Search in sources :

Example 1 with ZoneEffect

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

the class AuraEffect method init.

private void init() {
    event_type = (continuous) ? STANDARD_EVENT_TYPE.UNIT_MOVED : STANDARD_EVENT_TYPE.UNIT_TURN_STARTED;
    Targeting t = new FixedTargeting(KEYS.SOURCE);
    Conditions conditions = new Conditions();
    if (additionalConditions != null) {
        conditions.add(additionalConditions);
    }
    if (!continuous) {
        conditions.add(ConditionMaster.getSelfTriggerCondition());
    } else {
    // Condition retainCondition = ConditionMaster
    // .getDistanceCondition("TARGET", "SOURCE", radius);
    // effect = new AddBuffEffect(retainCondition, null, effect);
    // conditions.add(ConditionMaster
    // .getDistanceCondition("EVENT_SOURCE", "SOURCE", radius));
    }
    ZoneEffect zone_effect = new ZoneEffect(effect, radius, onlyEnemiesOrAllies, notSelf);
    ActiveAbility ability = new ActiveAbility(t, zone_effect);
    trigger = new AddTriggerEffect(event_type, conditions, ability);
}
Also used : ActiveAbility(main.ability.ActiveAbility) FixedTargeting(main.elements.targeting.FixedTargeting) Targeting(main.elements.targeting.Targeting) AutoTargeting(main.elements.targeting.AutoTargeting) FixedTargeting(main.elements.targeting.FixedTargeting) ZoneEffect(eidolons.ability.effects.containers.customtarget.ZoneEffect) AddTriggerEffect(eidolons.ability.effects.attachment.AddTriggerEffect)

Example 2 with ZoneEffect

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

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

the class ActivesConstructor method wrapEffects.

public static Effect wrapEffects(EFFECTS_WRAP wrap, Effect effects, Entity entity) {
    Formula radius = new Formula(entity.getParam(G_PARAMS.RADIUS));
    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(wrap) {
        case CHAIN:
            break;
        case CUSTOM_ZONE_CROSS:
            break;
        case CUSTOM_ZONE_STAR:
            // };
            break;
        case ZONE:
            effects = new Effects(new ZoneEffect(effects, radius, allyOrEnemyOnly, notSelf));
            break;
        case SINGLE_BUFF:
            Effects buffEffects = new Effects();
            if (effects instanceof Effects) {
                for (Effect effect : (Effects) effects) {
                    if (effect instanceof AddBuffEffect) {
                        buffEffects.add(((AddBuffEffect) effect).getEffect());
                    } else {
                        buffEffects.add(effect);
                    }
                }
            } else {
                buffEffects.add(effects);
            }
            String buffName = entity.getProperty(PROPS.BUFF_NAME);
            if (buffName == null) {
            }
            effects = new AddBuffEffect(buffName, buffEffects);
            break;
        default:
            break;
    }
    return effects;
}
Also used : Formula(main.system.math.Formula) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) DC_Effect(eidolons.ability.effects.DC_Effect) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) RollEffect(eidolons.ability.effects.oneshot.mechanic.RollEffect) Effect(main.ability.effects.Effect) RayEffect(eidolons.ability.effects.containers.customtarget.RayEffect) WaveEffect(eidolons.ability.effects.containers.customtarget.WaveEffect) ZoneEffect(eidolons.ability.effects.containers.customtarget.ZoneEffect) Effects(main.ability.effects.Effects) ZoneEffect(eidolons.ability.effects.containers.customtarget.ZoneEffect)

Aggregations

ZoneEffect (eidolons.ability.effects.containers.customtarget.ZoneEffect)3 RayEffect (eidolons.ability.effects.containers.customtarget.RayEffect)2 WaveEffect (eidolons.ability.effects.containers.customtarget.WaveEffect)2 Effects (main.ability.effects.Effects)2 Formula (main.system.math.Formula)2 DC_Effect (eidolons.ability.effects.DC_Effect)1 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)1 AddTriggerEffect (eidolons.ability.effects.attachment.AddTriggerEffect)1 RollEffect (eidolons.ability.effects.oneshot.mechanic.RollEffect)1 ActiveAbility (main.ability.ActiveAbility)1 Effect (main.ability.effects.Effect)1 AutoTargeting (main.elements.targeting.AutoTargeting)1 FixedTargeting (main.elements.targeting.FixedTargeting)1 Targeting (main.elements.targeting.Targeting)1