magarena/release/Magarena/scripts/Archdemon_of_Unx.groovy

29 lines
1.0 KiB
Groovy
Raw Normal View History

2013-09-02 07:03:29 -07:00
[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
this,
"PN sacrifices a non-Zombie creature, then put a 2/2 black Zombie creature token onto the battlefield."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
game.addEvent(new MagicSacrificePermanentEvent(
event.getSource(),
player,
MagicTargetChoice.SACRIFICE_NON_ZOMBIE
));
game.doAction(new MagicPlayTokenAction(
player,
2013-10-22 20:51:09 -07:00
TokenCardDefinitions.get("2/2 black Zombie creature token")
2013-09-02 07:03:29 -07:00
));
}
}
]