Project to gain insight into an MTG Deck’s statistics. Was rebased from deckStats because a web page by that name (that also includes this functionality) was created.
Deck loading behavior is in the ebarrientos.deckStats.load
package, through
the DeckLoader
trait. The main implementation is XMLDeckLoader
, that uses
the Cockatrice xml format.
The ebarrientos.deckStats.load
package also contains classes for loading
card information. There are seeral implementations, depending on where it
queries information from.
- Local storage
- XMLCardLoader
- Load from an XML file.
H2DBDoobieLoader- Load from an H2DB database using Doobie Deprecated
- This was removed as part of the move to ZIO2. We are using the Quill loader instead
- H2DBQuillLoader
- Load from an H2DB database using Quill
- DB configuration can be set in application.conf
- Remote
- MagicIOLoader
- Load from
api.magicthegathering.io
ScryCardLoader- Load from scry.me.uk Deprecated
MagicAPICardLoader- Load from http://stegriff.co.uk/ Deprecated
- Other
- WeakCachedLoader
- Card info cache. It requires a helper loader to get information the first time. Useful to avoid loading from remote sources more than once.
- MtgJsonLoader
- Loads cards that are in MtgJson format. It takes the Json directly and transforms it into a card.
The object ebarrientos.deckStats.math.Calc offers methods for calculating
metrics of a deck. It has methods for obtaining averages, counts, etc.
Also, ebarrientos.deckStats.queries.DeckCalc provides a deck level version
that relies internally on Calc
.
Upload a deck through the interface, see your information. By default runs on
http://localhost:8080. Run it with ./mill tapir.run