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