Commit Graph

7670 Commits

Author SHA1 Message Date
PatR
aa5a85f4da displacing pet long worm
Salvage part of an old patch.  Swapping places with any long worm,
even a baby one, always failed with "You stop.  Foo is in the way!"
This lets you swap places with tame baby long worms, and adult ones
if they have no tail (which won't happen unless there are more than
32 long worms on the current level--even if a long worm appears to
be only a head, there is normally a hidden tail segment at the same
location).
2018-12-14 18:17:42 -08:00
nhmall
1be3ad0ddc Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-12-14 17:25:24 -05:00
PatR
d8e430b907 last? pickup_types
Although choose_classes_menu() is only used for objects, it is written
to handle monsters too.  My change to give <space> special handling
might have broken selecting ghosts if it's ever used for monsters so
fix that.
2018-12-13 23:52:35 -08:00
Bart House
67037f18b5 Remove parameter names in declaration. 2018-12-13 21:23:43 -08:00
nhmall
b71df7b144 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-13 21:25:34 -05:00
PatR
d18ddb2c95 more interactive !pickup_types
More on clearing pickup_types so that autopickup reverts to picking up
evertyhing:  for menustyle:Full and Partial, add a menu entry for 'all
classes' as an alternative to unselecting every class already set.

Also, Full and Partial had no way to include venom.  Now it's a choice
when in wizard mode.  There's still no way--other than switching to
Traditional or Combination--during normal play (where venom objects can
exist if they were wished for in wizard mode and then left in bones).
2018-12-13 17:33:46 -08:00
nhmall
bdae51503c stale dependency 2018-12-13 20:21:26 -05:00
nhmall
5e37d5b5d4 commented out by default 2018-12-13 20:11:03 -05:00
nhmall
e6e2d8a257 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-12-13 20:08:47 -05:00
nhmall
36d27b11bd pdcurses expected objs
Match the required curses obj's in most recent updates from
git clone https://git.code.sf.net/p/pdcurses/code pdcurses
2018-12-13 20:07:22 -05:00
PatR
3165f7af8d spell "autopickup" consistently
The '@' command doesn't hyphenate 'auto-pickup' so 'O' and ^X shouldn't
either.
2018-12-13 16:54:52 -08:00
PatR
cf7536b167 random_response() buffer overflow
'sz' is the size of the buffer; 'if (count < sz) buf[count++] = c;'
can fill the entire buffer, leaving count==sz, so buf[count] = '\0';
would be out of bounds.

Formatting was way off.  Indentation these days should be multiples
of 4 spaces, never tabs.
2018-12-13 02:12:31 -08:00
nhmall
f9beca06dc core code style 2018-12-13 01:36:36 -05:00
Bart House
106cc8acde Merge branch 'win-minor' of https://rodney.nethack.org:20040/git/NHsource into win-minor 2018-12-12 21:46:32 -08:00
Bart House
0cd50847fb Changes to get fuzzer working in NetHackW. 2018-12-12 21:46:14 -08:00
PatR
05c253b6d8 show autopickup in ^X feedback
Gathers all the autopickup information in one place:

Auto-pickup is { off
               | on { for 'classes' [plus thrown]
                    | all types                   } [, with exceptions] }.
2018-12-12 18:55:06 -08:00
PatR
59dcf73ad8 interactive !pickup_types
To use 'O' to clear a value from pickup_types with menustyle Traditional
or Combination, you needed to give a value starting with 'a' (for 'all').
Accept space(s) too, similar to removing an object or monster name.
2018-12-12 18:49:12 -08:00
PatR
a63b9f29a5 fuzzing hero boost
I watched the fuzzer run for a bit and noticed that Str and most other
characteristics were steadily dropping until they hit 3 and not being
recovered, so I gave the defenseless hero a chance to benefit from
blessed restore ability occasionally.  It hasn't helped much.  Str and
Con both still drop to 3.  [If I had to guess, I'd go with side-effect
of polymorphing, but not an intended one.]
2018-12-12 17:55:43 -08:00
PatR
30ddfb01db place_monster() warning bit 2018-12-12 17:54:53 -08:00
PatR
fdec3704fd mon_sanity_check tweak
A change I included with the vault guard fix was triggering fuzzer
panics about dead monsters on the fmons list.  I'm not quite sure why;
I couldn't reproduce it interactively.  [Perhaps caused by hero killing
a monster and then getting another move before monsters get their turn,
but trying to do that still didn't trip the dead monster sanity check.]
Suppress that check so that the fuzzer can run amok.

