Prev: CC37 Up: Map Next: CCCD
CCAB: Hostiles pursue
This sets the pursue flag for all visible, hostile characters (who aren't in up in towers).
Research: If I nop this out then guards don't spot the items I drop. Iterate non-player characters.
hostiles_pursue CCAB LD HL,$8020 Point HL at the second vischar
CCAE LD DE,$0020 Prepare the vischar stride
CCB1 LD B,$07 Set B for seven iterations
Start loop
hp_loop CCB3 PUSH HL Preserve the vischar pointer
CCB4 LD A,(HL) Fetch vischar.character
Include hostiles only.
CCB5 CP $14 Is it character_20_PRISONER_1 or above?
CCB7 JR NC,hp_next Jump if so
Exclude the guards placed high up in towers and over the gate.
CCB9 LD A,$13 Point HL at vischar.mi.pos.height
CCBB ADD A,L
CCBC LD L,A
CCBD LD A,(HL) Fetch vischar.mi.pos.height
CCBE CP $20 Is it 32 or above?
CCC0 JR NC,hp_next Jump if so
CCC2 LD A,L Point HL at vischar.flags
CCC3 SUB $12
CCC5 LD L,A
CCC6 LD (HL),$01 Set vischar.flags to vischar_PURSUIT_PURSUE
hp_next CCC8 POP HL Restore the vischar pointer
CCC9 ADD HL,DE Advance the vischar pointer
CCCA DJNZ hp_loop ...loop
CCCC RET Return
Prev: CC37 Up: Map Next: CCCD