Prev: F499 Up: Map Next: F4CD
F4A4: Deal with ERIC when he's hitting
Used by the routine at 6AD9 when bit 1 of ERIC's status flags at 7FFB is set (by the routine at F46E, via F492).
F4A4 LD HL,$7FF6 7FF6 holds the hitting action timer (initially 0x12)
F4A7 DEC (HL) Has ERIC finished the punch?
F4A8 JP Z,$F425 Jump if so
F4AB LD A,(HL) Pick up the current value of the action timer in A
F4AC LD H,$AC 0xAC=ERIC
F4AE CP $0C Is it time to raise the fist to eye level?
F4B0 JP Z,$7041 Jump if so
F4B3 CP $0B Is it time to see if anyone was hit?
F4B5 RET NZ Return if not
ERIC's fist is fully raised. Check whether it's in someone's face.
F4B6 CALL $6F99 Check whether ERIC managed to deck anyone
F4B9 LD A,H A=character number of the decked boy (if any)
F4BA CP $A3 Was anyone decked?
F4BC JR Z,$F4C5 Jump if not
F4BE CP $A8 0xA8=ANGELFACE
F4C0 LD A,$03 Add 30 the score and print it if ANGELFACE was decked
F4C2 CALL Z,$6AFD
F4C5 CALL $EAE0 Make a hitting sound effect
F4C8 LD B,$0E Lines reprimand 0x0E: DON'T HIT YOUR MATES
F4CA JP $F456 Make any nearby teacher give ERIC lines
Prev: F499 Up: Map Next: F4CD