Commit Graph

4811 Commits

Author SHA1 Message Date
PatR
96f5f03287 revise the role, race, gender, align options
Using role:!wizard to limit which roles would be candidates for
random selection didn't work as I expected.  It required a separate
option setting for role to exclude.  This implements how I thought
it worked:
|OPTIONS=role:!ranger !samurai !wizard
will exclude multiple roles with a space-separated list in a single
option setting.  It also adds support for
|OPTIONS=!role:ranger samurai wizard
to do the same thing.  (OPTIONS=!role:!ranger isn't allowed.)

I thought 'OPTIONS=role:barbarian caveman knight' could be used to
limit random selection to those choices, but that doesn't work and
I haven't attempted to implement it.

This also renames the 'align' option to 'alignment'.  That made the
truncation to 'align' become ambiguous, so it got added back as an
alias for the full name.

Guidebook.tex is lagging; I'm burned out.
2022-12-14 13:14:54 -08:00
PatR
7096c68492 more interactive role selection
This ended up combining several unrelated changes.

Add missing 'fixes' entry for curses-specific item in New Features.

When answering "Shall I pick ... for you? [ynaq]", accept \m as well
as \n and space for choosing the default of 'y', same as normal
ynaq() would.  Also add '*' to '@' as not-shown potential answers;
they force 'random'.

When tty tore down any of the menus, things were reasonable if they
were short enough for corner windows, but tall ones that switch to
full screen weren't fully erased.  The parts of those outside of the
map window stayed behind when the tall menu was closed and cleared.
Mainly affects picking the "~ - reset filtering" choice but also
affected the role menu on 24 line tty screens.  (Didn't affect curses
because it tracks and refreshes its base window when some overlaying
window goes away.)

The role menu used 25 lines so required a second page for the case
of a 24 line screen on tty.  Dealing with that is a bit ugly but it
wasn't an issue when this form of role selection was tty-only (because
the info about choices made so far was displayed on the base window
rather than in an extra menu line back then) so I added a hack for it.
If the role menu will take one more line than the screen height, the
separator between 'random' (below 'Wizard') and 'pick race first' gets
squeezed out.  If the menu needs two more lines (doesn't happen now,
except by changing screen size to 23 lines for testing), a second line
gets squeezed out.  (Not attempted for curses because it wouldn't
help.  'windowborders' and one or two extra separators it adds make
menus taller.  I doubt if many players use curses on 24-line screens
but if they do, they'll be using something new rather than going from
something that used to fit on one page with 3.6.x.)
2022-12-13 15:59:05 -08:00
nhmall
092068495b fixes update 2022-12-11 21:55:15 -05:00
nhmall
4c32ca571a doc update 2022-12-08 10:46:36 -05:00
PatR
bf5a089389 revise man page yet again
Rewrite much of the paragraph about the run-time config file.

Remove mention of '-p @' since it doesn't actually work.

Expand 'nethack -s' a bit.

Revise --showpaths.

Shuffle --scores, --version, --showpaths, and --usage into the same
order as usage feedback lists them, primarily scores first and usage
last.
2022-12-07 12:22:49 -08:00
PatR
e724034995 unpaid sanity_check: leaving shop via recoil
Throwing while levitating or getting hit for knockback effect could
move hero carrying unpaid items out of a shop.  If that happened,
sanity_check complained that unpaid items weren't in a tended shop.

Check for entering and leaving special rooms during recoil same as
gets done for ordinary movement.  Leaving a shop via recoil or
knockback while owing a bill now gets treated as robbery immediately
rather than waiting until hero voluntarily moves to another spot
after recoil has finished.
2022-12-06 10:57:14 -08:00
PatR
be9e1f31af man page and usage: -D
Mention the changed character name that happens when running in wizard
mode.
2022-12-04 00:17:50 -08:00
PatR
7e33da788c another manpage update
Split some lines that began with one sentence and then continued with
another so that each sentence has its own line as per 'roff guidelines.

