only trigger if damage is dealt by permanent

master
melvin 2013-08-10 19:30:29 +08:00
parent 4725523588
commit 7cbbae3c12
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ public abstract class MagicWhenDamageIsDealtTrigger extends MagicTrigger<MagicDa
return new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
return (damage.isCombat() && damage.getTarget().isPlayer()) ?
return (damage.getSource() == permanent &&
damage.isCombat() &&
damage.getTarget().isPlayer()) ?
new MagicEvent(
permanent,
new MagicMayChoice(),