summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-07 11:43:17 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-07 11:43:17 +0200
commitaa603ee72fc9572f8120b45b72bfc97ef01c64aa (patch)
tree87c09d5e065e85da11ce771d58753a676a67e8e7
parentd0b16605fa9b6003dfd4e33acd7100a9309b6d8d (diff)
downloadandean-abyss-aa603ee72fc9572f8120b45b72bfc97ef01c64aa.tar.gz
Don't allow placing bases on an LoC.
Add an extra check, in case the Kidnap action is able to place "any piece" on an LoC.
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 07ed5ae..b21db10 100644
--- a/rules.js
+++ b/rules.js
@@ -1653,13 +1653,13 @@ function can_stack_any(s, faction) {
}
function can_stack_base(s, faction) {
- return can_stack_any(s, faction) && count_bases(s) < 2
+ return (is_city(s) || is_dept(s)) && can_stack_any(s, faction) && count_bases(s) < 2
}
function can_stack_piece(s, faction, type) {
if (can_stack_any(s, faction)) {
if (type === BASE)
- return count_bases(s) < 2
+ return (is_city(s) || is_dept(s)) && count_bases(s) < 2
return true
}
return false