summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.css5
-rw-r--r--play.js5
-rw-r--r--rules.ts12
3 files changed, 14 insertions, 8 deletions
diff --git a/play.css b/play.css
index d1611a9..5855410 100644
--- a/play.css
+++ b/play.css
@@ -509,7 +509,10 @@ body.shift .exhausted {
.locale.sea { border-radius: 50% }
.locale.exile { border-radius: 0 0 50% 50% }
-.locale.action { border-color: white; box-shadow: 0 0 4px white; }
+.locale.action {
+ border-color: white;
+ z-index: 100;
+}
.locale.selected {
border-color: cyan;
diff --git a/play.js b/play.js
index eb53196..c984fe8 100644
--- a/play.js
+++ b/play.js
@@ -757,7 +757,6 @@ 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)
@@ -1231,7 +1230,7 @@ function update_lord_mat(ix) {
function update_lord(ix) {
let locale = get_lord_locale(ix)
- if (locale < 0) {
+ if (locale < 0 || locale > CALENDAR_EXILE + 16) {
ui.lord_cylinder[ix].classList.add("hide")
ui.lord_mat[ix].classList.remove("action")
return
@@ -1241,7 +1240,7 @@ function update_lord(ix) {
ui.lord_cylinder[ix].classList.remove("hide")
update_lord_mat(ix)
ui.lord_exile[ix].classList.add("hide")
- } else {
+ } else if (locale <= CALENDAR_EXILE + 16) {
let t = locale > CALENDAR_EXILE ? locale - CALENDAR_EXILE : locale - CALENDAR
calendar_layout_cylinder[t].push(ui.lord_cylinder[ix])
ui.lord_cylinder[ix].classList.remove("hide")
diff --git a/rules.ts b/rules.ts
index aade2db..aed9d05 100644
--- a/rules.ts
+++ b/rules.ts
@@ -2586,6 +2586,8 @@ function disband_lord(lord: Lord, permanently = false) {
for_each_vassal_with_lord(lord, v => {
disband_vassal(v)
})
+
+ check_capture_of_the_king()
}
function exile_lord(lord: Lord) {
@@ -7447,8 +7449,10 @@ function gen_each_friendly_routed_vassal() {
function goto_death_check() {
game.who = NOBODY
- if (is_capture_of_the_king_triggered())
+ if (is_capture_of_the_king_triggered()) {
goto_capture_of_the_king()
+ return
+ }
log_h4("Death Check")
@@ -7657,10 +7661,10 @@ states.capture_of_the_king = {
},
lord(lord) {
push_undo()
- disband_lord(LORD_HENRY_VI, true)
log(`L${LORD_HENRY_VI} captured by L${lord}.`)
- set_delete(game.battle.routed, lord)
- set_delete(game.battle.fled, lord)
+ set_delete(game.battle.routed, LORD_HENRY_VI)
+ set_delete(game.battle.fled, LORD_HENRY_VI)
+ disband_lord(LORD_HENRY_VI, true)
set_lord_locale(LORD_HENRY_VI, CAPTURE_OF_THE_KING + lord as Locale)
// Note: the other 10 influence were already gained from normal battle victory
goto_death_check()