magarena/release/Magarena/scripts/Niblis_of_the_Urn.groovy

27 lines
990 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
2013-05-29 23:36:18 -07:00
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent == creature) ?
new MagicEvent(
permanent,
new MagicMayChoice(MagicTargetChoice.NEG_TARGET_CREATURE),
2013-06-22 01:49:43 -07:00
MagicTapTargetPicker.Tap,
2013-05-29 23:36:18 -07:00
this,
2013-06-15 07:27:32 -07:00
"PN may\$ tap target creature\$."
):
2013-05-29 23:36:18 -07:00
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicTapAction(creature,true));
}
});
}
2013-06-23 18:29:26 -07:00
}
2013-05-29 23:36:18 -07:00
}
2013-04-12 19:58:51 -07:00
]