magarena/release/Magarena/scripts/Drifter_il_Dal.groovy

23 lines
841 B
Groovy

[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
new MagicMayChoice(
new MagicPayManaCostChoice(MagicManaCost.create("{U}"))
),
this,
"You may\$ pay {U}\$. If you don't, sacrifice SN.") :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isNo()) {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}
}
}
]