Commit Graph

10428 Commits

Author SHA1 Message Date
nhw_cron
32c7279e63 This is cron-daily v1-Jan-14-2020. manpages updated: mn.txt 2020-01-14 12:02:10 -05:00
nhw_cron
f431c72873 This is cron-daily v1-Jan-14-2020. manpages updated: makedefs.txt 2020-01-14 12:01:52 -05:00
nhw_cron
bd254e0853 This is cron-daily v1-Jan-14-2020. manpages updated: dlb.txt 2020-01-14 12:01:30 -05:00
nhw_cron
b21b99d433 This is cron-daily v1-Jan-14-2020. manpages updated: mnh.txt 2020-01-14 11:55:59 -05:00
nhw_cron
466a126e39 This is cron-daily v1-Jan-14-2020. manpages updated: mn.txt 2020-01-14 11:55:45 -05:00
nhw_cron
144aabce94 This is cron-daily v1-Jan-14-2020. files updated: Files 2020-01-14 11:53:00 -05:00
nhw_cron
35634fab8e This is cron-daily v1-Jan-14-2020. manpages updated: recover.txt 2020-01-14 11:52:38 -05:00
nhw_cron
7ac4e0fd06 This is cron-daily v1-Jan-14-2020. manpages updated: nethack.txt 2020-01-14 11:52:19 -05:00
nhw_cron
cc3570a7d9 This is cron-daily v1-Jan-14-2020. manpages updated: makedefs.txt 2020-01-14 11:52:00 -05:00
nhw_cron
36736f2cf7 This is cron-daily v1-Jan-14-2020. manpages updated: lev_comp.txt 2020-01-14 11:51:36 -05:00
nhw_cron
e44e05df59 This is cron-daily v1-Jan-14-2020. manpages updated: dlb.txt 2020-01-14 11:51:14 -05:00
nhw_cron
ed72eb71da This is cron-daily v1-Jan-14-2020. manpages updated: dgn_comp.txt 2020-01-14 11:50:59 -05:00
nhmall
41137101a4 documentation updates 2020-01-14 11:44:02 -05:00
nhmall
a6c46bbd85 housekeeping items for 3.6.5 - first pass 2020-01-14 11:35:06 -05:00
nhmall
07f9e329b6 Merge changes from NetHack-3.6 into NetHack-3.7-Jan2020 2020-01-14 09:28:38 -05:00
PatR
cdc598e8bd fix pline.c potential buffer overruns
Fix 'Bugs 4, 5, and 6' which all use a similar fix but would have
conflicts over '#define BIGBUFSZ' if committed separately.

Format ("short explanation %s", string_argument), where the
explanation always has modest length but the string is potentially
up to 4*BUFSZ in length, into a 5*BUFSZ buffer.  Then truncate the
result to at most BUFSZ-1 characters so that it can be safely passed
to interface-specific putstr() or raw_print().

Applies to pline(), raw_printf(), and config_error_add().  Also done
for impossible() although there's no evidence that its buffer could
be overflowed in a controlled manner.
2020-01-14 02:52:34 -08:00
PatR
74de7d31e0 fix sym_val() buffer overrun
Fix 'Bug 3' where too long SYMBOL=string in run-time config file could
overflow a local buffer and clobber the stack.

Valid value is only one character long after processing an 'escaped'
encoded character which can be at most 6 characters (plus terminator):
backslash M backslash and up three digits.  If/when UTF8 gets added
the number of digits will increase.  Use a truncated copy of the input
(substantially bigger than 6+1); ignore any excess.
2020-01-14 02:05:14 -08:00
PatR
a842fda44c fix add_menu_coloring() buffer overrun
Fix 'Bug 2' where too long MENUCOLOR=string in run-time config file
could overflow a local buffer and clobber the stack.

Theoretically a menu coloring regular expression could require a
bigger buffer but I don't think we need to try to support that.
255 characters minus the amount needed to specify color and/or
attributes should be ample.
2020-01-13 19:26:53 -08:00
PatR
c35139e9ce fixes36.5 2020-01-13 19:17:35 -08:00
PatR
6d5c32f38a groundwork
Fix one warning and reformat some of the recently added code.
2020-01-13 19:09:57 -08:00
nhw_cron
e043478ac7 This is cron-daily v1-Jan-13-2020. guidebook updated: doc/Guidebook.txt 2020-01-13 16:44:18 -05:00
nhmall
cad10295b1 Merge some bug1 fixes from NetHack-3.6 2020-01-13 15:55:01 -05:00
PatR
2b1f8a1b43 fix #K166 - role selection filtering
pick_role() had a 5 year old copy+paste error where a pair of lines
were cloned multiple times but one of the resulting lines didn't get
the intended revision, preventing OPTIONS=align:!chaotic or !neutral
or !lawful from working as intended when letting the game choose role
randomly.  The bad line should have been calling ok_align() but that
routine turned out to have a bug too.

