Prev: EEFC Up: Map Next: EF54
EF32: Events: Spider
This event handles the poisonous spider.
Print " A poisonous spider drops on you.".
Event_Spider EF32 LD HL,$D8D8 HL=Messaging_PoisonousSpiderDropsOnYou.
EF35 CALL PrintStringAndNewline Call PrintStringAndNewline.
EF38 LD A,$0A Call GenerateRandomNumber with a maximum value of 0A.
EF3A CALL GenerateRandomNumber
EF3D JR NZ,Event_Spider_Safe Jump to Event_Spider_Safe if the random generator returns a non-zero response.
Bad luck!
EF3F LD HL,$EDD7 Switch GameOver onto the stack so the next return actions a "game over".
EF42 EX (SP),HL
Print "It stings you.".
EF43 LD HL,$D922 HL=Messaging_PoisonousSpiderStingsYou.
EF46 JR Event_Spider_PrintAndReturn Jump to Event_Spider_PrintAndReturn.
Handle that the poisonous spider didn't sting you.
Event_Spider_Safe EF48 LD A,$87 A=87 (event ID: 07).
EF4A CALL Handler_DestroyItemEvent Call Handler_DestroyItemEvent.
Print "It lingers a moment, then scuttles off.".
EF4D LD HL,$D8FA HL=Messaging_PoisonousSpiderScuttlesOff.
Event_Spider_PrintAndReturn EF50 CALL PausePrintStringAndScroll Call PausePrintStringAndScroll.
EF53 RET Return.
Prev: EEFC Up: Map Next: EF54