Make the handling of unique monsters consistent between vanquished
monsters and genocided/extinct monsters. No visible difference to
players.
This also prevents Nazgul and erinys from being polymorphed into
some other form to reduce the chance that their kill count fails
to match the expected number when they're reported to be extinct.
[My long test game (with 3451 total dead critters as of the last
save file) used for exercising the sorting of vanquished monsters
included
120 soldiers
111 wolves
9 Nazgul
2 erinyes
and the genocided/extinct list had none genocided, those four
extinct. No doubt the missing third erinys was alive somewhere
rather than counted as something else after getting polymorphed,
so this band-aid wouldn't have helped this particular game.]
...to make it more interesting. Using #vanquished in wizard mode
or answering 'a' to the "disclose vanquished monsters?" prompt will
put up a menu to choose how the list of vanquished monsters should
be ordered. Right now there are 6 choices:
Traditional: by monster level, by internal index within level;
by monster toughness, by internal index within monstr[] rating;
alphabetically, first unique monsters, then others;
by monster class, low to high level within class;
by count, high to low, by internal index within tied count;
by count, low to high, by internal index within tied count.
Two other orderings are implemented but suppressed from the menu
since they seemed uninteresting (alphabetical with uniques
intermixed with other monsters, and by-class high to low within
class). The first two are very similar to each other and one of
them should probably be discarded too. The by-class order(s) have
class-name separator lines between classes.
Options parsing for end of game disclosure has extended current
+v (always show vanquished monsters)
-v (never show vanquished monsters)
yv (prompt about them, with default response 'y')
nv (prompt about them, with default response 'n')
to include
#v (always show vanquished monsters and choose the ordering)
?v (prompt about them, with default response 'a' to choose ordering)
The 'a' response was picked because it's easy to use ynaq()
instead of ynq(), but it can be considered to mean "ask about sort
order". (Neither of the two new option values could be "av"; 'a'
for disclosing attributes would become ambiguous.)
+v or answering 'y' for any of yv, nv, or ?v uses the most recent
sort ordering (if #vanquished has been used in wizard mode) or the
traditional one (normal mode, or #vanquished not used). Players
will probably want to specify a default order and then use +v
rather than choose the final order from a menu. That hasn't been
implemented here. Count high to low might be a better default than
level high to low.
While looking through Guidebook.tex to try to determine whether
the new text needed special handling, I spotted multiple mistakes
in the existing text. Probably all from earlier updates of mine;
this attempts to fix them. As usual of late, Guidebook.mn has been
tested and Guidebook.tex hasn't.
...prior to making it more complicated. Most of the diff is just
reducing the block nesting level of the kill-count formatting by
a couple of tab stops.
At the end of December, farlook was changed to use doname() instead
of xname() in order to give more information when looking at stuff
the player had already seen. But it ended up giving away precise
stack size for mergable objects too, even if they hadn't been seen
up close. Changing doname() to be vague when dknown wasn't set
only worked for items in particular classes; dknown is pre-set for
a lot of things. So this changes mksobj()'s dknown handling to not
do that for stackable items.
The change to objclass.h is just comment formatting (for the first
part of the file only), provoked by the second line of the one for
oc_pre_discovered.
From a bug report sent directly to devteam 16-Jan-2015 (subject:
"NH343 (NAO version) - display bug"), if the hero was blind and
levitating and searched next to 'I' (text) or '?' (tiles) which
was displayed on top of a known pool and the remembered unseen
monster was no longer there, the 'I'/'?' was removed but the spot
was redrawn as floor rather than water.
This ended up being more elaborate than I anticipated. 'Q' will
now accept the wielded weapon as a choice of item to quiver. If
that item is a stack of more than one, it will offer to split N-1
into the quiver and leave 1 wielded. If the offer is declined, or
if there is already just 1, it will require confirmation to move the
item from the weapon slot to the quiver slot. The alternate weapon
is handled similarly, with different phrasing when in twoweapon
combat mode.
Just to be crystal clear: a single object cannot be in more than
one weapon, alt-weapon, or quiver slot at the same time. 'Q's old
behavior of rejecting the wielded weapon was to avoid accidentally
becoming empty-handed, not anything to do with multiple worn/wield
slots.
'Q' will also accept a count when picking an inventory item, then
put 'count'-many into the quiver, leaving N-count in original stack.
Except when the chosen item is already in the quiver; it that case,
it undoes the stack split and leaves things as they were. (That
restriction may not have been necessary but I'm not planning to
revisit it....)
Tidy the output from disclosure of vanquished monsters at end of game
or from #vanquished wizard-mode command. Instead of
Juiblex
The Wizard of Yendor (twice)
a mastodon
3 purple worms
an erinys
120 gnomes
42 grid bugs
it will line up the monster type names, yielding
Juiblex
the Wizard of Yendor (twice)
a mastodon
3 purple worms
an erinys
120 gnomes
42 grid bugs
For short lists, the original looked ok (maybe even better...), but
for long lists at the end of a long game, aligning the names looks
better and is easier to read than left justifying everything.
Change sort ordering of
diluted potion of bar
diluted potion of foo
potion of bar
potion of foo
potion of fruit juice
to
potion of bar
diluted potion of bar
potion of foo
diluted potion of foo
potion of fruit juice
so that potions of the same type are grouped together. Bless/curse
state (when known) takes precedence over dilution, so "blessed
diluted potion of foo" will come out before "uncursed potion foo".
Start coloring after the space which follows the selection indicator
instead of on that space. The difference isn't noticeable when the
highlighting is just a color, but it is if that highlighting includes
inverse video or underline which visibly apply to spaces. So for
a - entry A
the old code produced
a -########
and this revised code produces
a - #######
where '#" indicates characters subject to menu coloring.
I saw a lich in solid wall at one of the spots which gehennom.des
marks with a pool (so that baalz_fixup() can find the two spots that
need post-wallification fixup). I could understand the special level
loader placing a swimming or flying monster there, but don't know
whether it might do that for a lich (which doesn't need to breathe)
so am not sure whether this actually fixes what I observed.
The lich was there for far too long to have been a shapechanger, but
when I went back to the save file it was no longer there, producing
another puzzle.
Digging a grave witha a pick-axe converted the grave to floor but
did not dig a pit and unearth the grave's contents. [Caused by a
change to maketrap() intended to prevent wizard-mode wishing for
traps on top of furniture.] Digging a second time succeeded in
creating a pit since the location was no longer furniture.
When items were sorted alphabetically, holy water ended up in the H's
and unholy water in the U's. Force them to get placed with water in
the W's, as would happen if water wasn't given an alternate name when
blessed or cursed.
The code to apply an automatic annotation to the knox level was looking
for a drawbridge like on the castle level, but knox doesn't have any
drawbridge. Look for its door instead. (It's initially a secret door,
so won't be revealed via magic mapping. It needs to be found or
destroyed to get mapped as a door or empty doorway in order to trigger
the annotation.)
Also, give a tiny bit of variation to the knox level layout. It used
to have both the throne and the secret door on the lower of two similar
rows and the door into the treasure vault on the upper one. Now each
of the three can be on either of those two rows (independently of each
other), making eight possibilities. This doesn't accomplish much,
other than to make the secret door locations not always be at the same
fixed spot.
Silly shapechange message if <mon> is sensed via telepathy and takes
on a mindless form. In the case I noticed, it was a doppelganger on
the far side of a maze wall who changed from something ordinary into
a mummy while the hero was wearing an amulet of esp.
3.6.0 could deliver this message, but I think changes since then have
increased the chance for newcham() to give shapechange feedback.
getobj() was caching 'invent' in 'firstobj', dating from the days
of the !GOLDOBJ configuration, and sortloot() could change the value
of invent, making firstobj end up pointing somewhere into the midst
of the inventory list. So collecting letters of applicable items
could miss things (typically right after restoring a saved game).
Repeating the command would operate on already sorted invent, making
firstobj remain valid and things mysteriously reappear after having
been missed before.
Just get rid of 'firstobj' since it's no longer useful.
flags.sortloot was changed from boolean to xchar, but proper type
is plain char. (Presumeably it was originally off or on, then got
changed to 'n' for off, 'l' for on, plus 'f' for super-on.)
Also, make the sortloot menu for 'O' mark the current value as
preselected when interactively setting the value. (I've been
meaning to do this for various other options but haven't gotten
around to it. The need to workaround PICK_ONE+MENU_SELECTED menu
behavior is a nuisance.)
... when exploding chest trap destroys uchain without using
unpunish() to un-wear it first. The '!carried(uball)' clause
should be applied to the uball->ox,oy test only, not to both
uchain->ox,oy and uball->ox,oy.
Force the menu for the look-here command when 'here' is the inside
of an engulfer to be PICK_NONE. That way '>' won't exit the menu
by choosing the extra inventory item "> - hero".
For menustyle:Traditional, the object class prompt for 'D' includes
an entry choice of 'm' to request a menu. Supplying real classes
and 'm' resulted in a menu limited to those classes, as intended,
but any of BUCX for curse/bless state and 'm' without any actual
classes resulted in a menu of entire invent. A one-line fix once
the proper place for that fix was located.
For menustyle:Traditional or menustyle:Combination, 'A' includes an
extra choice of 'i' to examine relevant inventory prior to choosing
object classes (and object identification also offers that), but
the inventory display showed everything rather than just the items
applicable to 'A' (or to object ID). Figuring out where to apply
the fix was trivial, but the fix itself was a bit more involved and
it exposed a latent bug in display_pickinv(): "" was supposed to be
the same as NULL when passed in as list of target inventory letters,
but it wasn't being handled correctly.
A patch in late January to suppress suits as likely candidates for
the 'R' command when wearing a cloak also unintentionally suppressed
rings when wearing non-cursed (or not yet known to be cursed) gloves.
Cloak always blocks suit removal; gloves only block ring removal if
cursed.
Extend #stats beyond just monsters and objects. Have it display
memory usage for traps, engravings, light sources, timers, pending
shop wall/floor repair, regions, bones tracking, named object types,
and dungeon overview.
No doubt there are other memory consumers that I've overlooked.
When typedefed to C99's bool type, Clang complains in container_contents about "comparison of constant 108 with expression of type 'boolean' (aka 'bool') is always false".
The "sortloot revamp" patch six or seven weeks ago broke filtering
for '?' menu in display_pickinv() called by getobj(). The old code
handled 'lets' when building an array of object pointers to be
sorted. The revamp code did away with that to sort the linked list
instead, but neglected to put 'lets' handling into the subsequent
menu creation loop which is now operating on full invent rather
than the filtered subset.
Hitting a rust monster with a greased weapon would rust the weapon
instead of removing the grease. Likewise for monsters with passive
acid or corrosion damage. passive_obj() was ignoring grease.
Fast and Very_fast share the same property index, but from_what()
didn't handle that. Enlightenment for a Very_fast hero--which
can only happen via worn equipment (speed boots) or timed effect
(potion of speed or spell of haste self)--would be erroneously
described as "very fast innately" for roles who get intrinsic
speed at level 1, or "very fast because of experience" when high
enough level for roles who get intrinsic speed later.
When hero with two-handed weapon, or samurai with katana and without
shield, hits a monster which is wielding a weapon, there is a chance
for defender's weapon to be destroyed via shattering. The chance is
reduced--by increasing the chance to resist--if the hero's weapon is
rusty or otherwise eroded. That works as intended. This changes
things to make the chance be increased--by reducing the chance to
resist--if defender's weapon is rusty or otherwise eroded.
This set is the same as the default ascii symbols except that corner
walls are represented with '+' instead of '-' or '|' so that wall
joins are clearer. The baalz level looks a little better this way,
although not a lot. Unfortunately, most levels look a bit cluttered
with this, so I imagine it won't get a lot of use. At least it
serves as an example of being able to use "'c'" instead of "\123".
Originally I specified every terrain symbol explicitly, which was
how I noticed that S_darkroom and S_vibrating_square weren't being
handled. This has cut it down to just the wall symbols, serving as
explicit example of accepting default symbols for unspecified ones.