diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-01 01:27:44 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-01 01:27:44 +0200 |
commit | 9baa67c5e4d7c80b864bc4b680c765f58f64b391 (patch) | |
tree | 3d28799c287ce1c10537eb1acfe6e0d68f1559d8 /rules.ts | |
parent | 765ee0358f26152baf84d44e827ae6b4bd059968 (diff) | |
download | plantagenet-9baa67c5e4d7c80b864bc4b680c765f58f64b391.tar.gz |
fix select_engagement round 2
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -5743,13 +5743,6 @@ function is_melee_step() { return game.battle.step === 1 } -function has_strike(pos: number) { - let lord = game.battle.array[pos] - if (lord !== NOBODY) - return count_lord_hits(lord) > 0 - return false -} - // Capabilities adding troops at start of the battle function add_battle_capability_troops() { let here = game.battle.where @@ -7023,6 +7016,7 @@ function determine_engagements() { } function goto_determine_engagements() { + game.battle.step = 0 game.battle.engagements = determine_engagements() if (game.battle.round === 1 && game.battle.engagements.length > 1 && is_vanguard_in_battle()) { @@ -7050,11 +7044,9 @@ states.select_engagement = { prompt() { view.prompt = `Battle: Choose the next engagement.` for (let pos of battle_strike_positions) { - if (has_strike(pos)) { - let lord = game.battle.array[pos] - if (is_friendly_lord(lord)) - gen_action_lord(lord) - } + let lord = game.battle.array[pos] + if (is_friendly_lord(lord)) + gen_action_lord(lord) } }, lord(lord) { |