forked from External/mage
[refactoring][minor] Replaced all tabs with four spaces.
This commit is contained in:
parent
e646e4768d
commit
239a4fb100
2891 changed files with 79411 additions and 79411 deletions
|
|
@ -60,279 +60,279 @@ import java.util.UUID;
|
|||
*/
|
||||
public class StackAbility implements StackObject, Ability {
|
||||
|
||||
private static List emptyList = new ArrayList();
|
||||
private static ObjectColor emptyColor = new ObjectColor();
|
||||
private static ManaCosts emptyCost = new ManaCostsImpl();
|
||||
private static Costs emptyCosts = new CostsImpl();
|
||||
private static Abilities<Ability> emptyAbilites = new AbilitiesImpl<Ability>();
|
||||
private static List emptyList = new ArrayList();
|
||||
private static ObjectColor emptyColor = new ObjectColor();
|
||||
private static ManaCosts emptyCost = new ManaCostsImpl();
|
||||
private static Costs emptyCosts = new CostsImpl();
|
||||
private static Abilities<Ability> emptyAbilites = new AbilitiesImpl<Ability>();
|
||||
|
||||
private Ability ability;
|
||||
private UUID controllerId;
|
||||
private Ability ability;
|
||||
private UUID controllerId;
|
||||
private String name = "";
|
||||
private String expansionSetCode;
|
||||
|
||||
public StackAbility(Ability ability, UUID controllerId) {
|
||||
this.ability = ability;
|
||||
this.controllerId = controllerId;
|
||||
}
|
||||
public StackAbility(Ability ability, UUID controllerId) {
|
||||
this.ability = ability;
|
||||
this.controllerId = controllerId;
|
||||
}
|
||||
|
||||
public StackAbility(final StackAbility spell) {
|
||||
this.ability = spell.ability.copy();
|
||||
this.controllerId = spell.controllerId;
|
||||
public StackAbility(final StackAbility spell) {
|
||||
this.ability = spell.ability.copy();
|
||||
this.controllerId = spell.controllerId;
|
||||
this.name = spell.name;
|
||||
this.expansionSetCode = spell.expansionSetCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean resolve(Game game) {
|
||||
if (ability.getTargets().stillLegal(ability, game)) {
|
||||
return ability.resolve(game);
|
||||
}
|
||||
counter(null, game);
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean resolve(Game game) {
|
||||
if (ability.getTargets().stillLegal(ability, game)) {
|
||||
return ability.resolve(game);
|
||||
}
|
||||
counter(null, game);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset(Game game) { }
|
||||
|
||||
@Override
|
||||
public void counter(UUID sourceId, Game game) {
|
||||
//20100716 - 603.8
|
||||
if (ability instanceof StateTriggeredAbility) {
|
||||
((StateTriggeredAbility)ability).counter(game);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void reset(Game game) { }
|
||||
|
||||
@Override
|
||||
public void counter(UUID sourceId, Game game) {
|
||||
//20100716 - 603.8
|
||||
if (ability instanceof StateTriggeredAbility) {
|
||||
((StateTriggeredAbility)ability).counter(game);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getExpansionSetCode() {
|
||||
return expansionSetCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CardType> getCardType() {
|
||||
return emptyList;
|
||||
}
|
||||
@Override
|
||||
public List<CardType> getCardType() {
|
||||
return emptyList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getSubtype() {
|
||||
return emptyList;
|
||||
}
|
||||
@Override
|
||||
public List<String> getSubtype() {
|
||||
return emptyList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSubtype(String subtype) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean hasSubtype(String subtype) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getSupertype() {
|
||||
return emptyList;
|
||||
}
|
||||
@Override
|
||||
public List<String> getSupertype() {
|
||||
return emptyList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Abilities getAbilities() {
|
||||
return emptyAbilites;
|
||||
}
|
||||
@Override
|
||||
public Abilities getAbilities() {
|
||||
return emptyAbilites;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObjectColor getColor() {
|
||||
return emptyColor;
|
||||
}
|
||||
@Override
|
||||
public ObjectColor getColor() {
|
||||
return emptyColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaCosts getManaCost() {
|
||||
return emptyCost;
|
||||
}
|
||||
@Override
|
||||
public ManaCosts getManaCost() {
|
||||
return emptyCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MageInt getPower() {
|
||||
return MageInt.EmptyMageInt;
|
||||
}
|
||||
@Override
|
||||
public MageInt getPower() {
|
||||
return MageInt.EmptyMageInt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MageInt getToughness() {
|
||||
return MageInt.EmptyMageInt;
|
||||
}
|
||||
@Override
|
||||
public MageInt getToughness() {
|
||||
return MageInt.EmptyMageInt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Zone getZone() {
|
||||
return this.ability.getZone();
|
||||
}
|
||||
@Override
|
||||
public Zone getZone() {
|
||||
return this.ability.getZone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getId() {
|
||||
return this.ability.getId();
|
||||
}
|
||||
@Override
|
||||
public UUID getId() {
|
||||
return this.ability.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getSourceId() {
|
||||
return this.ability.getSourceId();
|
||||
}
|
||||
@Override
|
||||
public UUID getSourceId() {
|
||||
return this.ability.getSourceId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getControllerId() {
|
||||
return this.controllerId;
|
||||
}
|
||||
@Override
|
||||
public UUID getControllerId() {
|
||||
return this.controllerId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Costs getCosts() {
|
||||
return emptyCosts;
|
||||
}
|
||||
@Override
|
||||
public Costs getCosts() {
|
||||
return emptyCosts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effects getEffects() {
|
||||
return ability.getEffects();
|
||||
}
|
||||
@Override
|
||||
public Effects getEffects() {
|
||||
return ability.getEffects();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effects getEffects(Game game, EffectType effectType) {
|
||||
return ability.getEffects(game, effectType);
|
||||
}
|
||||
@Override
|
||||
public Effects getEffects(Game game, EffectType effectType) {
|
||||
return ability.getEffects(game, effectType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return ability.getRule();
|
||||
}
|
||||
@Override
|
||||
public String getRule() {
|
||||
return ability.getRule();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule(boolean all) {
|
||||
return ability.getRule(all);
|
||||
}
|
||||
@Override
|
||||
public String getRule(boolean all) {
|
||||
return ability.getRule(all);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule(String source) {
|
||||
return ability.getRule(source);
|
||||
}
|
||||
@Override
|
||||
public String getRule(String source) {
|
||||
return ability.getRule(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setControllerId(UUID controllerId) {
|
||||
this.controllerId = controllerId;
|
||||
}
|
||||
@Override
|
||||
public void setControllerId(UUID controllerId) {
|
||||
this.controllerId = controllerId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceId(UUID sourceID) {}
|
||||
@Override
|
||||
public void setSourceId(UUID sourceID) {}
|
||||
|
||||
@Override
|
||||
public void addCost(Cost cost) {}
|
||||
@Override
|
||||
public void addCost(Cost cost) {}
|
||||
|
||||
@Override
|
||||
public void addEffect(Effect effect) {}
|
||||
@Override
|
||||
public void addEffect(Effect effect) {}
|
||||
|
||||
@Override
|
||||
public boolean activate(Game game, boolean noMana) {
|
||||
return ability.activate(game, noMana);
|
||||
}
|
||||
@Override
|
||||
public boolean activate(Game game, boolean noMana) {
|
||||
return ability.activate(game, noMana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Targets getTargets() {
|
||||
return ability.getTargets();
|
||||
}
|
||||
@Override
|
||||
public Targets getTargets() {
|
||||
return ability.getTargets();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTarget(Target target) {}
|
||||
@Override
|
||||
public void addTarget(Target target) {}
|
||||
|
||||
@Override
|
||||
public UUID getFirstTarget() {
|
||||
return ability.getFirstTarget();
|
||||
}
|
||||
@Override
|
||||
public UUID getFirstTarget() {
|
||||
return ability.getFirstTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Choices getChoices() {
|
||||
return ability.getChoices();
|
||||
}
|
||||
@Override
|
||||
public Choices getChoices() {
|
||||
return ability.getChoices();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addChoice(Choice choice) {}
|
||||
@Override
|
||||
public void addChoice(Choice choice) {}
|
||||
|
||||
@Override
|
||||
public List<AlternativeCost> getAlternativeCosts() {
|
||||
return ability.getAlternativeCosts();
|
||||
}
|
||||
@Override
|
||||
public List<AlternativeCost> getAlternativeCosts() {
|
||||
return ability.getAlternativeCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAlternativeCost(AlternativeCost cost) { }
|
||||
@Override
|
||||
public void addAlternativeCost(AlternativeCost cost) { }
|
||||
|
||||
@Override
|
||||
public ManaCosts getManaCosts() {
|
||||
return ability.getManaCosts();
|
||||
}
|
||||
@Override
|
||||
public ManaCosts getManaCosts() {
|
||||
return ability.getManaCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaCosts<ManaCost> getManaCostsToPay ( ) {
|
||||
return ability.getManaCostsToPay();
|
||||
}
|
||||
@Override
|
||||
public ManaCosts<ManaCost> getManaCostsToPay ( ) {
|
||||
return ability.getManaCostsToPay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addManaCost(ManaCost cost) { }
|
||||
@Override
|
||||
public void addManaCost(ManaCost cost) { }
|
||||
|
||||
@Override
|
||||
public AbilityType getAbilityType() {
|
||||
return ability.getAbilityType();
|
||||
}
|
||||
@Override
|
||||
public AbilityType getAbilityType() {
|
||||
return ability.getAbilityType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsesStack() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean isUsesStack() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StackAbility copy() {
|
||||
return new StackAbility(this);
|
||||
}
|
||||
@Override
|
||||
public StackAbility copy() {
|
||||
return new StackAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public void setExpansionSetCode(String expansionSetCode) {
|
||||
this.expansionSetCode = expansionSetCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {}
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {}
|
||||
|
||||
@Override
|
||||
public Costs<Cost> getOptionalCosts() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@Override
|
||||
public Costs<Cost> getOptionalCosts() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOptionalCost(Cost cost) {}
|
||||
@Override
|
||||
public void addOptionalCost(Cost cost) {}
|
||||
|
||||
@Override
|
||||
public boolean checkIfClause(Game game) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean checkIfClause(Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void newId() {
|
||||
@Override
|
||||
public void newId() {
|
||||
this.ability.newId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void newOriginalId() {}
|
||||
@Override
|
||||
public void newOriginalId() {}
|
||||
|
||||
@Override
|
||||
public Ability getStackAbility() {
|
||||
return ability;
|
||||
}
|
||||
public Ability getStackAbility() {
|
||||
return ability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModal() {
|
||||
return ability.isModal();
|
||||
}
|
||||
@Override
|
||||
public boolean isModal() {
|
||||
return ability.isModal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMode(Mode mode) {}
|
||||
@Override
|
||||
public void addMode(Mode mode) {}
|
||||
|
||||
@Override
|
||||
public Modes getModes() {
|
||||
return ability.getModes();
|
||||
}
|
||||
@Override
|
||||
public Modes getModes() {
|
||||
return ability.getModes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canChooseTarget(Game game) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue