![]() |
Routines |
| Prev: 9065 | Up: Map | Next: 90D2 |
|
Only with the bow in hand ("you are not carrying the bow."), and not at one's own side. Bard never misses. Anyone else shooting at the dragon always misses -- only Bard can kill it -- and at anything else misses about a third of the time: "the arrow misses the ... by a wide margin.". A hit, "the arrow hits the ...", kills a living character (KILL) and strikes anything else as STRIKE WITH would; the arrow is spent, held by nothing, unless it was what was shot at.
|
||||
| DO_SHOOT | 9076 | LD A,$19 | Not carrying the bow: refused | |
| 9078 | CALL ACTOR_HAS_A | |||
| 907B | LD HL,MSG_NOT_CARRYING_THE_BOW | |||
| 907E | JP NC,RUN_MESSAGE_HL | |||
| 9081 | CALL SAME_SIDE | Not its own side; the test ends here | ||
| 9084 | CALL FOR_REAL | |||
| 9087 | LD A,$0F | It is an attack | ||
| 9089 | LD (ACTION),A | |||
| 908C | LD A,(ACTING) | Bard: a hit | ||
| 908F | CP $46 | |||
| 9091 | JR Z,DO_SHOOT_0 | |||
| 9093 | LD A,(TARGET) | At the dragon: a miss | ||
| 9096 | CP $3C | |||
| 9098 | LD HL,MSG_THE_ARROW_MISS_E | |||
| 909B | JP Z,RUN_MESSAGE_HL | |||
| 909E | LD A,$08 | Otherwise a miss one time in three | ||
| 90A0 | CALL RANDOM_POSITIVE | |||
| 90A3 | CP $03 | |||
| 90A5 | JP C,RUN_MESSAGE_HL | |||
| DO_SHOOT_0 | 90A8 | LD IX,STRONG_ARROW | The arrow is spent | |
| 90AC | LD A,(TARGET) | |||
| 90AF | CP $1A | |||
| 90B1 | JR Z,DO_SHOOT_1 | |||
| 90B3 | LD (IX+$01),$FF | |||
| DO_SHOOT_1 | 90B7 | LD HL,MSG_THE_ARROW_HIT_S | "the arrow hits the ..." | |
| 90BA | CALL RUN_MESSAGE_HL | |||
| 90BD | LD IX,(TARGET_RECORD) | Not a living character: struck, as STRIKE WITH | ||
| 90C1 | CALL IS_ALIVE | |||
| 90C4 | JP NZ,DO_STRIKE | |||
| 90C7 | LD A,(TARGET) | Killed | ||
| 90CA | CALL KILL | |||
| 90CD | LD A,$06 | |||
| 90CF | JP SAY_STATE | |||
| Prev: 9065 | Up: Map | Next: 90D2 |