diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-04 15:17:23 -0400 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-04 15:17:23 -0400 |
commit | 59ea3cba9379983c3bacdc2b214438e9acd05071 (patch) | |
tree | 456e4ebe037175792de8316845e1fc898f42c56c /rules.js | |
parent | 7b6e520a85790661fb79655c8bb2f3c6a2f0dfd8 (diff) | |
download | vijayanagara-59ea3cba9379983c3bacdc2b214438e9acd05071.tar.gz |
Backside of succession cards
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -106,6 +106,7 @@ exports.view = function (state, role) { let this_card = game.deck[0] | 0 let deck_size = Math.max(0, game.deck.length - 1) + let card_back = next_card_back() view = { state: game.state, @@ -117,7 +118,7 @@ exports.view = function (state, role) { vp: game.vp, resources: game.resources, inf: game.inf, - deck: [ this_card, deck_size, game.of_gods_and_kings ], + deck: [ this_card, deck_size, card_back, game.of_gods_and_kings ], cavalry: game.cavalry, cylinder: game.cylinder, pieces: game.pieces, @@ -188,7 +189,6 @@ exports.view = function (state, role) { else view.actions.undo = 0 } - } save_game() @@ -357,6 +357,14 @@ function this_card() { return game.deck[0] } +function next_card_back() { + if (game.deck.length > 1) { + if (game.deck[1] >= 45 && game.deck[1] <= 47) + return game.deck[1] - 44 + } + return 0 +} + function goto_card() { if (this_card() >= 37 && this_card() <= 40) { log_h1("Mongol Invaders C" + this_card()) @@ -5845,9 +5853,9 @@ const PIECE_FACTION_TYPE_NAME = [ [ null, null, "Invader" ] ] const PIECE_FACTION_TYPE_SYMBOL = [ - [ null, "EDS", "CDS" ], - [ null, "EBK", null ], - [ null, "EVE", null ], + [ "DDS", "EDS", "CDS" ], + [ "DBK", "EBK", null ], + [ "DVE", "EVE", null ], [ null, null, "CMI" ] ] const LAST_CAVALRY = 9 |