Prev: A678 Up: Map Next: A6B8
A69E: Timer 4: sinking into the bog
Both the tick and the expire routine of timer 4 (C6A8). If Bilbo is in the deep bog (room 29) the timer is stopped (count 0). Then '<actor> is slowly sinking into the bog.' is printed, and if the count is now 0, Bilbo dies.
In practice the tick runs at the end of the turn Bilbo entered the bog, while he is still there, so it always kills him. The other path - printing the message but surviving because the count is still 1 - would only be taken if he had somehow left within the same turn. (The message is printed even then, although he is no longer in the bog.)
A69E LD A,($C01B) Is Bilbo in the deep bog (room 29)?
A6A1 CP $1D
A6A3 JR NZ,$A6A9 No: just print the message
A6A5 SUB A Yes: stop the timer (count 0)
A6A6 LD ($C990),A
A6A9 LD HL,$B045 "you are slowly sinking into the bog."
A6AC CALL $72D4
A6AF LD A,($C990) Is the count 0?
A6B2 CP $00
A6B4 RET NZ No: he survives this turn
A6B5 JP $903C Yes: Bilbo is dead
Prev: A678 Up: Map Next: A6B8