mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28: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,11 +17,14 @@ public class ManaCost {
|
|||||||
//"GW" can be paid with either G or W
|
//"GW" can be paid with either G or W
|
||||||
|
|
||||||
public ManaCost(String manaCost) {
|
public ManaCost(String manaCost) {
|
||||||
if (manaCost.equals("") || manaCost.equals("X"))
|
if (manaCost.equals(""))
|
||||||
manaCost = "0";
|
manaCost = "0";
|
||||||
|
|
||||||
while (manaCost.startsWith("X")){
|
while (manaCost.startsWith("X")){
|
||||||
manaCost = manaCost.substring(2);
|
if (manaCost.length() < 2)
|
||||||
|
manaCost = "0";
|
||||||
|
else
|
||||||
|
manaCost = manaCost.substring(2);
|
||||||
xcounter++;
|
xcounter++;
|
||||||
}
|
}
|
||||||
manaPart = split(manaCost);
|
manaPart = split(manaCost);
|
||||||
|
|||||||
Reference in New Issue
Block a user