ManaClash is written in Python. The web interface uses the Autobahn library for websockets communication between the server and the web browser.
ManaClash only implements the MTG rules and doesn't contain information about any particular cards. The card information is parsed from the "oracle" text files.
oracle/8th_edition.txt
.Note that ManaClash currently only understand a subset of the 8th Edition, so the other editions and sets will not work very well.
The resulting file should look like this:
Name: Abyssal Specter Cost: 2BB Type: Creature — Specter Pow/Tgh: (2/3) Rules Text: Flying Whenever Abyssal Specter deals damage to a player, that player discards a card. Set/Rarity: ...
Name: Air Elemental Cost: 3UU Type: Creature — Elemental Pow/Tgh: (4/4) Rules Text: Flying Set/Rarity: ... ...
Create text files, such as decks/deckname.txt
(UTF-8 encoded) containing decks in the following format
20 Swamp 4 Dark Banishing 3 Megrim ...
The filename will be used as the deck name in the web client UI.
You may now start the command-line program mc.py
program to verify the cards are parsed correctly:
python mc.py decks/deck1.txt decks/deck2.txt
You may now start the webserver, which binds to the port 8080 by default:
python abserver.py
ManaClash should be running on http://localhost:8080
.