Prev: 62095 Up: Map Next: 62176
62130: Randomise Combination
Used by the routine at Handler_Events.
Event 22: randomise the combination.
Event_RandomCombination 62130 LD BC,314 Write 314 to *EventTimer.
62133 LD (25759),BC
62137 CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
62140 LD (25793),A Write the digit to *CollectionSlots.
62143 CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
62146 LD (25794),A Write the digit to *CollectionSlot_Two.
62149 CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
62152 LD (25795),A Write the digit to *CollectionSlot_Three.
62155 CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
62158 RES 0,A Reset bit 0.
62160 AND %00000111 Keep only bits 0-2.
62162 INC A Write 1-8 to *CollectionSlot_Four.
62163 LD (25796),A
62166 JP Print_Inventory Jump to Print_Inventory.
Event_RandomCombination_Target 62169 CALL JumpTable_GetRandomNumber Call JumpTable_GetRandomNumber.
62172 AND %00000111 Keep only bits 0-2.
62174 INC A Increase A by one.
62175 RET Return.
Prev: 62095 Up: Map Next: 62176