use of main.content.CONTENT_CONSTS2.INJURY in project Eidolons by IDemiurge.
the class InjuryEffect method applyThis.
@Override
public boolean applyThis() {
int mod = 100 - getTarget().getIntParam(PARAMS.INJURY_RESISTANCE);
if (mod <= 0) {
return true;
}
INJURY injury;
if (template != null) {
injury = template;
} else {
injury = getRandomInjury();
}
// preCheck applicable
getTarget().addProperty(PROPS.INJURIES, StringMaster.getWellFormattedString(injury.toString()));
Effects effects = EffectFinder.initParamModEffects(injury.getModString(), ref);
// TODO ++ PROPS
if (mod != 100) {
effects.appendFormulaByMod(mod);
}
effects.apply(ref);
return true;
}
use of main.content.CONTENT_CONSTS2.INJURY in project Eidolons by IDemiurge.
the class InjuryRule method applyOldWounds.
public static void applyOldWounds(Unit hero) {
Effects effects = new Effects();
for (String substring : StringMaster.open(hero.getProperty(PROPS.INJURIES))) {
INJURY template = new EnumMaster<INJURY>().retrieveEnumConst(INJURY.class, substring);
effects.add(new InjuryEffect(template, true));
}
effects.apply(Ref.getSelfTargetingRefCopy(hero));
}
Aggregations