Not makes more sense to me as Unless (Unless Controls Permanent Fewer than 4) something along those lines

This commit is contained in:
maurer.it 2010-12-29 16:38:41 -05:00
parent bb5477496a
commit 5c341872b7
13 changed files with 26 additions and 16 deletions

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
@ -61,7 +62,7 @@ public class DragonskullSummit extends CardImpl<DragonskullSummit> {
super(ownerId, 223, "Dragonskull Summit", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 223, "Dragonskull Summit", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "M10"; 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(); String abilityText = "tap it unless you control a " + filter.getMessage();
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
@ -61,7 +62,7 @@ public class DrownedCatacomb extends CardImpl<DrownedCatacomb> {
super(ownerId, 224, "Drowned Catacomb", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 224, "Drowned Catacomb", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "M10"; 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(); String abilityText = "tap it unless you control a " + filter.getMessage();
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.BlueManaAbility;
@ -61,7 +62,7 @@ public class GlacialFortress extends CardImpl<GlacialFortress> {
super(ownerId, 226, "Glacial Fortress", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 226, "Glacial Fortress", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "M10"; 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(); String abilityText = "tap it unless you control a " + filter.getMessage();
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.GreenManaAbility;
@ -61,7 +62,7 @@ public class RootboundCrag extends CardImpl<RootboundCrag> {
super(ownerId, 227, "Rootbound Crag", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 227, "Rootbound Crag", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "M10"; 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(); String abilityText = "tap it unless you control a " + filter.getMessage();
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.GreenManaAbility;
@ -61,7 +62,7 @@ public class SunpetalGrove extends CardImpl<SunpetalGrove> {
super(ownerId, 228, "Sunpetal Grove", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 228, "Sunpetal Grove", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "M10"; 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(); String abilityText = "tap it unless you control a " + filter.getMessage();
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
@ -59,7 +60,7 @@ public class BlackcleaveCliffs extends CardImpl<BlackcleaveCliffs> {
super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 224, "Blackcleave Cliffs", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "SOM"; 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(); 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 EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.GreenManaAbility;
@ -59,7 +60,7 @@ public class CopperlineGorge extends CardImpl<CopperlineGorge> {
super(ownerId, 225, "Copperline Gorge", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 225, "Copperline Gorge", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "SOM"; 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(); 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 EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
@ -59,7 +60,7 @@ public class DarkslickShores extends CardImpl<DarkslickShores> {
super(ownerId, 226, "Darkslick Shores", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 226, "Darkslick Shores", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "SOM"; 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(); 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 EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.GreenManaAbility;
@ -59,7 +60,7 @@ public class RazorvergeThicket extends CardImpl<RazorvergeThicket> {
super(ownerId, 228, "Razorverge Thicket", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 228, "Razorverge Thicket", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "SOM"; 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(); 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 EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());

View file

@ -34,6 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.ControlsPermanent; import mage.abilities.condition.common.ControlsPermanent;
import mage.abilities.condition.common.Unless;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.BlueManaAbility;
@ -59,7 +60,7 @@ public class SeachromeCoast extends CardImpl<SeachromeCoast> {
super(ownerId, 229, "Seachrome Coast", Rarity.RARE, new CardType[]{CardType.LAND}, null); super(ownerId, 229, "Seachrome Coast", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "SOM"; 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(); 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 EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());

View file

@ -34,7 +34,7 @@ import mage.Constants.Rarity;
import mage.Constants.Zone; import mage.Constants.Zone;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleTriggeredAbility; 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.condition.common.TenOrLessLife;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.LoseLifeSourceEffect; import mage.abilities.effects.common.LoseLifeSourceEffect;
@ -79,7 +79,7 @@ class VampireLaceratorTriggeredAbility extends SimpleTriggeredAbility {
super(Zone.BATTLEFIELD, EventType.UPKEEP_STEP_PRE, super(Zone.BATTLEFIELD, EventType.UPKEEP_STEP_PRE,
new ConditionalOneShotEffect( new ConditionalOneShotEffect(
new LoseLifeSourceEffect(1), new LoseLifeSourceEffect(1),
new Not( new TenOrLessLife(AN_OPPONENT)), new Unless( new TenOrLessLife(AN_OPPONENT)),
"At the beginning of your upkeep, you lose 1 " "At the beginning of your upkeep, you lose 1 "
+ "life unless an opponent has 10 or less life.")); + "life unless an opponent has 10 or less life."));
} }

View file

@ -97,10 +97,10 @@ public class ControlsPermanent implements Condition {
switch ( this.type ) { switch ( this.type ) {
case FEWER_THAN: case FEWER_THAN:
conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) > this.count; conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) < this.count;
break; break;
case MORE_THAN: case MORE_THAN:
conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) < this.count; conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) > this.count;
break; break;
case EQUAL_TO: case EQUAL_TO:
conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) == this.count; conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId()) == this.count;

View file

@ -16,11 +16,11 @@ import mage.game.Game;
* *
* @author maurer.it_at_gmail.com * @author maurer.it_at_gmail.com
*/ */
public class Not implements Condition { public class Unless implements Condition {
private Condition condition; private Condition condition;
public Not ( Condition condition ) { public Unless ( Condition condition ) {
this.condition = condition; this.condition = condition;
} }