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);
}
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;
}
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;
}
Aggregations