2013-05-25 19:28:10 -07:00
|
|
|
[
|
|
|
|
new MagicWhenAttacksTrigger() {
|
2013-04-12 19:32:25 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
|
|
|
return (permanent == creature) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
new MagicMayChoice(),
|
|
|
|
this,
|
2013-05-25 19:43:47 -07:00
|
|
|
"PN may\$ have SN deal 1 damage " +
|
2013-05-25 19:28:10 -07:00
|
|
|
"to each creature defending player controls."
|
|
|
|
) :
|
2013-04-12 19:32:25 -07:00
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2013-05-25 19:28:10 -07:00
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2013-04-12 19:32:25 -07:00
|
|
|
if (event.isYes()) {
|
|
|
|
final MagicSource source = event.getSource();
|
|
|
|
final MagicPlayer defendingPlayer = event.getPlayer().getOpponent();
|
|
|
|
final Collection<MagicPermanent> creatures =
|
|
|
|
game.filterPermanents(defendingPlayer,MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
|
|
|
|
for (final MagicPermanent creature : creatures) {
|
|
|
|
final MagicDamage damage = new MagicDamage(source,creature,1);
|
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-05-25 19:28:10 -07:00
|
|
|
}
|
|
|
|
]
|