Prev: 8438 Up: Map Next: 84B0
846A: MagicBow spell.
magic_bow_spell 846A LD A,(computer_player_flag) Jump to magic_bow_spell_0 if player is human.
846D OR A
846E JR Z,magic_bow_spell_0
8470 CALL get_wizard_object Else call get_wizard_object to get address of the wizard object data of the current player.
8473 OR A Ensure the carry flag is clear.
8474 LD HL,(temp_pointer) Load address from temp_pointer into HL and subtract $0009.
8477 LD DE,$0009
847A SBC HL,DE
847C LD A,(HL) If byte at resulting address is zero then jump to magic_bow_spell_0.
847D OR A
847E JR Z,magic_bow_spell_0
8480 LD A,$00 Set unknown10 variable to zero and return.
8482 LD (unknown10),A
8485 RET
magic_bow_spell_0 8486 CALL routine04 Call routine04 ???
8489 LD A,(spell_success_flag) Jump to magic_bow_spell_1 if spell_success_flag is clear.
848C OR A
848D JR Z,magic_bow_spell_1
848F LD HL,modwizard_pointers_6 Set current_character_pointer to modwizard_pointers_6.
8492 LD (current_character_pointer),HL
8495 CALL routine02 Copy sprite pointers to wizard data.
8498 CALL get_wizard_object Get address of the wizard object data of the current player.
849B LD DE,$0009 Load address from temp_pointer into HL and subtract $0009.
849E OR A
849F LD HL,(temp_pointer)
84A2 SBC HL,DE
84A4 LD (HL),$03 Store $03 at resulting address ???
84A6 INC HL Increment address and store $06 ???
84A7 LD (HL),$06
magic_bow_spell_1 84A9 CALL routine50 Call routine50 ???
84AC CALL routine11 Display SPELL FAILS or SPELL SUCCEEDS message and return.
84AF RET
Prev: 8438 Up: Map Next: 84B0