43 lines
1.7 KiB
Groovy
43 lines
1.7 KiB
Groovy
[
|
|
new MagicWhenOtherSpellIsCastTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
return (permanent.isFriend(cardOnStack) &&
|
|
cardOnStack.hasColor(MagicColor.Green)) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
new MagicMayChoice(),
|
|
this,
|
|
"PN may\$ put a 2/2 green Wolf 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("Wolf")));
|
|
}
|
|
}
|
|
},
|
|
new MagicWhenOtherSpellIsCastTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
return (permanent.isFriend(cardOnStack) &&
|
|
cardOnStack.hasColor(MagicColor.Blue)) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
new MagicMayChoice(),
|
|
this,
|
|
"PN may\$ put a 1/1 blue Bird creature token with flying 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("U Bird")));
|
|
}
|
|
}
|
|
}
|
|
]
|