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);
|
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
|
// convert these to SubAbilities when appropriate
|
||||||
if (params.containsKey("Stuck")) {
|
if (params.containsKey("Stuck")) {
|
||||||
abMana.setUndoable(false);
|
abMana.setUndoable(false);
|
||||||
|
|||||||
@@ -702,12 +702,12 @@ public class ManaPool {
|
|||||||
// paying via Mana Abilities
|
// paying via Mana Abilities
|
||||||
for (final AbilityMana mability : mAbilities) {
|
for (final AbilityMana mability : mAbilities) {
|
||||||
paidAbs.add(mability); // why???
|
paidAbs.add(mability); // why???
|
||||||
//TODO: Look at using new getManaProduced() method of Ability_Mana (ArsenalNut)
|
|
||||||
//String[] cost = formatMana(mability);
|
//String[] cost = formatMana(mability);
|
||||||
String[] cost = null;
|
String[] cost = null;
|
||||||
if (mability.isAnyMana()) {
|
if (mability.isAnyMana()) {
|
||||||
cost = new String[1];
|
//TODO: (ArsenalNut) Look at using new getManaProduced() method of Ability_Mana
|
||||||
cost[0] = mability.getExpressChoice();
|
// for all mana sources not just "any" mana sources
|
||||||
|
cost = mability.getManaProduced().split(" ");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cost = formatMana(mability);
|
cost = formatMana(mability);
|
||||||
|
|||||||
@@ -292,6 +292,16 @@ public abstract class AbilityMana extends AbilityActivated implements java.io.Se
|
|||||||
return this.lastExpressChoice;
|
return this.lastExpressChoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* clearExpressChoice.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void clearExpressChoice() {
|
||||||
|
this.lastExpressChoice = "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Getter for the field <code>lastProduced</code>.
|
* Getter for the field <code>lastProduced</code>.
|
||||||
|
|||||||
@@ -192,9 +192,6 @@ public class InputPayManaCostUtil {
|
|||||||
|
|
||||||
manaCost = AllZone.getHumanPlayer().getManaPool().subtractMana(sa, manaCost, chosen);
|
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();
|
AllZone.getHumanPlayer().getZone(Zone.Battlefield).updateObservers();
|
||||||
// DO NOT REMOVE THIS, otherwise the cards don't always tap (copied)
|
// DO NOT REMOVE THIS, otherwise the cards don't always tap (copied)
|
||||||
return manaCost;
|
return manaCost;
|
||||||
|
|||||||
Reference in New Issue
Block a user