summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-08-03 01:44:10 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit34508ffb7f6dbe05d084c057545ff2a5a481a6c8 (patch)
tree3881dc63c5057f199f265f8a7906f24401c3c9c3
parent353e68e874e24114a65eaf93b433e51dd24ae65f (diff)
downloadplantagenet-34508ffb7f6dbe05d084c057545ff2a5a481a6c8.tar.gz
influence point markers on track
-rw-r--r--play.js10
-rw-r--r--rules.js6
2 files changed, 16 insertions, 0 deletions
diff --git a/play.js b/play.js
index 810864f..416dec1 100644
--- a/play.js
+++ b/play.js
@@ -554,6 +554,10 @@ const ui = {
towny: document.getElementById("towns_y"),
citiesl: document.getElementById("cities_l"),
citiesy: document.getElementById("cities_y"),
+ influence_point_l: document.getElementById("ip_l"),
+ influence_point_y: document.getElementById("ip_y"),
+
+
court1_header: document.getElementById("court1_header"),
court2_header: document.getElementById("court2_header"),
court1: document.getElementById("court1"),
@@ -1284,6 +1288,12 @@ function on_update() {
ui.fortressy.style.top = (track_xy[view.fortressy][1]) + "px"
ui.fortressy.style.left = (track_xy[view.fortressy][0]) + "px"
+ ui.influence_point_l.style.top = (track_xy[view.influence_point_l][1]) + "px"
+ ui.influence_point_l.style.left = (track_xy[view.influence_point_l][0]) + "px"
+
+ ui.influence_point_y.style.top = (track_xy[view.influence_point_y][1]) + "px"
+ ui.influence_point_y.style.left = (track_xy[view.influence_point_y][0]) + "px"
+
update_plan()
update_cards()
diff --git a/rules.js b/rules.js
index dfdb45e..bfade33 100644
--- a/rules.js
+++ b/rules.js
@@ -1306,6 +1306,8 @@ exports.setup = function (seed, scenario, options) {
townl:0,
fortressl:0,
citiesl:0,
+ influence_point_l: 0,
+ influence_point_y: 0,
hand1: [],
hand2: [],
@@ -1390,6 +1392,8 @@ function setup_Ia(first_player, second_player) {
game.citiesl = 0
game.fortressy = 0
game.fortressl = 0
+ game.influence_point_l = 0
+ game.influence_point_y = 0
muster_lord(LORD_YORK, LOC_ELY)
muster_lord(LORD_MARCH, LOC_LUDLOW)
muster_lord(LORD_HENRY_VI, LOC_LONDON)
@@ -6906,6 +6910,8 @@ exports.view = function (state, current) {
fortressy: game.fortressy,
citiesl: game.citiesl,
citiesy: game.citiesy,
+ influence_point_l: game.influence_point_l,
+ influence_point_y: game.influence_point_y,
events: game.events,