magarena/release/Magarena/scripts/Thragtusk.groovy

19 lines
701 B
Groovy

[
new MagicWhenLeavesPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicRemoveFromPlayAction act) {
return act.isPermanent(permanent) ?
new MagicEvent(
permanent,
this,
"PN puts a 3/3 green Beast creature token onto the battlefield."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayTokenAction(event.getPlayer(), TokenCardDefinitions.get("Beast3")));
}
}
]