24 lines
970 B
Groovy
24 lines
970 B
Groovy
[
|
|
new MagicWhenOtherSpellIsCastTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
return (permanent.isEnemy(cardOnStack) &&
|
|
cardOnStack.hasColor(MagicColor.Blue) &&
|
|
permanent.isController(game.getTurnPlayer())) ?
|
|
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("4/4 green Elemental creature token")));
|
|
}
|
|
}
|
|
}
|
|
]
|