Search in sources :

Example 11 with Effects

use of main.ability.effects.Effects in project Eidolons by IDemiurge.

the class TrapEffect method initEffects.

@Override
protected void initEffects() {
    if (effects == null) {
        Effect e = ActivesConstructor.getEffectsFromAbilityType(abilName);
        this.effects = new Effects(e);
    }
}
Also used : Effect(main.ability.effects.Effect) AddStatusEffect(main.ability.effects.common.AddStatusEffect) TriggerEffect(eidolons.ability.effects.continuous.triggered.TriggerEffect) Effects(main.ability.effects.Effects)

Example 12 with Effects

use of main.ability.effects.Effects in project Eidolons by IDemiurge.

the class VampirismEffect method applyThis.

@Override
public boolean applyThis() {
    if (conditions == null) {
        initConditions();
    }
    // TODO Auto-generated method stub
    // endurance damage; modify endurance only? above base?
    // if (triggerEffect!=null) triggerEffect.apply(ref); else {
    Targeting targeting = new FixedTargeting(KEYS.SOURCE);
    Effects effects = new Effects();
    if (restoreEndurance) {
        ModifyValueEffect effect = new ModifyValueEffect(PARAMS.C_ENDURANCE, code, formula.toString());
        if (!restoreEnduranceAboveBase) {
            effect.setMaxParam(PARAMS.ENDURANCE);
        }
        effects.add(effect);
    }
    if (restoreToughness) {
        ModifyValueEffect effect = new ModifyValueEffect(PARAMS.C_TOUGHNESS, code, formula.toString());
        if (!restoreToughnessAboveBase) {
            effect.setMaxParam(PARAMS.TOUGHNESS);
        }
        effects.add(effect);
    }
    if (fromEnduranceDamage) {
        ActiveAbility ability = new ActiveAbility(targeting, effects);
        new AddTriggerEffect(// TODO
        STANDARD_EVENT_TYPE.UNIT_IS_DEALT_ENDURANCE_DAMAGE, // damage?
        conditions, ability).apply(ref);
    }
    if (fromToughnessDamage) {
    }
    return true;
}
Also used : ActiveAbility(main.ability.ActiveAbility) FixedTargeting(main.elements.targeting.FixedTargeting) Targeting(main.elements.targeting.Targeting) FixedTargeting(main.elements.targeting.FixedTargeting) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects)

Example 13 with Effects

use of main.ability.effects.Effects in project Eidolons by IDemiurge.

the class UnconsciousRule method getUnconsciousEffect.

private static Effect getUnconsciousEffect(Unit unit) {
    Effects e = new Effects();
    // Effects effects = new Effects(new
    // AddStatusEffect(STATUS.UNCONSCIOUS));
    // e.add(new ModifyValueEffect(PARAMS.C_FOCUS, MODVAL_TYPE.SET, "0"));
    // e.add(new AddBuffEffect(BUFF_NAME, effects));
    e.add(new UnconsciousFallEffect());
    e.add(new UnconsciousBuffEffect());
    e.setRef(Ref.getSelfTargetingRefCopy(unit));
    return e;
}
Also used : UnconsciousFallEffect(eidolons.ability.effects.oneshot.rule.UnconsciousFallEffect) UnconsciousBuffEffect(eidolons.ability.effects.oneshot.rule.UnconsciousBuffEffect) Effects(main.ability.effects.Effects)

Example 14 with Effects

use of main.ability.effects.Effects in project Eidolons by IDemiurge.

the class WaterRule method initSubmergedEffects.

private Effects initSubmergedEffects(float factor) {
    Effects effects = new Effects();
    Formula formula = new Formula("x*50");
    effects.add(new ModifyValueEffect(PARAMS.STEALTH, MOD.MODIFY_BY_PERCENT, formula.substituteVarValue("x", factor + "").toString()));
    effects.add(new ModifyValueEffect(PARAMS.NOISE, MOD.MODIFY_BY_PERCENT, formula.substituteVarValue("x", factor + "").toString()));
    formula = new Formula("-x*50");
    effects.add(new ModifyValueEffect(PARAMS.DEFENSE, MOD.MODIFY_BY_PERCENT, formula.substituteVarValue("x", factor + "").toString()));
    effects.add(new ModifyValueEffect(PARAMS.FIRE_RESISTANCE, MOD.MODIFY_BY_CONST, formula.substituteVarValue("x", factor + "").toString()));
    return effects;
}
Also used : Formula(main.system.math.Formula) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects)

Example 15 with Effects

use of main.ability.effects.Effects in project Eidolons by IDemiurge.

the class DurabilityRule method getAttackItemDurabilityReductionEffects.

public static Effects getAttackItemDurabilityReductionEffects(int amount) {
    String source_ref = "{EVENT_SOURCE}";
    String target_ref = "{EVENT_TARGET}";
    return new Effects(new ConditionalEffect(new OrConditions(new ItemCondition(source_ref, ItemEnums.ITEM_SLOT.MAIN_HAND.getProp().getName()), new ItemCondition(source_ref, ItemEnums.ITEM_SLOT.OFF_HAND.getProp().getName())), new DurabilityReductionEffect(true, amount)), new ConditionalEffect(new ItemCondition(target_ref, ItemEnums.ITEM_SLOT.ARMOR.getProp().getName()), new DurabilityReductionEffect(false, amount)));
}
Also used : ConditionalEffect(main.ability.effects.container.ConditionalEffect) DurabilityReductionEffect(eidolons.ability.effects.oneshot.rule.DurabilityReductionEffect) OrConditions(main.elements.conditions.OrConditions) Effects(main.ability.effects.Effects) ItemCondition(eidolons.ability.conditions.req.ItemCondition)

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