The first function call in the main loop of the collision detection code goes to a function that handles sprites that were hit by the player's magic shortly before the current sprite update. The code of that function is located between the offsets $8151 and $81A6.
The first sprite array that's accessed right in the first line should be familiar. It's already been used in the main loop to determine if the function at $8151 should be called or not. It contains the ID of the magic the sprite was hit by. As only three (Deluge, Thunder, Fire) of the five different kinds of magic throw the enemy back only these three types need to be handled in this function.
Continue reading "Faxanadu collision detection - Part II (Enemies that were hit by magic)"