magarena/release/Magarena/scripts/Assassin.groovy

24 lines
850 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 &&
2013-06-23 18:29:26 -07:00
damage.isCombat() &&
2013-03-03 04:06:08 -08:00
damage.getTarget().isPlayer()) ?
new MagicEvent(
permanent,
permanent.getController(),
damage.getTarget(),
this,
2013-06-15 07:27:32 -07:00
"RN loses the game."
) :
2013-03-03 04:06:08 -08:00
MagicEvent.NONE;
}
@Override
2013-06-15 03:09:37 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-03-03 04:06:08 -08:00
game.doAction(new MagicLoseGameAction(event.getRefPlayer()));
}
}
]