use of main.ability.effects.Effect.UPKEEP_FAIL_ACTION in project Eidolons by IDemiurge.
the class UpkeepRule method addUpkeep.
public static void addUpkeep(Obj payObj) {
Obj spell = payObj.getRef().getObj(KEYS.ACTIVE);
if (spell == null) {
return;
}
Obj abil = payObj.getRef().getObj(KEYS.ABILITY);
if (abil != null) {
if (abil instanceof PassiveAbilityObj) {
return;
}
}
String property = spell.getProperty(PROPS.UPKEEP_FAIL_ACTION);
if (new EnumMaster<UPKEEP_FAIL_ACTION>().retrieveEnumConst(UPKEEP_FAIL_ACTION.class, property) == null) {
property = UPKEEP_FAIL_ACTION.DEATH + "";
}
payObj.setProperty(PROPS.UPKEEP_FAIL_ACTION, property);
for (PARAMETER p : ValuePages.UPKEEP_PARAMETERS) {
Integer param = spell.getIntParam(p);
if (param > 0) {
payObj.getType().setParam(p, param);
}
}
}
Aggregations