Prev: 43105 Up: Map Next: 43158
43117: Send current character to sleep if possible
Used by the routine at 64623.
43117 CALL 45411 Point IX at Current Character's current stats
43120 BIT 7,(IX+6) If character's asleep flag is set then reset zero flag
43124 LD HL,52655 Point HL at "[Current Character's short name] IS ALREADY ASLEEP" text
43127 JP NZ,64313 If character is asleep then display "[Character] IS ALREADY ASLEEP" window (29) and return to game
43130 LD A,(IX+2) If character's stamina is 70 or more...
43133 AND 127 ...
43135 CP 70 ...then reset carry flag, otherwise set it
43137 LD HL,52668 Point HL at "[Current Character's short name] IS TOO WAKEFUL TO SLEEP" text
43140 JP NC,64313 If carry flag is reset then display "[Character] IS TOO WAKEFUL TO SLEEP" window (29) and return to game
43143 LD B,30 If character's happiness is less than 30 then show "[Character] DOES NOT WANT TO BE COMMANDED..." and jump to main game loop...
43145 CALL 45423 ...
43148 SET 7,(IX+6) Set character's asleep flag
43152 LD HL,52691 Point HL at "[Current Character's short name] HAS GONE TO SLEEP" text
43155 JP 64313 Display "[Character] HAS GONE TO SLEEP" window (29) and return to game
Prev: 43105 Up: Map Next: 43158