Prev: 45753 Up: Map Next: 45830
45760: ForceAttackRowIfHostile
Room view only, and never on the QUIT row. A press on row 8 (the front-hand item) zeroes the actor's action countdown (+0), cancelling any pending timed job — the countdown only fires its action when it decrements to zero in ResetCrewTimers. Then, if the alien (slot 0) is in the viewed actor's room — or, once the alien is active (flag $FF), the alien-target / Android slot (pointer at $83A5) is — swap the special row to ATTACK.
45760 LD A,(31252) room view (mode 1)?
45763 CP 1
45765 RET NZ no: nothing to do
45766 LD A,(33683)
45769 CP 17 cursor on the QUIT row?
45771 RET Z yes: leave everything alone
45772 CP 8 cursor on the front-hand item row?
45774 JR NZ,45780
45776 LD (IX+0),0 yes: cancel the actor's pending countdown
45780 LD A,(29567) alien (slot 0) in the viewed actor's room?
45783 CP (IX+1) (raw compare, so the duct bit must match too)
45786 JR Z,45803 yes: hostile present
45788 LD A,(33704) alien active ($FF, set by TriggerAlienEvent)?
45791 CP 255
45793 RET NZ no: done
45794 LD HL,(33701) the alien-target / Android record:
45797 INC HL
45798 LD A,(HL) its current room (+1)
45799 CP (IX+1) in the viewed actor's room?
45802 RET NZ no: done
45803 LD A,(33685) is the press landing on 49 "RmveGrille"?
45806 CP 49
45808 JR NZ,45815
45810 LD A,238 yes: mark the mirror with 238 so the
45812 LD (33685),A special-row shim honours the grille press
45815 LD A,52 special row (cell 13) = 52 " ATTACK "
45817 LD (29643),A
45820 LD HL,18646 and redraw it (screen row 14, column 22)
45823 LD (31257),HL
45826 CALL 31634
45829 RET
Prev: 45753 Up: Map Next: 45830