magarena/release/Magarena/scripts/Fable_of_Wolf_and_Owl.groovy

43 lines
1.8 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("2/2 green Wolf creature token")));
}
}
},
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("1/1 blue Bird creature token with flying")));
}
}
}
]