|  | Routines | 
| Prev: 31112 | Up: Map | Next: 31188 | 
| 
Used by the routine at 55726.
 | ||||
| 31122 | LD A,(23403) | If barriers-removed flag is set... | ||
| 31125 | AND 1 | ... | ||
| 31127 | JP NZ,55262 | ...then display "THERE ARE NO BARRIERS TO BE REMOVED HERE." window (29) and return to game | ||
| 31130 | LD A,(23701) | If Magic Knight's current room is not 09 (Retreat, 2, barrier room)... | ||
| 31133 | CP 9 | ... | ||
| 31135 | JP NZ,55262 | ...then display "THERE ARE NO BARRIERS TO BE REMOVED HERE." window (29) and return to game | ||
| 31138 | LD A,12 | If Magic Knight is not wearing the Magic Talisman (12)... | ||
| 31140 | CALL 33640 | ... | ||
| 31143 | JP NZ,55332 | ...then display "YOU CANNOT CAST THAT SPELL NOW..." window (10) and return to game | ||
| 31146 | LD A,(25024) | Load Magic Knight's current magic level into A... | ||
| 31149 | AND 127 | ... | ||
| 31151 | CP 55 | If this is less than 55... | ||
| 31153 | JP C,55332 | ...then display "YOU CANNOT CAST THAT SPELL NOW..." window (10) and return to game | ||
| 31156 | SUB 55 | Subtract 55 from magic level... | ||
| 31158 | LD B,A | ...and load into B | ||
| 31159 | LD A,(25024) | Load A with unused bit... | ||
| 31162 | AND 128 | ... | ||
| 31164 | OR B | ...combine with remaining magic level value... | ||
| 31165 | LD (25024),A | ...and store | ||
| 31168 | CALL 55651 | Flash border and screen (as in cast a spell) | ||
| 31171 | LD A,(23403) | Set barriers-removed flag... | ||
| 31174 | OR 1 | ... | ||
| 31176 | LD (23403),A | ... | ||
| 31179 | LD HL,50956 | Set room layout data pointer address for Retreat, 2 to address of "without barrier" version of room 09 (50956)... | ||
| 31182 | LD (50161),HL | ... | ||
| 31185 | JP 55344 | Display "THE BARRIER HAS FADED INTO NOTHINGNESS" window (29) and return to game | ||
| Prev: 31112 | Up: Map | Next: 31188 |