Prev: 977C Up: Map Next: 97AD
977F: Kill the character in A
The player's death is PLAYER_DIES. Anyone else is marked dead (flag bit 3), drops everything it holds (EMPTY_OUT), and gives up its slot in CHARACTERS, so its script never runs again.
KILL 977F AND A The player: PLAYER_DIES
9780 JP Z,PLAYER_DIES
9783 PUSH BC
9784 PUSH IY
9786 PUSH IX
9788 LD C,A
9789 CALL GET_OBJECT Dead
978C SET 3,(IX+$07)
9790 CALL EMPTY_OUT Everything it held drops
9793 LD A,C Its script is over
9794 CALL FIND_CHARACTER
9797 CP $FF
9799 LD A,C
979A JR Z,KILL_0
979C LD (IY+$00),$00
KILL_0 97A0 CALL BROKEN_OR_DEAD Named DEAD (BROKEN_OR_DEAD), and its orders thrown away (CANCEL_ORDERS)
97A3 LD A,C
97A4 CALL CANCEL_ORDERS
97A7 POP IX
97A9 POP IY
97AB POP BC
97AC RET
Prev: 977C Up: Map Next: 97AD