magarena/release/Magarena/scripts/Demon_s_Horn.groovy

27 lines
905 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
new MagicWhenOtherSpellIsCastTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
return cardOnStack.hasColor(MagicColor.Black) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.GAIN_LIFE,
1,
MagicSimpleMayChoice.DEFAULT_YES
),
this,
"PN may\$ gain 1 life."
) :
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2013-04-12 19:58:51 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
}
}
}
]