26 lines
1007 B
Groovy
26 lines
1007 B
Groovy
[
|
|
new MagicWhenOtherDiesTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
|
|
return (permanent != otherPermanent &&
|
|
otherPermanent.isCreature()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.NEG_TARGET_PLAYER,
|
|
this,
|
|
"SN deals 2 damage to target player\$."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPlayer(game,new MagicPlayerAction() {
|
|
public void doAction(final MagicPlayer player) {
|
|
final MagicDamage damage = new MagicDamage(event.getSource(),player,2);
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|