From 5bb07871bd206a461a9be2c4b7744a5ef4026a63 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 22 Dec 2021 13:02:46 +0100 Subject: richard: Handle display of rebel with no pretender. --- ui.js | 9 +++++++-- 1 file 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; } -- cgit v1.2.3