magarena/release/Magarena/scripts/Dragon_s_Claw.groovy

26 lines
901 B
Groovy
Raw Normal View History

2013-05-17 20:52:51 -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 cardOnStack.hasColor(MagicColor.Red) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.GAIN_LIFE,
1,
2013-05-17 20:52:51 -07:00
MagicSimpleMayChoice.DEFAULT_YES
),
2013-04-12 19:32:25 -07:00
this,
2013-05-17 20:59:54 -07:00
"PN may\$ gain 1 life."
2013-05-17 20:52:51 -07:00
):
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 MagicChangeLifeAction(event.getPlayer(),1));
}
}
2013-05-17 20:52:51 -07:00
}
]