![]() |
Routines |
| Prev: D794 | Up: Map | Next: D833 |
|
Follows the previous routine at D794.
|
||||
|
Check which (if any) spell, or spell type, has been cast/activated (rather than merely selected) - using spell number - from the spells list at 6DFC and stored at EAEC.
|
||||
| D7F3 | LD A,($EAEC) | |||
| D7F6 | CP $00 | No spell cast, or MOVE spell in effect | ||
| D7F8 | JP Z,$D901 | |||
| D7FB | CP $01 | SERVANT spell | ||
| D7FD | JR Z,$D833 | |||
| D7FF | CP $08 | HAIL spell | ||
| D801 | JP Z,$D8CE | |||
| D804 | CP $0C | WAYSTONE spell | ||
| D806 | JP Z,$D8D5 | |||
| D809 | CP $10 | FREEZE spell | ||
| D80B | JP Z,$D8E2 | |||
| D80E | CP $11 | SUMMON spell | ||
| D810 | JP Z,$D8E9 | |||
| D813 | CP $13 | PORTAL spell | ||
| D815 | JP Z,$D8F0 | |||
|
Maroc has cast some other spell:
|
||||
| D818 | LD A,($EBC7) | Check the type of spell cast | ||
| D81B | CP $02 | Spell type 2 = spell that generates a controllable graphic, e.g. SERVANT, MISSILE, OPEN | ||
| D81D | JP NZ,$D901 | If not one of these spell types, skip out of this routine for other checks | ||
|
Spell has been cast that involves a controllable cursor:
|
||||
| D820 | LD A,($EBCA) | Get byte indicating spell cursor type | ||
| D823 | CP $00 | If not active, can skip to next routine | ||
| D825 | JP Z,$D901 | |||
| D828 | LD C,A | Otherwise, temp store this value in the C register | ||
| D829 | AND $80 | Bit 7 of this byte is set for bolt spells (MISSILE, FIREBALL etc.) | ||
| D82B | CP $00 | |||
| D82D | JP Z,$D8B2 | If NOT set, it's another sort of aiming cursor, so can jump out here and deal with this spell's potential event/collision actions | ||
| D830 | JP $D901 | If set, it's a bolt/missile type spell, fine to jump out of this routine | ||
| Prev: D794 | Up: Map | Next: D833 |