magarena/release/Magarena/scripts/Purge_the_Profane.groovy

26 lines
859 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\$ discards two cards and PN gains 2 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game, {
final MagicPlayer player ->
game.addEvent(new MagicDiscardEvent(
event.getSource(),
player,
2
));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),2));
});
}
}
]