magarena/release/Magarena/scripts/Thief_of_Hope.groovy

23 lines
866 B
Groovy

[
new MagicWhenYouCastSpiritOrArcaneTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack spell) {
return new MagicEvent(
permanent,
MagicTargetChoice.TARGET_OPPONENT,
this,
"Target opponent\$ loses 1 life and PN gains 1 life."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.doAction(new MagicChangeLifeAction(player,-1));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
}
});
}
}
]