Search in sources :

Example 1 with RayEffect

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

Aggregations

RayEffect (eidolons.ability.effects.containers.customtarget.RayEffect)1 WaveEffect (eidolons.ability.effects.containers.customtarget.WaveEffect)1 ZoneEffect (eidolons.ability.effects.containers.customtarget.ZoneEffect)1 Effects (main.ability.effects.Effects)1 Formula (main.system.math.Formula)1