Prev: 35309 Up: Map Next: 35375
35349: Take Energy From Player
Used by the routine at HandlerHunchback.
Called when a boss has touched the player. It takes 16 (at TakeEnergyFromPlayer) or 8 (at TakeEnergyFromPlayer_Small) from PlayerEnergy. The chicken is then redrawn by DrawChicken, which returns to the caller. If the player did not have enough energy then the return address is discarded and LoseLife is used to take a life.
Input
IX The boss entity
TakeEnergyFromPlayer 35349 LD A,(24104) Fetch the energy of the player from PlayerEnergy.
35352 SUB 16 Take 16 off the energy of the player.
35354 JR C,TakeEnergyFromPlayer_Dead Jump to TakeEnergyFromPlayer_Dead if the player has run out of energy.
35356 JR TakeEnergyFromPlayer_Update Jump to TakeEnergyFromPlayer_Update to update the energy of the player.
This entry point is used by the routines at HandlerMummy, HandlerDracula, HandlerFrankenstein and HandlerDevil.
TakeEnergyFromPlayer_Small 35358 LD A,(24104) Fetch the energy of the player from PlayerEnergy.
35361 SUB 8 Take 8 off the energy of the player.
35363 JR C,TakeEnergyFromPlayer_Dead Jump to TakeEnergyFromPlayer_Dead if the player has run out of energy.
TakeEnergyFromPlayer_Update 35365 LD (24104),A Update the energy of the player in PlayerEnergy.
35368 JP DrawChicken Jump to DrawChicken to update the roast chicken.
TakeEnergyFromPlayer_Dead 35371 POP HL Discard the return address.
35372 JP LoseLife Jump to LoseLife to take a life from the player.
Prev: 35309 Up: Map Next: 35375