magarena/release/Magarena/scripts/Tangle_Asp.groovy

24 lines
845 B
Groovy
Raw Normal View History

2013-05-29 22:40:24 -07:00
[
new MagicWhenBlocksOrBecomesBlockedTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocker) {
2013-04-12 19:32:25 -07:00
return new MagicEvent(
permanent,
permanent == blocker ? blocker.getBlockedCreature() : blocker,
2013-04-12 19:32:25 -07:00
this,
"Destroy RN at end of combat."
2013-04-12 19:32:25 -07:00
);
}
@Override
2013-05-29 22:40:24 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processRefPermanent(game, {
final MagicPermanent permanent ->
game.doAction(new MagicAddTriggerAction(
permanent,
MagicAtEndOfCombatTrigger.Destroy
))
} as MagicPermanentAction);
2013-04-12 19:32:25 -07:00
}
2013-05-29 22:40:24 -07:00
}
]