Prev: 5F8F Up: Map Next: 5FCE
5FAA: Refuse Command
Used by the routine at ObeyCommand.
The scripts did not handle the command. A direction says you cannot go that way, any other verb is beyond the game, and a blank verb produces the longer refusal.
RefuseCommand 5FAA XOR A Clear *Continuation.
5FAB LD ($5B85),A
5FAE LD A,($5B7F) Jump to RefuseCommand_Verb if *Verb is unset.
5FB1 OR A
5FB2 JR Z,RefuseCommand_Verb
5FB4 CP $0B Jump to RefuseCommand_Verb if the verb is not a direction.
5FB6 JR NC,RefuseCommand_Verb
5FB8 LD A,$18 Jump to RefuseCommand_Print with message 18: "you can't go that way".
5FBA JR RefuseCommand_Print
A recognised verb that is not a direction, or no verb at all.
RefuseCommand_Verb 5FBC LD A,($5B7F) Jump to RefuseCommand_None if *Verb is unset.
5FBF OR A
5FC0 JR Z,RefuseCommand_None
5FC2 LD A,$0C Message 0C: "it's beyond my power to do that".
RefuseCommand_Print 5FC4 CALL PrintSystemMessage Call PrintSystemMessage to print the chosen refusal.
5FC7 JP GameLoop_Act Jump to GameLoop_Act for another turn.
RefuseCommand_None 5FCA LD A,$20 Jump to RefuseCommand_Print with message 20: "I don't understand that verb".
5FCC JR RefuseCommand_Print
Prev: 5F8F Up: Map Next: 5FCE