Routines |
Prev: 59298 | Up: Map | Next: 59373 |
Run after spell is cast (59298) if the spell triggered is an 'ongoing effect' type spell.
|
||||
Print the spell name in the bottom right:
|
||||
59330 | LD HL,60365 | Store the address pointer for spell name text | ||
59333 | LD (60065),HL | |||
59336 | LD HL,20729 | Screen display address pointer for the start of the text (left of small scroll area) | ||
59339 | LD (60068),HL | Store screen display address pointer | ||
59342 | LD A,7 | 7 characters to print (no effect spells need 8 letters) | ||
59344 | LD (60067),A | Store text character counter | ||
59347 | CALL 58080 | Print the spell name | ||
Check if the 'effect' spell cast is the same as the active one (deactivate) or a different one (replace):
|
||||
59350 | LD A,(60134) | Get spell (number) cast | ||
59353 | LD C,A | |||
59354 | LD A,(60137) | Compare with current 'active effect' spell | ||
59357 | CP C | |||
59358 | JR Z,59373 | It's the same one, so prepare to deactivate the spell: | ||
The spell cast is different from the currently active spell (or there isn't a currently active spell):
|
||||
59360 | LD A,C | Spell number of cast spell | ||
59361 | LD (60137),A | Set the spell being cast as the active 'effect' spell | ||
59364 | LD A,(60358) | Amount of energy that this spell drains (e.g. SHIELD) or heals (e.g. CHALICE) | ||
59367 | LD (60373),A | This byte is used to intermittently drain or heal Maroc's energy as time passes (54859) | ||
59370 | JP 60018 |
Prev: 59298 | Up: Map | Next: 59373 |