2013-05-26 03:54:12 -07:00
|
|
|
[
|
|
|
|
new MagicWhenTargetedTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicItemOnStack target) {
|
|
|
|
final MagicPermanent equippedCreature = permanent.getEquippedCreature();
|
|
|
|
return (target.containsInChoiceResults(equippedCreature) &&
|
|
|
|
target.isSpell()) ?
|
|
|
|
new MagicEvent(
|
|
|
|
equippedCreature,
|
|
|
|
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
|
|
|
|
new MagicDamageTargetPicker(2),
|
|
|
|
this,
|
|
|
|
"SN deals 2 damage to target creature or player\$."
|
|
|
|
):
|
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
2013-06-23 18:29:26 -07:00
|
|
|
|
2013-05-26 03:54:12 -07:00
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
event.processTarget(game,new MagicTargetAction() {
|
|
|
|
public void doAction(final MagicTarget target) {
|
|
|
|
final MagicDamage damage=new MagicDamage(event.getSource(),target,2);
|
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|