do some guesswork if cards can't be found (#4131)

modify up the simplifyCardName function to ignore right halves
add guessCard function that prioritises full card names the simple ones
fix imports for misformatted split cards or double faced cards
introduces a small concession: not completely formatted names with a
shared name on the left side will get mixed up, eg "bind" but not "Bind"
this should be fine considering how this would fix a lot more cards
This commit is contained in:
ebbit1q 2020-11-23 01:57:51 +01:00 committed by GitHub
parent d07bf1211a
commit ca5f1dd434
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 13 deletions

View file

@ -291,7 +291,7 @@ QString DeckLoader::getCardZoneFromName(QString cardName, QString currentZoneNam
QString DeckLoader::getCompleteCardName(const QString cardName) const
{
if (db) {
CardInfoPtr temp = db->getCardBySimpleName(cardName);
CardInfoPtr temp = db->guessCard(cardName);
if (temp) {
return temp->getName();
}