Prev: 98D9 Up: Map Next: 9918
98EC: Handle shield loss
Used by the routines at CF59 and CFB5.
Input
L Shield loss quantity
98EC LD A,$01 Set shield loss counter to 1
98EE LD ($A1E7),A
This entry point is used by the routine at 9683.
98F1 LD A,($A1E7) Decrement shield loss counter
98F4 DEC A
98F5 LD ($A1E7),A
98F8 OR A Return is shield loss counter is not zero
98F9 RET NZ
98FA LD A,$04 Reset shield loss counter
98FC LD ($A1E7),A
98FF LD A,($A1E6) Decrement shield power
9902 SUB L
9903 JP C,$990D Jump forward if shield loss is less than 0
9906 LD ($A1E6),A Set new shield power value
9909 CALL $9918 Draw shield power in HUD
990C RET
990D XOR A Set shield power to zero
990E LD ($A1E6),A
9911 LD ($A1E2),A Deactivite shield
9914 CALL $9918 Draw shield power in HUD
9917 RET
Prev: 98D9 Up: Map Next: 9918