magarena/release/Magarena/scripts/Nettle_Sentinel.groovy

28 lines
994 B
Groovy
Raw Normal View History

2013-05-17 23:02:20 -07:00
[
new MagicWhenOtherSpellIsCastTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return (permanent.isFriend(cardOnStack) &&
cardOnStack.hasColor(MagicColor.Green) &&
permanent.isTapped()) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.UNTAP,
1,
2013-05-17 23:02:20 -07:00
MagicSimpleMayChoice.DEFAULT_YES
),
2013-04-12 19:32:25 -07:00
this,
2013-05-17 23:02:20 -07:00
"PN may\$ untap SN."
) :
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicUntapAction(event.getPermanent()));
}
}
2013-05-17 23:02:20 -07:00
}
]