Prev: FC4B Up: Map Next: FCCE
FC8D: Action: Swim
Action_Swim FC8D CALL Parser_ValidateAnyDirectObject Call Parser_ValidateAnyDirectObject.
FC90 RET C Return if there is no direct object in the user input (so the command is malformed).
FC91 CP $01 Jump to Response_PleaseRephraseThat_Duplicate if there was more than 01 direct object referenced in the user input (so the command is malformed).
FC93 JP NC,Response_PleaseRephraseThat_Duplicate
FC96 LD A,($A7C3) A=*CurrentRoom.
FC99 LD HL,$FCCB HL=Table_ActionSwim_Rooms.
FC9C LD BC,$0003 BC=0003.
FC9F CPIR Search for the current room in the table.
FCA1 JP NZ,Response_YoureNotInWater Jump to Response_YoureNotInWater if none of the rooms in the table match the current room ID.
The player is in one of the rooms, so process the action.
FCA4 LD HL,$FCB3 HL=Table_ActionSwim_TokenGroup.
FCA7 LD DE,$FCBF DE=Table_ActionSwim.
FCAA LD BC,$0006 BC=0006.
FCAD CALL $B0DE Call B0DE.
Print "You can't.".
FCB0 JP Response_YouCant_Duplicate Jump to Response_YouCant_Duplicate.
The token table for the action "swim":
Table_ActionSwim_TokenGroup FCB3 DEFW PhraseTokens_North Token group 01.
FCB5 DEFW PhraseTokens_South Token group 02.
FCB7 DEFW PhraseTokens_East Token group 03.
FCB9 DEFW PhraseTokens_West Token group 04.
FCBB DEFW PhraseTokens_Up Token group 05.
FCBD DEFW PhraseTokens_Down Token group 06.
The actions table for "swim":
Table_ActionSwim FCBF DEFW RemoveUserInput_Token_1 Action routine 01.
FCC1 DEFW RemoveUserInput_Token_1 Action routine 02.
FCC3 DEFW RemoveUserInput_Token_1 Action routine 03.
FCC5 DEFW RemoveUserInput_Token_1 Action routine 04.
FCC7 DEFW RemoveUserInput_Token_1 Action routine 05.
FCC9 DEFW RemoveUserInput_Token_1 Action routine 06.
Table containing rooms where this action can be done.
Table_ActionSwim_Rooms FCCB DEFB $0C Room 0C: In A Deep Pool Of Water. Inside The Sea Cavern.
FCCC DEFB $0D Room 0D: A Narrow Underwater Passage.
FCCD DEFB $15 Room 15: In A Deep Pool. Inside Lug's Cavern.
Prev: FC4B Up: Map Next: FCCE