Prev: E7A2 Up: Map Next: E7ED
E7C2: Print name of ongoing effect spell in small scroll in bottom right of screen
Run after spell is cast (E7A2) if the spell triggered is an 'ongoing effect' type spell.
  • Ongoing 'effect' spells stay active until the player deactivates it either by re-casting it, or casting a different effect spell (e.g. switching from UNSEEN to SHIELD)
  • While an 'effect' spell is active, the player can cast other spells (e.g. MOVE, SERVANT, MISSLE) without deactivating the current 'effect' spell. See Bugs - Switching between 'effect' spells doesn't reduce a spell's charges
  • 'Effect' spells are: SHIELD, UNSEEN, PROTECT, AMULET, DEFENCE, WRAITHBANE (displayed as W BANE), CHALICE
shield spell active
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