![]()  | 
Routines | 
| Prev: EECD | Up: Map | Next: EEFC | 
| 
 
This event handles the pirate.
 
 | 
||||
| 
 
Print "
A pirate attacks you...".
 
 | 
||||
| Event_Pirate | EEDF | LD HL,$D7C5 | HL=D7C5. | |
| EEE2 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
| EEE5 | LD A,$0F | Call GenerateRandomNumber with a maximum value of 0F. | ||
| EEE7 | CALL GenerateRandomNumber | |||
| EEEA | JR NZ,Event_Pirate_Safe | Jump to Event_Pirate_Safe if the random generator returns a non-zero response. | ||
| 
 
Bad luck!
 
 | 
||||
| EEEC | LD HL,$EDD7 | Switch GameOver onto the stack so the next return actions a "game over". | ||
| EEEF | EX (SP),HL | |||
| 
 
Print "After a fierce struggle
he overpowers you.".
 
 | 
||||
| EEF0 | LD HL,$D7F6 | HL=D7F6. | ||
| EEF3 | JR Event_Pirate_PrintAndReturn | Jump to Event_Pirate_PrintAndReturn. | ||
| 
 
Handle that the pirate should work out more.
 
Print "But you avoid his blow.".
 
 | 
||||
| Event_Pirate_Safe | EEF5 | LD HL,$D7DE | HL=D7DE. | |
| Event_Pirate_PrintAndReturn | EEF8 | CALL PausePrintStringAndScroll | Call PausePrintStringAndScroll. | |
| EEFB | RET | Return. | ||
| Prev: EECD | Up: Map | Next: EEFC |