diff --git a/Mage.Sets/src/mage/sets/innistrad/ClifftopRetreat.java b/Mage.Sets/src/mage/sets/innistrad/ClifftopRetreat.java index ea71cf464b..50535dd647 100644 --- a/Mage.Sets/src/mage/sets/innistrad/ClifftopRetreat.java +++ b/Mage.Sets/src/mage/sets/innistrad/ClifftopRetreat.java @@ -33,7 +33,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.RedManaAbility; @@ -60,7 +60,7 @@ public class ClifftopRetreat extends CardImpl { super(ownerId, 238, "Clifftop Retreat", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "ISD"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Mountain or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/sets/innistrad/HinterlandHarbor.java b/Mage.Sets/src/mage/sets/innistrad/HinterlandHarbor.java index 4c96b8f822..ba5c2ccdaf 100644 --- a/Mage.Sets/src/mage/sets/innistrad/HinterlandHarbor.java +++ b/Mage.Sets/src/mage/sets/innistrad/HinterlandHarbor.java @@ -33,7 +33,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlueManaAbility; @@ -60,7 +60,7 @@ public class HinterlandHarbor extends CardImpl { super(ownerId, 241, "Hinterland Harbor", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "ISD"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tapped unless you control a Forest or an Island"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/sets/innistrad/IsolatedChapel.java b/Mage.Sets/src/mage/sets/innistrad/IsolatedChapel.java index d0ed9f9731..e63be319f7 100644 --- a/Mage.Sets/src/mage/sets/innistrad/IsolatedChapel.java +++ b/Mage.Sets/src/mage/sets/innistrad/IsolatedChapel.java @@ -33,7 +33,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -60,7 +60,7 @@ public class IsolatedChapel extends CardImpl { super(ownerId, 242, "Isolated Chapel", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "ISD"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Plains or a Swamp"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/sets/innistrad/MayorOfAvabruck.java b/Mage.Sets/src/mage/sets/innistrad/MayorOfAvabruck.java index e7a582ceec..a6fa60d829 100644 --- a/Mage.Sets/src/mage/sets/innistrad/MayorOfAvabruck.java +++ b/Mage.Sets/src/mage/sets/innistrad/MayorOfAvabruck.java @@ -45,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import java.util.UUID; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; /** * @@ -76,7 +76,7 @@ public class MayorOfAvabruck extends CardImpl { this.toughness = new MageInt(1); // Other Human creatures you control get +1/+1. - Effect effect = new ConditionalContinousEffect(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true), new UnlessCondition(new TransformedCondition()), ruleText); + Effect effect = new ConditionalContinousEffect(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true), new InvertCondition(new TransformedCondition()), ruleText); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // At the beginning of each upkeep, if no spells were cast last turn, transform Mayor of Avabruck. diff --git a/Mage.Sets/src/mage/sets/innistrad/SulfurFalls.java b/Mage.Sets/src/mage/sets/innistrad/SulfurFalls.java index 62d1776e7f..723d61da15 100644 --- a/Mage.Sets/src/mage/sets/innistrad/SulfurFalls.java +++ b/Mage.Sets/src/mage/sets/innistrad/SulfurFalls.java @@ -33,7 +33,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlueManaAbility; @@ -60,7 +60,7 @@ public class SulfurFalls extends CardImpl { super(ownerId, 248, "Sulfur Falls", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "ISD"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Island or a Mountain"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/sets/innistrad/WoodlandCemetery.java b/Mage.Sets/src/mage/sets/innistrad/WoodlandCemetery.java index b5aa824316..744ab5f479 100644 --- a/Mage.Sets/src/mage/sets/innistrad/WoodlandCemetery.java +++ b/Mage.Sets/src/mage/sets/innistrad/WoodlandCemetery.java @@ -33,7 +33,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -60,7 +60,7 @@ public class WoodlandCemetery extends CardImpl { super(ownerId, 249, "Woodland Cemetery", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "ISD"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Swamp or a Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java b/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java index 76b0b49014..6afca47b85 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java +++ b/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -60,7 +60,7 @@ public class DragonskullSummit extends CardImpl { super(ownerId, 223, "Dragonskull Summit", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Swamp or a Mountain"; 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 09fcda10bd..d7a556f148 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java +++ b/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -60,7 +60,7 @@ public class DrownedCatacomb extends CardImpl { super(ownerId, 224, "Drowned Catacomb", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Island or a Swamp"; 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 8388ed7cc6..3c6aa72240 100644 --- a/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java +++ b/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlueManaAbility; @@ -60,7 +60,7 @@ public class GlacialFortress extends CardImpl { super(ownerId, 226, "Glacial Fortress", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Plains or an Island"; 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 380e1dc89a..bdcc7b4c3a 100644 --- a/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java +++ b/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -60,7 +60,7 @@ public class RootboundCrag extends CardImpl { super(ownerId, 227, "Rootbound Crag", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Mountain or a Forest"; 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 6db50fc169..5e41ea3937 100644 --- a/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java +++ b/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -60,7 +60,7 @@ public class SunpetalGrove extends CardImpl { super(ownerId, 228, "Sunpetal Grove", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "M10"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); String abilityText = "tap it unless you control a Forest or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java b/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java index e6ce7e7c00..d3256b5ad2 100644 --- a/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java +++ b/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java @@ -34,7 +34,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.SacrificeTargetEffect; @@ -88,7 +88,7 @@ public class ShadowbornDemon extends CardImpl { triggeredAbility.addTarget(target); this.addAbility(new ConditionalTriggeredAbility( triggeredAbility, - new UnlessCondition(new CreatureCardsInControllerGraveCondition(6)), + new InvertCondition(new CreatureCardsInControllerGraveCondition(6)), "At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature")); } diff --git a/Mage.Sets/src/mage/sets/modernmasters/Epochrasite.java b/Mage.Sets/src/mage/sets/modernmasters/Epochrasite.java index 5503c748ce..b62e0a1bba 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/Epochrasite.java +++ b/Mage.Sets/src/mage/sets/modernmasters/Epochrasite.java @@ -33,7 +33,7 @@ import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.CastFromHandCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.ExileSourceEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect; @@ -65,7 +65,7 @@ public class Epochrasite extends CardImpl { // Epochrasite enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand. this.addAbility(new EntersBattlefieldAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), - new UnlessCondition(new CastFromHandCondition()), true, + new InvertCondition(new CastFromHandCondition()), true, "{this} enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand","")); // When Epochrasite dies, exile it with three time counters on it and it gains suspend. diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java index 529a605b46..6a6108ff42 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/BlackcleaveCliffs.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -54,7 +54,7 @@ public class BlackcleaveCliffs extends CardImpl { super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); String abilityText = "tapped unless you control fewer than 3 lands"; 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 471ea23f85..b45d3f51a5 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CopperlineGorge.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -55,7 +55,7 @@ public class CopperlineGorge extends CardImpl { this.expansionSetCode = "SOM"; // Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands. - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); String abilityText = "tapped unless you control two or fewer other lands"; 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 68cdb50ca9..f260a3f705 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/DarkslickShores.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/DarkslickShores.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; @@ -54,7 +54,7 @@ public class DarkslickShores extends CardImpl { super(ownerId, 226, "Darkslick Shores", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 lands"; 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 ad391a1dd9..1c2f86a90a 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/RazorvergeThicket.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; @@ -54,7 +54,7 @@ public class RazorvergeThicket extends CardImpl { super(ownerId, 228, "Razorverge Thicket", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 lands"; 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 4ade68fba5..781cfa3883 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SeachromeCoast.java @@ -34,7 +34,7 @@ import mage.constants.Rarity; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlueManaAbility; @@ -54,7 +54,7 @@ public class SeachromeCoast extends CardImpl { super(ownerId, 229, "Seachrome Coast", Rarity.RARE, new CardType[]{CardType.LAND}, null); this.expansionSetCode = "SOM"; - Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); + Condition controls = new InvertCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 4)); String abilityText = "tap it unless you control fewer than 3 lands"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/sets/zendikar/SphinxOfLostTruths.java b/Mage.Sets/src/mage/sets/zendikar/SphinxOfLostTruths.java index 73568810b5..af4f2a02ce 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SphinxOfLostTruths.java +++ b/Mage.Sets/src/mage/sets/zendikar/SphinxOfLostTruths.java @@ -34,7 +34,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DiscardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect; @@ -65,7 +65,7 @@ public class SphinxOfLostTruths extends CardImpl { // When Sphinx of Lost Truths enters the battlefield, draw three cards. Then if it wasn't kicked, discard three cards. Ability ability = new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(3)); - ability.addEffect(new ConditionalOneShotEffect(new DiscardControllerEffect(3), new UnlessCondition(KickedCondition.getInstance()), + ability.addEffect(new ConditionalOneShotEffect(new DiscardControllerEffect(3), new InvertCondition(KickedCondition.getInstance()), "Then if it wasn't kicked, discard three cards")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/zendikar/VampireLacerator.java b/Mage.Sets/src/mage/sets/zendikar/VampireLacerator.java index cadf9ba1bf..6428d0315b 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.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TenOrLessLifeCondition; -import mage.abilities.condition.UnlessCondition; +import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.LoseLifeSourceEffect; import mage.cards.CardImpl; @@ -58,7 +58,7 @@ public class VampireLacerator extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility( new ConditionalOneShotEffect( new LoseLifeSourceEffect(1), - new UnlessCondition( new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT) ), + new InvertCondition( new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT) ), "you lose 1 life unless an opponent has 10 or less life"), TargetController.YOU, false)); } diff --git a/Mage/src/mage/abilities/condition/FixedCondition.java b/Mage/src/mage/abilities/condition/FixedCondition.java index a2d3c0ae7d..69f98082ff 100644 --- a/Mage/src/mage/abilities/condition/FixedCondition.java +++ b/Mage/src/mage/abilities/condition/FixedCondition.java @@ -29,7 +29,6 @@ package mage.abilities.condition; import mage.abilities.Ability; -import mage.abilities.condition.Condition; import mage.game.Game; /** diff --git a/Mage/src/mage/abilities/condition/UnlessCondition.java b/Mage/src/mage/abilities/condition/InvertCondition.java similarity index 93% rename from Mage/src/mage/abilities/condition/UnlessCondition.java rename to Mage/src/mage/abilities/condition/InvertCondition.java index 7d06305dc6..fe742566e9 100644 --- a/Mage/src/mage/abilities/condition/UnlessCondition.java +++ b/Mage/src/mage/abilities/condition/InvertCondition.java @@ -28,7 +28,6 @@ package mage.abilities.condition; import mage.abilities.Ability; -import mage.abilities.condition.Condition; import mage.game.Game; /** @@ -38,11 +37,11 @@ import mage.game.Game; * * @author maurer.it_at_gmail.com */ -public class UnlessCondition implements Condition { +public class InvertCondition implements Condition { private Condition condition; - public UnlessCondition ( Condition condition ) { + public InvertCondition ( Condition condition ) { this.condition = condition; } diff --git a/Mage/src/mage/abilities/condition/LockedInCondition.java b/Mage/src/mage/abilities/condition/LockedInCondition.java new file mode 100644 index 0000000000..72863348f2 --- /dev/null +++ b/Mage/src/mage/abilities/condition/LockedInCondition.java @@ -0,0 +1,61 @@ +/* + * 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 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * 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.condition; + +import mage.abilities.Ability; +import mage.game.Game; + +/** + * A simple {@link Condition} to check the condition only one time at the start (result locked in). + * All subsequent checks return the first result. + * + * @author LevelX2 + */ +public class LockedInCondition implements Condition { + + private boolean conditionChecked = false; + private boolean result; + private Condition condition; + + public LockedInCondition ( Condition condition ) { + this.condition = condition; + } + + /* + * {@inheritDoc} + */ + @Override + public boolean apply(Game game, Ability source) { + if(!conditionChecked) { + result = !condition.apply(game, source); + conditionChecked = true; + } + return result; + } + +}