use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class RaiseEffect method getRevenantBuff.
private AddBuffEffect getRevenantBuff() {
Effects effect = new Effects();
for (String s : StringMaster.open(getModifiedParam())) {
String varPart = VariableManager.getVarPart(s);
String valueName = s.replace(varPart, "");
String formula = StringMaster.cropParenthesises(varPart) + "*" + // MAX?
getParamModFormula(valueName);
effect.add(new ModifyValueEffect(valueName, MOD.MODIFY_BY_CONST, formula));
}
BuffType buffType = new BuffType(DataManager.getType(BUFF_NAME));
buffType.setName(BUFF_NAME + corpse.getName());
AddBuffEffect e = new AddBuffEffect(buffType, effect);
return e;
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class UnconsciousRule method getWakeUpEffect.
private static Effect getWakeUpEffect(Unit unit) {
Effects e = new Effects();
e.add(new ModifyValueEffect(PARAMS.C_N_OF_ACTIONS, MOD.MODIFY_BY_CONST, "-" + AP_PENALTY));
e.add(new ModifyValueEffect(DC_Engine.isAtbMode() ? PARAMS.C_INITIATIVE : PARAMS.C_INITIATIVE_BONUS, MOD.MODIFY_BY_CONST, "-" + INITIATIVE_PENALTY));
e.add(new RemoveBuffEffect("Unconscious"));
e.setRef(Ref.getSelfTargetingRefCopy(unit));
return e;
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class DC_CounterRule method initEffects.
public void initEffects() {
effects = new Effects();
STATUS status = getStatus();
if (status != null) {
effects.add(new AddStatusEffect(status.toString()));
}
Effect e = getEffect();
if (e != null) {
effects.add(e);
}
effects.setForcedLayer(getEffectLayer());
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class DC_CounterRule method removeEffects.
protected void removeEffects(Unit unit) {
Effects effects = effectsCache.get(unit);
if (effects == null) {
return;
}
effects.remove();
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class DiseaseRule method getSpecialRoundEffects.
@Override
protected Effect getSpecialRoundEffects() {
// spread effects could go here! :)
ModifyValueEffect modifyValueEffect = new ModifyValueEffect(PARAMS.C_STAMINA, MOD.MODIFY_BY_CONST, getCounterRef() + "*" + STAMINA_PER_COUNTER);
modifyValueEffect.setMin_max_formula(new Formula("0"));
Effects effects = new Effects(modifyValueEffect);
return effects;
}
Aggregations