The suggested lines [set wroyal (K J L M O);
set broyal (k j l m o);] I have tried several times before - and just now again. The following happens: as soon as a white piece is clicked, the game stops immediately and the message 'White lost by absence of royalty!' appears.
It appears I have now solved this.
I have just tested this with the following result:
When the king enters the morph zone, the previous error message 'White lost by absence of royalty!' no longer appears. Instead, the king is shown in the table of captured pieces, which was the case before. The game can be continued, whereby the new king appears to be recognized as such and the king also receives the upgraded or downgraded move options. The only strange thing is that whenever the new king comes into check, this is not shown as a 'check'. The move options displayed for the new king also include those that put him back in check, which should not actually happen. If he makes such a move, an error message 'GameEnd This exposes your royal piece to capture' appears. Moves that free the king from check are possible.
I have just tested this with the following result:
When the king enters the morph zone, the previous error message 'White lost by absence of royalty!' no longer appears. Instead, the king is shown in the table of captured pieces, which was the case before. The game can be continued, whereby the new king appears to be recognized as such and the king also receives the upgraded or downgraded move options. The only strange thing is that whenever the new king comes into check, this is not shown as a 'check'. The move options displayed for the new king also include those that put him back in check, which should not actually happen. If he makes such a move, an error message 'GameEnd This exposes your royal piece to capture' appears. Moves that free the king from check are possible.