diff --git a/Mage/src/main/java/mage/target/TargetAmount.java b/Mage/src/main/java/mage/target/TargetAmount.java index 76ac8c7186f..6bd1e51c510 100644 --- a/Mage/src/main/java/mage/target/TargetAmount.java +++ b/Mage/src/main/java/mage/target/TargetAmount.java @@ -2,7 +2,6 @@ package mage.target; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; @@ -19,14 +18,8 @@ public abstract class TargetAmount extends TargetImpl { DynamicValue amount; int remainingAmount; - public TargetAmount(int amount) { - this(StaticValue.get(amount)); - } - - public TargetAmount(DynamicValue amount) { + protected TargetAmount(DynamicValue amount) { this.amount = amount; - //this.remainingAmount = amount; - amountWasSet = false; } protected TargetAmount(final TargetAmount target) { diff --git a/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java b/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java deleted file mode 100644 index 11cb59db031..00000000000 --- a/Mage/src/main/java/mage/target/common/TargetCreatureOrPlayerAmount.java +++ /dev/null @@ -1,46 +0,0 @@ -package mage.target.common; - -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.filter.common.FilterPermanentOrPlayer; - -/** - * @author BetaSteward_at_googlemail.com - */ -public class TargetCreatureOrPlayerAmount extends TargetPermanentOrPlayerAmount { - - private static final FilterPermanentOrPlayer defaultFilter - = new FilterPermanentOrPlayer("creatures and/or players"); - - static { - defaultFilter.getPermanentFilter().add(CardType.CREATURE.getPredicate()); - } - - public TargetCreatureOrPlayerAmount(int amount) { - // 107.1c If a rule or ability instructs a player to choose “any number,” that player may choose - // any positive number or zero, unless something (such as damage or counters) is being divided - // or distributed among “any number” of players and/or objects. In that case, a nonzero number - // of players and/or objects must be chosen if possible. - this(StaticValue.get(amount)); - this.minNumberOfTargets = 1; - } - - public TargetCreatureOrPlayerAmount(DynamicValue amount) { - super(amount); - this.zone = Zone.ALL; - this.filter = defaultFilter; - this.targetName = filter.getMessage(); - } - - private TargetCreatureOrPlayerAmount(final TargetCreatureOrPlayerAmount target) { - super(target); - this.filter = target.filter.copy(); - } - - @Override - public TargetCreatureOrPlayerAmount copy() { - return new TargetCreatureOrPlayerAmount(this); - } -} diff --git a/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayerAmount.java b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayerAmount.java index 63b3799d33a..9e42eb94fb6 100644 --- a/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayerAmount.java +++ b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayerAmount.java @@ -22,10 +22,6 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount { protected FilterPermanentOrPlayer filter; - TargetPermanentOrPlayerAmount(DynamicValue amount) { - this(amount, 0); - } - TargetPermanentOrPlayerAmount(DynamicValue amount, int maxNumberOfTargets) { super(amount); this.maxNumberOfTargets = maxNumberOfTargets;