Search in sources :

Example 1 with WaveEffect

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

the class ActivesConstructor method wrapEffects.

public static Effect wrapEffects(TARGETING_MODE mode, Effect effects, DC_ActiveObj entity) {
    Formula radius = new Formula(entity.getParam(G_PARAMS.RADIUS));
    Formula range = new Formula(entity.getParam(PARAMS.RANGE));
    Boolean allyOrEnemyOnly = null;
    if (entity.checkBool(GenericEnums.STD_BOOLS.NO_FRIENDLY_FIRE)) {
        allyOrEnemyOnly = false;
    }
    if (entity.checkBool(GenericEnums.STD_BOOLS.NO_ENEMY_FIRE)) {
        allyOrEnemyOnly = true;
    }
    boolean notSelf = entity.checkBool(GenericEnums.STD_BOOLS.NO_SELF_FIRE);
    switch(mode) {
        case SPRAY:
            effects = new WaveEffect(effects, radius, range, allyOrEnemyOnly, true, false, entity.checkBool(GenericEnums.STD_BOOLS.APPLY_THRU) ? C_OBJ_TYPE.BF : C_OBJ_TYPE.BF_OBJ);
            break;
        case WAVE:
            effects = new WaveEffect(effects, radius, range, allyOrEnemyOnly, true, true, // expanding
            entity.checkBool(GenericEnums.STD_BOOLS.APPLY_THRU) ? C_OBJ_TYPE.BF : C_OBJ_TYPE.BF_OBJ);
            // modifier?
            break;
        case RAY:
            effects = new RayEffect(effects);
            // ++ special conditions for allyOrEnemyOnly
            break;
        case DOUBLE:
            break;
        case MULTI:
            break;
        case TRIPPLE:
            break;
        case BLAST:
            if (// ideally, I
            entity.getIntParam(G_PARAMS.RADIUS) > 0) // shouldn't mix
            // up targeting
            // and effect
            // wrapping
            {
                effects = new ZoneEffect(effects, radius, allyOrEnemyOnly, notSelf);
            }
            break;
        case NOVA:
            // TODO
            effects = new Effects(new ZoneEffect(effects, radius, allyOrEnemyOnly, true));
            break;
        case SINGLE:
            break;
        case TRAP:
            break;
        default:
            break;
    }
    return effects;
}
Also used : RayEffect(eidolons.ability.effects.containers.customtarget.RayEffect) Formula(main.system.math.Formula) WaveEffect(eidolons.ability.effects.containers.customtarget.WaveEffect) Effects(main.ability.effects.Effects) ZoneEffect(eidolons.ability.effects.containers.customtarget.ZoneEffect)

Example 2 with WaveEffect

use of eidolons.ability.effects.containers.customtarget.WaveEffect 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

WaveEffect (eidolons.ability.effects.containers.customtarget.WaveEffect)2 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)1 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)1 RayEffect (eidolons.ability.effects.containers.customtarget.RayEffect)1 ShapeEffect (eidolons.ability.effects.containers.customtarget.ShapeEffect)1 ZoneEffect (eidolons.ability.effects.containers.customtarget.ZoneEffect)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 Effects (main.ability.effects.Effects)1 OwnershipChangeEffect (main.ability.effects.common.OwnershipChangeEffect)1 SpecialTargetingEffect (main.ability.effects.container.SpecialTargetingEffect)1 InstantDeathEffect (main.ability.effects.oneshot.InstantDeathEffect)1