Prev: A89E Up: Map Next: A8D2
A8AB: Bard: an order given to him becomes a step of his own script
The order is taken and parsed, and its action and objects are written into the script step at BARD_ORDER_STEP -- with opcode $42, an action that an order cannot interrupt -- so that Bard goes on trying it, turn after turn, until it works. Those are the three script bytes that DO_SAVE carries in the variables block.
BARD_TAKES_ORDER A8AB LD A,(ORDER_WAITING)
A8AE CP $01
A8B0 RET NZ
A8B1 SUB A
A8B2 LD (ORDER_WAITING),A
A8B5 INC A
A8B6 CALL TAKE_ORDER
A8B9 RET Z
A8BA SUB A
A8BB LD (SUCCEEDED),A
A8BE LD A,(PARSED_ACTION)
A8C1 LD (BARD_ORDER_ACTION),A
A8C4 LD BC,(TARGET)
A8C8 LD (BARD_ORDER_OBJECTS),BC
BARD_SETS_STEP A8CC LD A,$42
A8CE LD (BARD_ORDER_STEP),A
A8D1 RET
Prev: A89E Up: Map Next: A8D2