summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-14 11:06:15 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commitecbf467fffc2678b9aef81d7875622aa7e5c0ea3 (patch)
treed82aaa2eba972837fa9621b407f00ba1159aec00
parent5b0cc5b4caea40125c24cae8aeb243e857ac891e (diff)
downloadrommel-in-the-desert-ecbf467fffc2678b9aef81d7875622aa7e5c0ea3.tar.gz
Count own steps in battle!
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 99a31cc..a7f28fe 100644
--- a/rules.js
+++ b/rules.js
@@ -976,7 +976,7 @@ function has_friendly_units_in_battle() {
function count_normal_steps_in_battle() {
let steps = [ 0, 0, 0, 0 ]
- for_each_undisrupted_enemy_unit_in_hex(game.battle, u => {
+ for_each_undisrupted_friendly_unit_in_hex(game.battle, u => {
if (!is_elite_unit(u))
if (!is_unit_retreating(u))
steps[unit_class[u]] += unit_steps(u)
@@ -986,7 +986,7 @@ function count_normal_steps_in_battle() {
function count_elite_steps_in_battle() {
let steps = [ 0, 0, 0, 0 ]
- for_each_undisrupted_enemy_unit_in_hex(game.battle, u => {
+ for_each_undisrupted_friendly_unit_in_hex(game.battle, u => {
if (is_elite_unit(u))
if (!is_unit_retreating(u))
steps[unit_class[u]] += unit_steps(u)