magarena/release/Magarena/scripts/Sprouting_Thrinax.groovy

20 lines
801 B
Groovy

[
new MagicWhenPutIntoGraveyardTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
return (triggerData.fromLocation == MagicLocationType.Play) ?
new MagicEvent(
permanent,
this,
"PN puts three 1/1 green Saproling creature tokens onto the battlefield."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player=event.getPlayer();
game.doAction(new MagicPlayTokensAction(player,TokenCardDefinitions.get("Saproling"), 3));
}
}
]