use of main.ability.Ability in project Eidolons by IDemiurge.
the class DC_FeatObj method applyRank.
private void applyRank() {
Integer rank = getRank();
if (rank == 0) {
return;
}
Integer mod = rank * getRankFormulaMod();
for (AbilityObj p : getPassives()) {
// will affect AddParam effects?
for (Ability a : p.getAbilities()) {
for (Effect ef : a.getEffects()) {
try {
ef.resetOriginalFormula();
ef.appendFormulaByMod(100 + mod);
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
// some exceptions?
/*
* how widely will this be used?
* mostly on simple low-level skills...
* but also on auras I guess...
* the point is to make things flexible, deeply customizable, and viable for
* no-magic heroes...
*
* it's true that with the amount of Masteries/Skills I may not need this on lower
* levels, but at some point I will!
*
* how will the rank be saved into hero data?
* >> (var)
* >> special prop
* >> prop per rank #
*/
}
}
}
for (PARAMETER attr : ContentManager.getAttributes()) {
PARAMS param = (PARAMS) attr;
Integer value = getIntParam(param, true);
if (value <= 0) {
continue;
}
value += Math.round(value * mod / 100);
setParam(param, value);
}
// modifyHeroParameters();
for (PARAMETER param : DC_ContentManager.getFeatModifyingParams()) {
Integer value = getIntParam(param, true);
if (value == 0) {
continue;
}
value += Math.round(value * mod / 100);
setParam(param, value);
}
Integer sdMod = rank * getIntParam(PARAMS.RANK_SD_MOD);
setParam(PARAMS.SKILL_DIFFICULTY, getIntParam(PARAMS.SKILL_DIFFICULTY, true));
modifyParamByPercent(PARAMS.SKILL_DIFFICULTY, sdMod);
rankApplied = true;
}
Aggregations