]> granicus.if.org Git - nethack/log
nethack
5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 5 Feb 2019 02:39:53 +0000 (21:39 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agotty ^P recall for dolook/whatis feedback
PatR [Tue, 5 Feb 2019 02:24:17 +0000 (18:24 -0800)]
tty ^P recall for dolook/whatis feedback

Noticed while testing the history suppression:  if you have DECgraphics
enabled and look at a graphics character on the map, the topline shows
x      description of x
where 'x' is displayed as it appears on the map (line drawing char).
^P for msg_window:single knows about that and reproduces the effect if
you recall such a line.  But msg_window:full/combination/reverse didn't
know about that and dumped it as-is into text output, ending up with a
strange 8-bit character for 'x' instead of the line drawing one.

I think other rendering schemes will be unaffected by this.  It's just
duplicating what is done for msg_window:single.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 5 Feb 2019 01:54:05 +0000 (20:54 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agofixes entry for amiga fix
nhmall [Tue, 5 Feb 2019 01:27:18 +0000 (20:27 -0500)]
fixes entry for amiga fix

Also, a pull request 175 showed up after the earlier commit for the missing
continuation lines, so mark the pull request as closed.

closes #175

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 5 Feb 2019 01:05:28 +0000 (20:05 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Tue, 5 Feb 2019 01:04:59 +0000 (20:04 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

5 years agoanother contributed Amiga bit, missing line continuations in Makefile
nhmall [Tue, 5 Feb 2019 01:02:53 +0000 (20:02 -0500)]
another contributed Amiga bit, missing line continuations in Makefile

5 years agotty ^P fixes entry
PatR [Tue, 5 Feb 2019 00:52:37 +0000 (16:52 -0800)]
tty ^P fixes entry

Left this out of previous commit.

5 years agotty ^P message recall
PatR [Tue, 5 Feb 2019 00:46:04 +0000 (16:46 -0800)]
tty ^P message recall

Extend 'putstr(WIN_MESSAGE, attribute, string)'s attribute so that
'custompline(SUPPRESS_HISTORY, ...)' can work with ^P's message
history like DUMPLOG history, in order to keep autodescribe feedback
and intermediate prompts for multi-digit count ('Count: 12', 'Count:
123') prompts out of recall history.  The old autodescribe behavior
could easily push all real messages out of the recall buffer when
moving the cursor around for getpos, and the count behavior looked
silly for a four or five digit gold count if you set the msg_window
option to 'full' or 'combination' and viewed them all at once.

Other interfaces may want to follow suit, but this doesn't force them
to make any changes.  I added a hook for "urgent messages" that might
be rendered in bold or red or some such and/or override the use of
ESC at --More-- from suppressing further messages, but there aren't
any custompline(URGENT_MESSAGE, ...) calls (potentially "You die...",
for instance) to exercise it.  Other people have implemented similar
feature it different ways and I'm not sure whether this one is really
the way to go since the core needs to categorize each message that it
deems to be urgent.  MSG_TYPE:stop may be sufficent, although MSG_TYPE
matching can entail a lot of regexp execution overhead at run-time.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Mon, 4 Feb 2019 23:37:15 +0000 (18:37 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agovariable moved to context long ago
nhmall [Mon, 4 Feb 2019 23:35:17 +0000 (18:35 -0500)]
variable moved to context long ago

just reported, a variable moved to context long ago

5 years agofunction call through pointer
PatR [Mon, 4 Feb 2019 23:01:36 +0000 (15:01 -0800)]
function call through pointer

There be others of these.  Don't for ANSI C for something this simple.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Sun, 3 Feb 2019 22:28:27 +0000 (17:28 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agogoodtype() reversal
PatR [Sun, 3 Feb 2019 22:08:29 +0000 (14:08 -0800)]
goodtype() reversal

Reverse an erroneous part of the vault guard commit.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Sun, 3 Feb 2019 02:09:23 +0000 (21:09 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agofix #H7173 / github #101 - vault exit
PatR [Sun, 3 Feb 2019 01:37:06 +0000 (17:37 -0800)]
fix #H7173 / github #101 - vault exit

Fixes #101

If you tell the vault guard your name, drop carried gold, wait one
turn, then pick up the gold again, the guard will move a step away
during the wait.  If you teleport away, the guard will seal vault
walls and then park himself on the one-square (so far) temporary
corridor adjacent to the vault wall.  Periodically he'll say "Move
along!" and the hero will hear it, regardless of location on the
level.  Unless you dig a corridor to rescue him, or one or more of
the vault's walls get breached again, he will never move.

The report emphasized that you could use this to steal the vault's
gold, but it relies on being able to teleport beyond the gaurd's
reach and if you can do that, you might as well do so before the
guard comes.  The stranded guard, and him saying "Move along!" when
no longer leading hero out of the vault, are more significant bugs.

Bonus fix:  if the game ends and the guard seals up the vault while
the hero is in a spot that gets fixed up (vault wall or temporary
corridor) don't give the "You are encased in the rock" message if
game end was due to death rather than quit.

5 years agoobject classes for wizard mode identify
PatR [Sat, 2 Feb 2019 02:40:45 +0000 (18:40 -0800)]
object classes for wizard mode identify

When ^I was changed to allow picking more than one item to make
its temporary identification become persistent, group accelators got
left out.  So to pick all potions, you needed to select them letter
by letter (or via '.' to select everything, then deselect non-potions
letter by letter).  Now you can use '!' to select all potions.

5 years agocuring deafness
PatR [Sat, 2 Feb 2019 02:24:23 +0000 (18:24 -0800)]
curing deafness

Make healing magic which cures blindness also cure deafness.  So,
drinking non-cursed potion of healing or any extra healing or full
healing; breathing fumes from blessed potion of healing or non-cursed
potion of extra healing or any potion of full healing; prayer reward
to cure blindness as a minor trouble.  (Doesn't affect unicorn horns
which already treat deafness and blindness as two distinct troubles
that are eligible to be cured.)

More of a missing feature than a bug fix, so I listed it in the new
features section of the fixes file.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Sat, 2 Feb 2019 00:23:44 +0000 (19:23 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoFix making fake leash object with leashmon set
Pasi Kallinen [Fri, 1 Feb 2019 16:19:00 +0000 (18:19 +0200)]
Fix making fake leash object with leashmon set

When farlooking at a leash glyph on a map, the fake object should never
have leashmon set. This happened when a mimic was on the same spot
and was mimicing a corpse or statue, due to leashmon and corpsenm
using the same field.

5 years agoFix logic error in stuck_in_wall
Pasi Kallinen [Fri, 1 Feb 2019 11:38:21 +0000 (13:38 +0200)]
Fix logic error in stuck_in_wall

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Fri, 1 Feb 2019 00:56:38 +0000 (19:56 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agomissing maybe_reset_pick update
PatR [Fri, 1 Feb 2019 00:50:17 +0000 (16:50 -0800)]
missing maybe_reset_pick update

Accidentally omitted from the commit for 'stale lock picking context'
8bf16b940e15cac75cea2a4de92738c90fa71688.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Fri, 1 Feb 2019 00:29:55 +0000 (19:29 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agostale lock picking context
PatR [Thu, 31 Jan 2019 23:50:12 +0000 (15:50 -0800)]
stale lock picking context

Lock context wasn't being cleared if it was for a container and that
container got destroyed.  Case discovered was forcelock() ->
breakchestlock() -> delobj() (sometimes the container is destroyed
rather than just breaking its lock) followed by #wizmakemap (replace
current level) and maybe_reset_pick() trying to check whether
xlock.box was being carried.  But being interrupted, destroying the
container or dropping it down a hole to ship it to another level, then
attempting to resume picking the lock would also find a stale pointer.

5 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Thu, 31 Jan 2019 23:22:55 +0000 (18:22 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

5 years agoFix warning
Pasi Kallinen [Thu, 31 Jan 2019 19:31:26 +0000 (21:31 +0200)]
Fix warning

Fix "using integer constants in boolean context"

5 years agoRevert "adjust sample config file when STATUS_HILITES isn't defined"
nhmall [Thu, 31 Jan 2019 18:03:00 +0000 (13:03 -0500)]
Revert "adjust sample config file when STATUS_HILITES isn't defined"

This reverts commit 03e6c26af6de62f6a970d5b0c9845f924bfc93f4.

5 years agofix monstone() ... dealloc_obj() panic
PatR [Thu, 31 Jan 2019 12:22:04 +0000 (04:22 -0800)]
fix monstone() ... dealloc_obj() panic

Fuzzer feebdack.  When turning a monster into a statue, monstone()
builds a linked list of mon->minvent items to put into that statue.
It doesn't use obj_extract_self() to take them off again, leaving
obj->nobj non-Null.  Not noticed for the normal case where each item
gets linked into the container's contents, but triggers panic if an
item merges with something already put inside so gets removed.

Suddenly, the dungeon collapses.
dealloc_obj with nobj
[2] 0x01000c4193 panic + 995
[3] 0x0100155427 dealloc_obj + 71
[4] 0x010021d4de obfree + 686
[5] 0x01000f2f92 merged + 834
[6] 0x010015356e add_to_container + 126
[7] 0x01001628ac monstone + 636

I don't know why the petrified monster's mergeable inventory wasn't
already merged while in inventory.

5 years agoOption handling return values and errors
Pasi Kallinen [Thu, 31 Jan 2019 08:46:41 +0000 (10:46 +0200)]
Option handling return values and errors

Fix some options not stopping when encountering an error,
some didn't show up any errors, and other minor fixes.

5 years agoSilence sprintf format warnings and dehardcode buffer sizes
Pasi Kallinen [Thu, 31 Jan 2019 07:42:03 +0000 (09:42 +0200)]
Silence sprintf format warnings and dehardcode buffer sizes

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Thu, 31 Jan 2019 04:11:49 +0000 (23:11 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoanother warning fix
PatR [Thu, 31 Jan 2019 00:25:31 +0000 (16:25 -0800)]
another warning fix

Only appeared when ISAAC64 was disabled.

5 years agorng bit
nhmall [Wed, 30 Jan 2019 16:08:11 +0000 (11:08 -0500)]
rng bit

5 years agoadd a descriptive comment to integer.h
nhmall [Wed, 30 Jan 2019 13:30:02 +0000 (08:30 -0500)]
add a descriptive comment to integer.h

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Wed, 30 Jan 2019 03:33:18 +0000 (22:33 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agofix a likely typo/transcription error in integer.h
nhmall [Wed, 30 Jan 2019 03:12:09 +0000 (22:12 -0500)]
fix a likely typo/transcription error in integer.h

5 years agofix build
nhmall [Wed, 30 Jan 2019 01:29:56 +0000 (20:29 -0500)]
fix build

../sys/unix/unixmain.c: In function ‘sys_random_seed’:
../sys/unix/unixmain.c:779:29: error: expected expression before ‘long’
         fread(&seed, sizeof long, 1, fptr);

5 years agorandrole() fix
PatR [Wed, 30 Jan 2019 01:14:55 +0000 (17:14 -0800)]
randrole() fix

Give all the calls to randrole() its new argument.

5 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Wed, 30 Jan 2019 01:03:21 +0000 (20:03 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

5 years agoupdate the long version info generated by makedefs
nhmall [Wed, 30 Jan 2019 01:01:31 +0000 (20:01 -0500)]
update the long version info generated by makedefs

5 years agolast warning fix
PatR [Tue, 29 Jan 2019 23:27:22 +0000 (15:27 -0800)]
last warning fix

Compiler gave four diagnostics about 'seed' being used uninitialized
if 'no_seed' were false, but two of those were alternate suggestions
for how to suppress them.

5 years agoanother warning fix
PatR [Tue, 29 Jan 2019 23:18:17 +0000 (15:18 -0800)]
another warning fix

Comparison between signed and unsigned.  Compiler stupidity since
the range of possible values that signed 'i' can take is limited and
never negative.

5 years agowarning fix
PatR [Tue, 29 Jan 2019 23:00:07 +0000 (15:00 -0800)]
warning fix

The new code provoked several warnings; this fixes one of them.
Moving the declaration of 'rolecount' would have been sufficient,
but I've gone another way.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 29 Jan 2019 22:23:03 +0000 (17:23 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agomore window port code uses of obj_to_glyph()
nhmall [Tue, 29 Jan 2019 22:21:55 +0000 (17:21 -0500)]
more window port code uses of obj_to_glyph()

5 years agotry fix for Qt4 using a core macro
nhmall [Tue, 29 Jan 2019 22:07:00 +0000 (17:07 -0500)]
try fix for Qt4 using a core macro

../win/Qt4/qt4inv.cpp:41:26: error: macro "obj_to_glyph" requires 2 arguments, but only 1 given
  glyph=obj_to_glyph(nhobj);
                          ^
../win/Qt4/qt4inv.cpp: In member function ‘void nethack_qt4::NetHackQtInvUsageWindow::drawWorn(QPainter&, obj*, int, int, bool)’:
../win/Qt4/qt4inv.cpp:41:8: error: ‘obj_to_glyph’ was not declared in this scope
  glyph=obj_to_glyph(nhobj);
        ^

5 years agobuild bits - mostly for Windows
nhmall [Tue, 29 Jan 2019 16:31:41 +0000 (11:31 -0500)]
build bits - mostly for Windows

Allow sys/share/random.c to be included in the build
always, even if USE_ISAAC64 is defined, by making most
of its contents conditional in that case.

That avoids Makefile tinkering when going back and
forth between USE_ISAAC64 and not during testing.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 29 Jan 2019 14:27:17 +0000 (09:27 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoWorkaround for including stdint.h on older GCC versions
Patric Mueller [Tue, 29 Jan 2019 14:03:07 +0000 (15:03 +0100)]
Workaround for including stdint.h on older GCC versions

GCC doesn't set __STDC_VERSION__ for older versions. It is verified to
be set by default on 5.3.0.

Older versions set __INT64_MAX__ though (oldest version tested is
4.5.4).

If compilation with older GCC versions is required, set -std=c99. Even
3.4.6 is supported with this setting.

5 years agofixes36.2 update for added isaac64 prng
nhmall [Tue, 29 Jan 2019 12:38:57 +0000 (07:38 -0500)]
fixes36.2 update for added isaac64 prng

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 29 Jan 2019 12:22:23 +0000 (07:22 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoMerge branch 'alex-and-isaac' into NetHack-3.6.2-beta01
nhmall [Tue, 29 Jan 2019 12:20:17 +0000 (07:20 -0500)]
Merge branch 'alex-and-isaac' into NetHack-3.6.2-beta01

5 years agoConsistently use rn2 in trap detection
Alex Smith [Tue, 29 Jan 2019 03:37:08 +0000 (03:37 +0000)]
Consistently use rn2 in trap detection

It's a gameplay-affecting action (it updates the character's
memory of the map), and there's no way to spam it without using
resources, so rn2 is safe.

5 years agoinclude the rnd.c bits
nhmall [Tue, 29 Jan 2019 00:54:18 +0000 (19:54 -0500)]
include the rnd.c bits

5 years agomerge Alex's dual rng proposal with the isaac64 rng code and adjust
nhmall [Tue, 29 Jan 2019 00:43:55 +0000 (19:43 -0500)]
merge Alex's dual rng proposal with the isaac64 rng code and adjust

This is branched from Alex's hallu-rng-stability branch,
with two build corrections (detect.c, zap.c), and merged
with  the isaac64 branch that we have ready to go.

Alex's dual rng is supported by setting up the array
of multiple isaac64 contexts.

I stuck with Alex's approach of passing the rng function
name around as the parameter (rng or rn2_on_display_rng)
for the new additional parameter needed for
set_random(), init_random(), reseed_random(),
and init_isaac64().

5 years agoMerge branch 'countermeasures' into alex-and-isaac
nhmall [Mon, 28 Jan 2019 23:37:50 +0000 (18:37 -0500)]
Merge branch 'countermeasures' into alex-and-isaac

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Mon, 28 Jan 2019 21:36:23 +0000 (16:36 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agofix #H8072 - failing wish segfaults
PatR [Mon, 28 Jan 2019 17:10:52 +0000 (09:10 -0800)]
fix #H8072 - failing wish segfaults

Having an artifact wish be refused uses zeroobj and code which
followed was attempting to update its weight, triggering a segfault
now that zeroobj is 'const'.

5 years agoMerge branch 'countermeasures' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Mon, 28 Jan 2019 14:45:31 +0000 (09:45 -0500)]
Merge branch 'countermeasures' of https://rodney.nethack.org:20040/git/NHsource into countermeasures

5 years agoWindows build bit
nhmall [Mon, 28 Jan 2019 14:44:35 +0000 (09:44 -0500)]
Windows build bit

5 years agoworkaround for C89 not supporting inline
Patric Mueller [Mon, 28 Jan 2019 14:00:04 +0000 (15:00 +0100)]
workaround for C89 not supporting inline

5 years agontconf.h ensure Rand is always something
nhmall [Sun, 27 Jan 2019 14:34:18 +0000 (09:34 -0500)]
ntconf.h ensure Rand is always something

order of preference:
USE_ISAAC64
RANDOM
C routine

5 years agodetect DEV_RANDOM fopen failure and fall back, noting it in paniclog
nhmall [Sat, 26 Jan 2019 16:26:02 +0000 (11:26 -0500)]
detect DEV_RANDOM fopen failure and fall back, noting it in paniclog

5 years agodetect rng seed strength at runtime based on algorithm not compile time based on...
nhmall [Fri, 18 Jan 2019 23:42:42 +0000 (18:42 -0500)]
detect rng seed strength at runtime based on algorithm not compile time based on platform features

5 years agoevery platform provides sys_random_seed() and SYS_RANDOM_SEED goes away
nhmall [Thu, 17 Jan 2019 23:30:56 +0000 (18:30 -0500)]
every platform provides sys_random_seed() and SYS_RANDOM_SEED goes away

5 years agoDon't define Rand() if isaac64 is used
Patric Mueller [Thu, 17 Jan 2019 10:48:58 +0000 (11:48 +0100)]
Don't define Rand() if isaac64 is used

5 years agodefine Rand() in isaac4 config
nhmall [Tue, 15 Jan 2019 01:36:50 +0000 (20:36 -0500)]
define Rand() in isaac4 config

Rand() was typically defined to random() or to rand().

gcc seems to provide a random() to link to on linux
when sys/share/random.c is linked in, but other platforms
such as Windows got an undefined refence to random()
when RANDOM wasn't defined.

The only direct use seems to be in get_rnd_txt() these
days, in rumors.c

Under the USE_ISAAC64 config, neither srandom()
nor srand() are being invoked to seed those routines,
and it really should be using isaac64 when USE_ISAAC64
is defined anyway.

5 years agosome system-specific adjustments for RNG routines
nhmall [Mon, 14 Jan 2019 01:54:11 +0000 (20:54 -0500)]
some system-specific adjustments for RNG routines

move some system-specific seed-related stuff from hacklib.c to
a system-specific source file and #define SYS_RANDOM_SEED to
utilize it during build.

Windows changes for random seed generation using
crypto next gen (CNG) api routines.

Corresponding vms changes due to disentangling of VMS and
unix when the unix seed bits got moved (untested).

5 years agointegrate isaac64 into nethack
Patric Mueller [Sun, 13 Jan 2019 15:36:55 +0000 (16:36 +0100)]
integrate isaac64 into nethack

Also removed the float code from isaac64 as they are not used in
NetHack.

5 years agoadd file for the isaac64 random number generator
Patric Mueller [Sat, 12 Jan 2019 20:36:08 +0000 (21:36 +0100)]
add file for the isaac64 random number generator

This is the version from the Comprehensive C Archive Network, licensed
under the CC0 "No Rights Reserved" Creative Common License.
http://ccodearchive.net/info/isaac.html

5 years agofix check for stdc version in include/integer.h
Patric Mueller [Sun, 13 Jan 2019 14:17:59 +0000 (15:17 +0100)]
fix check for stdc version in include/integer.h

5 years agoreseed during level change to prevent deduction of rng state
Patric Mueller [Fri, 11 Jan 2019 18:23:01 +0000 (19:23 +0100)]
reseed during level change to prevent deduction of rng state

For platforms that read from the system's random number generator,
reseed during level change, before the map of a new level is created and
after level creation has finished.

5 years agoread rng seed from random number source device
Patric Mueller [Fri, 11 Jan 2019 18:08:22 +0000 (19:08 +0100)]
read rng seed from random number source device

Linux and BSD system have random number source devices that can be used
as source for a unguessable seed source.

Other platforms fall back to generate the seed with gettime().

5 years agoDon't advance the main RNG during hallucination
Alex Smith [Mon, 28 Jan 2019 04:45:26 +0000 (04:45 +0000)]
Don't advance the main RNG during hallucination

This is based on the multiple-RNGs code fron NetHack4, but using
only the parts relevant to the display RNG (and with substantial
changes, both because of post-3.4.3 changes, and because Nethack4's
display code is based on Slash'EM's rather than NetHack's).

5 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Mon, 28 Jan 2019 00:22:28 +0000 (19:22 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

5 years agosimplify and correctly locate fixes entry
nhmall [Mon, 28 Jan 2019 00:16:55 +0000 (19:16 -0500)]
simplify and correctly locate fixes entry

5 years agoWine Cellar tweak
PatR [Sun, 27 Jan 2019 23:28:31 +0000 (15:28 -0800)]
Wine Cellar tweak

User-contributed fix; bypassed the contact form so no #Hnnnn number.

On the Gnome King's Wine Cellar version of Mines' End, a couple of
wall stubs in the lower far right were diggable, unlike all other
walls on the level.  One single-spot wall stub was leftmost of three
undiggable spots, wall+floor+stone.  The floor spot wasn't noticeably
different from normal (not sure whether digging a pit was prohibited)
but the stone one was.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Sun, 27 Jan 2019 17:08:05 +0000 (12:08 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agodomove_core() out of domove(); assess domove_core() results
nhmall [Sun, 27 Jan 2019 16:55:23 +0000 (11:55 -0500)]
domove_core() out of domove(); assess domove_core() results

new domove_core() assessment results

potentially smudge engravings

Proceed to wipe engraving after domove_core() now, but only under
all of the following conditions:
    - you can reach the floor
    - preceding domove_core() move attempt was marked as
      having succeeded in domove_core()
    - there is actually an engraving there to impact at
      your original spot, or your new spot, or both

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Sat, 26 Jan 2019 02:07:40 +0000 (21:07 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoband-aid for #H4041 - build warning: has_colors()
PatR [Thu, 24 Jan 2019 23:25:50 +0000 (15:25 -0800)]
band-aid for #H4041 - build warning: has_colors()

Since no one has come up with a better fix for has_colors() being
implicitly declared, add a hack for suppressing a compiler complaint
about has_colors() on linux and/or sco unix that use sufficiently old
<curses.h>.

Report was right after release of 3.6.0 but my fix at the time broke
compile when using more recent <curses.h>.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Thu, 24 Jan 2019 12:55:27 +0000 (07:55 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoFix make tileutils failure
Pasi Kallinen [Wed, 23 Jan 2019 16:17:48 +0000 (18:17 +0200)]
Fix make tileutils failure

OALLOC was used twice

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Wed, 23 Jan 2019 05:38:47 +0000 (00:38 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agofix #H6422 - hmonas against shades
PatR [Wed, 23 Jan 2019 02:15:49 +0000 (18:15 -0800)]
fix #H6422 - hmonas against shades

I did much of this quite some time ago, as prequisite for a different
bug report about monsters vs shades, then set it aside.  It ended up
being more complicated than I anticipated.

When deciding whether various non-weapon attacks might hit a shade,
hmonas() was not checking for blessed or silver armor that should have
been applicable.  It did check boots when kicking, but not gloves or
rings (when no gloves) when touching, or outermost of cloak/suit/shirt
when hugging, or helmet when head-butting.  (The last one is actually
moot because nothing with a head-butt attack is able to wear a helm.)

The problem was more general than just whether attacks might hit and
hurt shades.  Various undead and/or demons are also affected by blessed
and/or silver attack but weren't for non-weapon attacks by poly'd hero.

At least two unrelated bugs are fixed:  a rope golem's AT_HUGS attack
gives feedback about choking but was fully effective against monsters
which fail the can_be_strangled() test.  And it was possible to hug a
long worm's tail, rendering the entire worm immobile.

The report also suggested that all artifacts be able to hit shades for
full effect, but by the time shades are encountered everyone has an
artifact so that would nullify a shade's most interesting ability.

TODO:  monster against hero and monster against other monster need to
have similar changes.

5 years agovampshifter resurrection while being held
PatR [Wed, 23 Jan 2019 01:54:58 +0000 (17:54 -0800)]
vampshifter resurrection while being held

If poly'd hero is holding a bat/cloud/wolf which dies and revives as a
vampire, release the hold.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 22 Jan 2019 11:12:00 +0000 (06:12 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoshielding bashing
PatR [Tue, 22 Jan 2019 02:54:37 +0000 (18:54 -0800)]
shielding bashing

Extracted from a larger patch:  the only way to get silver damage
bonus from attacking with a shield of reflection (polished silver
shield) is to throw it or to wield it.  Give different feedback when
hitting something while wielding a shield (or an iron ball; it seemed
appropriate despite having nothing to due with wanting to dish out
silver damage).

5 years agohmonas() simulated twoweap
PatR [Tue, 22 Jan 2019 02:49:44 +0000 (18:49 -0800)]
hmonas() simulated twoweap

Regular two-weapon requires that both weapons actually be weapons or
at least weapon-tools.  Simulation of that while polymorphed allowed
any one-handed object as the primary weapon.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Mon, 21 Jan 2019 11:47:20 +0000 (06:47 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agoDon't try to write a zero-length message
Pasi Kallinen [Mon, 21 Jan 2019 09:54:03 +0000 (11:54 +0200)]
Don't try to write a zero-length message

If the message history contains a zero-length message line, skip it,
as trying to write a zero-length string will make bwrite panic.

Happened only on X11. This is post-3.6.1 bug.

5 years agoMake demon gating show a message
Pasi Kallinen [Sun, 20 Jan 2019 13:56:40 +0000 (15:56 +0200)]
Make demon gating show a message

This was both an accessibility and comprehensibility issue.

5 years agoWindows warning fix
nhmall [Sat, 19 Jan 2019 16:04:26 +0000 (11:04 -0500)]
Windows warning fix

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Fri, 18 Jan 2019 23:50:51 +0000 (18:50 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agofix #H7983 - inconsistent shop 'for sale' behavior
PatR [Fri, 18 Jan 2019 22:13:30 +0000 (14:13 -0800)]
fix #H7983 - inconsistent shop 'for sale' behavior

Items on floor in the free spot one step inside a shop's doorway were
showing shop sell prices.  Treat items on that spot as if they were
flagged no_charge as on the floor of other shop squares.

Report stated that sometimes they showed a 'for sale' price and
sometimes they didn't, but I didn't see any cases where they didn't.

5 years agofix #H7980 - multiple weapon attacks when poly'd
PatR [Fri, 18 Jan 2019 21:22:43 +0000 (13:22 -0800)]
fix #H7980 - multiple weapon attacks when poly'd

This fixes the weapon related aspects of #H7980:  having an alternate
weapon be used in cases where it shouldn't when polymorphed into a
monster form with multiple weapon attacks.  The most egregious was
using an off-hand artifact, but it would also use off-hand two-handed
weapon, off-hand silver weapon when in silver-hating form, or any
reasonable off-hand weapon when wearing a shield.  That last is iffy
whether or not to allow, since you'll still get the extra attacks
whether it switches to secondary weapon or stays with the primary.
I've made it re-use the primary since two-weapon mode doesn't allow
a shield.  The other oddity was being able to use the secondary
weapon on the second swing even if the first swing was weaponless.
I went with ingoring the secondary weapon if there's no primary one
or if the primary is two-handed.

Report included "cursed secondary doesn't weld" but that has nothing
to do with polymorph attacking.  I've changed that to drop the weapon
if you attack with it when it's cursed, similar to what happens when
secondary weapon becomes cursed while two-weaponing.

It also included "marilith's attacks beyond the second don't use any
weapon and can hit cockatrices without touching them".  A marilith has
two weapon attacks and then four claw attacks.  Claw attacks only use
the weapon if it hasn't been used yet, so marilith hits with primary,
secondary (or primary a second time if no secondary), claw, claw,
claw, claw and that's the intended behavior.  It is able to hit
cockatrices if wielding anything at all, same as a monster with just
a single attack.  Since it is impossible to wield six weapons or three
pairs of gloves, that has to be intended behavior too.  Playability
trumps realism even if it is silly to hit without a 3rd through 6th
weapon and be safe from touching the target due to the 1st weapon or
one pair of gloves.  [Situation is different from having no control
over unsafely biting something after making a safe weapon or claw
attack; perhaps a better solution would be to refrain from using the
four claw attacks when attacking something that is fatal to touch.]

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Thu, 17 Jan 2019 01:04:03 +0000 (20:04 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

5 years agofix #H6285 - flooreffects and deltrap panic
PatR [Wed, 16 Jan 2019 23:08:11 +0000 (15:08 -0800)]
fix #H6285 - flooreffects and deltrap panic

Reported 14 months ago, a monster reading a scroll of earth which
dropped a boulder that killed another monster in an adjacent pit
was giving credit/blame to the hero and could also trigger a panic.
If the monster was killed, the pit would be filled and deleted via
m_detach and then when flooreffects tried to delete the same trap,
it accessed freed memory and deltrap could panic.

5 years agoMerge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
nhmall [Tue, 15 Jan 2019 02:20:24 +0000 (21:20 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2