mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Removed some unused functions.
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -19,8 +19,6 @@ package forge.card.spellability;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import forge.game.player.ComputerUtil;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SpellAbilityList class.
|
||||
@@ -135,7 +133,7 @@ public class SpellAbilityList {
|
||||
* execute.
|
||||
* </p>
|
||||
*/
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user