diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-12-09 20:49:49 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:12:55 +0100 |
commit | 1341c6003060c6e16d7bdd39b90360cac360c290 (patch) | |
tree | 7222a383a721193e74dca171a6c2aa2ff62bb7e2 | |
parent | 1de4749b3c2fd2f51e78fcf674105df3ca431c46 (diff) | |
download | richard-iii-1341c6003060c6e16d7bdd39b90360cac360c290.tar.gz |
Fix bug with finding a senior heir when all the non-minor heirs are dead.
Allow a minor heir to be the pretender before he has entered the map.
-rw-r--r-- | rules.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2269,7 +2269,7 @@ function find_minor_heir(owner) { function find_senior_heir(owner) { let candidate = null; for (let b in BLOCKS) - if (block_owner(b) === owner && block_type(b) === 'heir' && is_block_on_map(b)) + if (block_owner(b) === owner && block_type(b) === 'heir' && !is_dead(b)) if (!candidate || BLOCKS[b].heir < BLOCKS[candidate].heir) candidate = b; return candidate; |