Prev: 910E Up: Map Next: 939E
9171: Action Attack
Action_Attack 9171 CALL $914A
9174 LD A,($B6E9)
9177 LD HL,$026B
917A CP $FF
917C JR Z,Action_Attack_0
917E LD IX,($B70A)
9182 LD L,(IX+$08)
9185 LD H,(IX+$09)
Action_Attack_0 9188 LD ($B6FC),HL
918B LD IX,($B70C)
918F LD B,(IX+$05)
9192 LD A,($B6E9)
9195 INC A
9196 JR Z,Action_Attack_2
9198 LD IY,($B70A)
919C LD A,(IY+$00)
919F DEC A
91A0 LD HL,$AF5F HL="you cannot kill with[0x09][0x15]"
91A3 JP NZ,PrintMsg
91A6 LD A,(IY+$05)
91A9 ADD A,B
91AA JR NC,Action_Attack_1
91AC LD A,$FF
Action_Attack_1 91AE LD B,A
Action_Attack_2 91AF LD A,B
91B0 CALL Action_Attack_7
91B3 LD B,A
91B4 CALL $9D44
91B7 LD IX,($B708)
91BB LD A,(IX+$06)
91BE CALL Action_Attack_7
91C1 CP B
91C2 LD HL,$AF50 HL="but the effort is wasted.[0x0e] defense is too strong"
91C5 JP NC,PrintMsg
91C8 LD C,A
91C9 ADD A,$10
91CB JR NC,Action_Attack_3
91CD LD A,$FF
Action_Attack_3 91CF CP B
91D0 JR C,Action_Attack_6
91D2 LD A,B
91D3 SUB C
91D4 RLCA
91D5 LD E,A
91D6 LD D,$00
91D8 LD IY,$9226
91DC ADD IY,DE
91DE LD L,(IY+$00)
91E1 LD H,(IY+$01)
91E4 RRCA
91E5 RRCA
91E6 LD B,A
91E7 CPL
91E8 ADD A,(IX+$05)
91EB JR NC,Action_Attack_4
91ED LD (IX+$05),A
Action_Attack_4 91F0 LD A,B
91F1 RRCA
91F2 CPL
91F3 ADD A,(IX+$06)
91F6 JR NC,Action_Attack_5
91F8 LD (IX+$06),A
Action_Attack_5 91FB JP PrintMsg
Action_Attack_6 91FE LD HL,$AE3A HL="with one well place(s|d|ing|es) blow you cleave[0x0e] skull"
9201 CALL PrintMsg Call PrintMsg.
9204 SET 3,(IX+$07)
9208 LD A,($B6E8)
920B CALL $977F
920E LD A,$06
9210 JP DisplayExits_3
Action_Attack_7 9213 PUSH BC
9214 LD B,A
9215 LD A,$0A
9217 CALL CalcRandom
921A LD C,A
921B ADD A,B
921C JR NC,Action_Attack_8
921E XOR A
921F BIT 7,C
9221 JR NZ,Action_Attack_8
9223 DEC A
Action_Attack_8 9224 POP BC
9225 RET
9226 DEFW $AF3C
9228 DEFW $AF2B
922A DEFW $AF20
922C DEFW $AF15
922E DEFW $AF09
9230 DEFW $AEF4
9232 DEFW $AEE2
9234 DEFW $AED1
9236 DEFW $AEBA
9238 DEFW $AEAC
923A DEFW $AE98
923C DEFW $AE8B
923E DEFW $AE7A
9240 DEFW $AE70
9242 DEFW $AE5A
9244 DEFW $AE49
This entry point is used by the routine at Action_Putdown.
Action_Attack_9 9246 LD IX,($B708)
924A LD A,(IX+$00)
924D DEC A
924E RET
924F CALL Action_Putdown_4
9252 LD A,($B6E9)
9255 CP (IX+$01)
9258 JP Z,ICannotDoThat
925B LD IY,($B70A)
925F LD A,($B6E7)
9262 CP $12
9264 JR Z,Action_Attack_10
9266 BIT 5,(IY+$07)
926A JR Z,Action_Attack_12
Action_Attack_10 926C LD A,(IY+$02)
926F SUB (IX+$02)
9272 JR C,Action_Attack_11
9274 PUSH AF
9275 LD A,($B6E9)
9278 CALL $9CE8
927B LD B,A
927C POP AF
927D SUB B
Action_Attack_11 927E LD HL,$AE1A HL="[0x09] is too full"
9281 JP C,PrintMsg
9284 JP Z,PrintMsg
9287 CALL $9D44
928A LD A,(IY+$10)
928D LD (IX+$10),A
9290 LD A,($B6E9)
9293 LD (IX+$01),A
9296 RET
Action_Attack_12 9297 LD A,$05
9299 JP DisplayExits_2
929C CALL $9D44
929F LD IX,($B708)
92A3 LD A,(IX+$01)
92A6 CP $FF
92A8 JR Z,Action_Attack_13
92AA CALL LocateObject
92AD RES 2,(IX+$07)
92B1 LD A,$01
92B3 JR Action_Attack_14
This entry point is used by the routine at ActionClimbOut.
Action_Attack_13 92B5 CALL $9D44
92B8 LD A,$0A
Action_Attack_14 92BA LD IX,($B70C)
92BE ADD A,(IX+$05)
92C1 CP $80
92C3 JR NC,Action_Attack_16
92C5 LD (IX+$05),A
92C8 LD IX,($B708)
92CC LD (IX+$01),$FF
92D0 LD B,(IX+$00)
Action_Attack_15 92D3 LD (IX+$10),$00
92D7 INC IX
92D9 DJNZ Action_Attack_15
92DB RET
Action_Attack_16 92DC LD HL,$B146 HL="[0x0c] foul gluttony has{5} killed you[0x15]"
92DF CALL PrintMsg
92E2 LD A,($B6EA)
92E5 JP $977F
92E8 LD A,$83
92EA JP DisplayExits_2
This entry point is used by the routines at Action_Shoot and ActionClimbOut.
Action_Attack_17 92ED LD IX,($B708)
92F1 BIT 1,(IX+$07)
92F5 JP NZ,$9F76
92F8 BIT 3,(IX+$07)
92FC JP NZ,Action_Attack_22
92FF SUB A
9300 CP (IX+$06)
9303 JP Z,$9F76
9306 LD B,A
9307 LD A,($B6E9)
930A INC A
930B JR Z,Action_Attack_18
930D LD IY,($B70A)
9311 LD A,(IY+$05)
9314 AND A
9315 JP Z,$9F76
9318 PUSH IX
931A LD IX,($B70A)
931E LD A,$0B
9320 CALL $9B81
9323 POP IX
9325 INC A
9326 JP Z,$9F76
9329 LD B,(IY+$05)
Action_Attack_18 932C CALL $9D44
932F LD A,$15
9331 CALL CalcRandom
9334 ADD A,B
9335 LD IY,($B70C)
9339 ADD A,(IY+$05)
933C JR NC,Action_Attack_19
933E LD A,$FF
Action_Attack_19 9340 SUB (IX+$06)
9343 JR C,Action_Attack_20
9345 SET 3,(IX+$07)
9349 LD A,($B6E8)
934C CALL DisplayExits_6
934F SRA (IX+$05)
9353 LD A,(IX+$04)
9356 CP $02
9358 CALL C,$9D50
935B LD A,$83
935D CALL DisplayExits_3
Action_Attack_20 9360 LD A,($B6E9)
9363 CP $FF
9365 RET Z
9366 LD IY,($B70A)
936A BIT 3,(IY+$07)
936E RET NZ
936F LD B,(IY+$06)
9372 LD A,$15
9374 CALL CalcRandom
9377 ADD A,B
9378 JR NC,Action_Attack_21
937A LD A,$FF
Action_Attack_21 937C SUB (IX+$06)
937F RET C
9380 SET 3,(IY+$07)
9384 LD A,($B6E9)
9387 CALL DisplayExits_6
938A LD A,(IY+$05)
938D SRA A
938F LD (IY+$05),A
9392 CALL $9D50
9395 PUSH IY
9397 POP IX
Action_Attack_22 9399 LD A,$83
939B JP DisplayExits_3
Prev: 910E Up: Map Next: 939E