magarena/release/Magarena/scripts/Assassin.groovy

26 lines
913 B
Groovy
Raw Normal View History

2013-03-03 04:06:08 -08:00
[
new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
final MagicSource source = damage.getSource();
return (source == permanent &&
damage.isCombat() &&
damage.getTarget().isPlayer()) ?
new MagicEvent(
permanent,
permanent.getController(),
damage.getTarget(),
this,
"RN loses the game.") :
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] choiceResults) {
game.doAction(new MagicLoseGameAction(event.getRefPlayer()));
}
}
]