magarena/release/Magarena/scripts/Highway_Robber.groovy

25 lines
919 B
Groovy
Raw Normal View History

2013-04-03 01:03:00 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
2012-06-17 05:19:08 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
return new MagicEvent(
2012-09-21 09:10:24 -07:00
permanent,
MagicTargetChoice.TARGET_OPPONENT,
this,
2013-04-03 01:03:00 -07:00
"Target opponent$ loses 2 life and PN gains 2 life."
);
2012-06-17 05:19:08 -07:00
}
@Override
public void executeEvent(
2011-09-21 06:49:39 -07:00
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
2011-09-21 06:49:39 -07:00
public void doAction(final MagicPlayer player) {
game.doAction(new MagicChangeLifeAction(player,-2));
2012-08-30 06:55:54 -07:00
game.doAction(new MagicChangeLifeAction(event.getPlayer(),2));
2011-09-21 06:49:39 -07:00
}
2012-06-17 05:19:08 -07:00
});
}
2013-04-03 01:03:00 -07:00
}
]