A web application for finding similar Lorcana cards based on various attributes and characteristics.
This project is not affiliated with or endorsed by the creators of Lorcana. It is a personal project created for fun and to experiment with finding an easier way to find similar cards for deck building. I'm not claiming this is good code, and it's provided as is. Feel free to use it for your own purposes, but I'm not responsible for any issues it may cause.
I wanted to find a way to easily find similar cards for deck building. One of the most common issues is not having access to specific cards that are common in competitive decks, because they are either too expensive or not available on the secondary market.
Also I felt that there are a lot of cards that are similar in some way, but not exactly the same, and it would be helpful to have a way to find them to better utilize your collection.
Think of it as a poor man's deckbuilder helper.
I did try to find a similar tool, but I couldn't find anything that was exactly what I wanted, so I decided to build my own.
- Find similar cards based on multiple attributes
- Adjustable similarity weights
- Interactive web interface
- Real-time card comparison
- Price checking integration with CardTrader
Here is a breakdown of the attributes that are used to compare cards.
- Ink Cost: Ink cost of the card.
- Strength: Strength of the card.
- Willpower: Willpower of the card.
- Lore Points: Lore points of the card.
- Tags: List of tags that are on the card.
- Ability: The ability text of the card. This is one of the key features of this project. I use a sentence transformer model to embed the ability text and then compare the embeddings to find similar cards. The idea being that through the embedding process, the ability text is converted into a vector space where the similarity can be calculated. This might lead to interesting results that might not be obvious otherwise.
- Mechanics: This is a list of mechanics that are on the cards abilities section. The list is not exhaustive, but it is a start.
- Ink Color: Amber, Amethyst, Emerald, Ruby, Sapphire, Steel
- Card Type: Character, Action, Item, Location
- Inkwell: is this card inkable or not?
- In detail breakdown of individual cards and their similar counterparts
- Same but you can enter a list of cards to analyze
- WIP: Based on an exported lorcana collection csv file from dreamborn.ink and a decklist that you want to breakdown, extract the most similar deck that you can build with the cards in your personal collection.
- Also get a breakdown of why each card was chosen to be part of the deck
- Python 3.12.3+
- Dependencies listed in requirements.txt
- Clone the repository:
git clone https://github.com/heavenideas/similcana.git
cd similcana
- Install dependencies:
pip install -r requirements.txt
- Ensure the database file is present:
- Place
allCards.json
in thedatabase/
directory
- Start the Flask application:
python app.py
- Access the application in your web browser at
http://127.0.0.1:10000/
app.py
: Main Flask applicationdatabase/
: Database filesstatic/
: Static files (CSS, JavaScript)templates/
: HTML templatesrequirements.txt
: Project dependencies
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- LorcanaJSON: The LorcanaJSON project is a great resource for Lorcana card data. I used the data from this project to create my database.