magarena/release/Magarena/scripts/Awakening_Zone.groovy

28 lines
1.1 KiB
Groovy

[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.PLAY_TOKEN,
1,
MagicSimpleMayChoice.DEFAULT_YES
),
this,
"PN may\$ put a 0/1 colorless Eldrazi Spawn " +
"creature token onto the battlefield. It has " +
"\"Sacrifice this creature: Add {1} to your mana pool.\""
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicPlayTokenAction(event.getPlayer(),TokenCardDefinitions.get("Eldrazi Spawn")));
}
}
}
]