diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-06-22 22:50:57 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-07 18:39:37 +0200 |
commit | fcfed0cab586ecf3e2e6803e27f7cb0b38cb0898 (patch) | |
tree | 81b7f834e61c3c9b9848f2e20f8c94689febe3c2 /tools | |
parent | 5b91837ae8c298ca0110854c48a1bf2fb6bea69a (diff) | |
download | time-of-crisis-fcfed0cab586ecf3e2e6803e27f7cb0b38cb0898.tar.gz |
Pretender (part 1).
Create, display, and gain legacy.
Also renumber cards.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gencards.js | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tools/gencards.js b/tools/gencards.js new file mode 100644 index 0000000..ee88c70 --- /dev/null +++ b/tools/gencards.js @@ -0,0 +1,52 @@ +var ix = 0 +var xx = 0 + +const M = 0 +const S = 1 +const P = 2 + +const CARD_INDEX = [] +const CARD_INFO = [] + +function mk(n, type, cost, name, event) { + CARD_INFO[xx] = { name, type, cost, event } + var a = ix + var b = ix + n - 1 + for (let i = 0; i < n; ++i) + CARD_INDEX[a + i] = xx + console.log("const CARD_" + name + " = [ " + a + ", " + b + " ]") + ix = b + 1 + xx += 1 +} + +mk(12, M, 1, "M1", "None") +mk(12, S, 1, "S1", "None") +mk(12, P, 1, "P1", "None") + +mk(9, M, 2, "M2", "Castra") +mk(9, S, 2, "S2", "Tribute") +mk(9, P, 2, "P2", "Quaestor") + +mk(9, M, 2, "M2X", "Cavalry") +mk(9, S, 2, "S2X", "Princeps Senatus") +mk(9, P, 2, "P2X", "Ambitus") + +mk(8, M, 3, "M3", "Flanking Maneuver") +mk(8, S, 3, "S3", "Foederati") +mk(8, P, 3, "P3", "Mob") + +mk(8, M, 3, "M3X", "Force March") +mk(8, S, 3, "S3X", "Frumentarii") +mk(8, P, 3, "P3X", "Mobile Vulgus") + +mk(6, M, 4, "M4", "Praetorian Guard") +mk(6, S, 4, "S4", "Damnatio Memoriae") +mk(6, S, 4, "S4B", "Damnatio Memoriae (exp)") +mk(6, P, 4, "P4", "Pretender") + +mk(6, M, 4, "M4X", "Spiculum") +mk(6, S, 4, "S4X", "Triumph") +mk(6, P, 4, "P4X", "Demagogue") + +console.log("const CARD_INDEX = " + JSON.stringify(CARD_INDEX)) +console.log("const CARD_INFO = " + JSON.stringify(CARD_INFO)) |