magarena/release/Magarena/scripts/Elephant_Guide.groovy

19 lines
703 B
Groovy

[
new MagicWhenOtherDiesTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent died) {
return (permanent.getEnchantedCreature()==died) ?
new MagicEvent(
permanent,
this,
"Put a 3/3 green Elephant 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("Elephant")));
}
}
]