Commit Graph

5967 Commits

Author SHA1 Message Date
PatR
e0537a76d4 disclosing genocided/extinct monsters
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.]
2016-05-04 17:42:58 -07:00
PatR
67cd22573e tweak #vanquished - ESC when choosing sort order
Skip displaying vanquished monsters if player responds with ESC
in the sort order menu instead of treating it like RET and using
default order.
2016-05-03 16:23:27 -07:00
PatR
457203d87f fix #H4329 - building with Qt
In mid-December, formatkiller() was given an additional argument
but qt_win.cpp didn't get updated to reflect that.
2016-05-03 14:01:30 -07:00
PatR
b98427955c complicate #vanquished monsters processing...
...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.
2016-05-03 01:12:32 -07:00
PatR
a952162a7b simplify #vanquished monsters processing...
...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.
2016-05-01 13:54:08 -07:00
PatR
759544dd33 long worm #stats
When #stats shows memory use for monsters, include long worm tails.
2016-05-01 00:34:36 -07:00
PatR
16c08f7296 farlook of detected objects
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.
2016-04-30 18:55:52 -07:00
Pasi Kallinen
89dd37f8c7 Fix wish text matcher not allowing probability 0 objects 2016-04-30 22:41:41 +03:00
PatR
55feae7ad1 unseen-monster vs pool of water
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.
2016-04-29 18:32:46 -07:00
PatR
2fe9170ee4 implement #H4305 - Quivering wielded weapon
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....)
2016-04-29 15:10:56 -07:00
PatR
ff6e62b361 cleanup up #vanquished output
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.
2016-04-29 01:48:52 -07:00
PatR
8bea47e8b2 container simplification bit
Make use of the unsplitobj routine added last Fall,
2016-04-29 01:43:03 -07:00
PatR
b9e92fc179 glob tweak
Sometime back I oversimplified this bit of code to the point where
the impossible(), if ever triggered, would have been followed by a
crash.
2016-04-29 01:39:03 -07:00
PatR
1e0ab8f92f another sortloot tweak - diluted potions
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".
2016-04-25 17:07:07 -07:00
PatR
974d478170 tty menu coloring tweak
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.
2016-04-25 14:25:52 -07:00
PatR
4c6c2b02ed baalz hack fixup fix...
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.
2016-04-25 00:58:44 -07:00
PatR
6a3d82ced6 fix #H4317 - grave diggin'
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.
2016-04-25 00:14:48 -07:00
PatR
4750c0a303 sortloot ordering for holy/unholy water
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.
2016-04-23 15:44:26 -07:00
Pasi Kallinen
0956054b30 Better wishing text match
Try harder to find a matching object, and if multiple objects would
match, pick one from all the matches at random.
2016-04-23 22:38:25 +03:00
PatR
ebe21e72b2 wizard-mode enlightenment
Add another 'from_what' reason for intrinsic/extrinsic attributes:
You are <whatever> intrinsically.
2016-04-23 11:58:20 -07:00
PatR
713d8cc492 piousness lint 2016-04-23 11:57:14 -07:00
Pasi Kallinen
638aa6969c Unify piousness strings 2016-04-23 12:00:02 +03:00
Pasi Kallinen
c5aa0ff368 Simplify the web destruction func 2016-04-22 22:47:43 +03:00
PatR
117334b20e Ft.Ludios entrance (fort's entry, not level entry)
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.
2016-04-22 02:12:10 -07:00
PatR
23b3d5a126 newcham() feedback: "A <mon> turns into it!"
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.
2016-04-21 16:45:19 -07:00
PatR
573fff466e formatting fixups
Presence of trailing whitespace pointed out so post-reformatting
non-conformant formatting.
2016-04-20 16:43:33 -07:00
PatR
1cad2bd783 more sortloot revamp fallout
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.
2016-04-19 17:01:01 -07:00
PatR
a0a4408957 flags.sortloot tweaks
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.)
2016-04-19 14:40:59 -07:00
PatR
daee9f3e7c fix deleting worn obj (uchain) impossibility
... 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.
2016-04-19 11:30:11 -07:00
PatR
f9a47bb63d menu handling for ':' when hero is swallowed
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".
2016-04-18 18:15:58 -07:00
Pasi Kallinen
a181c2f93b Fix dead mon and guard sanity checking 2016-04-18 19:52:54 +03:00
PatR
d02ba84684 invent menu fixes (mostly menustyle:Traditional)
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.
2016-04-17 16:50:25 -07:00
Pasi Kallinen
8132cb5a42 Unify web burning or dissolving
Also make any flaming monster burn webs.

This also fixes a bug, where a gelatinous cube monster did not
dissolve the web.
2016-04-17 17:02:47 +03:00
PatR
828c244ff3 'R' fix
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.
2016-04-16 17:25:33 -07:00
PatR
953ee96f7e extend wizard-mode '#stats' command
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.
2016-04-16 15:37:35 -07:00
C.W. Betts
41ade6d37d Change flag::sortloot to xchar
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".
2016-04-14 14:04:22 -06:00
Sean Hunt
587ec223b9 Add fixes entries for recent merges 2016-04-12 21:32:34 -04:00
Sean Hunt
bca851d711 Merge remote-tracking branch 'github/tung/shop-floor-nested-loot' into NetHack-3.6.0 2016-04-12 21:32:10 -04:00
Sean Hunt
148a7cb26f Merge remote-tracking branch 'github/tung/tty-menu-enhancements' into NetHack-3.6.0 2016-04-12 21:26:06 -04:00
Sean Hunt
f5019b231e Merge remote-tracking branch 'github/tung/shkp-anger-bill-fix' into NetHack-3.6.0 2016-04-12 21:16:38 -04:00
Sean Hunt
ef621d2e6c Merge remote-tracking branch 'github/tung/randline-rng-fix' into NetHack-3.6.0 2016-04-12 21:08:31 -04:00
Sean Hunt
36c3a1c665 Merge remote-tracking branch 'github/UniQP/trap' into NetHack-3.6.0
Also update fixes file
2016-04-12 20:58:25 -04:00
Sean Hunt
1e47807302 Merge remote-tracking branch 'github/UniQP/break' into NetHack-3.6.0 2016-04-12 20:52:13 -04:00
Sean Hunt
e687023e77 Merge remote-tracking branch 'github/UniQP/rcnt' into NetHack-3.6.0 2016-04-12 20:51:28 -04:00
PatR
83efa69b11 fix #H4301 - tribute typo: The Last Hero 2016-04-10 19:24:27 -07:00
PatR
221a73fe2b getobj() ? fix
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.
2016-04-10 16:16:07 -07:00
PatR
65b9429b60 fix #H4296 - grease no checked for passive damage
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.
2016-04-09 18:51:28 -07:00
PatR
43c7a4b312 wizard mode enlightenment for "very fast"
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.
2016-04-09 15:48:41 -07:00
PatR
f150d8ddfe 'fix' #H4295 - weapon shattering
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.
2016-04-08 01:12:53 -07:00
PatR
60397758e4 new symbol set: "plain"
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.
2016-04-06 17:32:58 -07:00