Fixing those lead to other less obvious problems with role selection,
particularly the tty menu version for picking manually.  Roles and/or
races which should have been excluded by partial specification weren't
always kept out.  Also, if any filtering was specified, trying to
disable all filters (via choosing 'reset filtering' and de-selecting
everything in the menu) was a no-op.  Once any filtering was in place
you had to leave at least one role or race or gender or alignment
flagged as not acceptable in order to change any of the filtering.
When that was fixed and it was possible to turn off all filtering,
there was no way to turn it back on because the menu choice to reset
the filters wasn't offered unless there was some filtering in place
(that was intentional but turned out not to be a good idea).

I checked curses and X11; they both offer less versatile selection
capability that don't seem to need the tty-specific fixes.
2020-01-13 12:34:01 -08:00
nhmall
25c9fb8d2f fixes update 2020-01-13 15:30:23 -05:00
nhmall
d6183d065e windows intermediate file into .gitignore 2020-01-13 15:23:42 -05:00
nhmall
6397f0d895 remove unintended src file 2020-01-13 15:03:03 -05:00
nhmall
5b0f3ae7bf fix bug1
have string_for_opt() return the value string or empty_optstr to
provide some level of crash protection if some future added option
processing misbehaves. Callers of string_for_opt() and
string_for_env_opt() should always check for a match to empty_optstr.
2020-01-13 14:54:48 -05:00
nhmall
bb715bc824 ignore lib folder 2020-01-13 11:25:38 -05:00
PatR
c2060f9e8c more giant walking onto boulder feedback
autopick_testobj() needs to bypassed during move-without-pickup as
well as when autopicked is disabled.  I hope this is finally right.
2020-01-13 03:46:51 -08:00
PatR
4b7e9d67d3 rnd_class()
Guard against potential bad arguments:  first index greaer than last.
Return STRANGE_OBJECT instead of hardcoded 0 if it ever fails (which
should be impossible with good arguments).
2020-01-12 22:16:49 -08:00
PatR
2d35668c63 update novel fixes entry 2020-01-12 22:15:37 -08:00
PatR
3409546876 more random novels
Give statues 'real' spellbooks only.

Provide mkobj() a way to accomplish that instead of resorting to
mksobj(rnd_class()).
2020-01-12 22:02:36 -08:00
PatR
caaf1b375a randonly occurring Discworld novels
Give 'novel' a 1 in 1000 chance of being created in place of each
random spellbook (except for hero's initial inventory and NPC
priests' monster inventory and divine reward for prayer--those all
force regular spellbooks; statue contents aren't among the
exceptions--those books can now be novels).  Shop inventory (where
first book or scroll shop created is guaranteed one novel) hasn't
been touched.  If there is any other special spellbook handling
somewhere, I've overlooked it.
2020-01-12 11:00:38 -08:00
PatR
92970bfffc spell maneuver correctly 2020-01-12 09:19:17 -08:00
PatR
07a2c1c813 fix github issue #279 - boulder feedback
Polymophed into a giant and moving onto a boulder's location could
yield "you easily pick it up" (without actually doing so) followed
by "you see a boulder here".  It would happen if autopickup was Off,
or if the 'm' move-without-autopickup prefix was used, while either
boulder was included in pickup_types (including when that is set
for 'all') or hero had thrown that particular boulder and
pickup_thrown was On.  The check for whether auto-pick should try
on an object relied on its caller verifying that autopickup was On.
pickup() does that for
 pickup() -> autopick() -> autopick_testobj()
but moverock() wasn't doing that for
 moverock() -> autopick_testobj()
so the logic controlling moverock's message was subverted.

I first thought that logic itself was incorrect and changed the
message.  This keeps the new message even though it turned out not
to be cause of the problem.

Fixes #279
2020-01-12 05:05:24 -08:00
nhmall
1efc2d8e5e support haggis when pluralizing thus avoiding haggi 2020-01-11 20:04:32 -05:00
Patric Mueller
38fa93df73 Restrict the teleportation notification to actual teleportations
teleds() is used for more than just teleportations, the teleportation message
was also given when mounting a steed.

Trying out a new bit flags method parameter design pattern.
2020-01-11 19:51:54 +01:00
PatR
7c3ae74c27 hallucinatory water and lava terrain
When browsing the map while hallucinating and looking at a pool, a
moat, or 'other' water or at molten lava, report with hallucinatory
liquids rather than the ordinary substance.  Likewise when browsing
self on map or using ^X would report "sinking into lava".
2020-01-11 09:34:01 -08:00
PatR
92994f6d71 data.base lookup fix
Changing data.base lookup to accept leading spaces as an alternative
to the normal leading tab ended up adding an invalid integrity check.
Lines without any leading space or tab were considered to be in error
but empty lines are present so need to be accepted.
2020-01-11 08:45:45 -08:00
PatR
e27b6af856 fix github issue #277 - repeat door open failure
The change to make "ouch! you bump into a door" use up a turn didn't
end running, so when it happened while running useless turns took
place and that message was delivered repeatedly until some other
action interrupted the hero.  It didn't matter whether autoopen is
enabled.

