No description
Find a file
2023-09-15 20:19:01 +03:00
src/runeterra_decks Add patch 4.9.0 Fate's Voyage. 2023-09-15 20:18:47 +03:00
tests Add patch 4.9.0 Fate's Voyage. 2023-09-15 20:18:47 +03:00
tools Add patch 4.9.0 Fate's Voyage. 2023-09-15 20:18:47 +03:00
.gitignore Preserve enum order with unstable json. Extract all enum definitions from official datasets. 2021-01-22 13:55:07 +02:00
LICENSE Initial implementation. Version 0.1.0 2020-11-26 22:49:11 +02:00
README.md Update README.md 2021-01-16 17:16:06 +02:00
runeterra_decks.nimble Version 0.9.1 2023-09-15 20:19:01 +03:00

runeterra_decks

Legends of Runeterra deck/card code encoder/decoder and card infomation provider in Nim.

Example usage

import runeterra_decks/[cards, codes]


let code = "CEBAIAYGAQDQQDYHAMER2IZNGM2DOVICAEBQMCICAMETYYQBAEBQSEY"
var (deck, format, version) = parseDeck code

echo deck[10].code

deck[5].card = Card(`set`: 1, faction: Noxus, number: 5)

echo deck.serialize

Card info

You can query card info using runeterra_decks/info module which provides getInfo procedures. This significantly increases binary size.

echo deck[5].getInfo.name

if deck[0].getInfo.supertype == csupChampion:
  echo deck[0].getInfo.levelupDescription

for cards in deck:
  let info = cards.getInfo
  if csubSpider in info.subtypes and info.cost > 2:
    echo info.name

Or you can query entire runeterra library.

import tables, runeterra_decks/[info, cards]

for card, info in runeterraLibrary:
  if DoubleStrike in info.keywords:
    echo info