summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-05-16 12:46:41 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 12:53:17 +0100
commit26a9295546ce08130f3688e5725b357c2a812a2d (patch)
treeb20741b671e53c8ba9a20c2b385a3192ee7c3871
parent127eab896d7f1d5f26a9a0de3543804964ceba43 (diff)
downloadhammer-of-the-scots-26a9295546ce08130f3688e5725b357c2a812a2d.tar.gz
hammer: Fix bug with border raid disbanding.
Don't count blocks in the pool!
-rw-r--r--rules.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 6ded111..21f6c57 100644
--- a/rules.js
+++ b/rules.js
@@ -1970,11 +1970,11 @@ states.regroup_to = {
// BORDER RAIDS
-function count_non_noble_english_blocks() {
+function count_non_noble_english_blocks_on_map() {
let count = 0;
for (let b in BLOCKS)
if (block_owner(b) == ENGLAND && block_type(b) != 'nobles')
- if (game.location[b])
+ if (is_on_map(b))
++count;
return count;
}
@@ -1983,7 +1983,7 @@ function goto_border_raids() {
game.active = ENGLAND;
if (is_enemy_area(ENGLAND)) {
log("Scotland border raids.");
- if (count_non_noble_english_blocks() > 0) {
+ if (count_non_noble_english_blocks_on_map() > 0) {
game.state = 'border_raids';
} else {
log("England has no non-noble blocks in play.");
@@ -2000,7 +2000,7 @@ states.border_raids = {
view.prompt = "Border Raids: Eliminate a non-Noble block.";
for (let b in BLOCKS)
if (block_owner(b) == ENGLAND && block_type(b) != 'nobles')
- if (game.location[b])
+ if (is_on_map(b))
gen_action(view, 'block', b);
},
block: function (who) {