mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
fixed "any" mana bug with choice not getting reset
This commit is contained in:
@@ -354,6 +354,9 @@ public class AbilityFactoryMana {
|
||||
abMana.produceMana(AbilityFactoryMana.generatedMana(abMana, af, sa), player);
|
||||
}
|
||||
|
||||
// Only clear express choice after mana has been produced
|
||||
abMana.clearExpressChoice();
|
||||
|
||||
// convert these to SubAbilities when appropriate
|
||||
if (params.containsKey("Stuck")) {
|
||||
abMana.setUndoable(false);
|
||||
|
||||
@@ -702,12 +702,12 @@ public class ManaPool {
|
||||
// paying via Mana Abilities
|
||||
for (final AbilityMana mability : mAbilities) {
|
||||
paidAbs.add(mability); // why???
|
||||
//TODO: Look at using new getManaProduced() method of Ability_Mana (ArsenalNut)
|
||||
//String[] cost = formatMana(mability);
|
||||
String[] cost = null;
|
||||
if (mability.isAnyMana()) {
|
||||
cost = new String[1];
|
||||
cost[0] = mability.getExpressChoice();
|
||||
//TODO: (ArsenalNut) Look at using new getManaProduced() method of Ability_Mana
|
||||
// for all mana sources not just "any" mana sources
|
||||
cost = mability.getManaProduced().split(" ");
|
||||
}
|
||||
else {
|
||||
cost = formatMana(mability);
|
||||
|
||||
@@ -292,6 +292,16 @@ public abstract class AbilityMana extends AbilityActivated implements java.io.Se
|
||||
return this.lastExpressChoice;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* clearExpressChoice.
|
||||
* </p>
|
||||
*
|
||||
*/
|
||||
public void clearExpressChoice() {
|
||||
this.lastExpressChoice = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>lastProduced</code>.
|
||||
|
||||
@@ -192,9 +192,6 @@ public class InputPayManaCostUtil {
|
||||
|
||||
manaCost = AllZone.getHumanPlayer().getManaPool().subtractMana(sa, manaCost, chosen);
|
||||
|
||||
// reset choice to blank, make sure this done after subtractMana
|
||||
chosen.setExpressChoice("");
|
||||
|
||||
AllZone.getHumanPlayer().getZone(Zone.Battlefield).updateObservers();
|
||||
// DO NOT REMOVE THIS, otherwise the cards don't always tap (copied)
|
||||
return manaCost;
|
||||
|
||||
Reference in New Issue
Block a user