27 lines
1.0 KiB
Groovy
27 lines
1.0 KiB
Groovy
[
|
|
new MagicWhenPutIntoGraveyardTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
|
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.TARGET_CREATURE,
|
|
new MagicDamageTargetPicker(2),
|
|
this,
|
|
"SN deals 2 damage to target creature\$."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
final MagicDamage damage = new MagicDamage(event.getSource(),creature,2);
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|