magarena/release/Magarena/scripts/Brink_of_Disaster.groovy

23 lines
799 B
Groovy
Raw Normal View History

2013-03-17 23:08:14 -07:00
[
new MagicWhenBecomesTappedTrigger() {
2012-06-17 05:19:08 -07:00
@Override
2012-10-07 02:25:22 -07:00
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent tapped) {
2012-06-17 05:19:08 -07:00
final MagicPermanent enchantedPermanent = permanent.getEnchantedCreature();
2012-10-07 02:25:22 -07:00
return (enchantedPermanent == tapped) ?
2011-09-09 08:06:10 -07:00
new MagicEvent(
2012-10-07 02:25:22 -07:00
permanent,
enchantedPermanent,
this,
"Destroy RN."
):
2011-09-09 08:06:10 -07:00
MagicEvent.NONE;
2012-06-17 05:19:08 -07:00
}
@Override
public void executeEvent(
2011-09-09 08:06:10 -07:00
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
game.doAction(new MagicDestroyAction(event.getRefPermanent()));
2012-06-17 05:19:08 -07:00
}
2013-03-17 23:08:14 -07:00
}
]