Player death is dealt with in lines 6000–6060. 6000 is called from line 1093 if HIT POINTS (C(0)
) hits or drops below 0.
First we set the window width to 40 then print the death announcement.
6000 POKE 33,40: PRINT : PRINT : PRINT " WE MOURN THE PASSING OF"
If the player name is longer than 22 characters or there isn't a player name, we just call the player "THE PEASANT":
6005 IF LEN (PN$) > 22 THEN PN$ = ""
6010 IF PN$ = "" THEN PN$ = "THE PEASANT"
We then add " AND HIS COMPUTER" to the name.
6020 PN$ = PN$ + " AND HIS COMPUTER"
We centre the name:
6030 HTAB (20 - INT ( LEN (PN$) / 2)): PRINT PN$
And offer a resurrection via the ESC key:
6035 PRINT " TO INVOKE A MIRACLE OF RESSURECTION"
6040 PRINT " <HIT ESC KEY>";
We loop until we get the ESC key:
6050 IF PEEK ( - 16384) = 155 THEN 1
6060 GOTO 6050
On ESC we go back to the start of the program on line 1.