magarena/release/Magarena/scripts/Battlegrace_Angel.groovy

24 lines
850 B
Groovy
Raw Normal View History

2013-03-31 22:40:41 -07:00
[
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
final MagicPlayer player=permanent.getController();
return (creature.getController()==player&&player.getNrOfAttackers()==1)?
new MagicEvent(
permanent,
player,
creature,
this,
2013-03-31 23:06:10 -07:00
"RN gains lifelink until end of turn."
2013-03-31 22:40:41 -07:00
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
2013-05-21 05:26:01 -07:00
game.doAction(new MagicSetAbilityAction(event.getRefPermanent(),MagicAbility.Lifelink));
2013-03-31 22:40:41 -07:00
}
}
]