diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-23 09:03:57 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-23 09:03:57 +0200 |
commit | dbd210967deeccc035b5b1ac713917ab37a9a08a (patch) | |
tree | 77ae2f725a26995b12510d6a88fbcb5b84699104 | |
parent | 1670c2a19ab91d6e5f30080a469cf5c55aac902b (diff) | |
download | maria-dbd210967deeccc035b5b1ac713917ab37a9a08a.tar.gz |
renumber political cards to start at 0
-rw-r--r-- | cards.js | 2 | ||||
-rw-r--r-- | play.js | 8 | ||||
-rw-r--r-- | rules.js | 10 |
3 files changed, 10 insertions, 10 deletions
@@ -1,6 +1,6 @@ "use strict" -var political_cards = [ { title: null, powers: [], flavor: null, effects: [] } ] +var political_cards = [] ;(function () { @@ -67,7 +67,7 @@ const HEARTS = 2 const DIAMONDS = 3 const RESERVE = 4 -const IMPERIAL_ELECTION = 25 +const IMPERIAL_ELECTION = 24 const ELIMINATED = data.cities.name.length @@ -626,7 +626,7 @@ function on_init() { ui.italy.className = "marker political_marker_italy" ui.political = [] - for (let pc = 1; pc <= 25; ++pc) + for (let pc = 0; pc < 25; ++pc) ui.political[pc] = make_political_card(pc) ui.political_back = [ @@ -1092,9 +1092,9 @@ function on_update() { for (let e of ui.political_back[view.pol_deck]) ui.pc_deck.appendChild(e) if (view.flags & F_IMPERIAL_ELECTION) - ui.pc_deck.appendChild(ui.political[25]) + ui.pc_deck.appendChild(ui.political[24]) - for (let pc = 1; pc <= 25; ++pc) + for (let pc = 0; pc < 25; ++pc) ui.political[pc].classList.toggle("selected", pc === view.pc) for (let pow of all_major_powers) { @@ -99,7 +99,7 @@ const HEARTS = 2 const DIAMONDS = 3 const RESERVE = 4 -const IMPERIAL_ELECTION = 25 +const IMPERIAL_ELECTION = 24 const ELIMINATED = data.cities.name.length @@ -3826,10 +3826,10 @@ const setup_piece_position = [ ] function make_political_deck() { - let deck41 = [ 1, 2, 3, 4, 5, 6 ] - let deck42 = [ 7, 8, 9, 10, 11, 12, 25 ] - let deck43 = [ 13, 14, 15, 16, 17, 18 ] - let deck44 = [ 19, 20, 21, 22, 23, 24 ] + let deck41 = [ 0, 1, 2, 3, 4, 5 ] + let deck42 = [ 6, 7, 8, 9, 10, 11, 25 ] + let deck43 = [ 12, 13, 14, 15, 16, 17 ] + let deck44 = [ 18, 19, 20, 21, 22, 23 ] shuffle_bigint(deck41) shuffle_bigint(deck42) shuffle_bigint(deck43) |