Prev: 9A5D Up: Map Next: 9A9F
9A71: A character tries to get out of something
Called when a character is being held by an object (for example shut in a barrel or a cell). If the holder is dead or alive (i.e. another character is carrying this one), nothing special happens. If it is a closed object, the character does nothing this turn. If it is open, the character tries action 55, CLIMB OUT OF.
9A71 LD A,$FF No instrument for this
9A73 LD ($B5DA),A
9A76 LD A,(IX+$01) A = whoever (or whatever) is holding the character
9A79 LD ($B5D9),A That becomes the target
9A7C CALL $9B25 IX = the holder's own record
9A7F BIT 3,(IX+$07) Is the holder dead (e.g. another character just killed)?
9A83 JP NZ,$97CB Yes: the character can simply act as normal, as if not held at all
9A86 BIT 6,(IX+$07) Is the holder actually alive (another character carrying this one)?
9A8A JP NZ,$97CB Yes: likewise, act as normal
9A8D BIT 5,(IX+$07) Otherwise it is a container: is it open?
9A91 JP Z,$985C No: stuck for this turn - move on to the next character
9A94 LD A,$37 Yes: try to climb out (action 55)
9A96 LD ($B5D8),A
9A99 CALL $9921 Try it
9A9C JP $985C Then move on to the next character regardless
Prev: 9A5D Up: Map Next: 9A9F