![]() |
Data |
| Prev: C913 | Up: Map | Next: C946 |
|
What vicious warg does, turn by turn. CHARACTERS_ACT runs one step of a character's script each turn it can, and a step is an action the character tries as if it had typed it: RUN, TAKE, GIVE TO. A step that names nothing acts on whatever fits.
First comes the script table: one entry per script, a key and the script's address. Key 0 is an ordinary script -- the ones a character wanders between, picked at random by a 'switch at random' step. Any other key is an action code, and that script is the character's reaction when that is done to it: attacked, given something, captured.
Then the scripts, one step to a line. A step's first byte says what it is: its low four bits $00-$03 an action with objects (or, $01 and $03, a routine to call), $04 an action with none, $0E go to, $0F switch at random, $0C switch to a reaction. $10 added means an address follows, where the script goes on if the step is refused; $20 that the step is used up once it works (SCRIPT_DO zeroes its first byte); $40 that an order from the player cannot interrupt it. So $14 is an action with no objects, with somewhere to go if it is refused. The Characters page has every script written out.
|
||||
| VICIOUS_WARG_SCRIPTS | C924 | DEFB $00 | Key 0, an ordinary script: VICIOUS_WARG_A | |
| C925 | DEFW VICIOUS_WARG_A | |||
| C927 | DEFB $FF | End of the table | ||
|
VICIOUS_WARG_A -- An ordinary script: ATTACK WITH, Go to VICIOUS_WARG_A.
|
||||
| VICIOUS_WARG_A | C928 | DEFB $14,$0F | ATTACK WITH | |
| C92A | DEFW VICIOUS_WARG_B | If it is refused: VICIOUS_WARG_B | ||
| C92C | DEFB $0E | Go to VICIOUS_WARG_A | ||
| C92D | DEFW VICIOUS_WARG_A | |||
|
VICIOUS_WARG_B -- Where a jump or a refusal goes on: FOLLOW, WARG_HOWLS, Go to VICIOUS_WARG_A.
|
||||
| VICIOUS_WARG_B | C92F | DEFB $14,$27 | FOLLOW | |
| C931 | DEFW VICIOUS_WARG_C | If it is refused: VICIOUS_WARG_C | ||
| C933 | DEFB $03 | Call WARG_HOWLS | ||
| C934 | DEFW WARG_HOWLS | |||
| C936 | DEFB $00 | Not used | ||
| C937 | DEFB $0E | Go to VICIOUS_WARG_A | ||
| C938 | DEFW VICIOUS_WARG_A | |||
|
VICIOUS_WARG_C -- Where a jump or a refusal goes on: RUN, Go to VICIOUS_WARG_A.
|
||||
| VICIOUS_WARG_C | C93A | DEFB $14,$24 | RUN | |
| C93C | DEFW VICIOUS_WARG_D | If it is refused: VICIOUS_WARG_D | ||
| C93E | DEFB $0E | Go to VICIOUS_WARG_A | ||
| C93F | DEFW VICIOUS_WARG_A | |||
|
VICIOUS_WARG_D -- Where a jump or a refusal goes on: Pause: nothing this turn, Go to VICIOUS_WARG_A.
|
||||
| VICIOUS_WARG_D | C941 | DEFB $04,$FF | Pause: nothing this turn | |
| C943 | DEFB $0E | Go to VICIOUS_WARG_A | ||
| C944 | DEFW VICIOUS_WARG_A | |||
| Prev: C913 | Up: Map | Next: C946 |