Search in sources :

Example 1 with ShapeEffect

use of eidolons.ability.effects.containers.customtarget.ShapeEffect in project Eidolons by IDemiurge.

the class AI_SpellMaster method getZoneLogic.

private static AI_LOGIC getZoneLogic(DC_ActiveObj spell) {
    List<Effect> zoneEffects = EffectFinder.getEffectsOfClass(spell, SpecialTargetingEffect.class);
    if (!zoneEffects.isEmpty()) {
        for (Effect effect : zoneEffects) {
            SpecialTargetingEffect zoneEffect = (SpecialTargetingEffect) effect;
            if (EffectFinder.check(zoneEffect.getEffect(), DealDamageEffect.class)) {
                if (zoneEffect instanceof WaveEffect) {
                    return AiEnums.AI_LOGIC.AUTO_DAMAGE;
                }
                if (zoneEffect instanceof ShapeEffect) {
                    return AiEnums.AI_LOGIC.AUTO_DAMAGE;
                }
                if (spell.getTargetingMode() == AbilityEnums.TARGETING_MODE.NOVA) {
                    return AiEnums.AI_LOGIC.AUTO_DAMAGE;
                }
                if (spell.getTargetingMode() == AbilityEnums.TARGETING_MODE.SPRAY) {
                    return AiEnums.AI_LOGIC.AUTO_DAMAGE;
                }
                if (spell.getTargetingMode() == AbilityEnums.TARGETING_MODE.WAVE) {
                    return AiEnums.AI_LOGIC.AUTO_DAMAGE;
                }
                return AiEnums.AI_LOGIC.DAMAGE_ZONE;
            }
            if (EffectFinder.check(zoneEffect.getEffect(), ModifyValueEffect.class)) {
                if (isModifyValueEffectPositive(spell, zoneEffect)) {
                    return AiEnums.AI_LOGIC.RESTORE_ZONE;
                } else {
                    return AiEnums.AI_LOGIC.DEBILITATE_ZONE;
                }
            }
            if (EffectFinder.check(zoneEffect.getEffect(), ModifyCounterEffect.class)) {
                Effect e = EffectFinder.getEffectsOfClass(zoneEffect.getEffect(), ModifyCounterEffect.class).get(0);
                ModifyCounterEffect counterEffect = (ModifyCounterEffect) e;
                if (isCounterEffectPositive(spell, counterEffect)) {
                    return AiEnums.AI_LOGIC.RESTORE_ZONE;
                } else {
                    return AiEnums.AI_LOGIC.DEBILITATE_ZONE;
                }
            }
        }
    }
    return null;
}
Also used : ModifyCounterEffect(eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect) SpecialTargetingEffect(main.ability.effects.container.SpecialTargetingEffect) WaveEffect(eidolons.ability.effects.containers.customtarget.WaveEffect) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) WaveEffect(eidolons.ability.effects.containers.customtarget.WaveEffect) DrainEffect(eidolons.ability.effects.oneshot.mechanic.DrainEffect) GatewayEffect(eidolons.ability.effects.oneshot.unit.GatewayEffect) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) ShapeEffect(eidolons.ability.effects.containers.customtarget.ShapeEffect) RaiseEffect(eidolons.ability.effects.oneshot.unit.RaiseEffect) BehaviorModeEffect(eidolons.ability.effects.continuous.BehaviorModeEffect) MoveEffect(eidolons.ability.effects.oneshot.move.MoveEffect) SpecialTargetingEffect(main.ability.effects.container.SpecialTargetingEffect) Effect(main.ability.effects.Effect) DealDamageEffect(eidolons.ability.effects.oneshot.DealDamageEffect) OwnershipChangeEffect(main.ability.effects.common.OwnershipChangeEffect) CreateObjectEffect(eidolons.ability.effects.oneshot.unit.CreateObjectEffect) SummonEffect(eidolons.ability.effects.oneshot.unit.SummonEffect) InstantDeathEffect(main.ability.effects.oneshot.InstantDeathEffect) ModifyCounterEffect(eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect) ShapeEffect(eidolons.ability.effects.containers.customtarget.ShapeEffect)

Aggregations

AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)1 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)1 ShapeEffect (eidolons.ability.effects.containers.customtarget.ShapeEffect)1 WaveEffect (eidolons.ability.effects.containers.customtarget.WaveEffect)1 BehaviorModeEffect (eidolons.ability.effects.continuous.BehaviorModeEffect)1 DealDamageEffect (eidolons.ability.effects.oneshot.DealDamageEffect)1 DrainEffect (eidolons.ability.effects.oneshot.mechanic.DrainEffect)1 ModifyCounterEffect (eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect)1 MoveEffect (eidolons.ability.effects.oneshot.move.MoveEffect)1 CreateObjectEffect (eidolons.ability.effects.oneshot.unit.CreateObjectEffect)1 GatewayEffect (eidolons.ability.effects.oneshot.unit.GatewayEffect)1 RaiseEffect (eidolons.ability.effects.oneshot.unit.RaiseEffect)1 SummonEffect (eidolons.ability.effects.oneshot.unit.SummonEffect)1 Effect (main.ability.effects.Effect)1 OwnershipChangeEffect (main.ability.effects.common.OwnershipChangeEffect)1 SpecialTargetingEffect (main.ability.effects.container.SpecialTargetingEffect)1 InstantDeathEffect (main.ability.effects.oneshot.InstantDeathEffect)1