update mv mapping (#4896)

This commit is contained in:
tooomm 2024-01-30 06:27:45 +01:00 committed by GitHub
parent 9776ea53c9
commit 94e39c044c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -189,7 +189,7 @@ int OracleImporter::importCardsFromSet(const CardSetPtr &currentSet,
{ {
// mtgjson name => xml name // mtgjson name => xml name
static const QMap<QString, QString> cardProperties{ static const QMap<QString, QString> cardProperties{
{"manaCost", "manacost"}, {"convertedManaCost", "cmc"}, {"type", "type"}, {"manaCost", "manacost"}, {"manaValue", "cmc"}, {"type", "type"},
{"loyalty", "loyalty"}, {"layout", "layout"}, {"side", "side"}, {"loyalty", "loyalty"}, {"layout", "layout"}, {"side", "side"},
}; };
@ -365,7 +365,7 @@ int OracleImporter::importCardsFromSet(const CardSetPtr &currentSet,
// add other face for split cards as card relation // add other face for split cards as card relation
if (!getStringPropertyFromMap(card, "side").isEmpty()) { if (!getStringPropertyFromMap(card, "side").isEmpty()) {
properties["cmc"] = getStringPropertyFromMap(card, "faceConvertedManaCost"); properties["cmc"] = getStringPropertyFromMap(card, "faceManaValue");
if (layout == "meld") { // meld cards don't work if (layout == "meld") { // meld cards don't work
static const QRegularExpression meldNameRegex{"then meld them into ([^\\.]*)"}; static const QRegularExpression meldNameRegex{"then meld them into ([^\\.]*)"};
QString additionalName = meldNameRegex.match(text).captured(1); QString additionalName = meldNameRegex.match(text).captured(1);