diff --git a/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java b/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java index ac9da8f9eae..93c38299370 100644 --- a/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java +++ b/Mage.Sets/src/mage/sets/onslaught/CabalSlaver.java @@ -43,6 +43,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; * @author markedagain */ public class CabalSlaver extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("Goblin"); static { @@ -58,7 +59,7 @@ public class CabalSlaver extends CardImpl { this.toughness = new MageInt(1); // Whenever a Goblin deals combat damage to a player, that player discards a card. - this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(new DiscardTargetEffect(1),filter, false, SetTargetPointer.NONE, true)); + this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(new DiscardTargetEffect(1), filter, false, SetTargetPointer.PLAYER, true)); } public CabalSlaver(final CabalSlaver card) { diff --git a/Mage/src/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java b/Mage/src/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java index 69ac883329d..a06bfef568d 100644 --- a/Mage/src/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/DealsDamageToAPlayerAllTriggeredAbility.java @@ -1,16 +1,16 @@ /* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR @@ -20,12 +20,11 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; @@ -43,8 +42,8 @@ import mage.target.targetpointer.FixedTarget; * * @author LevelX2 */ - public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImpl { + private final FilterPermanent filter; private final SetTargetPointer setTargetPointer; private final boolean onlyCombat; @@ -81,12 +80,12 @@ public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImp if (!setTargetPointer.equals(SetTargetPointer.NONE)) { for (Effect effect : this.getEffects()) { effect.setValue("damage", event.getAmount()); - switch(setTargetPointer) { + switch (setTargetPointer) { case PLAYER: effect.setTargetPointer(new FixedTarget(permanent.getControllerId())); break; case PERMANENT: - effect.setTargetPointer(new FixedTarget(permanent.getId())); + effect.setTargetPointer(new FixedTarget(permanent.getId(), permanent.getZoneChangeCounter(game))); break; } @@ -100,7 +99,7 @@ public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImp @Override public String getRule() { - return "Whenever " + filter.getMessage() + " deals "+(onlyCombat ? "combat ":"") + "damage to a player, " + super.getRule(); + return "Whenever " + filter.getMessage() + " deals " + (onlyCombat ? "combat " : "") + "damage to a player, " + super.getRule(); } }