Prev: 41911 Up: Map Next: 41952
41925: Handler: Appearing Nastie
Handles a nastie which is appearing (sprite IDs 1 to 5). Each time it is handled the sprite ID goes up by one, until it reaches 6 and HandlerChooseNastie turns it into a real nastie. If the player attacks it while it is appearing then it is blown up by BlowUpActor, and if it is in a different room to the player it is counted off by ExpireActor.
Input
IX Nastie record
Count off the nastie if it is not in the same room as the player.
HandlerAppearingNastie 41925 LD A,(38659) Fetch the room of the player from 38659.
41928 CP (IX+1) Jump to ExpireActor if the nastie is in a different room to the player.
41931 JP NZ,ExpireActor
41934 CALL StoreEntity Remember the previous position of the nastie.
Blow up the nastie if the player is attacking it.
41937 CALL TestAttackOverlap Test whether the player is attacking the nastie.
41940 JP C,BlowUpActor Jump to BlowUpActor to blow up the nastie if the player is attacking it.
Move the nastie on to the next sprite and make a sound, the pitch of which depends on the sprite ID.
41943 INC (IX+0) Move the nastie on to the next appearing sprite.
41946 CALL PlayAppearingSound Play the appearing sound.
41949 JP DisplayActor Jump to DisplayActor to display the nastie.
Prev: 41911 Up: Map Next: 41952