Search in sources :

Example 6 with AddBuffEffect

use of eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.

the class PanicRule method initEffects.

@Override
public void initEffects() {
    ImmobilizeEffect effect = new ImmobilizeEffect();
    effects = new AddBuffEffect(retain_conditions, buffTypeName, effect);
}
Also used : AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) ImmobilizeEffect(eidolons.ability.effects.oneshot.status.ImmobilizeEffect)

Example 7 with AddBuffEffect

use of eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.

the class TreasonRule method initEffects.

@Override
public void initEffects() {
    OwnershipChangeEffect effect = new OwnershipChangeEffect(true);
    effects = new AddBuffEffect(retain_conditions, buffTypeName, effect);
}
Also used : AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) OwnershipChangeEffect(main.ability.effects.common.OwnershipChangeEffect)

Example 8 with AddBuffEffect

use of eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.

the class DC_CounterRule method applyEffects.

protected void applyEffects(Unit unit) {
    Effect effects = getWrappedEffects(unit);
    effects.apply(Ref.getSelfTargetingRefCopy(unit));
    if (effects instanceof AddBuffEffect) {
        ((AddBuffEffect) effects).getBuff().setCounterRef(getCounterName());
    }
// TODO animation?
// startContinuousAnimation();
// playAddAnimation();
// playIntensifyAnimation();
// playTickAnimation();
}
Also used : AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) 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)

Example 9 with AddBuffEffect

use of eidolons.ability.effects.attachment.AddBuffEffect 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 10 with AddBuffEffect

use of eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.

the class AuraEffect method applyThis.

/*
     *
     * so what really happens?
     *
     * maybe it's OK if it's not Spirit?
     *
     * There aren't really non-ValueMod effect variants, are there?
     * "Damage Aura"? Property Aura, e.g. demonic! :)
     */
public boolean applyThis() {
    if (!on) {
        return true;
    }
    if (game.isSimulation()) {
        return false;
    }
    if (continuous) {
        AutoTargeting targeting = new AutoTargeting(new DistanceCondition(radius.toString()));
        targeting.getConditions().add(ConditionMaster.getAliveCondition(KEYS.MATCH));
        if (onlyEnemiesOrAllies != null) {
            if (onlyEnemiesOrAllies) {
                targeting.getConditions().add(ConditionMaster.getEnemyCondition());
            } else {
                targeting.getConditions().add(ConditionMaster.getAllyCondition());
            }
        }
        // remove aura-bearer from targets list
        targeting.getConditions().add(new NotCondition(new RefCondition(KEYS.MATCH, KEYS.SOURCE)));
        AddBuffEffect buffEffect = new AddBuffEffect(getBuffType(), effect, true);
        Effects auraEffects = new Effects(new ConditionalEffect(ConditionMaster.getAliveCondition(KEYS.SOURCE), new CustomTargetEffect(targeting, buffEffect)));
        auraEffect = new AddBuffEffect(auraEffects);
        // auraEffect.setTransient(false);
        boolean results = auraEffect.apply(ref);
        if (results) {
            if (!notSelf) {
                Effect copy = effect.getCopy();
                copy.apply(Ref.getSelfTargetingRefCopy(ref.getSourceObj()));
            }
        }
        return results;
    }
    // preCheck?
    if (!initialized) {
        init();
    }
    return trigger.apply(ref);
}
Also used : ConditionalEffect(main.ability.effects.container.ConditionalEffect) AutoTargeting(main.elements.targeting.AutoTargeting) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) CustomTargetEffect(main.ability.effects.continuous.CustomTargetEffect) ZoneEffect(eidolons.ability.effects.containers.customtarget.ZoneEffect) AttachmentEffect(main.ability.effects.AttachmentEffect) ConditionalEffect(main.ability.effects.container.ConditionalEffect) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) Effect(main.ability.effects.Effect) MicroEffect(main.ability.effects.MicroEffect) AddTriggerEffect(eidolons.ability.effects.attachment.AddTriggerEffect) CustomTargetEffect(main.ability.effects.continuous.CustomTargetEffect) Effects(main.ability.effects.Effects)

Aggregations

AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)22 Effects (main.ability.effects.Effects)12 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)9 Effect (main.ability.effects.Effect)9 Ref (main.entity.Ref)6 OwnershipChangeEffect (main.ability.effects.common.OwnershipChangeEffect)5 Conditions (main.elements.conditions.Conditions)5 Formula (main.system.math.Formula)5 RollEffect (eidolons.ability.effects.oneshot.mechanic.RollEffect)4 AddTriggerEffect (eidolons.ability.effects.attachment.AddTriggerEffect)3 ModifyPropertyEffect (eidolons.ability.effects.common.ModifyPropertyEffect)3 ModifyCounterEffect (eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect)3 DC_Effect (eidolons.ability.effects.DC_Effect)2 WaveEffect (eidolons.ability.effects.containers.customtarget.WaveEffect)2 ZoneEffect (eidolons.ability.effects.containers.customtarget.ZoneEffect)2 BehaviorModeEffect (eidolons.ability.effects.continuous.BehaviorModeEffect)2 DealDamageEffect (eidolons.ability.effects.oneshot.DealDamageEffect)2 AttackEffect (eidolons.ability.effects.oneshot.attack.AttackEffect)2 RemoveBuffEffect (eidolons.ability.effects.oneshot.buff.RemoveBuffEffect)2 DrainEffect (eidolons.ability.effects.oneshot.mechanic.DrainEffect)2