magarena/release/Magarena/scripts/Griffin_Guide.groovy

21 lines
766 B
Groovy

[
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent died) {
return permanent.getEnchantedCreature() == died ?
new MagicEvent(
permanent,
this,
"Put a 2/2 white Griffin creature token with flying onto the battlefield."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
game.doAction(new MagicPlayTokenAction(event.getPlayer(),TokenCardDefinitions.get("Griffin")));
}
}
]