Prev: 41895 Up: Map Next: 41925
41911: Test Attack Overlap
Used by the routine at HandlerAppearingNastie.
Tests whether the player is attacking with the sword (sprite IDs 32 to 47) 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 41911 LD A,(38658) Fetch the sprite ID of the player from ImmortalData.
41914 SUB 32 Subtract 32 (the first attacking Sabreman sprite ID).
41916 CP 16 Return if the player is not attacking (the carry flag is reset).
41918 RET NC
41919 LD BC,3088 Set how far above and to the right of the actor the player can be in BC to 3088.
41922 JP TestPlayerTouchingActor Jump to TestPlayerTouchingActor to test whether the player is touching the actor.
Prev: 41895 Up: Map Next: 41925