Prev: A3A7 Up: Map Next: A3C5
A3B7: Test Attack Overlap
Used by the routine at HandlerAppearingNastie.
Tests whether the player is attacking with the sword (sprite IDs 20 to 2F) and is touching an actor. The size of the area used for the test is set up here for TestPlayerTouchingActor, which does the work.
Input
IX Actor record
Output
F Carry flag set if the player is attacking and touching the actor
TestAttackOverlap A3B7 LD A,($9702) Fetch the sprite ID of the player from ImmortalData.
A3BA SUB $20 Subtract 20 (the first attacking Sabreman sprite ID).
A3BC CP $10 Return if the player is not attacking (the carry flag is reset).
A3BE RET NC
A3BF LD BC,$0C10 Set how far above and to the right of the actor the player can be in BC to 0C10.
A3C2 JP TestPlayerTouchingActor Jump to TestPlayerTouchingActor to test whether the player is touching the actor.
Prev: A3A7 Up: Map Next: A3C5