skip more cards (#3715)

closes #3713
This commit is contained in:
ebbit1q 2019-05-09 09:37:04 +02:00 committed by ctrlaltca
parent 0dc4cc7e03
commit 3830c85ce6

View file

@ -249,20 +249,32 @@ int OracleImporter::importCardsFromSet(CardSetPtr currentSet, const QList<QVaria
setInfo.setProperty(xmlPropertyName, propertyValue); setInfo.setProperty(xmlPropertyName, propertyValue);
} }
// skip alternatives
if (getStringPropertyFromMap(card, "isAlternative") == "true") {
continue;
}
// skip cards containing a star char in the collectors number // skip cards containing a star char in the collectors number
if (setInfo.getProperty("num").contains("")) { if (setInfo.getProperty("num").contains("")) {
continue; continue;
} }
// skip prerelease foils
if (setInfo.getProperty("num").contains("s")) {
continue;
}
// special handling properties // special handling properties
colors = card.value("colors").toStringList().join(""); colors = card.value("colors").toStringList().join("");
if (!colors.isEmpty()) if (!colors.isEmpty()) {
properties.insert("colors", colors); properties.insert("colors", colors);
}
// special handling properties // special handling properties
colorIdentity = card.value("colorIdentity").toStringList().join(""); colorIdentity = card.value("colorIdentity").toStringList().join("");
if (!colorIdentity.isEmpty()) if (!colorIdentity.isEmpty()) {
properties.insert("coloridentity", colorIdentity); properties.insert("coloridentity", colorIdentity);
}
const auto &mainCardType = getMainCardType(card.value("types").toStringList()); const auto &mainCardType = getMainCardType(card.value("types").toStringList());
if (!mainCardType.isEmpty()) { if (!mainCardType.isEmpty()) {
@ -271,8 +283,9 @@ int OracleImporter::importCardsFromSet(CardSetPtr currentSet, const QList<QVaria
power = getStringPropertyFromMap(card, "power"); power = getStringPropertyFromMap(card, "power");
toughness = getStringPropertyFromMap(card, "toughness"); toughness = getStringPropertyFromMap(card, "toughness");
if (!(power.isEmpty() && toughness.isEmpty())) if (!(power.isEmpty() && toughness.isEmpty())) {
properties.insert("pt", power + ptSeparator + toughness); properties.insert("pt", power + ptSeparator + toughness);
}
additionalNames = card.value("names").toStringList(); additionalNames = card.value("names").toStringList();