Commit Graph

6627 Commits

Author SHA1 Message Date
Bart House
77bd37b435 Visual Studio 2015 build improvements. 2017-09-01 12:13:58 +03:00
Bart House
98266801b6 Improve Visual Studio 2015 build. 2017-09-01 12:13:52 +03:00
Bart House
e5dadd525f Visual Studio 2015 build improvements. 2017-09-01 12:13:30 +03:00
Bart House
5a4df357ab Improvements to vs2015 build. 2017-09-01 12:12:58 +03:00
Pasi Kallinen
ffb3f12997 Fix pile display when picking up items while invisible
Reported directly to the devteam. Set hilite_pile on, become
invisible, pick up all but one item from a pile on the floor,
the pile symbol was still there afterwards.

This is yet another case of evil hack, because the gbuf doesn't
distinguish between object piles and single items, see
commit 854fe40609
2017-09-01 09:43:36 +03:00
PatR
06d211f75c rogue starting invent: +9 lock pick
Reported directly to devteam, the starting inventory for rogue chars
specified that their lock pick be +9, but the 'spe' enchantment field
is meaningless for that type of item.  A followup report indicated that
it had been this way since at least the 3.0 era.

It might have been a typo, since 9 and 0 are next to each other.  Or
perhaps before lock picks were introduced, rogues started with a
skeleton key.  That assumes spe==9 meant skeleton key back in the days
when each key and lock had a designated shape and a non-skeleton key
had to match the lock's shape to work.  I don't know whether that was
how skeleton keys were flagged and don't care eough to delve deeper....
2017-08-28 15:56:16 -07:00
Pasi Kallinen
7e793a09d7 Add database entry for "martial arts" the skill 2017-08-28 20:40:41 +03:00
Pasi Kallinen
30aea05f47 Minor Guidebook tweakage 2017-08-24 22:59:46 +03:00
Pasi Kallinen
23be1b81d2 Typofix in Guidebook.tex 2017-08-24 10:34:37 +03:00
Pasi Kallinen
ef9d198d53 Explain "no travel path" in Guidebook 2017-08-24 10:33:23 +03:00
Pasi Kallinen
d1b4253307 Fix reversed stinking cloud targeting logic
...and give indication when blessed scroll of fire was targeted
at illegal position.
2017-08-24 09:04:54 +03:00
Pasi Kallinen
c7d13d6fa3 Make blessed scroll of fire useful
Blessed scroll of fire allows to choose the explosion location like
scroll of stinking cloud does. This should make it somewhat useful
in the early game.
2017-08-23 23:35:53 +03:00
PatR
0ad33783f0 crushed to death by a gas spore's explosion
From the newsgroup, remarking on an usual cause of death seen at NAO.
Surviving a gas spore's explosion (via hit points, not from life-saving)
left "gas spore's explosion" as stale killer.name.  Being killed by
opening a drawbridge (but not by closing or breaking one) only assigned
killer.name if it didn't already have a value, so the stale reason got
used:  crushed to death by a gas spore's explosion.

This fixes it two ways:  clear the stale value after surviving the
explosion, and assign a specific reason when opening the drawbridge.

This also removes stale reason for death set up by various drawbridge
activity.  For the usual case, the hero only survives by life-saving
which does its own clearing of killer.name.  But there might have been
cases where it was being set for the hero when operating on a monster,
so no life-saving involved.  The drawbridge code is not the easiest
code to navigate....
2017-08-21 15:50:36 -07:00
PatR
eadecb1baf BONES_POOLS fix and bonesid fix
The BONES_POOLS implementation added an extra dot to the bones file
name (only when enabled) which would be a problem on some filesystems.
This changes the name from "bonD0.15.3" to "bon3D0.15" which avoids
the second dot and also fits within 8.3 characters.  To enforce that,
the maximum value for BONES_POOLS is now 10 (yielding single-digit pool
numbers 0 through 9).

BONES_POOLS==1 will omit the pool number (that's not a change, just a
reminder), yielding "bonD0.15" and so on.  Right now, BONES_POOLS==0
is equivalent to BONES_POOLS=1, but it could be changed someday to
mean that bones files shouldn't be used if we decide to support that.

The pool number as a suffix was being included in content validation,
so it wasn't possible to move "bonD0.15.3" to pool 2 by renaming it to
"bonD0.15.2".  I'm not sure whether that was intentional, but it seems
overly draconian.  "bon3D0.15" can be renamed to "bon2D0.15" and then
be loaded by a game assigned to pool 2.  Also, pre-pool bones can be
retained by renaming to any valid pool and should still work.

