mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Improve Colorless Mana Payment when amount in ManaPool is <= to amount of Colorless Mana, or only one type of Mana in the pool.
This commit is contained in:
@@ -261,8 +261,11 @@ public class ManaPool extends Card {
|
||||
normalMana[map.get(m.getColor())] += m.getAmount();
|
||||
}
|
||||
|
||||
int totalMana = 0;
|
||||
ArrayList<String> alChoice = new ArrayList<String>();
|
||||
for(int i = 0; i < normalMana.length; i++){
|
||||
totalMana += normalMana[i];
|
||||
totalMana += snowMana[i];
|
||||
if (normalMana[i] > 0){
|
||||
alChoice.add(manaStrings[i]+"("+normalMana[i]+")");
|
||||
}
|
||||
@@ -271,7 +274,17 @@ public class ManaPool extends Card {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (alChoice.size() == 1){
|
||||
choice = manaChoices.get(0);
|
||||
return choice;
|
||||
}
|
||||
|
||||
int numColorless = Integer.parseInt(manaStr);
|
||||
if (numColorless >= totalMana){
|
||||
choice = manaChoices.get(0);
|
||||
return choice;
|
||||
}
|
||||
|
||||
Object o = AllZone.Display.getChoiceOptional("Pay Mana from Mana Pool", alChoice.toArray());
|
||||
if (o != null){
|
||||
String ch = o.toString();
|
||||
|
||||
Reference in New Issue
Block a user