magarena/release/Magarena/scripts/Subversion.groovy

24 lines
825 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
this,
"Your opponent loses 1 life. You gain 1 life."
):
MagicEvent.NONE;
}
@Override
2013-06-15 07:08:11 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:58:51 -07:00
final MagicPlayer player = event.getPlayer();
game.doAction(new MagicChangeLifeAction(player.getOpponent(),-1));
game.doAction(new MagicChangeLifeAction(player,1));
2013-06-23 18:29:26 -07:00
}
2013-04-12 19:58:51 -07:00
}
]