magarena/release/Magarena/scripts/Eyes_of_the_Wisent.groovy

24 lines
947 B
Groovy
Raw Normal View History

2013-06-08 03:18:38 -07:00
[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
2013-06-23 18:29:26 -07:00
return (permanent.isEnemy(cardOnStack) &&
cardOnStack.hasColor(MagicColor.Blue) &&
permanent.isController(game.getTurnPlayer())) ?
2013-06-08 03:18:38 -07:00
new MagicEvent(
permanent,
new MagicMayChoice(),
this,
"PN may\$ put a 4/4 green Elemental creature token onto the battlefield."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicPlayTokenAction(event.getPlayer(), TokenCardDefinitions.get("G Elemental")));
}
}
}
]