Change the continuation lines in the files and environment sections
to begin with <backslash><space><tab> instead of just <tab>, again to
meet the guidelines (don't begin lines with whitespace).  This had a
side-effect of suppressing some space insertion for justifying right
margin of right-hand column on some of the lines.  That hadn't looked
very good anyway.

Add new file 'usagehlp' to the files section.

Also add previously unmentioned Guidebook[.txt], but it's hard to
explain why it probably won't be present....

Update the bones file entry.

'cmdhelp' isn't used anymore.  Should it be moved to outdated/dat and
the Makefile install steps be updated to stop bothering with it?
2022-11-30 16:32:43 -08:00
PatR
67a27a22b8 fixes entry for pull request #937 - stale memory
Pull request from entrez:  memory freed when changing levels could be
accessed if the level change happened when hero caused an engulfer to
expel him onto a level teleporter.  Wouldn't happen when monsters are
moving because hero's level change will be deferred.  Wouldn't happen
for trap doors and holes, but could happen for magic portal if hero
got swallowed while on one after coming through from other side.

Fixes #937
2022-11-30 14:58:59 -08:00
PatR
9fe0a7b8ee fixes entry for PR #940 - cursed gold detection
Pull request from vultur-cadens:  using autodescribe with cursor
movement to browse the map during gold detection didn't give any
feedback for fake piles of gold that get drawn at trap locations.
(After detection finishes, using autodescribe with ; or // reports
on such piles normally.)

Fixes #940
2022-11-30 12:45:58 -08:00
PatR
e64ed2859d unpaid object: sanity check, teleporting, 'I u'
It turns out that there are some objects marked unpaid that aren't
carried by the hero, so the recent sanity check for unpaid/no_charge
could complain.  Unpaid items dropped on the shop boundary (gap in
shop wall, doorway, shk's free spot) stayed unpaid when dropped onto
the floor, similar to recent change for pushed shop-owned boulders.
Don't give sanity complaints for those.  They could be all the way
inside a shop too, where unpaid items in a gap in the shop wall got
pushed into the shop when the wall was repaired.  (Possibly those
should come off the bill instead of remaining unpaid.)

Teleporting items out of a shop was marking them unpaid instead of
treating that as robbery.  That's a bug caught by the sanity check.
rloco() was also marking shop items which got teleported from one
spot inside the shop to another spot inside the same shop as unpaid.
Fix both of those things.  Also, if an unpaid item on the boundary
gets teleported all the way inside, take it off the bill.

Change 'I u' to mention whether there are additional unpaid items on
the floor somewhere since they won't be part of unpaid inventory and
they're not on the used-up bill either.  It might occasionally help
the player figure out why the shopkeeper won't let the hero out of
the shop.
2022-11-29 13:55:42 -08:00
PatR
8836b32128 github issue #935 - disarming swallowed hero
Issue reported by AndrioCelos:  bullwhip using monster was able to
snatch hero's weapon when hero was engulfed.

Fix is trivial:  when a monster is choosing an item to use, don't
pick bullwhip if hero is engulfed.  Regular attack attempts already
skip engulfed hero.

Fixes #935
2022-11-28 02:08:49 -08:00
PatR
223818ff41 github issue #934 - hearing unseem mon read scroll
Issue reported by Melon2007:  when non-deaf hero heard an unseen
monster read a scroll, the monster's type was identified accurately
(unless distorted by hallucination).  That was intentional but it
doesn't seem plausible for the hero's hearing to be that acute.
Change it to report the monster type accurately if not hallucinating
and monster is the same species as the hero (as the current form if
hero is poly'd), otherwise report it as "someone" when it's humanoid,
otherwise as "something".

Also, if the monster is heard at a spot that would be visible if
hero could see, draw a "remembered, unseen monster" glyph there.

Fixes #934
2022-11-28 01:44:19 -08:00
PatR
4b9044f053 pull request #930 - Qt4 and older Qt5 support
Pull request form chasonr:  restore the capability of using old Qt 4.

I've added a brief Guidebook update.

Closes #930
2022-11-23 13:42:55 -08:00
PatR
e0867661b4 Unix: fix 'nethack -u name'
Using '-u name' rather than '-uname' was being treated as '--usage'
for any value of 'name'.

'-uname' worked as intended unless name was 'sage' (or leading
substring of it).  That's still the case after this fix, where the
space after -u is now necessary for that special case name.
2022-11-22 14:53:43 -08:00
PatR
8bab5546bd another man page revision
Add new '--usage' and '--help'.
Add missing '--nethackrc:RC-file' and '--no-nethackrc'.
Explain -D and -X more precisely.
Reorder the options to manually produce a synopsis section that looks
like

"  nethack [ -d|--directory directory ] [ -w|--windowtype interface ]
"  [ --nethackrc:RC-file | --no-nethackrc ] [ -n ] [ -dec | -ibm ]
"  [ -u playername ] [ -X | -D ] [ -p profession ] [ -r race ] [ -@ ]
"
"  Also [ -A|-Arc | -B|-Bar | -C|-Cav | -H|-Hea | -K|-Kni | -M|-Mon |
"  -P|-Pri | -R|-Rog | -Ran | -S|-Sam | -T|-Tou | -V|-Val | -W|-Wiz ]
"
"  nethack [ -d|--directory directory ] -s|--scores [ -v ]
"  [ -p profession ] [ -r race ] [ playernames ]
"
"  nethack [ --usage | --help ] [ --showpaths ] [ --version[:paste] ]

to avoid instances of line breaks like "...[\n-foo ]..." and
"...[ -bar\n]...".  With TeX it would be straightforward to favor line
breaks in front of "[" and after "]" but I don't know whether or how
'roff can do that.
2022-11-19 17:03:26 -08:00
PatR
d5dc5402f6 fixes entry for PR #928 - remove '#if LINT'
Pull request from argrath:  remove a bunch of '#ifdef LINT' code
snippets that no longer serve any useful purpose.

If a lint that handles C99 is ever produced, persumably it won't
need the fairly ridiculous hacks for 'static' and 'long'/'long *'.

Closes #928
2022-11-19 00:50:36 -08:00
PatR
fa0b2b7e94 fixes entry for PR #925 - shop boulders
Pull request from entrez:  boulders owned by shops could be used up
(plugging hole in floor) or stolen (pushed through unrepaired gap in
shop wall) without cost.  Not very common because shops rarely have
boulders in them.

Fixes #925
2022-11-19 00:15:23 -08:00
PatR
3278d7e0c1 control of command-line usage entry in '?' menu
Instead of using a compile-time macro to suppress inclusion of the
menu entry to show UNIX command-line usage in the help menu, use a
sysconf setting instead.

Default is HIDEUSAGE=0, to include the entry for command-line usage.
Set HIDEUSAGE=1 to exclude that.  Does not affect 'nethack --usage'
if player actually has access to the command-line.
2022-11-18 17:54:17 -08:00
PatR
a96b3d0b03 fix 'nethack --scores'
The command line parsing in unixmain.c accepted --scores as an
alternative to -s but prscore() in topten.c didn't.
2022-11-16 23:41:07 -08:00
PatR
76a94db88c manpage update
Add -w|--windowtype.

Also --scores and --directory as recognized variations of -s and -d.

Add -@.  The existing description of '-p @' seems to be inaccurate,
and random role but still having to supply race+gender+alignment
isn't very useful anyway.  The bit about maybe needing to quote @ with
backslash might still be useful if moved to -@ though.

Add -A|-Arc -B|-Bar ... -W|Wiz since they hadn't been listed.  I put
them on their own line instead of cluttering up the main program
invocation even further.

Move '-u character-name' before '-D' since that order matters on some
platforms.

Move --showpaths and --version to a separate command invocation since
combining them with any other stuff ends up ignoring that other stuff.
I didn't add --dumpenums.

The description of config file name and location under '-dec and -ibm'
is out of date, particularly for Windows.
2022-11-16 14:47:25 -08:00
nhmall
38ff4029aa follow-up bit to fixes3-7-0.txt 2022-11-05 19:40:23 -04:00
nhmall
76833d6f5e add fixes3-7-0.txt entry for pr923 2022-11-05 19:28:28 -04:00
PatR
f6b3b968e7 change #vanquished from wizard mode to normal play
Make the existing '#vanquished' command be available during regular
play, with M-V bound to it.  'm #vanquished' or 'm M-V' brings up
the sorting menu that you get when answering 'a' rather than 'y' at
the end-of-game "disclose vanquished creatures?" prompt.

The original #vanquished came from slash'em, where it was available
in normal play.  When added to nethack, it was put in as wizard-mode-
only. I added the sorting capability several years ago.

The chosen sort is remembered and re-used if not reset but only for
the remainder of the current session.  It probably ought of become
a run-time option so be settable in advance and across sessions but
I haven't done that.
2022-11-03 00:00:34 -07:00
PatR
dd36d765b6 revise Guidebook.mn comment 2022-11-02 14:29:35 -07:00
PatR
8b466b227a fixes entry for PR #917 - unnaming unique mons
Pull request from entrez:  attempting to unname a unique monster or
shopkeeper by assigning a new name of <space> was rejected as
intended, but the rejection message is phrased strangely when <space>
gets inserted as the name that won't be assigned.

Fixes #917
2022-11-01 16:26:29 -07:00
PatR
55ec68ef0a Longbow of Diana
Give an extra +1 to potential multi-shot to rangers wielding the
Longbow of Diana and shooting any type of arrow.  When an elf ranger
has been wielding an elven bow to shoot elvish arrows or an orc
ranger has been wielding an orcish bow to shoot orcish arrows, they
lose their racial bonus but won't lose any multi-shot capability by
switching to their quest artifact.  Human and gnome rangers gain the
+1 bonus.  (I have no idea how a gnome could wield a longbow.  One
would need a step ladder to hold it vertically, and could only draw
the string back a stubby arm's length if they held if horizonally.)

That bonus gets applied before feeding the multi-shot counter to
rnd() so doesn't mean an extra arrow every time.  And you have to
be wielding your own quest artifact--in addition to it being the
appropriate launcher for the ammo you're shooting--so doesn't provide
any multi-shot benefit to other types of characters who wish for it.
2022-10-31 23:13:05 -07:00
nhmall
ad23b4e8e1 grammar: "foo based" to "foo-based"
There seems to be a need to locate these in the distribution every decade or so.
2022-10-30 16:08:14 -04:00
nhmall
943c1bc3c3 more OSX -> macOS 2022-10-29 10:46:14 -04:00
nhmall
1adfbd2594 fixes update for pr913 part 2 2022-10-29 10:43:58 -04:00
nhmall
b445b99214 fixes entry for pr913 2022-10-29 10:38:29 -04:00
nhmall
2fef1f497c more Guidebook updates 2022-10-27 22:27:00 -04:00
nhmall
ee03f5c2ba Merge branch 'showgold-guidebook-update' of https://github.com/entrez/NetHack into NetHack-3.7 2022-10-27 22:23:34 -04:00
Michael Meyer
f39a158bdd Update Guidebook #showgold info
The #showgold command now does mention known contained gold in your
inventory, so the various lines in the Guidebook which explicitly state
that it doesn't needed to be updated.  Wish I had noticed this in time
to put it into the previous Guidebook patch I submitted, but what can
you do.
2022-10-27 16:21:11 -04:00
nhmall
8b89917ede be consistent for all patforms in fixes3-7-0.txt 2022-10-27 15:49:16 -04:00
nhmall
3cd99786f2 doc/Guidebook.txt update 2022-10-27 11:33:10 -04:00
nhmall
c2df67b1f1 Guidebook date stamp 2022-10-27 10:47:03 -04:00
Michael Meyer
19a02b7e18 Guidebook updates 2022-10-27 10:40:54 -04:00
nhmall
b70a3d198e add a fixes entry for pull request #910 2022-10-27 10:07:32 -04:00
PatR
eeb208b3a9 X11 getlin()'s prompt
Reissuing getlin() with a different prompt wasn't reliably resizing the
X11 prompt widget.  After a lot of hacking away at win/X11/dialogs.c I
eventually tried setting the response portion of the widget first and
got much better results, enough to throw away the tentative changes to
dialogs.c.

There's still a lot of room from improvement but I think it would need
to replace the ghostview prompting instead of trying to massage that.
2022-10-25 02:55:49 -07:00
PatR
027cf3bf4d map documentation refinement
Add minor detail to recently added map description in doc/window.txt:
origin is in upper left and positive y goes downward, so not typical
Cartesian x,y coordinate plane.
2022-10-23 15:31:12 -07:00
nhmall
6f20939db9 support Unicode on Win32 pr #903 2022-10-23 12:34:16 -04:00
PatR
39560aac49 fix github issue #907 - bad shade logic
Issue reported by vultur-cadens:  one of the checks for whether a
shade would be harmed by an attack was erroneously inside a block
of code that only executed when you could see the attack.  Basic
physical damage wasn't affected but some monster (or poly'd hero)
damage types that shouldn't affect shades didn't when seen but did
when unseen.

Could also get "attack passes harmlessly through the shade" when
an unseen attack for physical damage hit and failed to deal damage.

fixes #907
2022-10-23 01:11:14 -07:00
PatR
4e85ad85cc fixes entry for PR #904 - duplicate invlet
Pull request from entrez:  explicitly throwing 1 out of stack of more
than 1 and then having the throw be rejected by tageting yourself did
not recombine the split, resulting in stacks of 1 and N-1 that both
had the same inventory letter.  Undo the split if throwing fails.

A similar fix was made for gold a year and a half ago by commit
c3ccd93a88.

fixes #904
2022-10-23 00:18:42 -07:00
PatR
86cbf9366a PR #906 - loadstone confers 'steadfastness'
Pull request by Theyflower:  carrying a loadstone prevents big
monsters from hitting their target for knockback effect, same as
wielding Giantslayer.

The PR code needed fixing (unintended switch from 'otmp' to 'obj')
so I didn't use the commeit.  The PR code also required that the
loadstone be blessed which sounds nethackish but would mean that
nobody would ever notice.  Allow carrying any loadstone to prevent
being knocked back.  It will still be a rare accident or uncommon
tactical decision.  (It doesn't happen if the target is flying or
levitating because those checks deliberately come first.)

supersedes #906
closes #906
2022-10-22 23:57:05 -07:00
PatR
84fabf764a allow big humanoids to wear mummy wrappings
A giant mummy starts out with a mummy wrapping but couldn't wear it.
Allow humanoids who are bigger than human size (including poly'd hero
when applicable) to wear such cloaks.  They won't do so if they are
invisible and the cloak would let hero start seeing them.
2022-10-22 17:14:22 -07:00
PatR
b1f7a68636 document map column 0
Something that FIQ once pointed out:  the fact that map column 0 is
not shown wasn't explicitly described anywhere.  Add a paragraph for
NHW_MAP to doc/window.txt and describe it there.
2022-10-21 15:16:25 -07:00
PatR
b824031f12 \#saveoptions fix
I hadn't ever used #saveoptions before and when I checked to see
whether the autounlock:none changes were being handled properly, I
discovered that options set via 'm O' weren't being handled at all.

This includes some miscellaneous reformatting of things noticed
while tracking down the problem.
2022-10-13 13:19:58 -07:00
PatR
c2894a422b monk strength
Add a stack of 2 tins of spinach near the leader on the monk quest
start level and another stack of 2 blessed tins of spinach at a
random spot on the monk quest locate level, to compensate for the
inability to gain strength from giant corpses if they adhere to
vegan or vegetarian conduct.  paxed supplied the 'tinplace' magic.

4 tins of spinach aren't nearly enough to get to 18/100, but by
uncursing the first pair, if necessary, and waiting until strength
is at least 18, they can be eaten to add 4..40 (average 22) points
of exceptional strength.  (Players choosing either of those conducts
for other roles or foodless for any role are on their own as far as
boosting Str goes, same as before.)

The special level loader needed to be modified to handle tins of
spinach.  It now accepts "spinach" as a fake monster type for an
object of type "tin".  Also added support for empty tins since it
involved the same code, and use of fake monster type "empty" with
object type "egg" to be able to create generic (unhatchable) eggs.
(Wishing for "egg" produces those by default but it also accepts
explicit "empty egg" by coincidence.)
2022-10-12 13:47:12 -07:00
PatR
3681855f34 fixes entry for PR #883 - digestion attack by hero
Pull request from entrez:  poly'd hero who digests a creature has a
change to gain an intrinsic from it.  I put the fixes entry in the
New Features section.

I was a bit concerned that g.afternmv might be cleared during the
turns the hero is busy digesting, leaving a stale value for
g.corpsenm_digested, but I don't think that that can happen.

Fixes #883
2022-10-08 16:09:19 -07:00