mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
removed TargetAdjustment as it is no longer necessary
This commit is contained in:
parent
b833fc7f77
commit
407611c11b
4 changed files with 14 additions and 45 deletions
|
@ -13,7 +13,6 @@ import mage.abilities.effects.Effects;
|
|||
import mage.constants.AbilityType;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.EffectType;
|
||||
import mage.constants.TargetAdjustment;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Controllable;
|
||||
import mage.game.Game;
|
||||
|
@ -532,8 +531,4 @@ public interface Ability extends Controllable, Serializable {
|
|||
TargetAdjuster getTargetAdjuster();
|
||||
|
||||
void adjustTargets(Game game);
|
||||
|
||||
void setTargetAdjustment(TargetAdjustment targetAdjustment);
|
||||
|
||||
TargetAdjustment getTargetAdjustment();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ public abstract class AbilityImpl implements Ability {
|
|||
protected List<Watcher> watchers = new ArrayList<>();
|
||||
protected List<Ability> subAbilities = null;
|
||||
protected boolean canFizzle = true;
|
||||
protected TargetAdjustment targetAdjustment = TargetAdjustment.NONE;
|
||||
protected TargetAdjuster targetAdjuster = null;
|
||||
|
||||
public AbilityImpl(AbilityType abilityType, Zone zone) {
|
||||
|
@ -120,7 +119,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
this.sourceObject = ability.sourceObject;
|
||||
this.sourceObjectZoneChangeCounter = ability.sourceObjectZoneChangeCounter;
|
||||
this.canFizzle = ability.canFizzle;
|
||||
this.targetAdjustment = ability.targetAdjustment;
|
||||
this.targetAdjuster = ability.targetAdjuster;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1225,23 +1224,13 @@ public abstract class AbilityImpl implements Ability {
|
|||
this.canFizzle = canFizzle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTargetAdjustment(TargetAdjustment targetAdjustment) {
|
||||
this.targetAdjustment = targetAdjustment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TargetAdjustment getTargetAdjustment() {
|
||||
return targetAdjustment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTargetAdjuster(TargetAdjuster targetAdjuster) {
|
||||
this.targetAdjuster = targetAdjuster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TargetAdjustment getTargetAdjuster() {
|
||||
public TargetAdjuster getTargetAdjuster() {
|
||||
return targetAdjuster;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
package mage.constants;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum TargetAdjustment {
|
||||
NONE,
|
||||
X_TARGETS,
|
||||
X_CMC_EQUAL_PERM,
|
||||
X_CMC_EQUAL_GY_CARD,
|
||||
X_POWER_LEQ,
|
||||
CHOSEN_NAME,
|
||||
CHOSEN_COLOR,
|
||||
VERSE_COUNTER_TARGETS,
|
||||
TREASURE_COUNTER_POWER,
|
||||
SIMIC_MANIPULATOR,
|
||||
CREATURE_POWER_X_OR_LESS,
|
||||
X_CMC_EQUAL_SPELL_CONTROLLED
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.game.stack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -28,6 +27,7 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.Targets;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
import mage.util.GameLog;
|
||||
import mage.util.SubTypeList;
|
||||
import mage.watchers.Watcher;
|
||||
|
@ -49,7 +49,7 @@ public class StackAbility extends StackObjImpl implements Ability {
|
|||
private UUID controllerId;
|
||||
private String name;
|
||||
private String expansionSetCode;
|
||||
private TargetAdjustment targetAdjustment = TargetAdjustment.NONE;
|
||||
private TargetAdjuster targetAdjuster = null;
|
||||
|
||||
public StackAbility(Ability ability, UUID controllerId) {
|
||||
this.ability = ability;
|
||||
|
@ -62,7 +62,7 @@ public class StackAbility extends StackObjImpl implements Ability {
|
|||
this.controllerId = stackAbility.controllerId;
|
||||
this.name = stackAbility.name;
|
||||
this.expansionSetCode = stackAbility.expansionSetCode;
|
||||
this.targetAdjustment = stackAbility.targetAdjustment;
|
||||
this.targetAdjuster = stackAbility.targetAdjuster;
|
||||
this.targetChanged = stackAbility.targetChanged;
|
||||
}
|
||||
|
||||
|
@ -596,12 +596,17 @@ public class StackAbility extends StackObjImpl implements Ability {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setTargetAdjustment(TargetAdjustment targetAdjustment) {
|
||||
this.targetAdjustment = targetAdjustment;
|
||||
public void setTargetAdjuster(TargetAdjuster targetAdjuster) {
|
||||
this.targetAdjuster = targetAdjuster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TargetAdjustment getTargetAdjustment() {
|
||||
return targetAdjustment;
|
||||
public TargetAdjuster getTargetAdjuster() {
|
||||
return targetAdjuster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Game game) {
|
||||
this.targetAdjuster.adjustTargets(this, game);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue