magarena/release/Magarena/scripts/Vorosh__the_Hunter.groovy

34 lines
1.2 KiB
Groovy

[
new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicDamage damage) {
final MagicPlayer player=permanent.getController();
return (damage.getSource()==permanent&&damage.getTarget().isPlayer()&&damage.isCombat()) ?
new MagicEvent(
permanent,
player,
new MagicMayChoice(
new MagicPayManaCostChoice(MagicManaCost.create("{2}{G}"))
),
this,
"You may\$ pay {2}{G}\$. If you do, put six +1/+1 counters on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.PlusOne,
6,
true
));
}
}
}
]