| The Hobbit (v1.0) | Routines |
| Prev: 8F5F | Up: Map | Next: 8FCF |
|
Hands the orders collected from a quotation (80CD) to the character being spoken to (88A7). Something that is not a character cannot take orders.
Whether the character obeys depends on byte 6 of its entry in C9BA. A value of 0 means it always obeys. Otherwise a random number from 0 up to that value is picked (9BF4), and 0 means it says "no". Because of the way the random numbers are skewed (9BFD), the chance of a refusal goes DOWN as the value goes up: 1 gives a refusal half the time, 3 a quarter of the time, and 5 or 6 one time in eight. So the value is really a measure of willingness rather than stubbornness: the trolls, the wood elf and the butler (1) are the most contrary, Gollum and Bard (3) refuse one order in four, Gandalf, Elrond and Thorin (5 and 6) one in eight - and the goblins, the warg and the dragon (0) never refuse at all.
|
||||
| 8F9E | CALL $9C99 | Dry run? Then stop: talking always works | ||
| 8FA1 | LD A,($B5D9) | Is the person spoken to a character? | ||
| 8FA4 | CALL $99E0 | |||
| 8FA7 | CP $FF | |||
| 8FA9 | LD A,$00 | (A = 0: no orders to hand over) | ||
| 8FAB | JR Z,$8FC2 | No: the orders are thrown away | ||
| 8FAD | LD A,($B5EA) | Is Gollum waiting for his answer? | ||
| 8FB0 | CP $00 | |||
| 8FB2 | JR NZ,$8FC2 | Yes: the words go to him, no refusal | ||
| 8FB4 | LD A,(IY+$06) | A = the character's stubbornness | ||
| 8FB7 | CP $00 | |||
| 8FB9 | JR Z,$8FC2 | 0: always obeys | ||
| 8FBB | CALL $9BF4 | Otherwise pick a random number from 0 up to the stubbornness | ||
| 8FBE | CP $00 | |||
| 8FC0 | JR Z,$8FC6 | 0: refuses | ||
| 8FC2 | CALL $88A7 | Hand over the orders (A of them) | ||
| 8FC5 | RET | |||
| 8FC6 | LD HL,$B0D5 | "<character> says "no"." | ||
| 8FC9 | CALL $72D4 | |||
| 8FCC | SUB A | No orders | ||
| 8FCD | JR $8FC2 | |||
| Prev: 8F5F | Up: Map | Next: 8FCF |