summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-12-22 13:02:46 +0100
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:12:55 +0100
commit5bb07871bd206a461a9be2c4b7744a5ef4026a63 (patch)
tree4ff2b9569b1b7f73e908db6d8b24beebaf952681
parent5121f28c5f483f313d0b5b42cc0cdceca9a9b99d (diff)
downloadrichard-iii-5bb07871bd206a461a9be2c4b7744a5ef4026a63.tar.gz
richard: Handle display of rebel with no pretender.
-rw-r--r--ui.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui.js b/ui.js
index e15b999..fcf2196 100644
--- a/ui.js
+++ b/ui.js
@@ -122,8 +122,13 @@ function block_name(who) {
}
function block_owner(who) {
- if (who === REBEL)
- return BLOCKS[game.pretender].owner;
+ if (who === REBEL) {
+ if (game.pretender)
+ return BLOCKS[game.pretender].owner;
+ if (game.king)
+ return ENEMY[BLOCKS[game.king].owner];
+ return YORK;
+ }
return BLOCKS[who].owner;
}