Prev: 62766 Up: Map Next: 62843
62788: Process: Capture Roman
The player is trying to capture the Roman, check which version of the Roman is in the current room.
Process_CaptureRoman 62788 LD HL,58177 Call CheckItemGroupPresent with Data_ItemGroup_Roman.
62791 CALL CheckItemGroupPresent
The player wants to capture the Roman but is he already captured?
Print "You've done that already." if the Roman is already captured.
62794 CP 11 Jump to Response_YouveDoneThatAlready if item 11: "The captured Roman" is in the current room.
62796 JP Z,Response_YouveDoneThatAlready
The player wants to capture the Roman but is he even here?
Print "You can't." if the Roman isn't present in the room.
62799 CP 10 Jump to Response_YouCant_Duplicate if item 10: "The Roman,camped" isn't in the current room.
62801 JP NZ,Response_YouCant_Duplicate
Can the player even capture the Roman? Do they have the rope?
62804 LD A,81 Call ValidateItemPresent with item 81: "A piece of rope".
62806 CALL ValidateItemPresent
62809 JP NZ,Response_YouveNothingToTieHimWith Jump to Response_YouveNothingToTieHimWith if item 81: "A piece of rope" isn't present in the current room or the players inventory.
The Roman is here, and the player has the rope! Let's capture a Roman:
Change the Roman state!
62812 LD BC,2571 Call TransformItem to transform item 10 ("The Roman,camped") into item 11 ("The captured Roman").
62815 CALL TransformItem
62818 LD A,4 Call AddToScore to add 4 points to the score.
62820 CALL AddToScore
The rope as a separate item is no longer needed.
62823 LD A,81 Call Handler_DestroyItemEvent with item 81: "A piece of rope".
62825 CALL Handler_DestroyItemEvent
The rope has been used so handle the inventory count.
62828 LD HL,42896 Decrease *Count_InventoryItems by one.
62831 DEC (HL)
Flag to the game that this has occurred.
62832 LD HL,42887 Set bit 0 of *Flag_EventStates which relates to the roman being captured.
62835 SET 0,(HL)
Print "You capture the unsuspecting Roman,securing his hands with the rope.".
62837 LD HL,56408 HL=Messaging_CaptureTheUnsuspectingRoman.
62840 JP PrintStringAndNewline_Duplicate Jump to PrintStringAndNewline_Duplicate.
Prev: 62766 Up: Map Next: 62843