mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fix for ManaCost where X X doesn't have an additional mana payment (and causes an out of range error
This commit is contained in:
@@ -17,10 +17,13 @@ public class ManaCost {
|
||||
//"GW" can be paid with either G or W
|
||||
|
||||
public ManaCost(String manaCost) {
|
||||
if (manaCost.equals("") || manaCost.equals("X"))
|
||||
if (manaCost.equals(""))
|
||||
manaCost = "0";
|
||||
|
||||
while (manaCost.startsWith("X")){
|
||||
if (manaCost.length() < 2)
|
||||
manaCost = "0";
|
||||
else
|
||||
manaCost = manaCost.substring(2);
|
||||
xcounter++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user