summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-08-28 13:33:32 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commitd45ad852b81c44fc769a5cfee8d9deb4fc142a1d (patch)
tree2222c4961640bd878156bf7ead96c4d01dfb5f79
parent2d5354214cfb05ba88cc3d36ac08c3ed75048a10 (diff)
downloadplantagenet-d45ad852b81c44fc769a5cfee8d9deb4fc142a1d.tar.gz
bugfixes cylinders and css
-rw-r--r--data.js15
-rw-r--r--play.css3
-rw-r--r--play.js18
-rw-r--r--rules.js4
-rw-r--r--tools/gendata.js19
-rw-r--r--tools/layout.svg44
6 files changed, 60 insertions, 43 deletions
diff --git a/data.js b/data.js
index b8bce82..9e5a2b9 100644
--- a/data.js
+++ b/data.js
@@ -412,21 +412,22 @@ seat:[
{"name":"seat lancaster lord_somerset_1","box":{"x":453,"y":1248,"w":54,"h":56}},
{"name":"seat york lord_norfolk","box":{"x":850,"y":1330,"w":54,"h":56}},
{"name":"seat york lord_northumberland_y1","box":{"x":397,"y":405,"w":54,"h":56}},
+{"name":"seat york lord_york","box":{"x":904,"y":930,"w":54,"h":56}},
],
vassalbox:[
-{"name":"vassal vassal_westmorld","box":{"x":602,"y":466,"w":54,"h":56}},
-{"name":"vassal vassal_stanley","box":{"x":605,"y":836,"w":54,"h":56}},
+{"name":"vassal vassal_westmorld","box":{"x":600,"y":470,"w":54,"h":56}},
+{"name":"vassal vassal_stanley","box":{"x":609,"y":840,"w":54,"h":56}},
{"name":"vassal vassal_dudley","box":{"x":704,"y":898,"w":54,"h":56}},
-{"name":"vassal vassal_shrewsbury","box":{"x":453,"y":881,"w":54,"h":56}},
+{"name":"vassal vassal_shrewsbury","box":{"x":455,"y":879,"w":54,"h":56}},
{"name":"vassal vassal_worcester","box":{"x":616,"y":999,"w":54,"h":56}},
{"name":"vassal vassal_oxford","box":{"x":776,"y":1109,"w":54,"h":56}},
{"name":"vassal vassal_essex","box":{"x":955,"y":1082,"w":54,"h":56}},
-{"name":"vassal vassal_suffolk","box":{"x":1156,"y":1020,"w":54,"h":56}},
+{"name":"vassal vassal_suffolk","box":{"x":1156,"y":1024,"w":54,"h":56}},
{"name":"vassal vassal_fauconberg","box":{"x":1094,"y":1279,"w":54,"h":56}},
{"name":"vassal vassal_norfolk","box":{"x":850,"y":1330,"w":54,"h":56}},
-{"name":"vassal vassal_exeter","box":{"x":406,"y":1381,"w":54,"h":56}},
-{"name":"vassal vassal_bonville","box":{"x":146,"y":1359,"w":54,"h":56}},
-{"name":"vassal vassal_beaumont","box":{"x":726,"y":763,"w":54,"h":56}},
+{"name":"vassal vassal_devon","box":{"x":406,"y":1381,"w":54,"h":56}},
+{"name":"vassal vassal_bonville","box":{"x":155,"y":1356,"w":54,"h":56}},
+{"name":"vassal vassal_beaumont","box":{"x":730,"y":765,"w":54,"h":56}},
],
}
if (typeof module !== 'undefined') module.exports = data
diff --git a/play.css b/play.css
index 9688c75..cd0fcf5 100644
--- a/play.css
+++ b/play.css
@@ -254,7 +254,8 @@ body.shift #capabilities2 {
z-index: 200;
}
body.shift .favour,
-body.shift .depleted {
+body.shift .depleted,
+body.shift .exhausted {
display:none;
}
diff --git a/play.js b/play.js
index 531d84c..2e1d69c 100644
--- a/play.js
+++ b/play.js
@@ -678,28 +678,33 @@ function build_map() {
e.style.top = y + "px"
e.style.width = w + "px"
e.style.height = h + "px"
+ e.style.zIndex = "-10"
register_action(e, "locale", ix, "laden_march")
register_tooltip(e, get_locale_tip(ix))
document.getElementById("locales").appendChild(e)
// Locale Markers
e = ui.locale_markers[ix] = document.createElement("div")
- e.className = "locale marker york rose favour " + locale.name // York to be removed - York/Lancaster
+ e.className = "locale marker rose york favour " + locale.name // York to be removed - York/Lancaster
e.style.top = y+h-small + "px"
e.style.left = x+ (w-small)/2 + "px"
e.style.width = small + "px"
e.style.height = small + "px"
- e.style.border = "2px solid aqua" // to be changed depending on the favour marker
+ e.style.zIndex = "-20"
+ // e.style.border = "2px solid aqua" // to be changed depending on the favour marker
e.style.backgroundSize = small + "px"
document.getElementById("pieces").appendChild(e)
+
+ // Depleted markers
e = ui.locale_markers[ix] = document.createElement("div")
- e.className = "locale marker depleted " + locale.name // Depleted to be removed - depleted/exhausted to add markers
+ e.className = "locale marker exhausted " + locale.name // Depleted to be removed - depleted/exhausted to add markers
e.style.top = y+h-small-offsetdeplete + "px"
e.style.left = offsetdeplete+x+ (w-small)/2 + "px"
e.style.width = small + "px"
e.style.height = small + "px"
- e.style.border = "2px solid aqua"
+ e.style.zIndex = "-15"
+ // e.style.border = "2px solid aqua"
e.style.backgroundSize = small + "px"
document.getElementById("pieces").appendChild(e)
})
@@ -713,7 +718,6 @@ function build_map() {
let xc = Math.round(x + w / 2)
let yc = Math.round(y + h / 2)
let small = 46
- locale_xy[ix] = [ xc, yc ]
e.className = "marker " + seat.name
e.style.position = "absolute"
e.style.top = y + "px"
@@ -722,12 +726,11 @@ function build_map() {
e.style.height = 46 + "px"
e.style.backgroundSize = small + "px"
e.style.transform = "rotate(315deg)"
+ e.style.zIndex = "-50"
register_tooltip(e, data.seat[ix].name)
document.getElementById("pieces").appendChild(e)
})
-
-
data.lords.forEach((lord, ix) => {
let e = ui.lord_cylinder[ix] = document.createElement("div")
let side = lord.side.toLowerCase()
@@ -744,7 +747,6 @@ function build_map() {
let xc = Math.round(x + w / 2)
let yc = Math.round(y + h / 2)
let small = 46
- locale_xy[ix] = [ xc, yc ]
e.className = "marker " + vassal.name
e.style.position = "absolute"
e.style.top = y + "px"
diff --git a/rules.js b/rules.js
index bfade33..8a2be03 100644
--- a/rules.js
+++ b/rules.js
@@ -6081,8 +6081,8 @@ states.feed = {
view.prompt = "Feed: You must shift the Service of any Unfed Lords."
for (let lord = first_friendly_lord; lord <= last_friendly_lord; ++lord) {
if (is_lord_unfed(lord)) {
- gen_action_service_bad(lord)
- done = false
+ // TODO PILLAGE gen_action_service_bad(lord)
+ done = true
}
}
}
diff --git a/tools/gendata.js b/tools/gendata.js
index 599ecac..1260fac 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -250,18 +250,18 @@ const boxes = {
"Shrewsbury deplete": [510,855,78,69],
"Harlech deplete": [288,902,67,61],
"Plymouth deplete": [263,1407,58,50],
- "vassal vassal_westmorld": [602,466,54,56],
- "vassal vassal_stanley": [605,836,54,56],
+ "vassal vassal_westmorld": [600,470,54,56],
+ "vassal vassal_stanley": [609,840,54,56],
"vassal vassal_dudley": [704,898,54,56],
- "vassal vassal_shrewsbury": [453,881,54,56],
+ "vassal vassal_shrewsbury": [455,879,54,56],
"vassal vassal_worcester": [616,999,54,56],
"vassal vassal_oxford": [776,1109,54,56],
"vassal vassal_essex": [955,1082,54,56],
- "vassal vassal_suffolk": [1156,1020,54,56],
+ "vassal vassal_suffolk": [1156,1024,54,56],
"vassal vassal_fauconberg": [1094,1279,54,56],
"vassal vassal_norfolk": [850,1330,54,56],
- "vassal vassal_exeter": [406,1381,54,56],
- "vassal vassal_bonville": [146,1359,54,56],
+ "vassal vassal_devon": [406,1381,54,56],
+ "vassal vassal_bonville": [155,1356,54,56],
"seat lancaster lord_henry_vi": [944,1144,54,56],
"seat lancaster lord_margaret": [944,1144,54,56],
"seat lancaster lord_henry_tudor": [944,1144,54,56],
@@ -271,7 +271,7 @@ const boxes = {
"seat york lord_salisbury": [653,617,54,56],
"seat lancaster lord_clarence": [654,593,54,56],
"seat lancaster lord_northumberland_l": [397,405,54,56],
- "vassal vassal_beaumont": [726,763,54,56],
+ "vassal vassal_beaumont": [730,765,54,56],
"seat lancaster lord_buckingham": [715,958,54,56],
"seat york lord_march": [432,947,54,56],
"seat lancaster lord_jasper_tudor_2": [230,888,54,56],
@@ -287,9 +287,11 @@ const boxes = {
"seat york lord_northumberland_y1": [397,405,54,56],
"seat york lord_warwick_y": [1118,1385,54,56],
"Ireland favour": [50,947,110,121],
+ "seat york lord_york": [904,930,54,56],
}
+
let data = []
function print(str) {
data.push(str)
@@ -614,6 +616,7 @@ defseat("seat york lord_warwick_y")
defseat("seat lancaster lord_somerset_1")
defseat("seat york lord_norfolk")
defseat("seat york lord_northumberland_y1")
+defseat("seat york lord_york")
// VASSAL SEAT
@@ -628,7 +631,7 @@ defvassal("vassal vassal_essex")
defvassal("vassal vassal_suffolk")
defvassal("vassal vassal_fauconberg")
defvassal("vassal vassal_norfolk")
-defvassal("vassal vassal_exeter")
+defvassal("vassal vassal_devon")
defvassal("vassal vassal_bonville")
defvassal("vassal vassal_beaumont")
diff --git a/tools/layout.svg b/tools/layout.svg
index 458b216..d8c25c0 100644
--- a/tools/layout.svg
+++ b/tools/layout.svg
@@ -39,12 +39,12 @@
inkscape:deskcolor="#d1d1d1"
showgrid="true"
inkscape:zoom="0.7681373"
- inkscape:cx="251.25716"
- inkscape:cy="1001.1231"
+ inkscape:cx="464.76066"
+ inkscape:cy="793.47794"
inkscape:window-width="1920"
- inkscape:window-height="1057"
- inkscape:window-x="-8"
- inkscape:window-y="-8"
+ inkscape:window-height="991"
+ inkscape:window-x="-9"
+ inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="g8"
inkscape:document-rotation="0"
@@ -1991,8 +1991,8 @@
id="rect1016"
width="53.546478"
height="55.672852"
- x="602.03796"
- y="465.797"
+ x="600.03796"
+ y="469.797"
rx="0"
ry="0"
inkscape:label="vassal vassal_westmorld" />
@@ -2001,8 +2001,8 @@
id="rect1020"
width="53.546478"
height="55.672852"
- x="604.79962"
- y="835.85706"
+ x="608.79962"
+ y="839.85706"
rx="0"
ry="0"
inkscape:label="vassal vassal_stanley" />
@@ -2021,8 +2021,8 @@
id="rect1024"
width="53.546478"
height="55.672852"
- x="452.9093"
- y="880.96387"
+ x="454.9093"
+ y="878.96387"
rx="0"
ry="0"
inkscape:label="vassal vassal_shrewsbury" />
@@ -2062,7 +2062,7 @@
width="53.546478"
height="55.672852"
x="1156.2075"
- y="1019.9665"
+ y="1023.9665"
rx="0"
ry="0"
inkscape:label="vassal vassal_suffolk" />
@@ -2095,14 +2095,14 @@
y="1380.821"
rx="0"
ry="0"
- inkscape:label="vassal vassal_exeter" />
+ inkscape:label="vassal vassal_devon" />
<rect
style="fill:#000000"
id="rect1040"
width="53.546478"
height="55.672852"
- x="146.3671"
- y="1358.7279"
+ x="155.48006"
+ y="1356.1241"
rx="0"
ry="0"
inkscape:label="vassal vassal_bonville" />
@@ -2201,8 +2201,8 @@
id="rect1060"
width="53.546478"
height="55.672852"
- x="726.31189"
- y="763.13379"
+ x="730.31189"
+ y="765.13379"
rx="0"
ry="0"
inkscape:label="vassal vassal_beaumont" />
@@ -2354,5 +2354,15 @@
x="50.145851"
y="946.63257"
inkscape:label="Ireland favour" />
+ <rect
+ style="fill:#000000"
+ id="rect446"
+ width="53.546478"
+ height="55.672852"
+ x="904.30859"
+ y="930.31909"
+ rx="0"
+ ry="0"
+ inkscape:label="seat york lord_york" />
</g>
</svg>