magarena/release/Magarena/scripts/Nefarox__Overlord_of_Grixis...

27 lines
913 B
Groovy
Raw Normal View History

2013-02-12 21:09:07 -08:00
[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
final MagicPlayer player=permanent.getController();
return (creature == permanent && player.getNrOfAttackers()==1) ?
new MagicEvent(
permanent,
player.getOpponent(),
this,
"PN sacrifices a creature."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
2013-02-12 21:09:07 -08:00
game.addEvent(new MagicSacrificePermanentEvent(
event.getSource(),
event.getPlayer(),
MagicTargetChoice.SACRIFICE_CREATURE
));
}
}
]