magarena/release/Magarena/scripts/Subversion.groovy

26 lines
891 B
Groovy
Raw Normal View History

2013-03-31 22:39:42 -07:00
[
new MagicAtUpkeepTrigger() {
2012-06-17 05:19:08 -07:00
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
2012-10-07 02:02:57 -07:00
final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
2012-10-07 02:02:57 -07:00
permanent,
this,
"Your opponent loses 1 life. You gain 1 life."
):
MagicEvent.NONE;
2012-06-17 05:19:08 -07:00
}
@Override
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
2012-08-30 07:07:22 -07:00
final MagicPlayer player = event.getPlayer();
game.doAction(new MagicChangeLifeAction(player.getOpponent(),-1));
2012-06-17 05:19:08 -07:00
game.doAction(new MagicChangeLifeAction(player,1));
}
2013-03-31 22:39:42 -07:00
}
]