Braces left in for split mana costs in xml (#3108)
This commit is contained in:
parent
019295931a
commit
65ef66cfa7
1 changed files with 11 additions and 3 deletions
|
@ -78,9 +78,17 @@ CardInfoPtr OracleImporter::addCard(const QString &setName,
|
|||
if (cards.contains(cardName)) {
|
||||
card = cards.value(cardName);
|
||||
} else {
|
||||
// Remove {} around mana costs
|
||||
cardCost.remove(QChar('{'));
|
||||
cardCost.remove(QChar('}'));
|
||||
// Remove {} around mana costs, except if it's split cost
|
||||
QStringList symbols = cardCost.split("}");
|
||||
QString formattedCardCost = QString();
|
||||
for (QString symbol : symbols) {
|
||||
if (symbol.contains(QRegExp("[BWUGR]/[BWUGR]"))) {
|
||||
symbol.append("}");
|
||||
} else {
|
||||
symbol.remove(QChar('{'));
|
||||
}
|
||||
formattedCardCost.append(symbol);
|
||||
}
|
||||
|
||||
// detect mana generator artifacts
|
||||
bool mArtifact = false;
|
||||
|
|
Loading…
Reference in a new issue