From bde1e90dfbdd391c8214e7c3aca888fb54cb411c Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 12 May 2013 16:18:17 +0200 Subject: [PATCH] Fixed bug that Cloudstone Curio triggered also for opponents permanents entering the battlefield. --- .../src/mage/sets/ravnika/CloudstoneCurio.java | 4 +++- .../EntersBattlefieldAllTriggeredAbility.java | 17 +++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/sets/ravnika/CloudstoneCurio.java b/Mage.Sets/src/mage/sets/ravnika/CloudstoneCurio.java index b064411b08..ed4a2fabff 100644 --- a/Mage.Sets/src/mage/sets/ravnika/CloudstoneCurio.java +++ b/Mage.Sets/src/mage/sets/ravnika/CloudstoneCurio.java @@ -34,6 +34,7 @@ import mage.Constants; import mage.Constants.CardType; import mage.Constants.Outcome; import mage.Constants.Rarity; +import mage.Constants.TargetController; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; @@ -58,6 +59,7 @@ public class CloudstoneCurio extends CardImpl { private static final FilterPermanent filter = new FilterPermanent("a nonartifact permanent"); static { filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + filter.add(new ControllerPredicate(TargetController.YOU)); } public CloudstoneCurio(UUID ownerId) { @@ -65,7 +67,7 @@ public class CloudstoneCurio extends CardImpl { this.expansionSetCode = "RAV"; // Whenever a nonartifact permanent enters the battlefield under your control, you may return another permanent you control that shares a card type with it to its owner's hand. - this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new CloudstoneCurioEffect(), filter, true, true, "")); + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new CloudstoneCurioEffect(), filter, true, "", true)); } diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java b/Mage/src/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java index aea3f50ac9..98e02751dc 100644 --- a/Mage/src/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/EntersBattlefieldAllTriggeredAbility.java @@ -63,8 +63,7 @@ public class EntersBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl { } public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional) { - this(zone, effect, filter, optional, null); - this.filter = filter; + this(zone, effect, filter, optional, false, null, false); } public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, String rule) { @@ -72,16 +71,18 @@ public class EntersBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl { } public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, String rule, boolean controlled) { + this(zone, effect, filter, optional, false, rule, controlled); + } + + public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule) { + this(zone, effect, filter, optional, setTargetPointer, rule, false); + } + + public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule, boolean controlled) { super(Zone.BATTLEFIELD, effect, optional); this.filter = filter; this.rule = rule; this.controlled = controlled; - } - - public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule) { - super(Zone.BATTLEFIELD, effect, optional); - this.filter = filter; - this.rule = rule; this.setTargetPointer = setTargetPointer; }