Routines |
Prev: 59262 | Up: Map | Next: 59330 |
Used by the routine at 59262.
|
||||
The player has selected (FIRE button press) and then confirmed (second FIRE button press) a spell from the list.
|
||||
59298 | LD A,0 | Reset fire button register, store zero value | ||
59300 | LD (60210),A | |||
The following routine decrements the number of charges left for the spell.
'Active effect' spells (SHIELD, UNSEEN etc.) are deactivated by casting the same spell again. Therefore, spell charges for these spells are not reduced now, but later at 59956 when the spell is cast again to 'deactivate' it.
|
||||
59303 | LD A,(60359) | Check the 'spell type' byte | ||
59306 | CP 4 | Is it an 'ongoing effect' spell (SHIELD, UNSEEN, PROTECT, AMULET, DEFENCE, WRAITHBANE, CHALICE)? | ||
59308 | JR Z,59330 | If so, skip this routine | ||
59310 | LD A,(60360) | Number of spell 'charges' left | ||
59313 | CP 255 | 255 = infinite charges - no need to decrease charges | ||
59315 | JR Z,59328 | |||
59317 | DEC A | Otherwise, reduce charges by 1 | ||
59318 | LD (60360),A | ...and re-store. | ||
59321 | CP 0 | Zero charges left? | ||
59323 | JR NZ,59328 | |||
59325 | LD (60357),A | If so, set the spell to 'not acquired' (0) to remove it from the list as this is its last use | ||
59328 | JR 59373 | ...and set the flashing icon in the top right of the scroll |
Prev: 59262 | Up: Map | Next: 59330 |