magarena/release/Magarena/scripts/Awakening_Zone.groovy

28 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-18 06:23:38 -07:00
[
new MagicAtUpkeepTrigger() {
2012-06-17 05:19:08 -07:00
@Override
2012-09-21 09:10:24 -07:00
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
2011-08-13 07:51:18 -07:00
new MagicEvent(
2012-09-21 09:10:24 -07:00
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.PLAY_TOKEN,
1,
2013-05-18 06:23:38 -07:00
MagicSimpleMayChoice.DEFAULT_YES
),
2012-09-21 09:10:24 -07:00
this,
2013-05-18 06:23:38 -07:00
"PN may\$ put a 0/1 colorless Eldrazi Spawn " +
2012-09-21 09:10:24 -07:00
"creature token onto the battlefield. It has " +
"\"Sacrifice this creature: Add {1} to your mana pool.\""
):
2011-09-04 01:19:43 -07:00
MagicEvent.NONE;
2012-06-17 05:19:08 -07:00
}
@Override
2013-05-18 06:23:38 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
2012-08-30 05:58:33 -07:00
game.doAction(new MagicPlayTokenAction(event.getPlayer(),TokenCardDefinitions.get("Eldrazi Spawn")));
2012-06-17 05:19:08 -07:00
}
}
2013-05-18 06:23:38 -07:00
}
]