diff --git a/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java b/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java index 32b9e0d639..18beb41023 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java +++ b/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -61,7 +62,7 @@ public class DragonskullSummit extends CardImpl { super(ownerId, 223, "Dragonskull Summit", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java b/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java index b6dbf691be..7a4fd74fb7 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java +++ b/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -61,7 +62,7 @@ public class DrownedCatacomb extends CardImpl { super(ownerId, 224, "Drowned Catacomb", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java b/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java index 1c3ea25e56..1b455f09a3 100644 --- a/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java +++ b/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlueManaAbility; @@ -61,7 +62,7 @@ public class GlacialFortress extends CardImpl { super(ownerId, 226, "Glacial Fortress", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java b/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java index ab78a98d08..5b090759e4 100644 --- a/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java +++ b/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -61,7 +62,7 @@ public class RootboundCrag extends CardImpl { super(ownerId, 227, "Rootbound Crag", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java b/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java index 51549eb77e..fdd0f1f193 100644 --- a/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java +++ b/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -61,7 +62,7 @@ public class SunpetalGrove extends CardImpl { super(ownerId, 228, "Sunpetal Grove", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java index 200cb558f1..21061967d3 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -59,7 +60,7 @@ public class BlackcleaveCliffs extends CardImpl { super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 3); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java index fb8b15b582..f7ea3ff49c 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -59,7 +60,7 @@ public class CopperlineGorge extends CardImpl { super(ownerId, 225, "Copperline Gorge", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 3); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/DarkslickShores.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/DarkslickShores.java index e45f7af9cc..591b730aef 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/DarkslickShores.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/DarkslickShores.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -59,7 +60,7 @@ public class DarkslickShores extends CardImpl { super(ownerId, 226, "Darkslick Shores", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 3); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java index 576494243d..ff9a8a79cf 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -59,7 +60,7 @@ public class RazorvergeThicket extends CardImpl { super(ownerId, 228, "Razorverge Thicket", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 3); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java index f62b87cd95..316c2ffd0e 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java @@ -34,6 +34,7 @@ import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanent; +import mage.abilities.condition.common.Unless; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlueManaAbility; @@ -59,7 +60,7 @@ public class SeachromeCoast extends CardImpl { super(ownerId, 229, "Seachrome Coast", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 3); + Condition controls = new Unless(new ControlsPermanent(filter, ControlsPermanent.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 " + filter.getMessage(); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/sets/zendikar/VampireLacerator.java b/Mage.Sets/src/mage/sets/zendikar/VampireLacerator.java index e5bca3dc5b..248eb8b805 100644 --- a/Mage.Sets/src/mage/sets/zendikar/VampireLacerator.java +++ b/Mage.Sets/src/mage/sets/zendikar/VampireLacerator.java @@ -34,7 +34,7 @@ import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleTriggeredAbility; -import mage.abilities.condition.common.Not; +import mage.abilities.condition.common.Unless; import mage.abilities.condition.common.TenOrLessLife; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.LoseLifeSourceEffect; @@ -79,7 +79,7 @@ class VampireLaceratorTriggeredAbility extends SimpleTriggeredAbility { super(Zone.BATTLEFIELD, EventType.UPKEEP_STEP_PRE, new ConditionalOneShotEffect( new LoseLifeSourceEffect(1), - new Not( new TenOrLessLife(AN_OPPONENT)), + new Unless( new TenOrLessLife(AN_OPPONENT)), "At the beginning of your upkeep, you lose 1 " + "life unless an opponent has 10 or less life.")); } diff --git a/Mage/src/mage/abilities/condition/common/ControlsPermanent.java b/Mage/src/mage/abilities/condition/common/ControlsPermanent.java index 77f73a89be..77964ae179 100644 --- a/Mage/src/mage/abilities/condition/common/ControlsPermanent.java +++ b/Mage/src/mage/abilities/condition/common/ControlsPermanent.java @@ -97,10 +97,10 @@ public class ControlsPermanent implements Condition { switch ( this.type ) { case FEWER_THAN: - conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) > this.count; + conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) < this.count; break; case MORE_THAN: - conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) < this.count; + conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) > this.count; break; case EQUAL_TO: conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) == this.count; diff --git a/Mage/src/mage/abilities/condition/common/Not.java b/Mage/src/mage/abilities/condition/common/Unless.java similarity index 89% rename from Mage/src/mage/abilities/condition/common/Not.java rename to Mage/src/mage/abilities/condition/common/Unless.java index 4ff5f44ceb..8762227c7d 100644 --- a/Mage/src/mage/abilities/condition/common/Not.java +++ b/Mage/src/mage/abilities/condition/common/Unless.java @@ -16,11 +16,11 @@ import mage.game.Game; * * @author maurer.it_at_gmail.com */ -public class Not implements Condition { +public class Unless implements Condition { private Condition condition; - public Not ( Condition condition ) { + public Unless ( Condition condition ) { this.condition = condition; }