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)) {
|
if (cards.contains(cardName)) {
|
||||||
card = cards.value(cardName);
|
card = cards.value(cardName);
|
||||||
} else {
|
} else {
|
||||||
// Remove {} around mana costs
|
// Remove {} around mana costs, except if it's split cost
|
||||||
cardCost.remove(QChar('{'));
|
QStringList symbols = cardCost.split("}");
|
||||||
cardCost.remove(QChar('}'));
|
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
|
// detect mana generator artifacts
|
||||||
bool mArtifact = false;
|
bool mArtifact = false;
|
||||||
|
|
Loading…
Reference in a new issue