- Fixed a crash (varolz, the scar-striped + dryad arbor)

This commit is contained in:
swordshine
2018-04-02 11:55:44 +08:00
parent af70a1f58b
commit eeec3feb1f
2 changed files with 10 additions and 1 deletions

View File

@@ -601,7 +601,13 @@ public final class StaticAbilityContinuous {
if (addKeywords != null) {
newKeywords = Arrays.copyOf(addKeywords, addKeywords.length);
for (int j = 0; j < newKeywords.length; ++j) {
newKeywords[j] = newKeywords[j].replace("CardManaCost", affectedCard.getManaCost().getShortString());
if (newKeywords[j].contains("CardManaCost")) {
if (affectedCard.getManaCost().isNoCost()) {
newKeywords[j] = ""; // prevent a crash (varolz the scar-striped + dryad arbor)
} else {
newKeywords[j] = newKeywords[j].replace("CardManaCost", affectedCard.getManaCost().getShortString());
}
}
}
}