Add assistance to fire-command

Allows the fire-command to autowield a launcher; it will now
do either swapweapon or wield an appropriate launcher, if you
have ammo quivered.

This assistance can be turned off with the fireassist boolean option.

Adds a rudimentary command queue, which allows the code to add keys
or extended commands into the queue, and they're executed as if
the user did them.  Time passes normally when doing the queue,
and the queue will get cleared if hero is interrupted.
This commit is contained in:
Pasi Kallinen
2021-06-09 09:02:31 +03:00
parent f6e60c7516
commit 76f77ee0cc
15 changed files with 253 additions and 8 deletions

View File

@@ -879,6 +879,10 @@ computer pick something appropriate if {\it autoquiver\/} is true.
If your wielded weapon has the throw-and-return property, your quiver
is empty, and {\it autoquiver\/}
is false, you will throw that wielded weapon instead of filling the quiver.
If {\it fireassist\/} is true, firing will automatically try to wield a launcher
(for example, a bow or a sling) matching the ammo in the quiver; this might
take multiple turns, and get interrupted by a monster.
Remember to swap back to your main melee weapon afterwards.
%.lp ""
\\
See also `{\tt t}' (throw) for more general throwing and shooting.
@@ -1011,7 +1015,7 @@ If you ``throw'' an arrow while not wielding a bow, you are throwing
it by hand and it will generally be less effective than when shot.\\
%.lp ""
See also `{\tt f}' (fire) for throwing or shooting an item pre-selected
via the `{\tt Q}' (quiver) command.
via the `{\tt Q}' (quiver) command, with some extra assistance.
%.lp
\item[\tb{T}]
Take off armor.\\
@@ -1326,7 +1330,8 @@ You can set the
option to require a response of ``{\tt yes}'' instead.
%.lp
\item[\tb{\#fire}]
Fire ammunition from quiver. Default key is `{\tt f}'.
Fire ammunition from quiver, possibly autowielding a launcher.
Default key is `{\tt f}'.
%.lp
\item[\tb{\#force}]
Force a lock. Autocompletes. Default key is `{\tt M-f}'.
@@ -2630,7 +2635,7 @@ in an appendix to {\it Unearthed Arcana}, an AD\&D supplement.
%.pg
The commands to use weapons are `{\tt w}' (wield), `{\tt t}' (throw),
`{\tt f}' (fire, an alternate way of throwing), `{\tt Q}' (quiver),
`{\tt f}' (fire), `{\tt Q}' (quiver),
`{\tt x}' (exchange), `{\tt X}' (twoweapon), and ``{\tt \#enhance}''
(see below).
@@ -2672,6 +2677,8 @@ for `{\tt Q}' runs out.
If your quiver is empty, {\it autoquiver\/}
is false, and you are wielding a weapon which returns when thrown,
you will throw that weapon instead of filling the quiver.
The fire command also has extra assistance, if {\it fireassist\/}
is on it will try to wield a launcher matching the ammo in the quiver.
%.pg
Some characters have the ability to throw or shoot a volley of multiple
@@ -3981,6 +3988,11 @@ extended ones (off).
An obsolete synonym for ``{\tt gender:female}''. Cannot be set with the
`{\tt O}' command.
%.lp
\item[\ib{fireassist}]
This option controls what happens when you attempt the `{\tt f}' (fire)
and don't have an appropriate launcher, such as a bow or a sling, wielded.
If on, you will automatically wield the launcher. Default is on.
%.lp
\item[\ib{fixinv}]
An object's inventory letter sticks to it when it's dropped (default on).
If this is off, dropping an object shifts all the remaining inventory letters.