mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
updated verify check to handle mana abilities being split
This commit is contained in:
parent
524b9fcd44
commit
a2ae0bc9b8
1 changed files with 14 additions and 1 deletions
|
@ -1449,7 +1449,6 @@ public class VerifyCardDataTest {
|
|||
if (refText.contains("[") && refText.contains("]")) {
|
||||
refText = refText.replace("[", "").replace("]", "");
|
||||
}
|
||||
|
||||
// evergreen keyword fix
|
||||
for (String s : refText.split("[\\$\\\n]")) {
|
||||
if (Arrays
|
||||
|
@ -1472,6 +1471,20 @@ public class VerifyCardDataTest {
|
|||
.replace("\n•", "<br>&bull ");
|
||||
refText += "<br>";
|
||||
}
|
||||
// mana ability fix
|
||||
for (String s : refText.split("[\\$\\\n]")) {
|
||||
if (!s.startsWith("{T}: Add {") || !s.contains("} or {")) {
|
||||
continue;
|
||||
}
|
||||
String newStr = "";
|
||||
for (String c : s.split("[\\{\\}]")) {
|
||||
if ("WUBRG".contains(c) && c.length() > 0) {
|
||||
newStr += "{T}: Add {" + c + "}.\n";
|
||||
}
|
||||
}
|
||||
refText = refText.replace(s, newStr);
|
||||
}
|
||||
|
||||
|
||||
String[] refRules = refText.split("[\\$\\\n]"); // ref card's abilities can be splited by \n or $ chars
|
||||
for (int i = 0; i < refRules.length; i++) {
|
||||
|
|
Loading…
Reference in a new issue