magarena/release/Magarena/scripts/Serrated_Arrows.groovy

23 lines
745 B
Groovy

[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer upkeepPlayer) {
return (permanent.isController(upkeepPlayer) &&
permanent.getCounters(MagicCounterType.Charge) == 0) ?
new MagicEvent(
permanent,
this,
"Sacrifice SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}
}
]