diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-12-22 13:02:46 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:12:55 +0100 |
commit | 5bb07871bd206a461a9be2c4b7744a5ef4026a63 (patch) | |
tree | 4ff2b9569b1b7f73e908db6d8b24beebaf952681 | |
parent | 5121f28c5f483f313d0b5b42cc0cdceca9a9b99d (diff) | |
download | richard-iii-5bb07871bd206a461a9be2c4b7744a5ef4026a63.tar.gz |
richard: Handle display of rebel with no pretender.
-rw-r--r-- | ui.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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; } |