Prev: F28F Up: Map Next: F2E0
F2B2: Randomise Combination
Used by the routine at Handler_Events.
Event 16: randomise the combination.
Event_RandomCombination F2B2 LD BC,$013A Write 013A to *EventTimer.
F2B5 LD ($649F),BC
F2B9 CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
F2BC LD ($64C1),A Write the digit to *CollectionSlots.
F2BF CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
F2C2 LD ($64C2),A Write the digit to *CollectionSlot_Two.
F2C5 CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
F2C8 LD ($64C3),A Write the digit to *CollectionSlot_Three.
F2CB CALL Event_RandomCombination_Target Call Event_RandomCombination_Target.
F2CE RES 0,A Reset bit 0.
F2D0 AND %00000111 Keep only bits 0-2.
F2D2 INC A Write 01-08 to *CollectionSlot_Four.
F2D3 LD ($64C4),A
F2D6 JP Print_Inventory Jump to Print_Inventory.
Event_RandomCombination_Target F2D9 CALL JumpTable_GetRandomNumber Call JumpTable_GetRandomNumber.
F2DC AND %00000111 Keep only bits 0-2.
F2DE INC A Increase A by one.
F2DF RET Return.
Prev: F28F Up: Map Next: F2E0