Search in sources :

Example 16 with Effects

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

the class ForceRule method getForceEffects.

private static Effect getForceEffects(DC_ActiveObj action) {
    String force = String.valueOf(getForce(action));
    KnockdownEffect e = new KnockdownEffect(force);
    // PushEffect e1 = new PushEffect(force);
    // InterruptionEffect e2 = new InterruptionEffect(force);
    Effects effects = new Effects();
    // if ()
    // effects.add(e);
    effects.add(new ForceEffect(force, action.isAttackAny()));
    return effects;
}
Also used : ForceEffect(eidolons.ability.effects.oneshot.attack.force.ForceEffect) KnockdownEffect(eidolons.ability.effects.oneshot.attack.force.KnockdownEffect) Effects(main.ability.effects.Effects)

Example 17 with Effects

use of main.ability.effects.Effects 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));
}
Also used : INJURY(main.content.CONTENT_CONSTS2.INJURY) InjuryEffect(eidolons.ability.effects.oneshot.rule.InjuryEffect) Effects(main.ability.effects.Effects)

Example 18 with Effects

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

the class DC_CounterRule method getWrappedEffects.

private Effect getWrappedEffects(Unit unit) {
    if (getEffect() == null)
        return new Effects();
    if (getBuffName() != null) {
        return getBuffEffect();
    }
    Effects effect = effectsCache.get(unit);
    if (effect == null) {
        effect = new Effects(ContinuousEffect.transformEffectToContinuous(getEffect()));
        effectsCache.put(unit, effect);
    }
    return effect;
}
Also used : Effects(main.ability.effects.Effects)

Example 19 with Effects

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

the class DivinationMaster method applyKnownSpellDivinationEffect.

private static void applyKnownSpellDivinationEffect(DC_SpellObj spell) {
    if (hero.checkPassive(UnitEnums.STANDARD_PASSIVES.DRUIDIC_VISIONS)) {
        Ref ref = Ref.getSelfTargetingRefCopy(hero);
        ref.setID(KEYS.SPELL, spell.getId());
        new ModifyValueEffect(PARAMS.C_ESSENCE, MOD.MODIFY_BY_CONST, DC_Formulas.DRUIDIC_VISIONS_ESSENCE).apply(ref);
        return;
    }
    if (hero.checkPassive(UnitEnums.STANDARD_PASSIVES.HOLY_PRAYER)) {
        Ref ref = Ref.getSelfTargetingRefCopy(hero);
        ref.setID(KEYS.SPELL, spell.getId());
        new ModifyValueEffect(PARAMS.C_MORALE, MOD.MODIFY_BY_CONST, DC_Formulas.HOLY_PRAYER_MORALE).apply(ref);
    // ++ REMOVE COOLDOWN FROM SPELL?
    }
    Ref ref = Ref.getSelfTargetingRefCopy(spell);
    AddBuffEffect buffEffect = new AddBuffEffect(BUFF_FAVORED, new Effects(new ModifyValueEffect(PARAMS.ESS_COST, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.FOC_REQ, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.FOC_COST, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.STA_COST, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.SPELLPOWER_MOD, MOD.MODIFY_BY_PERCENT, "25")));
    buffEffect.apply(ref);
    buffEffect.getBuff().setDuration((// TODO
    hero.getIntParam(PARAMS.CHARISMA) + // GRACE!
    hero.getIntParam(PARAMS.DIVINATION_MASTERY)) / 5);
    buffEffect.getBuff().setProperty(G_PROPS.STD_BOOLS, "" + GenericEnums.STD_BOOLS.STACKING, true);
}
Also used : AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) Ref(main.entity.Ref) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects)

Example 20 with Effects

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

the class PriorityManagerImpl method getSelfSpellPriority.

@Override
public int getSelfSpellPriority(Action action) {
    Effects effects = null;
    if (action instanceof AiQuickItemAction)
        effects = EffectFinder.getEffectsFromSpell(((DC_QuickItemAction) action.getActive()).getItem().getActives().get(0));
    else
        effects = EffectFinder.getEffectsFromSpell(action.getActive());
    if (effects.getEffects().isEmpty())
        return 0;
    setBasePriority(getUnitPriority(getUnit(), false));
    for (Effect e : effects) {
        addEffectPriority(action, e);
    }
    return priority;
}
Also used : AiQuickItemAction(eidolons.game.battlecraft.ai.elements.actions.AiQuickItemAction) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) RollEffect(eidolons.ability.effects.oneshot.mechanic.RollEffect) Effect(main.ability.effects.Effect) DealDamageEffect(eidolons.ability.effects.oneshot.DealDamageEffect) OwnershipChangeEffect(main.ability.effects.common.OwnershipChangeEffect) InstantDeathEffect(main.ability.effects.oneshot.InstantDeathEffect) ModifyCounterEffect(eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect) DrainEffect(eidolons.ability.effects.oneshot.mechanic.DrainEffect) AttackEffect(eidolons.ability.effects.oneshot.attack.AttackEffect) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) RaiseEffect(eidolons.ability.effects.oneshot.unit.RaiseEffect) BehaviorModeEffect(eidolons.ability.effects.continuous.BehaviorModeEffect) SummonEffect(eidolons.ability.effects.oneshot.unit.SummonEffect) 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