Prev: A92D Up: Map Next: A98E
A934: Check to see if thief can steal from player.
Used by the routine at People_Main.
Input
Output
Thief_TryToSteal A934 LD A,(IX+$17) See if thief has bumped into player.
A937 CP $01
A939 JR Z,Thief_TryToSteal_0
A93B RET C
A93C DEC (IX+$17)
A93F RET
Thief_TryToSteal_0 A940 LD A,(TempBl)
A943 CP $02
A945 RET NC
A946 PUSH IX
A948 PUSH DE
A949 LD (IX+$17),$05
A94D LD A,(Inv_Select) See if money is selected.
A950 AND A If not check to see what is.
A951 JR NZ,Thief_TryToSteal_3
A953 CALL Block_ClearMem Clear any money being carried.
A956 DEFW IridiValue
A958 DEFB $04
Thief_TryToSteal_1 A959 CALL Message_Display Display the message to let the player know they have been robbed.
Msg_YourPardon A95C DEFM "your pardon"
A967 DEFB $5E
A968 CALL Inv_Update Update the inventory screen.
Thief_TryToSteal_2 A96B POP DE
A96C POP IX
A96E RET
Thief_TryToSteal_3 A96F LD L,A Offset selected index to the address of the pocket it represents.
A970 LD H,$00
A972 LD BC,_b14e
A975 ADD HL,BC
A976 PUSH HL
A977 LD A,(HL) Get index of the object selected.
A978 AND $7F
A97A LD HL,Obj_NotStealIndicies Compare to the table of objects that cannot be stolen.
A97D LD BC,$0007
A980 CPIR
A982 POP HL
A983 JR Z,Thief_TryToSteal_2 Done if found.
A985 LD (HL),$00 Make object stolen by clearing pocket.
A987 LD A,$01 Select money.
A989 LD (Inv_Select),A
A98C JR Thief_TryToSteal_1
Prev: A92D Up: Map Next: A98E