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