Search in sources :

Example 1 with GatewayEffect

use of eidolons.ability.effects.oneshot.unit.GatewayEffect in project Eidolons by IDemiurge.

the class AI_SpellMaster method getSummonedUnit.

public static ObjType getSummonedUnit(DC_ActiveObj active, Ref ref) {
    ObjType type;
    List<Effect> list = EffectFinder.getEffectsOfClass(active.getAbilities(), GatewayEffect.class);
    if (!list.isEmpty()) {
        GatewayEffect effect = (GatewayEffect) list.get(0);
        return DataManager.getType(effect.getUnitType(), C_OBJ_TYPE.BF_OBJ);
    }
    SummonEffect effect = null;
    try {
        effect = (SummonEffect) EffectFinder.getEffectsOfClass(active.getAbilities(), SummonEffect.class).get(0);
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    if (effect instanceof RaiseEffect) {
        RaiseEffect raiseEffect = (RaiseEffect) effect;
        effect.setRef(ref);
        return DataManager.getType(raiseEffect.getUnitType(), C_OBJ_TYPE.BF_OBJ);
    }
    if (effect != null) {
        type = DataManager.getType(effect.getTypeName(), C_OBJ_TYPE.BF_OBJ);
        return type;
    }
    if (effect instanceof RaiseEffect) {
        RaiseEffect raiseEffect = (RaiseEffect) effect;
        return DataManager.getType(raiseEffect.getUnitType(), C_OBJ_TYPE.BF_OBJ);
    }
    if (effect instanceof RaiseEffect) {
        RaiseEffect raiseEffect = (RaiseEffect) effect;
        return DataManager.getType(raiseEffect.getUnitType(), C_OBJ_TYPE.BF_OBJ);
    }
    return null;
}
Also used : SummonEffect(eidolons.ability.effects.oneshot.unit.SummonEffect) RaiseEffect(eidolons.ability.effects.oneshot.unit.RaiseEffect) ObjType(main.entity.type.ObjType) GatewayEffect(eidolons.ability.effects.oneshot.unit.GatewayEffect) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) WaveEffect(eidolons.ability.effects.containers.customtarget.WaveEffect) DrainEffect(eidolons.ability.effects.oneshot.mechanic.DrainEffect) GatewayEffect(eidolons.ability.effects.oneshot.unit.GatewayEffect) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) ShapeEffect(eidolons.ability.effects.containers.customtarget.ShapeEffect) RaiseEffect(eidolons.ability.effects.oneshot.unit.RaiseEffect) BehaviorModeEffect(eidolons.ability.effects.continuous.BehaviorModeEffect) MoveEffect(eidolons.ability.effects.oneshot.move.MoveEffect) SpecialTargetingEffect(main.ability.effects.container.SpecialTargetingEffect) Effect(main.ability.effects.Effect) DealDamageEffect(eidolons.ability.effects.oneshot.DealDamageEffect) OwnershipChangeEffect(main.ability.effects.common.OwnershipChangeEffect) CreateObjectEffect(eidolons.ability.effects.oneshot.unit.CreateObjectEffect) SummonEffect(eidolons.ability.effects.oneshot.unit.SummonEffect) InstantDeathEffect(main.ability.effects.oneshot.InstantDeathEffect) ModifyCounterEffect(eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect)

Aggregations

AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)1 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)1 ShapeEffect (eidolons.ability.effects.containers.customtarget.ShapeEffect)1 WaveEffect (eidolons.ability.effects.containers.customtarget.WaveEffect)1 BehaviorModeEffect (eidolons.ability.effects.continuous.BehaviorModeEffect)1 DealDamageEffect (eidolons.ability.effects.oneshot.DealDamageEffect)1 DrainEffect (eidolons.ability.effects.oneshot.mechanic.DrainEffect)1 ModifyCounterEffect (eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect)1 MoveEffect (eidolons.ability.effects.oneshot.move.MoveEffect)1 CreateObjectEffect (eidolons.ability.effects.oneshot.unit.CreateObjectEffect)1 GatewayEffect (eidolons.ability.effects.oneshot.unit.GatewayEffect)1 RaiseEffect (eidolons.ability.effects.oneshot.unit.RaiseEffect)1 SummonEffect (eidolons.ability.effects.oneshot.unit.SummonEffect)1 Effect (main.ability.effects.Effect)1 OwnershipChangeEffect (main.ability.effects.common.OwnershipChangeEffect)1 SpecialTargetingEffect (main.ability.effects.container.SpecialTargetingEffect)1 InstantDeathEffect (main.ability.effects.oneshot.InstantDeathEffect)1 ObjType (main.entity.type.ObjType)1