diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java index 46b1f077ef..3bfb390ffd 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DealsDamageToACreatureAttachedTriggeredAbility; import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; -import mage.abilities.condition.common.PermanentOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattelfieldCondition; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.decorator.ConditionalReplacementEffect; import mage.abilities.effects.ReplacementEffect; @@ -59,7 +59,7 @@ public class NekoTe extends CardImpl { // Whenever equipped creature deals damage to a creature, tap that creature. That creature doesn't untap during its controller's untap step for as long as Neko-Te remains on the battlefield. ReplacementEffect skipUntapEffect = new SkipUntapTargetEffect(Duration.WhileOnBattlefield); skipUntapEffect.setText("That creature doesn't untap during its controller's untap step for as long as {this} remains on the battlefield"); - ConditionalReplacementEffect effect = new ConditionalReplacementEffect(skipUntapEffect, new PermanentOnBattelfieldCondition(), false); + ConditionalReplacementEffect effect = new ConditionalReplacementEffect(skipUntapEffect, new SourceOnBattelfieldCondition(), false); Ability ability = new DealsDamageToACreatureAttachedTriggeredAbility(new TapTargetEffect("that creature"), false, "equipped creature", false, true); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/commander2013/Ophiomancer.java b/Mage.Sets/src/mage/sets/commander2013/Ophiomancer.java index 41ce1cbd5b..759e77fce6 100644 --- a/Mage.Sets/src/mage/sets/commander2013/Ophiomancer.java +++ b/Mage.Sets/src/mage/sets/commander2013/Ophiomancer.java @@ -32,7 +32,7 @@ import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.common.PermanentOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattelfieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.DeathtouchAbility; diff --git a/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java b/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java index ed5c043f04..13c41231c1 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java +++ b/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java @@ -31,8 +31,8 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.PermanentOnBattelfieldCondition; -import mage.abilities.condition.common.PermanentOnBattlefieldControlUnchangedCondition; +import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; import mage.abilities.decorator.ConditionalContinousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continious.GainControlTargetEffect; @@ -67,7 +67,7 @@ public class SowerOfTemptation extends CardImpl { // remains on the battlefield, even if a different player gains control of Sower of Temptation itself. ConditionalContinousEffect effect = new ConditionalContinousEffect( new GainControlTargetEffect(Duration.Custom, true), - new PermanentOnBattelfieldCondition(), + new SourceOnBattelfieldCondition(), "gain control of target creature for as long as {this} remains on the battlefield"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); ability.addTarget(new TargetCreaturePermanent()); @@ -105,7 +105,7 @@ class SowerOfTemptationGainControlEffect extends OneShotEffect { ConditionalContinousEffect effect = new ConditionalContinousEffect( new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.Custom), - new PermanentOnBattlefieldControlUnchangedCondition(), + new SourceOnBattlefieldControlUnchangedCondition(), "another target permanent is indestructible for as long as you control Aegis Angel"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); Target target = new TargetPermanent(filter); diff --git a/Mage.Sets/src/mage/sets/magic2012/MasterThief.java b/Mage.Sets/src/mage/sets/magic2012/MasterThief.java index 72b26aa435..098616302e 100644 --- a/Mage.Sets/src/mage/sets/magic2012/MasterThief.java +++ b/Mage.Sets/src/mage/sets/magic2012/MasterThief.java @@ -32,7 +32,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.PermanentOnBattlefieldControlUnchangedCondition; +import mage.abilities.condition.common.SourceOnBattlefieldControlUnchangedCondition; import mage.abilities.decorator.ConditionalContinousEffect; import mage.abilities.effects.common.continious.GainControlTargetEffect; import mage.cards.CardImpl; @@ -65,7 +65,7 @@ public class MasterThief extends CardImpl { // When Master Thief enters the battlefield, gain control of target artifact for as long as you control Master Thief. ConditionalContinousEffect effect = new ConditionalContinousEffect( new GainControlTargetEffect(Duration.Custom), - new PermanentOnBattlefieldControlUnchangedCondition(), + new SourceOnBattlefieldControlUnchangedCondition(), "gain control of target artifact for as long as you control Master Thief"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); ability.addTarget(new TargetPermanent(filter)); diff --git a/Mage/src/mage/abilities/condition/common/ControlsPermanentCondition.java b/Mage/src/mage/abilities/condition/common/ControlsPermanentCondition.java index 7b0469b8cb..5ea028b9fe 100644 --- a/Mage/src/mage/abilities/condition/common/ControlsPermanentCondition.java +++ b/Mage/src/mage/abilities/condition/common/ControlsPermanentCondition.java @@ -50,6 +50,7 @@ public class ControlsPermanentCondition implements Condition { private Condition condition; private CountType type; private int count; + private boolean onlyControlled; /** * Applies a filter and delegates creation to @@ -72,9 +73,14 @@ public class ControlsPermanentCondition implements Condition { * @param count */ public ControlsPermanentCondition ( FilterPermanent filter, CountType type, int count ) { + this(filter, type, count, true); + } + + public ControlsPermanentCondition ( FilterPermanent filter, CountType type, int count, boolean onlyControlled ) { this.filter = filter; this.type = type; - this.count = count; + this.count = count; + this.onlyControlled = onlyControlled; } /** @@ -98,7 +104,9 @@ public class ControlsPermanentCondition implements Condition { boolean conditionApplies = false; FilterPermanent localFilter = filter.copy(); - localFilter.add(new ControllerIdPredicate(source.getControllerId())); + if (onlyControlled) { + localFilter.add(new ControllerIdPredicate(source.getControllerId())); + } switch ( this.type ) { case FEWER_THAN: diff --git a/Mage/src/mage/abilities/condition/common/PermanentOnBattelfieldCondition.java b/Mage/src/mage/abilities/condition/common/SourceOnBattelfieldCondition.java similarity index 94% rename from Mage/src/mage/abilities/condition/common/PermanentOnBattelfieldCondition.java rename to Mage/src/mage/abilities/condition/common/SourceOnBattelfieldCondition.java index 0e28f7064e..0f9085b62e 100644 --- a/Mage/src/mage/abilities/condition/common/PermanentOnBattelfieldCondition.java +++ b/Mage/src/mage/abilities/condition/common/SourceOnBattelfieldCondition.java @@ -38,7 +38,7 @@ import mage.game.Game; * * @author LevelX2 */ -public class PermanentOnBattelfieldCondition implements Condition { +public class SourceOnBattelfieldCondition implements Condition { @Override public boolean apply(Game game, Ability source) { diff --git a/Mage/src/mage/abilities/condition/common/PermanentOnBattlefieldControlUnchangedCondition.java b/Mage/src/mage/abilities/condition/common/SourceOnBattlefieldControlUnchangedCondition.java similarity index 94% rename from Mage/src/mage/abilities/condition/common/PermanentOnBattlefieldControlUnchangedCondition.java rename to Mage/src/mage/abilities/condition/common/SourceOnBattlefieldControlUnchangedCondition.java index b8c0f9eebd..5276ab3802 100644 --- a/Mage/src/mage/abilities/condition/common/PermanentOnBattlefieldControlUnchangedCondition.java +++ b/Mage/src/mage/abilities/condition/common/SourceOnBattlefieldControlUnchangedCondition.java @@ -40,7 +40,7 @@ import mage.game.permanent.Permanent; * * @author LevelX2 */ -public class PermanentOnBattlefieldControlUnchangedCondition implements Condition { +public class SourceOnBattlefieldControlUnchangedCondition implements Condition { private UUID controllerId;