Fixes #277
2020-01-10 13:13:36 -08:00
nhmall
14929f797d silence a warning about use of potentially uninitialized variable 2020-01-10 15:10:47 -05:00
PatR
a4e80fa9b4 more trap feedback
When trapped in lava, change the text from "stuck in the lava" to
"sinking into lava" to describe the situation much more accurately.
Instead of doing that twice, move the u.utraptype feedback into a
separate routine that both enlightenment and self-lookat can use.
2020-01-10 06:53:48 -08:00
PatR
3a6e2a9802 escaping buried iron ball
Noticed while testing the look-at-self feedback for traps.  When
punished and the iron ball gets buried, hero becomes "tethered to a
buried object".  It is possible to simply walk away (like from a pit,
bear trap, web, stuck in floor by solidified lava or sinking into
molten lava) but that requires many tries.  Once the escape happens,
"you finally wrench the ball free" and are supposed to have it
reattached to a replacement chain.  However, buried_ball() wouldn't
look at buried objects if the trap countdown timer was 0 (which is
the case when finally wrenching free).  So hero got a new chain to
drag around but it had no heavy iron ball attached.

I didn't turn on sanity checking but that would have complained about
this.  Normal dragging didn't care but I wouldn't be surprised if
various actions that checked Punished and picked up the ball in order
to put it down again elsewhere would have had possibly serious trouble.
2020-01-10 04:36:28 -08:00
PatR
f6c547f376 randomized trap names
Use trapname() in several more places.  I wasn't systematic about it.

trapname() could generate a random value of 0 and attempt to use
"real trap #0" but 0 is NO_TRAP.  So it ended up with "water" from
the preceding block of entries in defsyms[].  Treat 0 as an extra
chance for the actual trap instead of an hallucinatory one.

Add a couple more hallucinatory traps.  "Roach Motel" is trademarked
but like Spam and Band-Aid, general usage has trampled over it.  I
included "(tm)" anyway.  Also, sometimes generate "<role> trap" or
"<rank> trap" on the fly.  Why should tourists get all the fun?
2020-01-09 18:45:06 -08:00
PatR
3ed51c2718 enhanced look-at-self
^X reports whether you're caught in a trap, but neither looking at
yourself (via '//' or ';' or other getpos autodescribe) nor looking
"here" (via ':') said anything about that.  Make looking at yourself
do so.
2020-01-09 16:59:30 -08:00
PatR
f5d7343677 readobjnam() tidying
Move wizard mode wishing for traps and terrain from readobjnam() to a
separate routine.
2020-01-08 18:01:04 -08:00
PatR
8a3a32834f more wishing for Amulet of Yendor
Make wish for "amulet of yendor" be the same as "real amulet of yendor"
instead of preserving the 3.6.x behavior of having a 50% chance of it
yielding "fake amulet of yendor".

Both the "real" and "fake" prefixes are still accepted, but "real" has
become a no-op:
 !real and fake, real and fake => fake
 real and !fake, !real and !fake => real
so fake vs !fake always decides the result.
2020-01-08 17:21:47 -08:00
Patric Mueller
2965488525 Unpaid globs showed weight info unconditionally outside of wizmode
globwt() didn't check for wizmode, so unpaid globs would be shown with weight
information even for normal player.

Eliminated globwt() completely and consolidated the output of aum in one place
as we don't really care about the ordering of debug info in wizmode.
2020-01-08 11:34:53 +01:00
PatR
df50d4cf17 fix #K112 - fumbling vs autoopen
Report complained that having autoopen not work when fumbling was
inconvenient and mentioned that the "ouch! you bump into a door"
result didn't take any time.  This updates the documentation to
state that autoopen won't work while fumbling (so the inconvenient
behavior persists) but changes movement so that bumping into a door
now takes time.  (Despite "ouch!", it doesn't inflict any damage.)

Also, document the recently added autounlock option.
2020-01-07 17:57:38 -08:00
PatR
a49dcd1e12 tethered aklys description
Recent object formatting changes for wielded weapon put some pline
arguments in the wrong order.
 a - aklys (weapontethered  in hand)
or worse, when dual-wielding
 a - aklys (wieldedtethered  in right hand)
Change back to
 a - aklys (tethered weapon in hand)
or
 a - aklys (tethered weapon in right hand)

I considered (tethered weapon wielded in right hand) for the two-
weapon case, but I think that's too verbose.
2020-01-07 04:40:20 -08:00