2013-05-25 19:27:00 -07:00
|
|
|
[
|
|
|
|
new MagicWhenDamageIsDealtTrigger() {
|
2012-06-17 05:19:08 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
2012-09-22 01:59:21 -07:00
|
|
|
return (damage.getSource() == permanent &&
|
|
|
|
damage.getTarget().isPlayer() &&
|
|
|
|
damage.isCombat()) ?
|
2011-08-13 23:57:22 -07:00
|
|
|
new MagicEvent(
|
2012-09-22 01:59:21 -07:00
|
|
|
permanent,
|
|
|
|
new MagicMayChoice(
|
|
|
|
MagicTargetChoice.TARGET_ARTIFACT_OR_ENCHANTMENT_YOUR_OPPONENT_CONTROLS
|
|
|
|
),
|
|
|
|
new MagicDestroyTargetPicker(false),
|
|
|
|
this,
|
2013-05-25 19:43:47 -07:00
|
|
|
"PN may\$ destroy target artifact or enchantment\$ an opponent controls."
|
2012-09-22 01:59:21 -07:00
|
|
|
):
|
2011-09-04 01:19:43 -07:00
|
|
|
MagicEvent.NONE;
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2013-05-25 19:27:00 -07:00
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2013-03-22 19:26:50 -07:00
|
|
|
if (event.isYes()) {
|
2013-03-21 06:35:09 -07:00
|
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
2011-08-30 06:31:13 -07:00
|
|
|
public void doAction(final MagicPermanent permanent) {
|
|
|
|
game.doAction(new MagicDestroyAction(permanent));
|
|
|
|
}
|
|
|
|
});
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
2011-08-30 06:31:13 -07:00
|
|
|
}
|
2013-05-25 19:27:00 -07:00
|
|
|
}
|
|
|
|
]
|