From 6d081770ec81e431a050d9d7feac6ece4ba87d14 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 15 Dec 2021 03:29:18 +0100 Subject: richard: Show enemy pools. --- data.js | 15 +++++++++++---- rules.js | 13 +++++++++---- ui.js | 13 +++++++++++-- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/data.js b/data.js index cb6de80..b69a665 100644 --- a/data.js +++ b/data.js @@ -37,8 +37,12 @@ let AREAS = { "Irish Sea":{"x":280,"y":685}, "North Sea":{"x":1425,"y":460}, "English Channel":{"x":915,"y":1820}, - "Pool":{x:1688-87,y:87}, - "Minor":{x:1688-87-66-10,y:87}, + "Pool":{x:0,y:0}, + "Minor":{x:0,y:0}, + "LPool":{x:1688-50,y:50}, + "LMinor":{x:1688-50-210,y:50}, + "YPool":{x:50,y:1950-50}, + "YMinor":{x:50+210,y:1950-50}, } let BORDERS = {}; @@ -102,8 +106,11 @@ const CARDS = { AREAS[a].layout_minor = (1 - minor) / 2; } - layout("Pool", 50, 'Y', 1, 0); - layout("Minor", 10, 'Y', 1, 0); + layout("LPool", 13, 'Y', 1, -1); + layout("LMinor", 5, 'X', -1, 0); + layout("YPool", 13, 'Y', -1, 1); + layout("YMinor", 5, 'X', 1, 0); + layout("France", 4, 'X', 0, 0); layout("Calais", 4, 'X', 0, 0); diff --git a/rules.js b/rules.js index 054d134..521aa46 100644 --- a/rules.js +++ b/rules.js @@ -13,6 +13,11 @@ exports.scenarios = [ const { CARDS, BLOCKS, AREAS, BORDERS } = require('./data'); +delete AREAS.LPool; +delete AREAS.YPool; +delete AREAS.LMinor; +delete AREAS.YMinor; + const LANCASTER = "Lancaster"; const YORK = "York"; const REBEL = "Rebel"; @@ -1761,7 +1766,7 @@ states.action_phase = { states.recruit_where = { prompt: function (view, current) { if (is_inactive_player(current)) - return view.prompt = "Waiting for " + game.active + " to recruit."; + return view.prompt = "Action Phase: Waiting for " + game.active + "."; view.prompt = "Recruit " + block_name(game.who) + " where?"; gen_action_undo(view); gen_action(view, 'block', game.who); @@ -1783,7 +1788,7 @@ states.recruit_where = { states.move_to = { prompt: function (view, current) { if (is_inactive_player(current)) - return view.prompt = "Waiting for " + game.active + " to move."; + return view.prompt = "Action Phase: Waiting for " + game.active + "."; view.prompt = "Move " + block_name(game.who) + "."; gen_action_undo(view); gen_action(view, 'block', game.who); @@ -1844,7 +1849,7 @@ states.move_to = { states.sea_move_to = { prompt: function (view, current) { if (is_inactive_player(current)) - return view.prompt = "Waiting for " + game.active + " to move."; + return view.prompt = "Action Phase: Waiting for " + game.active + "."; if (game.active === game.piracy) { view.prompt = "Piracy: Sea Move " + block_name(game.who) + " to a coastal area."; } else { @@ -3434,7 +3439,7 @@ exports.view = function(state, current) { if (is_known) { view.known[b] = [a, game.steps[b], (game.moved[b] || game.dead[b]) ? 1 : 0]; - } else if (a !== POOL && a !== MINOR) { + } else { let list = view.secret[BLOCKS[b].owner]; if (!(a in list)) list[a] = [0, 0]; diff --git a/ui.js b/ui.js index 5dc0c97..62e676d 100644 --- a/ui.js +++ b/ui.js @@ -583,8 +583,17 @@ function update_map() { } // Layout blocks on map - for (let area in AREAS) - layout_blocks(area, layout[area].Lancaster, layout[area].York); + for (let area in AREAS) { + if (area === POOL) { + layout_blocks("LPool", layout[area].Lancaster, []); + layout_blocks("YPool", layout[area].York, []); + } else if (area === MINOR) { + layout_blocks("LMinor", layout[area].Lancaster, []); + layout_blocks("YMinor", layout[area].York, []); + } else { + layout_blocks(area, layout[area].Lancaster, layout[area].York); + } + } for (let where in AREAS) { if (ui.areas[where]) { -- cgit v1.2.3