diff options
author | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-04-02 10:41:49 +0200 |
---|---|---|
committer | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-04-02 10:41:49 +0200 |
commit | 5294cd1d5cad37ecff3ed6c269cdff43d0fb97ab (patch) | |
tree | 5622e14aed5a84f7e1ed174f8447e11d0f6c78c1 | |
parent | f296767321abb7b586a874726f9de1edb1ae00b7 (diff) | |
download | plantagenet-5294cd1d5cad37ecff3ed6c269cdff43d0fb97ab.tar.gz |
L12 ravine bugfix
-rw-r--r-- | rules.js | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -8968,7 +8968,10 @@ states.reposition_center = { // === BATTLE: STRIKE === function filled(pos) { - return game.battle.array[pos] !== NOBODY + if (game.battle.array[pos] !== NOBODY && !ravine_check(game.battle.ravine, pos)) { + return true + } + return false } const battle_strike_positions = [ D1, D2, D3, A1, A2, A3 ] @@ -9058,6 +9061,12 @@ function has_strike(pos) { // === BATTLE: ENGAGEMENTS +function ravine_check(lord,pos) { + if (game.battle.array[pos] === lord) + return true + return false +} + function determine_engagements() { let center = [ A2, D2 ] let engagements = [ @@ -9669,6 +9678,7 @@ function goto_end_battle_round() { // === BATTLE: NEW ROUND === function end_battle_round() { + game.battle.ravine = NOBODY let attacker_loser = null set_active_attacker() if (has_no_unrouted_forces()) { |