summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-12-20 16:50:48 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commitf3c6092b93f2b33cc59e19577271829b6b88920b (patch)
tree203b5e7e77a7193b80b1ddc1a510d6ebf506493a /rules.js
parentd2ef398d6ff588ae88c71f0da43c36c7e7551889 (diff)
downloadnevsky-f3c6092b93f2b33cc59e19577271829b6b88920b.tar.gz
Stuff.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index df239c6..4ea5cb1 100644
--- a/rules.js
+++ b/rules.js
@@ -1779,6 +1779,7 @@ states.shift_lord = {
view.prompt = `Shift ${lord_name[game.who]} or Service up to ${game.count}.`
// TODO: click on calendar boxes? - need off-calendar buttons?
let here = 0
+ let lord = game.who
if (is_lord_on_calendar(lord))
here = get_lord_locale(lord) - CALENDAR
else
@@ -1794,6 +1795,7 @@ states.shift_lord = {
view.actions.done = 1
},
turn(turn) {
+ let lord = game.who
log(`Shifted L${lord} to ${turn}.`)
if (is_lord_on_calendar(lord))
set_lord_locale(lord, CALENDAR + turn)
@@ -1803,6 +1805,7 @@ states.shift_lord = {
end_immediate_event()
},
left() {
+ let lord = game.who
log(`Shifted L${lord} left.`)
if (is_lord_on_calendar(lord))
shift_lord_cylinder(lord, -1)
@@ -1812,6 +1815,7 @@ states.shift_lord = {
end_immediate_event()
},
right() {
+ let lord = game.who
log(`Shifted L${lord} right.`)
if (is_lord_on_calendar(lord))
shift_lord_cylinder(lord, 1)
@@ -2008,6 +2012,7 @@ function resume_levy_arts_of_war() {
states.levy_arts_of_war = {
prompt() {
let c = game.what[0]
+ view.show_arts_of_war = [ c ]
view.what = c
switch (data.cards[c].when) {
case "this_levy":
@@ -3092,7 +3097,7 @@ function this_lord_has_russian_druzhina() {
function this_lord_has_house_of_suzdal() {
if (game.active === RUSSIANS)
if (lord_has_capability(game.command, AOW_RUSSIAN_HOUSE_OF_SUZDAL))
- return is_lord_on_map(LORD_ALEKSANDR) || is_lord_on_map(LORD_ANDREY)
+ return is_lord_on_map(LORD_ALEKSANDR) && is_lord_on_map(LORD_ANDREY)
return false
}
@@ -3814,6 +3819,7 @@ states.surrender = {
}
function goto_siegeworks() {
+ // TODO: automatic or manual placement?
if (can_siegeworks())
game.state = "siegeworks"
else