summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js21
-rw-r--r--rules.js7
2 files changed, 17 insertions, 11 deletions
diff --git a/play.js b/play.js
index 8f31f4c..89990a7 100644
--- a/play.js
+++ b/play.js
@@ -1111,6 +1111,7 @@ function update_locale(loc) {
if (ui.locale_name[loc]) {
ui.locale_name[loc].classList.toggle("action", is_action("locale", loc) || is_action("laden_march", loc))
}
+
ui.locale_markers[loc].replaceChildren()
@@ -1120,14 +1121,20 @@ function update_locale(loc) {
else
ui.locale_markers[loc].appendChild(get_cached_element("marker circle battle"))
- /*if (set_has(view.pieces.exhausted, loc)) {
+
+ if (set_has(view.pieces.depleted, loc)) {
let cn
- if (is_york_locale(loc))
- cn = "marker small exhausted lancaster"
- else
- cn = "marker small exhausted york"
- ui.locale_markers[loc].appendChild(get_cached_element(cn))
- }*/
+ cn = "depleted"
+ ui.locale_markers[loc].classList.add(cn)
+ }
+ if (set_has(view.pieces.exhausted, loc)) {
+ let cn
+ cn = "exhausted"
+ ui.locale_markers[loc].classList.add(cn)
+ cn = "depleted"
+ ui.locale_markers[loc].classList.remove(cn)
+
+ }
}
function update_plan() {
diff --git a/rules.js b/rules.js
index 2f9fb6b..9fa4146 100644
--- a/rules.js
+++ b/rules.js
@@ -1155,8 +1155,8 @@ function is_friendly_locale(loc) {
}
function can_add_troops(lordwho, locale) {
- // TODO condition not exhausted
- return true
+ if (has_exhausted_marker(locale)) return false
+ else return true
}
function can_add_transport(who, what) {
@@ -2108,6 +2108,7 @@ states.levy_muster_lord = {
push_undo()
let info = data.lords[game.who]
let locale = data.locales[get_lord_locale(game.who)].type
+ deplete_locale(get_lord_locale(game.who))
switch(locale) {
case "calais":
add_lord_forces(game.who, MEN_AT_ARMS, 2)
@@ -3568,8 +3569,6 @@ function goto_tax() {
add_lord_assets(game.command, COIN, 2)
else
add_lord_assets(game.command, COIN, 3)
-
-
spend_action(1)
resume_command()