Search in sources :

Example 31 with Effects

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;
}
Also used : AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) BuffType(main.entity.type.BuffType) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects)

Example 32 with Effects

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;
}
Also used : RemoveBuffEffect(eidolons.ability.effects.oneshot.buff.RemoveBuffEffect) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects)

Example 33 with Effects

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());
}
Also used : STATUS(main.content.enums.entity.UnitEnums.STATUS) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) ContinuousEffect(main.ability.effects.continuous.ContinuousEffect) Effect(main.ability.effects.Effect) AddStatusEffect(main.ability.effects.common.AddStatusEffect) ModifyCounterEffect(eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect) CustomTargetEffect(main.ability.effects.continuous.CustomTargetEffect) Effects(main.ability.effects.Effects) AddStatusEffect(main.ability.effects.common.AddStatusEffect)

Example 34 with Effects

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();
}
Also used : Effects(main.ability.effects.Effects)

Example 35 with Effects

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;
}
Also used : Formula(main.system.math.Formula) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects)

Aggregations

Effects (main.ability.effects.Effects)50 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)23 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)18 Effect (main.ability.effects.Effect)17 RollEffect (eidolons.ability.effects.oneshot.mechanic.RollEffect)8 FixedTargeting (main.elements.targeting.FixedTargeting)8 Ref (main.entity.Ref)8 ActiveAbility (main.ability.ActiveAbility)7 Formula (main.system.math.Formula)7 AddTriggerEffect (eidolons.ability.effects.attachment.AddTriggerEffect)6 Targeting (main.elements.targeting.Targeting)6 DealDamageEffect (eidolons.ability.effects.oneshot.DealDamageEffect)5 AttackEffect (eidolons.ability.effects.oneshot.attack.AttackEffect)5 ModifyCounterEffect (eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect)5 DC_Effect (eidolons.ability.effects.DC_Effect)4 ZoneEffect (eidolons.ability.effects.containers.customtarget.ZoneEffect)4 BehaviorModeEffect (eidolons.ability.effects.continuous.BehaviorModeEffect)4 DrainEffect (eidolons.ability.effects.oneshot.mechanic.DrainEffect)4 RaiseEffect (eidolons.ability.effects.oneshot.unit.RaiseEffect)4 SummonEffect (eidolons.ability.effects.oneshot.unit.SummonEffect)4