mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
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:
parent
d07bf1211a
commit
ca5f1dd434
6 changed files with 30 additions and 13 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue