diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-02-21 18:12:14 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | 9982e11fe4b48cb36a92d09d086d792b08831813 (patch) | |
tree | cb963f6c0462413ca2ac925933482494fa8b5a70 | |
parent | 92d41ac9c88e212963e6e5b1700a7d4a124bbc04 (diff) | |
download | wilderness-war-9982e11fe4b48cb36a92d09d086d792b08831813.tar.gz |
Bake card event names into data.js
-rw-r--r-- | rules.js | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -26,6 +26,8 @@ // TODO: abbreviate per-player (game.British.xxx) property name (game.b.xxx) // TODO: move core of is_friendly/enemy to is_british/french and branch in is_friendly/enemy // TODO: for_each_exit -> flat list of all exits +// TODO: use is_enemy_occupied(s) instead of has_unbesieged_enemy_units || has_unbesieged_enemy_fortifications +// TODO: use game.french.fortresses for victory checks // UI: show discard/removed card list in UI // UI: show pool leaders in their own box // UI: show dead leaders as grayed out in own box @@ -65,15 +67,6 @@ let last_french_piece = -1; let british_militia_units = []; let french_militia_units = []; -// Create card event names. -for (let c = 1; c < cards.length; ++c) { - cards[c].event = cards[c].name - .replace(/&/g, "and") - .replace(/!/g, "") - .replace(/ /g, "_") - .toLowerCase(); -} - // Figure out piece indices. for (let p = 1; p <= last_piece; ++p) { if (pieces[p].faction === 'british') { |