27 lines
891 B
Groovy
27 lines
891 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("{G}"))
|
|
),
|
|
this,
|
|
"You may\$ pay {G}\$. 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()));
|
|
}
|
|
}
|
|
}
|
|
]
|