Search in sources :

Example 1 with InterruptEffect

use of main.ability.effects.triggered.InterruptEffect in project Eidolons by IDemiurge.

the class InterruptRule method interrupt.

public static void interrupt(Unit target) {
    getEffect().apply(Ref.getSelfTargetingRefCopy(target));
    new InterruptEffect().apply(Ref.getSelfTargetingRefCopy(target));
}
Also used : InterruptEffect(main.ability.effects.triggered.InterruptEffect)

Example 2 with InterruptEffect

use of main.ability.effects.triggered.InterruptEffect in project Eidolons by IDemiurge.

the class BindingSpellEffect method applyThis.

@Override
public boolean applyThis() {
    // TODO Auto-generated method stub
    Effects effects = null;
    if (!shareOrRedirect) {
        effects = new Effects(new CustomTargetEffect(new FixedTargeting(KEYS.TARGET2), new DuplicateEffect(true)), new CustomTargetEffect(new FixedTargeting(KEYS.TARGET), new InterruptEffect()));
    }
    Effect EFFECT = new DuplicateSpellEffect(KEYS.TARGET.name(), false, true);
    EFFECT.setTargetGroup(ref.getGroup());
    effects = new Effects(EFFECT);
    Event.STANDARD_EVENT_TYPE event_type = Event.STANDARD_EVENT_TYPE.SPELL_RESOLVED;
    conditions.add(ConditionMaster.getPropCondition("EVENT_SPELL", G_PROPS.SPELL_TAGS, SpellEnums.SPELL_TAGS.MIND_AFFECTING.name()));
    return false;
}
Also used : InterruptEffect(main.ability.effects.triggered.InterruptEffect) FixedTargeting(main.elements.targeting.FixedTargeting) CustomTargetEffect(main.ability.effects.continuous.CustomTargetEffect) DuplicateEffect(eidolons.ability.effects.continuous.triggered.DuplicateEffect) DuplicateSpellEffect(eidolons.ability.effects.continuous.triggered.DuplicateSpellEffect) Event(main.game.logic.event.Event) DC_Effect(eidolons.ability.effects.DC_Effect) DuplicateSpellEffect(eidolons.ability.effects.continuous.triggered.DuplicateSpellEffect) DuplicateEffect(eidolons.ability.effects.continuous.triggered.DuplicateEffect) Effect(main.ability.effects.Effect) InterruptEffect(main.ability.effects.triggered.InterruptEffect) CustomTargetEffect(main.ability.effects.continuous.CustomTargetEffect) Effects(main.ability.effects.Effects)

Example 3 with InterruptEffect

use of main.ability.effects.triggered.InterruptEffect in project Eidolons by IDemiurge.

the class BlockEffect method applyThis.

@Override
public boolean applyThis() {
    // effect interrupt
    String OBJ_REF = null;
    switch(BLOCK_TYPE) {
        case ATTACK:
            event_type = Event.STANDARD_EVENT_TYPE.UNIT_IS_BEING_ATTACKED;
            conditions.add(new RefCondition(KEYS.EVENT_TARGET, KEYS.SOURCE, false));
            break;
        case HOSTILE_ACTION:
            event_type = Event.STANDARD_EVENT_TYPE.HOSTILE_ACTION;
            conditions.add(new RefCondition(KEYS.EVENT_TARGET, KEYS.SOURCE, false));
            break;
        case DAMAGE:
            event_type = Event.STANDARD_EVENT_TYPE.UNIT_IS_BEING_DEALT_TOUGHNESS_DAMAGE;
            break;
        case DAMAGE_FROM_SOURCE:
            break;
        case DAMAGE_TYPE:
            break;
        case HOSTILE_SPELLS:
            event_type = Event.STANDARD_EVENT_TYPE.SPELL_BEING_RESOLVED;
            conditions.add(new RefCondition(KEYS.EVENT_TARGET, KEYS.TARGET, false));
            OBJ_REF = Ref.KEYS.SPELL.name();
            break;
        case SPELLS_FROM_SOURCE:
            break;
        default:
            break;
    }
    effects = new Effects(new InterruptEffect(OBJ_REF));
    ActiveAbility abilities = new ActiveAbility(new FixedTargeting(KEYS.SOURCE), effects);
    abilities.setRef(ref);
    new AddTriggerEffect(event_type, conditions, abilities).apply(ref);
    return true;
}
Also used : ActiveAbility(main.ability.ActiveAbility) InterruptEffect(main.ability.effects.triggered.InterruptEffect) FixedTargeting(main.elements.targeting.FixedTargeting) RefCondition(main.elements.conditions.RefCondition) AddTriggerEffect(eidolons.ability.effects.attachment.AddTriggerEffect)

Aggregations

InterruptEffect (main.ability.effects.triggered.InterruptEffect)3 FixedTargeting (main.elements.targeting.FixedTargeting)2 DC_Effect (eidolons.ability.effects.DC_Effect)1 AddTriggerEffect (eidolons.ability.effects.attachment.AddTriggerEffect)1 DuplicateEffect (eidolons.ability.effects.continuous.triggered.DuplicateEffect)1 DuplicateSpellEffect (eidolons.ability.effects.continuous.triggered.DuplicateSpellEffect)1 ActiveAbility (main.ability.ActiveAbility)1 Effect (main.ability.effects.Effect)1 Effects (main.ability.effects.Effects)1 CustomTargetEffect (main.ability.effects.continuous.CustomTargetEffect)1 RefCondition (main.elements.conditions.RefCondition)1 Event (main.game.logic.event.Event)1