Prev: 56684 Up: Map Next: 56727
56713: Handler: Increase Energy (Eaten Food)
Used by the routine at Handler_EatFood.
Input
IY Monster data
A Energy increment
Handler_IncreaseEnergy 56713 ADD A,(IY+12) Add the energy value to the monsters current energy level (*IY+12).
56716 LD (IY+12),A
Ensure the maximum value for monster energy is not breached.
56719 CP 65 Return if the monsters energy is lower than 65.
56721 RET C
56722 LD (IY+12),64 Else write 64 to the monsters energy (*IY+12) to keep it within the acceptable range.
56726 RET Return.
Prev: 56684 Up: Map Next: 56727