Routines |
Prev: 54782 | Up: Map | Next: 54865 |
Used by the routine at 54782.
|
||||||||||||||||||||
The following spells have a 'trickle' drain/heal effect on Maroc's energy while they're in effect:
Each 'trickle' of drain/restore takes place every 16 game cycles:
|
||||||||||||||||||||
54842 | LD A,(60074) | Incrementing game counter | ||||||||||||||||||
54845 | LD C,A | (This instruction/C register not needed) | ||||||||||||||||||
54846 | AND 15 | Check if any of bits 0-3 are set | ||||||||||||||||||
54848 | CP 0 | |||||||||||||||||||
54850 | JR NZ,54865 | If so, don't do anything but instead skip to next routine | ||||||||||||||||||
Every 16th game cycle:
|
||||||||||||||||||||
54852 | LD A,(60137) | Currently active 'effect' spell | ||||||||||||||||||
54855 | CP 0 | |||||||||||||||||||
54857 | JR Z,54865 | If no active effect spells, jump to next routine | ||||||||||||||||||
54859 | LD A,(60373) | Ongoing effect spell - amount of energy to drain/heal (see table) | ||||||||||||||||||
54862 | CALL 58316 | Increase/decrease Maroc's energy accordingly |
Prev: 54782 | Up: Map | Next: 54865 |