![]() |
Routines |
| Prev: 8EA0 | Up: Map | Next: 8EEF |
|
Used by the routine at HandleTouchingCreature.
Takes 20 from the energy of the player in PlayerEnergy, which is what happens when a creature touches them (see HandleTouchingCreature). The chicken is redrawn by DrawChicken. If the energy is gone then LoseLife takes a life.
|
||||
| HurtPlayer | 8ED7 | LD A,($5E28) | Fetch the energy of the player from PlayerEnergy. | |
| 8EDA | SUB $20 | Subtract 20. | ||
| 8EDC | JR Z,HurtPlayer_NoEnergy | Jump to HurtPlayer_NoEnergy if the energy is zero. | ||
| 8EDE | JR NC,HurtPlayer_Update | Jump to HurtPlayer_Update if there is some energy left. | ||
| 8EE0 | XOR A | A=00 (no energy left). | ||
| HurtPlayer_NoEnergy | 8EE1 | LD ($5E28),A | Update the energy of the player in PlayerEnergy. | |
| 8EE4 | CALL DrawChicken | Call DrawChicken to redraw the chicken. | ||
| 8EE7 | JR LoseLife | Jump to LoseLife to take a life from the player. | ||
| HurtPlayer_Update | 8EE9 | LD ($5E28),A | Update the energy of the player in PlayerEnergy. | |
| 8EEC | JP DrawChicken | Jump to DrawChicken to redraw the chicken. | ||
| Prev: 8EA0 | Up: Map | Next: 8EEF |