The three letter filecode for quest bones has made the bonesid be
broken since 3.3.0 introduced it (the three letter code, not bones-id).
"QArc.2" for level 2 of the Archeologist quest was being written into
the bones file as "rc.2", but worked as intended because validation
when loading bones had the same mistake.  This fixes it to use "QArc.2"
when saving and accept either "QArc.2" or "rc.2" when loading, so 3.6.0
bones files (and existing to-be-3.6.1 bones) will continue to work.
2017-08-21 02:50:26 -07:00
Pasi Kallinen
73d36b59dd Typofix 2017-08-21 12:00:08 +03:00
Pasi Kallinen
1854d21dd7 Update NetHackW.exe version details 2017-08-20 23:44:35 +03:00
Pasi Kallinen
1eca824321 Add sysconf BONES_POOLS to allow more bones-files per level
Reduce the chance of a player playing on a public server encountering
their own bones, by implementing separate bones pools. The pool a player
belongs to is determined at game start, and only bones in that pool
are used. The sysconf BONES_POOLS allows the sysadmin to define how
many pools there are.
2017-08-20 23:04:59 +03:00
Pasi Kallinen
7bb4cb1b1e Silence some warnings 2017-08-19 19:23:47 +03:00
Pasi Kallinen
a2b51de481 Add stuff for compiling with Visual Studio 2015 2017-08-19 15:21:24 +03:00
Pasi Kallinen
831ce24a57 Enable dumplog for winnt 2017-08-19 14:29:18 +03:00
Pasi Kallinen
189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00
Pasi Kallinen
9eae5a8c4b Fix thinko on preprocessor conditional 2017-08-19 13:47:41 +03:00
Pasi Kallinen
42a3f9d906 Silence another warning 2017-08-19 13:44:08 +03:00
Pasi Kallinen
d1c1fd5faf Fix syntax error 2017-08-19 13:40:47 +03:00
Pasi Kallinen
a552956f7a Silence some warnings 2017-08-19 13:38:38 +03:00
Pasi Kallinen
bbc3cee759 Fix minor diffs between Guidebook.mn and .tex 2017-08-17 23:30:36 +03:00
Pasi Kallinen
00aae6b684 Remove erroneous bolding from Guidebook.mn 2017-08-17 23:18:41 +03:00
PatR
70c62882bf add missing fixes entries for curing blindness 2017-08-16 15:08:36 -07:00
PatR
0840974b42 nurse corpse vs blindness
The carrot patch made monsters (carnivorous pets, g.cubes) who eat
nurse corpses have temporary blindness be cured.  Do the same for the
hero.
2017-08-14 16:42:44 -07:00
PatR
5f3e11687c healing vapor vs blindness
Drinking any potion full healing or extra healing or non-cursed potion
of healing cures blindness in addition to restoring lost hit points.
Now breathing vapor from any potion of full healing or non-cursed
potion of extra healing or blessed potion of healing will also do so.
2017-08-14 16:36:37 -07:00
PatR
5e54397609 fix #H5853 - carrots don't cure blind pets
Report was for a blinded horse which ate a carrot but remained blind.
This fixes that, and also lets blinded carnivorous pets eat carrots.
Gelatinous cubes now handle carrots too, but since they lack eyses
there won't be any noticeable effect for them.
2017-08-14 16:30:23 -07:00
PatR
fd74f2e149 fix files.c part of #H5778 - file descriptor leaks
Fix the SELF_RECOVER part of files.c which was actually in slightly
worse shape than previously fixed recover.c itself.

I think the HOLD_LOCKFILE_OPEN edition of nhclose() is the only
remaining file descriptor leak from the original #H5778 report.

The revised code compiles when SELF_RECOVER is defined, but I didn't
actually force a recovery to fully test it.

This patch includes a couple of reformatting and/or reorganization
bits in addition to the fd leak fix.
2017-08-12 16:44:39 -07:00
PatR
e8723df778 grappling with water
Reported directly to devteam:  if applying a grappling hook towards
a target past some water ended up pulling the hero toward the target,
hero would drown without any chance of crawling out of the water.
It used hurtle() to move, and hurtle assumed levitation so didn't
check for entering pools of water except on the Plane of Water.
2017-08-08 18:58:25 -07:00
PatR
1e15fdcb77 rereformat winprocs.h
Overriding clang-format was justified, but the result was too wide.
Make the lines less that 80 characters.

Also, WC_PERM_INVENT and WC_PLAYER_SELECTION had comments cloned from
the preceding line.
2017-08-07 14:27:15 -07:00
Pasi Kallinen
152ddf4a4b Unify strength string 2017-08-06 22:56:07 +03:00
Pasi Kallinen
1f671b962c Demangle clang formatted code 2017-08-06 20:27:48 +03:00
Pasi Kallinen
4e05de9bff Add whatis_moveskip option to change fast-moving cursor
Previously the "fast-moving" when getting a target location
was always by 8 units. If this option is on, fast-moving
will instead skip the same map glyphs. This should be much more
useful for blind players.
2017-08-06 15:41:31 +03:00
PatR
1614f8f5ee fix brace mismatch in winami.c
Reported directly to devteam, so no #H number.  Conditional code in
amii_get_ext_cmd() included an unmatched '{', which would break
compilation (at least if EXTMENU was enabled) and also resulted in
the remainder of winami.c being mis-formatted (the functions there
were treated as being inside a block rather than at file level).

