mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
refactor: remove unused class and constructors
This commit is contained in:
parent
4edce76732
commit
682a9d1aa6
3 changed files with 1 additions and 58 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue