use of main.ability.effects.container.SpecialTargetingEffect 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;
}
use of main.ability.effects.container.SpecialTargetingEffect in project Eidolons by IDemiurge.
the class CoordinatesMaster method getZoneCoordinates.
public static Set<Coordinates> getZoneCoordinates(DC_ActiveObj entity) {
Effect effect = EffectFinder.getFirstEffectOfClass(entity, SpecialTargetingEffect.class);
Set<Coordinates> coordinates = null;
if (effect != null) {
SpecialTargetingEffect targetEffect = (SpecialTargetingEffect) effect;
coordinates = targetEffect.getCoordinates();
}
return coordinates;
}
use of main.ability.effects.container.SpecialTargetingEffect in project Eidolons by IDemiurge.
the class TargetingMaster method getZoneEffect.
public static Targeting getZoneEffect(DC_ActiveObj active) {
List<Effect> zoneEffects = EffectFinder.getEffectsOfClass(active, SpecialTargetingEffect.class);
if (!zoneEffects.isEmpty()) {
SpecialTargetingEffect zoneEffect = (SpecialTargetingEffect) zoneEffects.get(0);
zoneEffect.setRef(active.getRef());
zoneEffect.initTargeting();
return zoneEffect.getTargeting();
}
return active.getTargeting();
}
Aggregations