magarena/release/Magarena/scripts/Scythe_Tiger.groovy

27 lines
1020 B
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
return new MagicEvent(
permanent,
new MagicMayChoice(MagicTargetChoice.SACRIFICE_LAND),
MagicSacrificeTargetPicker.create(),
this,
"You may sacrifice a land. If you don't, sacrifice SN."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent land) {
game.doAction(new MagicSacrificeAction(land));
}
});
} else {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}
}
}
]