Also, a waiting-to-exit vault guard could move extra times, uselessly
since ''hero hasn't left temporary corridor yet'' is why he's waiting,
if there were any monsters fast enough to get extra moves before the
hero's next turn.
2018-12-12 15:42:46 -08:00
nhmall
155499fbda Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-12 06:40:52 -05:00
PatR
9952049a75 fix #H7677 - guard placed twice at <0,0>
"Placing monster over another?" warning was triggered for vault guard
by an earlier change which made m_detach() stop removing monsters at
<0,*> from level.monsters[][].  So one guard would replace another at
<0,0> for however many guards were created, and memory for all but
the last one would be lost.

This involved a lot of flailing about and the patch includes various
things would could have been discarded.  One or two extended monster
sanity checks are included, plus a couple of debugpline()'s for
tracking guard movement.
2018-12-12 01:54:33 -08:00
Bart House
ce7c9d5077 Terminal font when not fitting to screen. Consolas for fit to screen. 2018-12-11 20:52:07 -08:00
PatR
cf89253358 an() bit 2018-12-11 01:27:20 -08:00
PatR
140bb9cc85 fix 'a X'
The fruit name fix a couple of days ago revealed that an() didn't
pick the right article for single letters.  If you set named fruit to
"X" and wished for "fruit", you'd have 'k - a X' added to inventory.
This changes an() and also doname() which bypasses an().
2018-12-10 17:34:18 -08:00
nhmall
5f21dd1308 fix apparent copy and paste error 2018-12-10 18:01:43 -05:00
nhmall
ac6ab22347 typo fix 2018-12-10 17:28:43 -05:00
nhmall
2243b1bb00 trigger update 2018-12-10 17:24:32 -05:00
nhmall
3837df1221 Qt build 2018-12-10 09:00:50 -05:00
PatR
9c422f2c1f fix #H7707 - terrain change leaving stale flags
struct rm.flags in overloaded for a bunch of rm.typ -dependent things
(doormask, altarmask, throne/fountain/sink looted, a few others) and
wasn't being reset for various cases where rm.typ gets changed.

I've changed a lot, some no doubt unnecessarily, and probably missed
plenty.  This compiles but has not been thoroughly tested.
2018-12-10 03:52:00 -08:00
PatR
d680066343 fix #H7704 - clairvoyance: objects vs pools
When clairvoyance revealed an underwater object and the player wasn't
being given a chance to browse for some other reason, the map didn't
get refreshed and the object stayed displayed with the water hidden
under it.  Force a chance to browse when revealing underwater objects
despite that being intrusive when clairvoyance kicks in while walking
around.
2018-12-10 02:21:31 -08:00
nhmall
66100fd8fc Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-10 00:50:01 -05:00
nhmall
56dc7e150c allow a deferred windowport init during options processing
When options processing encountered OPTIONS=windowtype:X,
the code would immediately attempt to switch over to that
windowtype right in the midst of options processing.

This stores the chosen option into
chosen_window[WINTYPELEN]
thus allowing the startup code to choose it after
options processing has been completed.
2018-12-10 00:44:18 -05:00
PatR
b40868a74f fix #H7708 - change in terrain not noticed
Jumping or teleporting while levitating in xorn form wouldn't toggle
blocking of levitation when moving from open spots to wall/stone and
unblocking of same when moving the opposite way.

