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