magarena/release/Magarena/scripts/Phyrexian_Bloodstock.groovy

26 lines
1.0 KiB
Groovy

[
new MagicWhenLeavesPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicRemoveFromPlayAction act) {
return act.isPermanent(permanent) ?
new MagicEvent(
permanent,
MagicTargetChoice.TARGET_WHITE_CREATURE,
new MagicDestroyTargetPicker(true),
this,
"Destroy target white creature\$. It can't be regenerated."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(MagicChangeStateAction.Set(creature,MagicPermanentState.CannotBeRegenerated));
game.doAction(new MagicDestroyAction(creature));
}
});
}
}
]