From 2c2d6df64e9c16a23447cb6ca5bd7889b857e731 Mon Sep 17 00:00:00 2001 From: Sloth Date: Wed, 23 May 2012 15:33:25 +0000 Subject: [PATCH] - Removed some unused functions. --- .../card/spellability/AbilityTriggered.java | 6 ----- .../forge/card/spellability/SpellAbility.java | 24 ------------------- .../card/spellability/SpellAbilityList.java | 6 ++--- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/src/main/java/forge/card/spellability/AbilityTriggered.java b/src/main/java/forge/card/spellability/AbilityTriggered.java index faa1f0612d9..71e75843bd5 100644 --- a/src/main/java/forge/card/spellability/AbilityTriggered.java +++ b/src/main/java/forge/card/spellability/AbilityTriggered.java @@ -107,12 +107,6 @@ public class AbilityTriggered extends Ability implements Command { return false; } // this is a triggered ability: it cannot be "played" - /** {@inheritDoc} */ - @Override - public final boolean canAfford() { - return false; - } // this is a triggered ability: it cannot be "afforded" - /** {@inheritDoc} */ @Override public final void resolve() { diff --git a/src/main/java/forge/card/spellability/SpellAbility.java b/src/main/java/forge/card/spellability/SpellAbility.java index 67d48b0412c..7c2d632fe35 100644 --- a/src/main/java/forge/card/spellability/SpellAbility.java +++ b/src/main/java/forge/card/spellability/SpellAbility.java @@ -30,7 +30,6 @@ import forge.card.abilityfactory.AbilityFactory; import forge.card.cost.Cost; import forge.card.mana.Mana; import forge.control.input.Input; -import forge.game.player.ComputerUtil; import forge.game.player.Player; //only SpellAbility can go on the stack @@ -161,29 +160,6 @@ public abstract class SpellAbility { */ public abstract boolean canPlay(); - /** - * Can afford. - * - * @return boolean - */ - public boolean canAfford() { - Player activator = this.getActivatingPlayer(); - if (activator == null) { - activator = this.getSourceCard().getController(); - } - - return ComputerUtil.canPayCost(this, activator); - } - - /** - * Can play and afford. - * - * @return true, if successful - */ - public final boolean canPlayAndAfford() { - return this.canPlay() && this.canAfford(); - } - // all Spell's and Abilities must override this method /** *

diff --git a/src/main/java/forge/card/spellability/SpellAbilityList.java b/src/main/java/forge/card/spellability/SpellAbilityList.java index d7e21c35348..ccdc5cb26fa 100644 --- a/src/main/java/forge/card/spellability/SpellAbilityList.java +++ b/src/main/java/forge/card/spellability/SpellAbilityList.java @@ -19,8 +19,6 @@ package forge.card.spellability; import java.util.ArrayList; -import forge.game.player.ComputerUtil; - /** *

* SpellAbilityList class. @@ -135,7 +133,7 @@ public class SpellAbilityList { * execute. *

*/ - public final void execute() { + /*public final void execute() { for (int i = 0; i < this.size(); i++) { if (!ComputerUtil.canPayCost(this.get(i))) { throw new RuntimeException("SpellAbilityList : execute() error, cannot pay for the spell " @@ -144,7 +142,7 @@ public class SpellAbilityList { ComputerUtil.playNoStack(this.get(i)); } - } // execute() + }*/ // execute() /** {@inheritDoc} */ @Override