magarena/release/Magarena/scripts/Mark_of_the_Oni.groovy

23 lines
747 B
Groovy

[
new MagicAtEndOfTurnTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer eotPlayer) {
return (permanent.isController(eotPlayer) &&
eotPlayer.controlsPermanent(MagicSubType.Demon) == false) ?
new MagicEvent(
permanent,
this,
"Sacrifice SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}
}
]