Search in sources :

Example 1 with ATTRIBUTE

use of eidolons.content.DC_ContentManager.ATTRIBUTE in project Eidolons by IDemiurge.

the class HC_PointView method refresh.

@Override
public void refresh() {
    for (HC_PointComp comp : compMap.values()) {
        // if (comp.getParams().isMastery())
        // comp.setEntity(new ObjType(hero.getType()));
        // else //not so easy! I'll probably need another set of comps for
        // *final mastery* scores
        // 
        comp.setEntity((comp.isEditable()) ? buffer : hero);
        comp.refresh();
    }
    ATTRIBUTE attr = null;
    try {
        attr = HC_Master.getSelectedAttribute();
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    List<String> list = new ArrayList<>();
    if (attr != null) {
        list = AttributeMaster.getAttributeBonusInfoStrings(attr, hero);
    }
    paramBonusInfoComp.setTextLines(list);
    paramBonusInfoComp.refresh();
}
Also used : ATTRIBUTE(eidolons.content.DC_ContentManager.ATTRIBUTE) ArrayList(java.util.ArrayList)

Example 2 with ATTRIBUTE

use of eidolons.content.DC_ContentManager.ATTRIBUTE in project Eidolons by IDemiurge.

the class UnitLevelManager method getRandomParameter.

private PARAMETER getRandomParameter(boolean attrs, Entity newType) {
    PARAMETER param;
    if (attrs) {
        ATTRIBUTE a = new RandomWizard<ATTRIBUTE>().getObjectByWeight(newType.getProperty(PROPS.ATTRIBUTE_PROGRESSION), ATTRIBUTE.class);
        param = ContentManager.getBaseAttribute(ContentManager.getPARAM(a.toString()));
    } else {
        MASTERY mstr = new RandomWizard<MASTERY>().getObjectByWeight(newType.getProperty(PROPS.MASTERY_PROGRESSION), MASTERY.class);
        if (mstr == null) {
            return null;
        }
        // TODO complete the ENUM!!!
        param = ContentManager.getPARAM(mstr.toString());
        if (param == null) {
            param = ContentManager.findPARAM(mstr.toString());
        }
    }
    return param;
}
Also used : ATTRIBUTE(eidolons.content.DC_ContentManager.ATTRIBUTE) MASTERY(main.content.enums.entity.SkillEnums.MASTERY) PARAMETER(main.content.values.parameters.PARAMETER)

Example 3 with ATTRIBUTE

use of eidolons.content.DC_ContentManager.ATTRIBUTE in project Eidolons by IDemiurge.

the class DC_FeatObj method apply.

@Override
public void apply() {
    if (!checkApplyReqs()) {
        return;
    }
    if (game.isSimulation() || !paramStringParsed) {
        try {
            parseParamBonusString();
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
        }
    }
    applyRank();
    initHero();
    for (ATTRIBUTE attr : DC_ContentManager.getAttributeEnums()) {
        initAttr(attr);
    }
    // modifyHeroParameters();
    for (PARAMETER param : DC_ContentManager.getFeatModifyingParams()) {
        modifyHeroParam(param);
    }
    try {
        addParamBonuses();
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    try {
        applyParamMods();
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    activatePassives();
}
Also used : ATTRIBUTE(eidolons.content.DC_ContentManager.ATTRIBUTE) PARAMETER(main.content.values.parameters.PARAMETER)

Aggregations

ATTRIBUTE (eidolons.content.DC_ContentManager.ATTRIBUTE)3 PARAMETER (main.content.values.parameters.PARAMETER)2 ArrayList (java.util.ArrayList)1 MASTERY (main.content.enums.entity.SkillEnums.MASTERY)1