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)));
}
Aggregations