This handles those cases but there are no doubt others.  The only
other one I checked was when failed #untrap moves hero onto trap.
That case works correctly--at least after this fix is in place.

Noticed while working on it:  change of terrain didn't always update
the status line.  When levitation became blocked, it still said Lev
and when unblocked, didn't say that.  Next status update got status
condition back in sync.
2018-12-09 16:22:27 -08:00
PatR
fe1b27e774 fix #H7702 - named fruit warning: singular of null
Some code added for 3.6.1 tries to find the longest matching prefix
when comparing a user-supplied with previously set up fruit names.
It does so by temporarily replacing space with NUL then passing that
to makesingular().  After already having named a fruit (resulting in
something to try to compare with), attempting to assign a name
beginning with two or more spaces would yield an impossible "singular
of null?" warning.

After the warning, the name minus its leading spaces got successfully
assigned.  I'm not sure why a single leading space didn't trigger it
too, nor where the leading (and trailing, if any) spaces are going
away when the name is assigned.

Fix by removing all leading and trailing spaces from a new fruit name,
and combine consecutive internal spaces to one, before any other
manipulations.  (This can result in names that used to work as-is now
being simplified a bit--when consecutive internal spaces have been
given--but that shouldn't be a problem.)

Also, don't complain about "missing parameter for 'fruit:'" if user
hits <return> when prompted for fruit name by 'O'.  An empty fruit
name at that stage is just a no-op.
2018-12-09 15:03:13 -08:00
Bart House
04d3be930b Changes to font size and vary_msgcount options for Windows nethack ports. 2018-12-09 14:37:07 -08:00
Bart House
1aec267c09 NetHackW default font changed from "Terminal" to "Courier New" 2018-12-09 14:06:25 -08:00
Bart House
a8d5f49837 Merge branch 'win-minor' into win-fontmap
# Conflicts:
#	win/win32/mhmap.c
2018-12-09 14:02:57 -08:00
Bart House
88bbf781d1 Three fixes to NetHackW font handling.
Check that player level is valid before checking if it is rogue.
Prevent attempting to pick a font that is too small.
Don't leak fonts when trying to find a font that fits.
2018-12-09 11:57:50 -08:00
Bart House
fccc3cbee6 Render the two block glyphs using FillRect instead of DrawText. 2018-12-09 11:30:29 -08:00
nhmall
0573392f16 Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-12-09 13:47:12 -05:00
nhmall
46d2724f58 some early startup adjustments 2018-12-09 13:09:30 -05:00
nhmall
d93b8b50ae fixes entry for foxen refix
commit e0927cd983 fixes #167
2018-12-09 10:31:07 -05:00
nhmall
e0927cd983 Merge branch 'foxen_fix' into NetHack-3.6.2-beta01 2018-12-09 10:19:27 -05:00
nhmall
cb191e6a0e more windmain 2018-12-09 10:14:19 -05:00
copperwater
2b127ee453 Fix resurfacing of "foxen" pluralization bug
Inadvertently reintroduced in f9f1236. It was just the conditional
that was bad: due to resolving the possible buffer underflow when
comparing to "muskox", the pluralizer now only adds -es when the length
of the string is greater than 5. So for "box" and "fox" the pluralizer
will never add the -es ending, since they are greater than 5.

This commit checks for "does not end in muskox" correctly.
2018-12-09 09:51:47 -05:00
nhmall
f706ba094c clean up some tear-down
Windows continued to use function pointers belonging
to particular window ports that were still assigned
even after that port (tty) had gone through its
shutdown procedures when requested by the core.
Fix that and return to the minimal function pointers
that are not part of any of the actual WindowPorts.
2018-12-08 23:04:53 -05:00
nhmall
8d516d4358 clean up Windows exit routines 2018-12-08 22:34:50 -05:00
nhmall
afc34d3016 a late bot() call was observed on GUI Windows so prevent such a crash 2018-12-08 22:08:55 -05:00
nhmall
01625455d9 more startup tweaking for Windows 2018-12-08 21:17:34 -05:00