Prev: 40941 Up: Map Next: 41358
41264: TriggerAlienEvent — arm the Android once the alien is hurt
Per-frame check: once the crew has wounded the alien 6 or more times (slot 0 byte +4), and a valid Android slot exists (AlienTargetID < 8 — Long Game only) whose record is still dormant (+7 = 0), set AlienActiveFlag = 255 via AlienEventDispatch. UpdateAndroid sees the flag and turns the Android hostile — the traitor reveals himself when the alien is in danger.
Used by the routine at 36457.
41264 LD HL,29570 HL -> the alien's wound counter (+4)
41267 LD A,(HL)
41268 CP 6 wounded fewer than 6 times?
41270 RET C yes: no trigger yet
41271 LD A,(33703) is there a valid Android slot?
41274 CP 8 (the Short Game hard-wires 9)
41276 RET NC no: nothing to trigger
41277 LD HL,(33701) HL -> the Android's record;
41280 LD DE,7 its status byte (+7):
41283 ADD HL,DE
41284 XOR A still dormant (0)?
41285 CP (HL)
41286 RET NZ no (collapsed / host): stay quiet
41287 LD A,255 yes: AlienActiveFlag = 255 —
41289 JP 45732 the Android turns hostile
41292 RET (unreachable)
41293 LD HL,33682
41296 LD (HL),0
41298 LD BC,31
41301 IN A,(C)
41303 BIT 2,A
41305 JR Z,41309
41307 SET 3,(HL)
41309 BIT 3,A
41311 JR Z,41315
41313 SET 2,(HL)
41315 AND 19
41317 OR (HL)
41318 LD (HL),A
41319 RET
41320 LD HL,33682
41323 LD (HL),0
41325 LD BC,61438
41328 IN A,(C)
41330 CPL
41331 RRCA
41332 RRCA
41333 JR NC,41337
41335 SET 2,(HL)
41337 RRCA
41338 JR NC,41342
41340 SET 3,(HL)
41342 RRCA
41343 JR NC,41347
41345 SET 0,(HL)
41347 RRCA
41348 JR NC,41352
41350 SET 1,(HL)
41352 AND 8
41354 RET Z
41355 SET 4,(HL)
41357 RET
Prev: 40941 Up: Map Next: 41358