magarena/release/Magarena/scripts/Wall_of_Reverence.groovy

25 lines
1004 B
Groovy
Raw Normal View History

2013-05-18 06:02:17 -07:00
[
new MagicAtEndOfTurnTrigger() {
2012-06-17 05:19:08 -07:00
@Override
2012-09-21 07:26:17 -07:00
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer eotPlayer) {
return permanent.isController(eotPlayer) ?
2012-06-17 05:19:08 -07:00
new MagicEvent(
2011-09-04 00:49:20 -07:00
permanent,
MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
MagicPowerTargetPicker.getInstance(),
this,
2013-05-18 06:02:17 -07:00
"PN gains life equal to the power of target creature\$ he or she controls."
2012-09-21 07:26:17 -07:00
):
2011-09-04 01:19:43 -07:00
MagicEvent.NONE;
2012-06-17 05:19:08 -07:00
}
@Override
2013-05-18 06:02:17 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
2012-08-30 05:46:40 -07:00
game.doAction(new MagicChangeLifeAction(event.getPlayer(),creature.getPower()));
}
2012-06-17 05:19:08 -07:00
});
}
2013-05-18 06:02:17 -07:00
}
]