|  | Routines | 
| Prev: 36390 | Up: Map | Next: 36542 | 
| 
Used by the routine at 48096.
 
 | ||||||||
| 36471 | CALL 48417 | Remove Berk's current power and reset sweet / mushroom / edible eyes / sausage to its original state | ||||||
| 36474 | LD A,(34221) | Set current power value to class of entity currently held by Berk... | ||||||
| 36477 | LD (34220),A | ... | ||||||
| 36480 | XOR A | Set class of entity held by Berk to zero (i.e. none)... | ||||||
| 36481 | LD (34221),A | ... | ||||||
| 36484 | LD (34224),A | Set number of elapsed game-cycles in current block to zero | ||||||
| 36487 | RES 4,(IX+9) | Reset Berk's carrying-something flag | ||||||
| 36491 | LD IY,(34260) | Load IY with address of complex state data for entity last held by Berk... | ||||||
| 36495 | LD (IY+1),A | ...and set its depth to zero (i.e. outside room) | ||||||
| 36498 | LD A,(IY+10) | Initialise remaining duration of power to value encoded entity's complex state data (bits 0-4)... | ||||||
| 36501 | AND 31 | ... | ||||||
| 36503 | LD (34225),A | ... | ||||||
| 36506 | LD A,(34220) | If Berk's current power is not floating (level 3)... | ||||||
| 36509 | CP 10 | ... | ||||||
| 36511 | JP NZ,48096 | ...then jump to 48096 (advance HL to next script instruction and execute) | ||||||
| 
Power is floating
 | ||||||||
| 36514 | LD (IX+12),12 | Set distance Berk will be pushed by Drutt while floating to 12 | ||||||
| 36518 | SET 7,(IX+9) | Set Berk's moving-upwards flag | ||||||
| 36522 | LD (IX+11),240 | Reset Berk's walking-right, walking-left, unused-(11,2) and unused-(11,3) flags, and set his impassable-leftwards, impassable-rightwards, interaction-(11,6) and interaction-(11,7) flags | ||||||
| 36526 | SET 7,(IX+8) | Set bit 7 of Berk's class value (i.e. set spans-full-depth flag) | ||||||
| 36530 | INC (IX+6) | Increase y-coordinate of Berk's bottom edge by two characters... | ||||||
| 36533 | INC (IX+6) | ... | ||||||
| 36536 | LD HL,35515 | Point HL at script data for Berk gaining floating power... | ||||||
| 36539 | JP 48098 | ...and execute | ||||||
| Prev: 36390 | Up: Map | Next: 36542 |