magarena/release/Magarena/scripts/Promise_of_Bunrei.groovy

27 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-19 01:16:06 -07:00
[
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
2013-06-06 06:36:05 -07:00
return (otherPermanent.isCreature() &&
otherPermanent.isFriend(permanent)) ?
2013-05-19 01:16:06 -07:00
new MagicEvent(
permanent,
this,
2013-06-23 18:29:26 -07:00
"Sacrifice SN. If you do, " +
2013-05-19 01:16:06 -07:00
"put four 1/1 colorless Spirit creature tokens onto the battlefield."
):
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2013-05-19 01:16:06 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent permanent=event.getPermanent();
final MagicPlayer player=event.getPlayer();
if (player.controlsPermanent(permanent)) {
game.doAction(new MagicSacrificeAction(permanent));
game.doAction(new MagicPlayTokensAction(player,TokenCardDefinitions.get("Spirit1"),4));
}
}
}
]