Prev: 836A Up: Map Next: 83D0
839C: MagicSword spell.
magic_sword_spell 839C LD A,(computer_player_flag) Jump to magic_sword_spell_0 if player is human.
839F OR A
83A0 JR Z,magic_sword_spell_0
83A2 CALL routine03 Else call routine03 to get byte from unknown_table_3.
83A5 AND $04 Jump to magic_sword_spell_0 if bit 2 is clear.
83A7 JR Z,magic_sword_spell_0
83A9 LD A,$00 Set unknown10 variable to zero and return.
83AB LD (unknown10),A
83AE RET
magic_sword_spell_0 83AF CALL routine04 Call routine04 ???
83B2 LD A,(spell_success_flag) Jump to magic_sword_spell_1 if spell_success_flag is clear.
83B5 OR A
83B6 JR Z,magic_sword_spell_1
83B8 LD HL,modwizard_pointers_1 Set current_character_pointer to modwizard_pointers_1.
83BB LD (current_character_pointer),HL
83BE CALL routine02 Copy sprite pointers to wizard data.
83C1 CALL routine03 Get byte from unknown_table_3.
83C4 AND $FC Clear bits 0 and 1, and set bit 2.
83C6 OR $04
83C8 LD (HL),A Store result back in unknown_table_3.
magic_sword_spell_1 83C9 CALL routine50 Call routine50 ???
83CC CALL routine11 Display SPELL FAILS or SPELL SUCCEEDS message and return.
83CF RET
Prev: 836A Up: Map Next: 83D0