prioritize creature on maincardtype (#3611)
This commit is contained in:
parent
477faafb84
commit
fafdb65453
1 changed files with 12 additions and 4 deletions
|
@ -242,9 +242,17 @@ int OracleImporter::importCardsFromSet(CardSetPtr currentSet, const QList<QVaria
|
||||||
if (!colorIdentity.isEmpty())
|
if (!colorIdentity.isEmpty())
|
||||||
properties.insert("coloridentity", colorIdentity);
|
properties.insert("coloridentity", colorIdentity);
|
||||||
|
|
||||||
maintype = card.value("types").toStringList().first();
|
{
|
||||||
if (!maintype.isEmpty())
|
const auto &typeList = card.value("types").toStringList();
|
||||||
properties.insert("maintype", maintype);
|
if (typeList.contains("Creature")) {
|
||||||
|
properties.insert("maintype", "Creature");
|
||||||
|
} else {
|
||||||
|
const auto &maintype = typeList.first();
|
||||||
|
if (!maintype.isEmpty()) {
|
||||||
|
properties.insert("maintype", maintype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
power = getStringPropertyFromMap(card, "power");
|
power = getStringPropertyFromMap(card, "power");
|
||||||
toughness = getStringPropertyFromMap(card, "toughness");
|
toughness = getStringPropertyFromMap(card, "toughness");
|
||||||
|
|
Loading…
Reference in a new issue