Prev: 62617 Up: Map Next: 62669
62628: Deal with ERIC when he's hitting
Used by the routine at 27353 when bit 1 of ERIC's status flags at 32763 is set (by the routine at 62574, via 62610).
Input
Output
62628 LD HL,32758 32758 holds the hitting action timer (initially 18)
62631 DEC (HL) Has ERIC finished the punch?
62632 JP Z,62501 Jump if so
62635 LD A,(HL) Pick up the current value of the action timer in A
62636 LD H,172 172=ERIC
62638 CP 12 Is it time to raise the fist to eye level?
62640 JP Z,28737 Jump if so
62643 CP 11 Is it time to see if anyone was hit?
62645 RET NZ Return if not
ERIC's fist is fully raised. Check whether it's in someone's face.
62646 CALL 28569 Check whether ERIC managed to deck anyone
62649 LD A,H A=character number of the decked boy (if any)
62650 CP 163 Was anyone decked?
62652 JR Z,62661 Jump if not
62654 CP 168 168=ANGELFACE
62656 LD A,3 Add 30 the score and print it if ANGELFACE was decked
62658 CALL Z,27389
62661 CALL 60128 Make a hitting sound effect
62664 LD B,14 Lines reprimand 14: DON'T HIT YOUR MATES
62666 JP 62550 Make any nearby teacher give ERIC lines
Prev: 62617 Up: Map Next: 62669