This is completely untested.

There's some code suppressed via '#if 0' with a comment "fix for PL2".
We haven't used the patch-level nomenclature since version 3.0!
2017-08-05 17:58:20 -07:00
PatR
0d7101cd29 fix part of #H5778 - file descriptor leaks
Handle the part of #H5778 in sys/atari/tos.c.

The part in util/recover.c has already been fixed; the part in
src/files.c still needs to be fixed.
2017-08-05 17:29:24 -07:00
Pasi Kallinen
4d7d63814a Throne room's throne is occupied by a king
Based on a patch by Leon Arnott
2017-08-04 23:15:30 +03:00
Pasi Kallinen
b6d1ee3320 Using a cursed tin whistle in a vault summons the guard
...since guards respond to shrill whistles.
Based on a patch by Leon Arnott.
2017-08-04 22:41:26 +03:00
Pasi Kallinen
e2904012b7 Show current timeouts in #wizintrinsic 2017-08-04 21:41:04 +03:00
PatR
b90c5d5c4f USE_OLDARGS update (3 of 2 :-)
Handle the few variadic calls in pline.c a better way.
2017-08-03 16:31:55 -07:00
PatR
3b675c5b49 USE_OLDARGS update (2 of 2)
Files modified:
include/extern.h
src/pline.c, priest.c, potion.c, mkobj.c

A bunch of calls to pline() in pline.c started triggering warnings
either as-is or possibly after the changes to tradstdc.h.  Fixing
them in place would include intrusive VA_PASSx() like in lev_main.c.
Moving them to other files is much simpler (and they didn't
particularly belong in pline.c in the first place, although I didn't
actually find any better place for them....).

The probing/stethoscope feedback went to priest.c, where there's a
comment stating that it should move to wherever englightenment ends
up once that is moved out of its completely inappropriate current
home in cmd.c.  (Holdover from when ^X was wizard-mode only but even
the other wizard mode commands don't really belong with the command
processing code.)
2017-08-02 18:56:54 -07:00
PatR
64f284dd61 USE_OLDARGS update (1 of 2)
Files modified:
    include/tradstdc.h, sp_lev.h, system.h
    util/lev_main.c

Silence a bunch of warnings generated by recent gcc which weren't there
with whatever version I had when 3.6.0 was being readied for release.
For lev_main, there were two basic types:  not enough arguments in calls
to lc_pline, lc_warning, and lc_error (since we weren't passing dummy
arguments as is done for add_opvars), and conversion from 'int' or
narrower to 'char *' (from -Wint-to-pointer-cast, which either wasn't
there yet in the older gcc, or wasn't included in -Wall back then).
[Note that for any configuration decrepit enough to actually need
USE_OLDARGS, such conversions will either work fine or else nethack
simply won't be viable.]

src/pline.c generates a bunch of warnings (for USE_OLDARGS).  The fix
for that will be (2 of 2).

To test, instead of mucking about with CFLAGS or sys/unix/hints, I've
been temporarily adding unconditional
|#undef USE_STDARG
|#undef USE_VARARGS
|#define USE_OLDARGS
to the end of config1.h and then doing my normal build--which is why
-Wall (or possibly -W) is drawing -Wint-to-pointer-cast warnings.
2017-08-02 18:23:42 -07:00
Pasi Kallinen
b4e4d70008 Fix couple static code analyzer warnings 2017-08-02 19:48:44 +03:00
Pasi Kallinen
b13bae91dc Add way to cycle through valid locations for polearm or jump target 2017-07-31 19:10:26 +03:00
Pasi Kallinen
439028dcae Add whatis_filter option to filter eligible map locations for travel
Compound option whatis_filter, filters the eligible map locations
when getting a cursor location for targeting. Accepts 'n' (none),
'v' (map locations in view), or 'a' (map locations in the same area,
eg. room or corridor).
2017-07-31 16:58:23 +03:00
PatR
6b851e0503 fix misplaced #if in sys/msdos/pckeys.c
Reported directly to devteam, so no #H number.  If SIMULATE_CURSOR
isn't defined, there would be no switch statement to attach the
subsequent cases to.

The suggested fix is obviously correct, but untested....
2017-07-30 18:43:47 -07:00
PatR
e4d4becfa2 fix #H5781 - missing fprintf args in wc_trace.c
This compiles cleanly after the fixes, but is otherwise untested.
2017-07-30 18:33:28 -07:00