2013-05-27 07:32:11 -07:00
|
|
|
[
|
|
|
|
new MagicAtUpkeepTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer player) {
|
|
|
|
return new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
player,
|
|
|
|
this,
|
|
|
|
"PN sacrifices a non-Zombie creature."
|
|
|
|
);
|
|
|
|
}
|
2013-06-23 18:29:26 -07:00
|
|
|
|
2013-05-27 07:32:11 -07:00
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
final MagicPlayer player = event.getPlayer();
|
|
|
|
game.addEvent(new MagicSacrificePermanentEvent(
|
|
|
|
event.getSource(),
|
|
|
|
player,
|
|
|
|
MagicTargetChoice.SACRIFICE_NON_ZOMBIE
|
|
|
|
));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
new MagicAtEndOfTurnTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer eotPlayer) {
|
|
|
|
final Collection<MagicPermanent> targets =
|
|
|
|
game.filterPermanents(permanent.getController(),MagicTargetFilter.TARGET_CREATURE);
|
|
|
|
return (targets.size() == 0) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
this,
|
|
|
|
"Sacrifice SN."
|
|
|
|
):
|
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
2013-06-23 18:29:26 -07:00
|
|
|
|
2013-05-27 07:32:11 -07:00
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
game.doAction(new MagicSacrificeAction(event.getPermanent()));
|
2013-06-23 18:29:26 -07:00
|
|
|
}
|
2013-05-27 07:32:11 -07:00
|
|
|
}
|
|
|
|
]
|