magarena/release/Magarena/scripts/Falkenrath_Noble.groovy

25 lines
981 B
Groovy
Raw Normal View History

2013-05-18 04:57:59 -07:00
[
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return otherPermanent.isCreature() ?
new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_PLAYER,
this,
2013-05-18 04:57:59 -07:00
"Target player\$ loses 1 life and PN gains 1 life."
2013-04-12 19:32:25 -07:00
) :
MagicEvent.NONE;
}
@Override
2013-05-18 04:57:59 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.doAction(new MagicChangeLifeAction(player,-1));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));
}
});
}
2013-05-18 04:57:59 -07:00
}
]