magarena/release/Magarena/scripts/Sanguine_Bond.groovy

28 lines
1009 B
Groovy
Raw Normal View History

2013-05-17 20:52:32 -07:00
[
new MagicWhenLifeIsGainedTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicLifeChangeTriggerData lifeChange) {
2013-05-17 20:59:54 -07:00
return permanent.isController(lifeChange.player) ?
2013-04-12 19:32:25 -07:00
new MagicEvent(
permanent,
2013-05-17 20:59:54 -07:00
MagicTargetChoice.TARGET_OPPONENT,
lifeChange.amount,
2013-04-12 19:32:25 -07:00
this,
2013-05-17 20:59:54 -07:00
"Target opponent\$ loses RN life."
2013-05-17 20:52:32 -07:00
):
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-06-15 07:08:11 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-05-17 20:59:54 -07:00
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.doAction(new MagicChangeLifeAction(
player,
-event.getRefInt()
));
}
});
2013-04-12 19:32:25 -07:00
}
2013-05-17 20:52:32 -07:00
}
]