Prev: 26845 Up: Map Next: 26895
26861: Handle Midges Weapon Hit
Used by the routine at UpdateMidges.
A weapon has hit the midges. The repellent spray kills them, a streamer has no effect and a smoke bomb stuns them (and stops them dead).
Input
A State of the weapon
IX Midges object
MidgesWeaponHit 26861 AND %00111111 Keep only bits 0-5 (the type of the weapon).
26863 CP 8 Jump to MidgesWeaponHit_Kill if it is the repellent spray.
26865 JR Z,MidgesWeaponHit_Kill
26867 CP 18 Jump to UpdateMidges_NoWeaponHit if it is a streamer.
26869 JP Z,UpdateMidges_NoWeaponHit
26872 BIT 3,(IX+4) Jump to EatFlower if the midges are eating the flower.
26876 JP NZ,EatFlower
26879 LD (IX+6),0 Write 0 to IX+6 (stop the vertical movement).
26883 CALL StunBug Stun the midges using StunBug.
26886 JP UpdateMidges_NoWeaponHit Jump to UpdateMidges_NoWeaponHit.
MidgesWeaponHit_Kill 26889 LD BC,80 BC=80 (the points for the kill).
26892 JP KillLeech_AddPoints Add the points to the score and explode the midges using KillLeech_AddPoints.
Prev: 26845 Up: Map Next: 26895