Search in sources :

Example 1 with MASTERY_RANK

use of main.content.enums.entity.SkillEnums.MASTERY_RANK in project Eidolons by IDemiurge.

the class DC_RequirementsManager method generateSkillRequirements.

public Requirements generateSkillRequirements(Entity type, int mode) {
    if (mode == RANK_MODE) {
        return generateSkillRankRequirements(type);
    }
    String cost = HeroManager.getCost(type, getHero());
    Condition xpReq = ConditionMaster.getParamCondition(1, PARAMS.XP, PARAMS.XP_COST);
    String mastery = type.getProperty(G_PROPS.MASTERY);
    MASTERY_RANK rank = getRank(type.getIntParam("SKILL_DIFFICULTY"));
    Condition rankReq = ConditionMaster.getParamCondition(mastery, rank.getMasteryReq() + "");
    ((NumericCondition) xpReq).setComparingValue(new Formula("" + cost));
    return new Requirements(new Conditions(new SkillPointCondition(), ConditionMaster.getPropCondition(PROPS.SKILLS, PROPS.SKILL_REQUIREMENTS, KEYS.SOURCE.toString(), KEYS.MATCH.toString()), rankReq, xpReq, // TODO OR CONDITION!
    ConditionMaster.getPropCondition(PROPS.SKILLS, PROPS.SKILL_OR_REQUIREMENTS, KEYS.SOURCE.toString(), KEYS.MATCH.toString())), InfoMaster.NOT_ENOUGH_MASTERY, InfoMaster.getPropReasonString(type, PROPS.SKILL_REQUIREMENTS), InfoMaster.getSkillRankReqString(mastery, type, rank), InfoMaster.getParamReasonString(type, PARAMS.XP, cost), InfoMaster.getOrReasonStringFromContainer(PROPS.SKILL_OR_REQUIREMENTS, type.getProperty(PROPS.SKILL_OR_REQUIREMENTS)));
}
Also used : ClassTreeCondition(eidolons.ability.conditions.req.ClassTreeCondition) SkillPointCondition(eidolons.ability.conditions.req.SkillPointCondition) ValueGroupCondition(eidolons.ability.conditions.req.ValueGroupCondition) MultiClassCondition(eidolons.ability.conditions.req.MultiClassCondition) MASTERY_RANK(main.content.enums.entity.SkillEnums.MASTERY_RANK) Formula(main.system.math.Formula) SkillPointCondition(eidolons.ability.conditions.req.SkillPointCondition)

Aggregations

ClassTreeCondition (eidolons.ability.conditions.req.ClassTreeCondition)1 MultiClassCondition (eidolons.ability.conditions.req.MultiClassCondition)1 SkillPointCondition (eidolons.ability.conditions.req.SkillPointCondition)1 ValueGroupCondition (eidolons.ability.conditions.req.ValueGroupCondition)1 MASTERY_RANK (main.content.enums.entity.SkillEnums.MASTERY_RANK)1 Formula (main.system.math.Formula)1