2013-05-18 00:35:37 -07:00
|
|
|
[
|
|
|
|
new MagicWhenAttacksTrigger() {
|
2012-06-17 05:19:08 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
|
|
|
return (permanent==creature) ?
|
|
|
|
new MagicEvent(
|
2013-05-18 00:35:37 -07:00
|
|
|
permanent,
|
|
|
|
this,
|
|
|
|
"Destroy all creatures other than SN."
|
|
|
|
) :
|
2011-09-04 01:19:43 -07:00
|
|
|
MagicEvent.NONE;
|
2012-06-17 05:19:08 -07:00
|
|
|
}
|
|
|
|
@Override
|
2013-05-18 00:35:37 -07:00
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2012-09-06 07:16:07 -07:00
|
|
|
final MagicPermanent permanent=event.getPermanent();
|
2013-06-23 18:29:26 -07:00
|
|
|
final MagicTargetFilter<MagicPermanent> targetFilter =
|
2013-06-03 22:46:22 -07:00
|
|
|
new MagicOtherPermanentTargetFilter(
|
2012-06-17 05:19:08 -07:00
|
|
|
MagicTargetFilter.TARGET_CREATURE,permanent);
|
2012-10-07 07:36:03 -07:00
|
|
|
final Collection<MagicPermanent> targets=
|
|
|
|
game.filterPermanents(permanent.getController(),targetFilter);
|
2012-06-17 05:19:08 -07:00
|
|
|
game.doAction(new MagicDestroyAction(targets));
|
|
|
|
}
|
2013-05-18 00:35:37 -07:00
|
|
|
}
|
|
|
|
]
|