magarena/release/Magarena/scripts/Geth_s_Verdict.groovy

27 lines
980 B
Groovy

[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_PLAYER,
this,
"Target player\$ sacrifices a creature and loses 1 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.addEvent(new MagicSacrificePermanentEvent(
event.getSource(),
player,
MagicTargetChoice.SACRIFICE_CREATURE
));
game.doAction(new MagicChangeLifeAction(player,-1));
}
});
}
}
]