player control of spellbook order (trunk only)

Add the capability of sorting the entire spellbook by various criteria,
augmenting the existing ability to swap pairs of spells.  In the menu that's
put up for the '+' command, add a non-spell entry after the last known spell
        + - [sort spells]
Selecting that brings up a new menu

        View known spells list sorted

        a + by casting letter
        b - alphabetically
        c - by level, low to high
        d - by level, high to low
        e - by skill group, alphabetized within each group
        f - by skill group, low to high level within group
        g - by skill group, high to low level within group
        h - maintain current ordering

        z - reassign casting letters to retain current order

'a' corresponds to the normal ordering; 'b' through 'g' cause the order
to change, but during the current invocation of the '+' command only.
(Entry 'h' is a no-op, something aside from ESC to get out without doing
anything.  'a' is only a no-op if you haven't picked any of 'b' through
'g' yet.)  After making a choice, you're taken back to the '+' command to
view the spells in the requested order.  And once back there, you can pick
'+' again to come back to this menu, where picking 'z' will cause casting
letters to be shuffled such that present display order becomes the actual
spellbook order.  Newly learned spells get appended to the end as usual;
the most recent sorting order isn't sticky even if finished off with 'z'.

     No doubt seeing it in action will be clearer than this description.
This also updates the Guidebook to mention the spell retention field added
to the '+' menu some weeks back.
This commit is contained in:
nethack.rankin
2006-05-18 04:18:28 +00:00
parent 4ebc37a371
commit aec65a0acb
4 changed files with 261 additions and 42 deletions

View File

@@ -27,7 +27,7 @@
\begin{document}
%
% input file: guidebook.mn
% $Revision: 1.98 $ $Date: 2006/04/30 17:55:09 $
% $Revision: 1.99 $ $Date: 2006/05/13 04:57:35 $
%
%.ds h0 "
%.ds h1 %.ds h2 \%
@@ -872,10 +872,15 @@ Count your gold pieces.
%.lp
\item[\tb{+}]
List the spells you know. Using this command, you can also rearrange
the order in which your spells are listed. They are shown via a menu,
and if you select a spell in that menu, you'll be re-prompted for
another spell to swap places with it, and then have opportunity to
make further exchanges.
the order in which your spells are listed, either by sorting the entire
list or by picking one spell from the menu then picking another to swap
places with it. Swapping pairs of spells changes their casting letters,
so the change lasts after the current `{\tt +}' command finishes. Sorting
the whole list is temporary. To make the most recent sort order persist
beyond the current `{\tt +}' command, choose the sort option again and then
pick ``reassign casting letters''. (Any spells learned after that will
be added to the end of the list rather than be inserted into the sorted
ordering.)
%.lp
\item[\tb{$\backslash$}]
Show what types of objects have been discovered.
@@ -1806,8 +1811,12 @@ nondirectional---they don't require a direction.
%.pg
Just as weapons are divided into groups in which a character can become
proficient (to varying degrees), spells are similarly grouped.
Successfully casting a spell exercises the skill group; sufficient skill
may increase the potency of the spell and reduce the risk of spell failure.
Successfully casting a spell exercises its skill group; using the
`{\tt \#enhance}' command to advance a sufficiently exercised skill
will affect all spells within the group. Advanced skill may increase the
potency of spells, reduce their risk of failure during casting attempts,
and improve the accuracy of the estimate for how much longer they will
be retained in your memory.
Skill slots are shared with weapons skills. (See also the section on
``Weapon proficiency''.)
@@ -1816,9 +1825,10 @@ Casting a spell also requires flexible movement, and wearing various types
of armor may interfere with that.
%.pg
The command to read a spellbook is the same as for scrolls, `{\tt r}'
(read). The `{\tt +}' command lists your current spells, their levels,
categories, and chances for failure.
The command to read a spellbook is the same as for scrolls, `{\tt r}' (read).
The `{\tt +}' command lists each spell you know along with its level, skill
category, chance of failure when casting, and an estimate of how strongly
it is remembered.
The `{\tt Z}' (cast) command casts a spell.
%.hn 2