parent
0dc4cc7e03
commit
3830c85ce6
1 changed files with 16 additions and 3 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue