Routines |
Prev: E7A2 | Up: Map | Next: E7ED |
Run after spell is cast (E7A2) if the spell triggered is an 'ongoing effect' type spell.
|
||||
Print the spell name in the bottom right:
|
||||
E7C2 | LD HL,$EBCD | Store the address pointer for spell name text | ||
E7C5 | LD ($EAA1),HL | |||
E7C8 | LD HL,$50F9 | Screen display address pointer for the start of the text (left of small scroll area) | ||
E7CB | LD ($EAA4),HL | Store screen display address pointer | ||
E7CE | LD A,$07 | 7 characters to print (no effect spells need 8 letters) | ||
E7D0 | LD ($EAA3),A | Store text character counter | ||
E7D3 | CALL $E2E0 | Print the spell name | ||
Check if the 'effect' spell cast is the same as the active one (deactivate) or a different one (replace):
|
||||
E7D6 | LD A,($EAE6) | Get spell (number) cast | ||
E7D9 | LD C,A | |||
E7DA | LD A,($EAE9) | Compare with current 'active effect' spell | ||
E7DD | CP C | |||
E7DE | JR Z,$E7ED | 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):
|
||||
E7E0 | LD A,C | Spell number of cast spell | ||
E7E1 | LD ($EAE9),A | Set the spell being cast as the active 'effect' spell | ||
E7E4 | LD A,($EBC6) | Amount of energy that this spell drains (e.g. SHIELD) or heals (e.g. CHALICE) | ||
E7E7 | LD ($EBD5),A | This byte is used to intermittently drain or heal Maroc's energy as time passes (D64B) | ||
E7EA | JP $EA72 |
Prev: E7A2 | Up: Map | Next: E7ED |