Prev: F2D4 Up: Map Next: F2EF
F2DA: Handler: Resolve Attack
Print the attack, then sometimes announce that it missed.
Handler_ResolveAttack F2DA PUSH AF The sword swings, with "You swing the sword:-".
F2DB LD HL,$DF5C
This entry point is used by the routine at Handler_AnnounceArrow.
Handler_ResolveAttack_Print F2DE CALL PrintStringAndANewline Print that message and start a new line.
F2E1 POP AF Restore the miss flag from the stack.
F2E2 AND A Return when this attack cannot miss.
F2E3 RET Z
F2E4 CALL GenerateRandomNumber Call GenerateRandomNumber to roll the miss chance, and return when the blow lands.
F2E7 RET NZ
F2E8 LD HL,$DEF9 The blow missed. Print "Bad luck.You missed.".
F2EB POP DE Discard the return address on the stack.
F2EC JP PauseAndPrintResponse Jump back to PauseAndPrintResponse to return to the game loop.
Prev: F2D4 Up: Map Next: F2EF