]> granicus.if.org Git - nethack/log
nethack
3 years agocurses port
nhmall [Mon, 23 Aug 2021 01:04:19 +0000 (21:04 -0400)]
curses port

3 years agoreword fixes37.0 entry
nhmall [Sun, 22 Aug 2021 23:34:12 +0000 (19:34 -0400)]
reword fixes37.0 entry

3 years agoWindows VS build failure if DLB wasn't defined
nhmall [Sun, 22 Aug 2021 23:23:09 +0000 (19:23 -0400)]
Windows VS build failure if DLB wasn't defined

3 years agofix nhl_loadlua() failures on Windows
nhmall [Sun, 22 Aug 2021 23:15:03 +0000 (19:15 -0400)]
fix nhl_loadlua() failures on Windows

The [dlb_]fopen() requires an RDBMODE argument on Windows.
ftell(), fseek(), and fread() interactions can be problematic otherwise.

3 years agoPrevent impossible trying to find a door position
Pasi Kallinen [Sun, 22 Aug 2021 15:44:17 +0000 (18:44 +0300)]
Prevent impossible trying to find a door position

When random dungeon level generation looks for room walls
to place doors at (for joining corridors or creating niches),
it complained about impossible, if the shaped theme room
doesn't have a valid place for a door.

Make the position routine return FALSE and let the
caller deal with it...

Observed this with the small circular themeroom which had
all 4 valid positions already joined with corridors, and
the niche function tried to add a niche to the room.

3 years agoignore visual studio .user files
nhmall [Sun, 22 Aug 2021 12:12:50 +0000 (08:12 -0400)]
ignore visual studio .user files

3 years agotweak baby/gold dragon tile
PatR [Sun, 22 Aug 2021 06:13:26 +0000 (23:13 -0700)]
tweak baby/gold dragon tile

Make the "eyebrows" yellow instead of gray for male and female baby
and adult gold dragons.

3 years agofixes entry for gold dragon scales in bones
PatR [Sun, 22 Aug 2021 05:55:57 +0000 (22:55 -0700)]
fixes entry for gold dragon scales in bones

Closes pull request #577

3 years agoFix: gold dragon scale mail remained lit in bones
copperwater [Wed, 18 Aug 2021 03:32:18 +0000 (23:32 -0400)]
Fix: gold dragon scale mail remained lit in bones

This is caused by the bones-pile-making routine using artifact_light()
as a test for whether it needs to call end_burn. Gold dragon scale mail
uses artifact_light(), but only returns true when its owornmask is set.
But owornmask was getting zeroed right before artifact_light() is
called. Fix is to move it right after instead.

Tested that Sunsword is not affected by this (created bones while
wearing gold dragon scales and wielding Sunsword in a dark area; when
returning to them, no light was emitted from the gravesite) because it
always returns true in artifact_light() irrespective of owornmask.

3 years agoremove test bit
nhmall [Sun, 22 Aug 2021 02:51:39 +0000 (22:51 -0400)]
remove test bit

3 years agobuild issue without DLB defined
nhmall [Sun, 22 Aug 2021 02:47:55 +0000 (22:47 -0400)]
build issue without DLB defined

3 years agorecent in_use comment typo
PatR [Sat, 21 Aug 2021 20:18:48 +0000 (13:18 -0700)]
recent in_use comment typo

3 years agomore visual studio build tweaks
nhmall [Sat, 21 Aug 2021 19:53:21 +0000 (15:53 -0400)]
more visual studio build tweaks

3 years agofollow-up build fixes for Windows
nhmall [Sat, 21 Aug 2021 19:48:40 +0000 (15:48 -0400)]
follow-up build fixes for Windows

3 years agosanity checking: bypassed billed object destroyed
Pasi Kallinen [Sat, 21 Aug 2021 15:50:13 +0000 (18:50 +0300)]
sanity checking: bypassed billed object destroyed

3 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Sat, 21 Aug 2021 12:24:08 +0000 (08:24 -0400)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

3 years agosanity checking: obfree() vs obj->in_use
PatR [Sat, 21 Aug 2021 12:36:06 +0000 (05:36 -0700)]
sanity checking: obfree() vs obj->in_use

Drinking a potion sets the in_use flag so that it can be deleted
if found in a hangup save file.  That flag wasn't being cleared if
a shop-owned item is used up and goes onto the shop bill instead of
being discarded.  The recently revised object sanity checking was
complaining (turn after turn after turn until player paid for the
potion) that there was an object with its in_use bit set.

Restore only purges in_use objects in invent and didn't mess up
billing by getting rid such objects since they're on another list.

3 years agocompile NetHack-3.7 without makedefs-generated .h files
nhmall [Tue, 17 Aug 2021 18:43:29 +0000 (14:43 -0400)]
compile NetHack-3.7 without makedefs-generated .h files

This evolves and hopefully eases the game-build requirements by
removing game-compile dependencies on any header files generated
by the makedefs utility, including:

date.h dependency and its inclusion is removed and comparable functionality
is produced at runtime via new file src/date.c.

pm.h dependency and its inclusion is removed and comparable functionality is
produced by moving the monster definitions from monst.c into new header
file called monsters.h and altering them slightly. The former pm.h header
file #define PM_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

onames.h dependency and its inclusion is removed and comparable functionality
is produced by moving the object definitions from objects.c into new header
file called objects.h and altering them slightly. The former onames.h header
file #define values are now replaced with appropriate emitted enum entries
during the compiler preprocessing.

artilist.h has been slightly altered, and the former onames.h artifact-related
header file #define ART_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

makedefs can still produce date.h (makedefs -v), pm.h (makedefs -p), and
onames.h (makedefs -o) for reference purposes. They won't be used during
the compiler.

The other uses for makedefs remain. They are used to prepare external
file content that the game utilizes, not prerequisite code for the
compile:
    makedefs -d    (database)
    makedefs -r    (rumors)
    makedefs -h    (oracles)
    makedefs -s    (epitaphs, engravings, bogusmons)

date.c

Pull the code for date/time stamping from mdlib.c into date.c.
Set date.o to be dependent on source files, header files, and .o files
so that date.o is rebuilt from date.c when any of those changes, thus
ensuring an accurate date/time stamp. It also includes git sha
functionality formerly done by makedefs writing #define directives
into include/date.h. For unix it passes the git info on
the compile line for date.c (via sys/unix/hints/linux.2020, macOS.2020)

nethack --dumpenums (optional, but on by default)

Allow developer to obtain some internal enum values from NetHack
without having to resort to an external utility such as
makedefs.

Uncomment #define NODUMPENUMS in config.h to disable this.

The updates to sys/windows/Makefile.gcc have not been tested yet.

3 years agopotionbreathe's obj->in_use
PatR [Fri, 20 Aug 2021 22:11:24 +0000 (15:11 -0700)]
potionbreathe's obj->in_use

potionbreathe() uses obj->in_use as a flag to inhibit wielded unholy
water from being dropped in case that gets broken against a monster
and triggers the hero to change from human were-critter to beast were-
critter.  Reset that to zero if caller hasn't already set it to 1.

3 years agoohitmon: obfree vs delobj
PatR [Fri, 20 Aug 2021 22:06:05 +0000 (15:06 -0700)]
ohitmon: obfree vs delobj

Make missiles that aren't launched by the hero and that hit a monster
use the routine that protects the Amulet and invocation items against
being deleted.  I don't think there are any cases where this matters
because those items don't break when they hit something, but be more
cautious.

3 years agoshk.c formatting
PatR [Fri, 20 Aug 2021 22:01:36 +0000 (15:01 -0700)]
shk.c formatting

Mostly wrapping wide lines.  No change in behavior except one
impossible warning now ends in "?" instead of "??".

3 years agodelobj() rejection
PatR [Thu, 19 Aug 2021 21:55:22 +0000 (14:55 -0700)]
delobj() rejection

If the Amulet or an invocation item refuses to be deleted, make sure
the retained object doesn't get left with its in_use bit set.  I'm not
sure whether there are any cases where this matters.

3 years agotool_in_use()
PatR [Thu, 19 Aug 2021 21:20:43 +0000 (14:20 -0700)]
tool_in_use()

tool_in_use() [for the '(' and '*' commands] has nothing to do with
the obj->in_use bit, so rename it to tool_being_used().

3 years agosanity check false positive for obj->nomerge
PatR [Thu, 19 Aug 2021 20:08:22 +0000 (13:08 -0700)]
sanity check false positive for obj->nomerge

The luckstone in the Mines and the amulet of reflection or bag of
holding in Sokoban have their 'nomerge' bit set until they make
it into the hero's inventory.  So don't complain about them when
sanity_check is enabled.

3 years agowhen spellbook being read becomes cursed
PatR [Thu, 19 Aug 2021 00:40:09 +0000 (17:40 -0700)]
when spellbook being read becomes cursed

Revisit a 3.6.1 fix.  When the hero is occupied reading a spellbook
and something causes it to become cursed without interrupting (post-
Wizard harassment's malignant aura), always stop reading instead of
just when the book's bknown flag is already set.

3 years agoextended object sanity checking
PatR [Thu, 19 Aug 2021 00:17:14 +0000 (17:17 -0700)]
extended object sanity checking

When sanity checking is enabled, check objects for bits used as
temporary flags that should always be cleared by the time that a
sanity check pass gets made:  o.in_use, o.bypass, and o.nomerge.

Also, fix glob checking.  It was unintentionally placed within
the braces of ``if (obj->owornmask) { ... }'' so didn't actually
check globs except for the unlikely case when wielded in one of
the uwep/uswapwep/uquiver slots.

3 years agosome potion.c formatting bits
PatR [Wed, 18 Aug 2021 20:18:26 +0000 (13:18 -0700)]
some potion.c formatting bits

3 years agoOselect() for monster's weapon
PatR [Tue, 17 Aug 2021 23:31:14 +0000 (16:31 -0700)]
Oselect() for monster's weapon

Make the Oselect() macro less likely to accidentally interfere with
caller's if-then-else usage.

3 years ago[not] leashing long worm['s tail]
PatR [Tue, 17 Aug 2021 23:26:51 +0000 (16:26 -0700)]
[not] leashing long worm['s tail]

Leashing a long worm isn't allowed so leashing its tail isn't either.
Make the rejection message be more specific for the tail case.

3 years agoLua: diagonals for selection floodfill
Pasi Kallinen [Sun, 15 Aug 2021 10:50:28 +0000 (13:50 +0300)]
Lua: diagonals for selection floodfill

3 years agoQt: deprecation warnings, again
Pasi Kallinen [Sun, 15 Aug 2021 07:58:39 +0000 (10:58 +0300)]
Qt: deprecation warnings, again

Check Qt version for the QFontMetrics::width vs horizontalAdvance.
Of course can't just #define horizontalAdvance to width, that would
be too easy ...

3 years agofix some VS warnings that recently appeared
nhmall [Sat, 14 Aug 2021 19:36:54 +0000 (15:36 -0400)]
fix some VS warnings that recently appeared

  ..\src\explode.c(884): warning C4028: formal parameter 1 different from declaration

  That one stems from commit 6b60618e0e.
  Adjust the prototype in include/extern.h to match the function definition in
  src/explode.c

  Also, a recent update to the Microsoft Visual Studio 2019 causes the
  compiler to complain while compiling a vendor c++ header (string) if
  warning C4774 is enabled.

  We force that warning to be enabled during the Makefile build, even though
  it is not enabled by default.

  Only do so in the Makefile.msc for c source files, and not for c++
  (sys/share/cppregex.cpp).

  See below for an example of the compiler complaint.

  cppregex.cpp
  C:\Program Files (x86)\Microsoft Visual
  Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\string(530):
  warning C4774: '_scprintf' : format string expected in argument 1 is
  not a string literal
  C:\Program Files (x86)\Microsoft Visual
  Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\string(530):
  note: e.g. instead of printf(name); use printf("%s", name); because
  format specifiers in 'name' may pose a security issue
  C:\Program Files (x86)\Microsoft Visual
  Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\string(530):
  note: consider using constexpr specifier for named string literals
  C:\Program Files (x86)\Microsoft Visual
  Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\string(583):
  note: see reference to function template instantiation 'std::string
  std::_Floating_to_string<float>(const char *,_Ty)' being compiled
          with
[
   _Ty=float
]

3 years agoQt: Fix Qt5 deprecation warnings
Pasi Kallinen [Sat, 14 Aug 2021 18:03:13 +0000 (21:03 +0300)]
Qt: Fix Qt5 deprecation warnings

Mostly the warnings were about QString::sprintf and QFontMetrics::width.
sprintf replacement is asprintf, which annoyingly behaves differently
from sprintf - it seems to append to the string.

Not thoroughly tested, but seems to work.

3 years agodefsym.h comment update
nhmall [Sat, 14 Aug 2021 13:16:27 +0000 (09:16 -0400)]
defsym.h comment update

3 years agomore sym-related content into single place
nhmall [Sat, 14 Aug 2021 12:33:38 +0000 (08:33 -0400)]
more sym-related content into single place

3 years agoFix eels hiding when a pool boiled off
Pasi Kallinen [Sat, 14 Aug 2021 10:33:04 +0000 (13:33 +0300)]
Fix eels hiding when a pool boiled off

Sanity check caught an eel hiding on floor; this was caused by
an exploding flaming sphere boiling off the pool the eel was
hiding in. The freezing water case was already handled, so
add the same, rather lackluster handling, to the fire case.

3 years agolookaround comments
Pasi Kallinen [Thu, 12 Aug 2021 16:38:26 +0000 (19:38 +0300)]
lookaround comments

trying to figure this out

3 years agomore defsym.h comment adjustments
nhmall [Thu, 12 Aug 2021 14:00:23 +0000 (10:00 -0400)]
more defsym.h comment adjustments

3 years agocomment correction in defsym.h
nhmall [Thu, 12 Aug 2021 13:21:06 +0000 (09:21 -0400)]
comment correction in defsym.h

3 years agofixes37.0 entry for pull request 574 (from entrez)
nhmall [Thu, 12 Aug 2021 13:12:58 +0000 (09:12 -0400)]
fixes37.0 entry for pull request 574 (from entrez)

3 years agoMerge branch 'trapdoor-consistency' of https://github.com/entrez/NetHack into pr574
nhmall [Thu, 12 Aug 2021 12:55:29 +0000 (08:55 -0400)]
Merge branch 'trapdoor-consistency' of https://github.com/entrez/NetHack into pr574

3 years agoFix up msgs when dropping obj on trapdoor
Michael Meyer [Wed, 11 Aug 2021 00:21:11 +0000 (20:21 -0400)]
Fix up msgs when dropping obj on trapdoor

Messages for dropping an object on a trapdoor or hole seemed to
imply they still operate by the rules of a pit (that any object on the
same square as the trap is automatically inaccessible).  Since this is
no longer true for trapdoors and holes as of 1b7c372f, it seems
misleading to say an item "tumbles into the hole" even when it doesn't
fall through and stays on the current level.

Even for an item which really did fall through to the level below, these
messages were redundant since they were immediately followed by
near-identical messages from down_gate(dokick.c).

Limit the "tumbles into the pit" messages to pits only, and rely on the
standard down_gate message for items which fall through a trap door
or hole.

3 years agoPermit blind feeling for objects on trapdoor
Michael Meyer [Wed, 11 Aug 2021 00:14:27 +0000 (20:14 -0400)]
Permit blind feeling for objects on trapdoor

Items on a trap door or on the edge of a hole are accessible (they can
be picked up, kicked, etc), but these locations were considered
inaccessible for purposes of feeling the ground for objects while blind.

3 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Tue, 10 Aug 2021 18:24:07 +0000 (14:24 -0400)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

3 years agocomment typo
nhmall [Tue, 10 Aug 2021 18:01:29 +0000 (14:01 -0400)]
comment typo

3 years agoMerge branch 'defsym' into NetHack-3.7
nhmall [Tue, 10 Aug 2021 17:38:35 +0000 (13:38 -0400)]
Merge branch 'defsym' into NetHack-3.7

3 years agoheader files sym.h and defsym.h
nhmall [Sun, 8 Aug 2021 16:29:46 +0000 (12:29 -0400)]
header files sym.h and defsym.h

There were multiple symbol-related lists that had to be kept
in sync in various places.

Consolidate some of that into a single new file
    defsym.h
with a set of morphing macros that can be custom-called from
the various places that use the sym info without maintaining
multiple occurrences. Most maintenance can be done there.

Rename monsym.h to sym.h since it looks after some
symbols not related to monsters now too.

The defsym.h header file is included in multiple places to
produce different code depending on its use and the controlling
macro definitions in place prior to including it.

Its purpose is to have a definitive source for
pchar, objclass and mon symbol maintenance.

The controlling macros used to morph the resulting code are
used in these places:
  - in include/sym.h for enums of some S_ symbol values
    (define PCHAR_ENUM, MONSYMS_ENUM prior to #include defsym.h)
  - in include/objclass.h for enums of some S_ symbol values
    (define OBJCLASS_ENUM prior to #include defsym.h)
  - in src/symbols.c for parsing S_ entries in config files
    (define PCHAR_PARSE, MONSYMS_PARSE, OBJCLASS_PARSE prior
    to #include defsym.h)
  - in src/drawing.c for initializing some data structures/arrays
    (define PCHAR_DRAWING, MONSYMS_DRAWING, OBJCLASS_DRAWING prior
    to #include defsym.h)
  - in win/share/tilemap.c for processing a tile file
    (define PCHAR_TILES prior to #include defsym.h).

3 years agoUse mon_visible
Pasi Kallinen [Mon, 9 Aug 2021 16:16:36 +0000 (19:16 +0300)]
Use mon_visible

3 years agoMove movement tests
Pasi Kallinen [Mon, 9 Aug 2021 13:13:09 +0000 (16:13 +0300)]
Move movement tests

Rushing will go along a snaking corridor.

3 years agoMore movement tests
Pasi Kallinen [Sun, 8 Aug 2021 16:30:56 +0000 (19:30 +0300)]
More movement tests

Rush behaves different in ROOM vs CORR; in corridors, it'll
turn 90 degrees, but will not go in the opposite direction
from when it started.

3 years agotty: use bright colors directly on supporting terminals
Patric Mueller [Mon, 2 Aug 2021 23:03:30 +0000 (01:03 +0200)]
tty: use bright colors directly on supporting terminals

Terminals supporting more than 8 colors can directly display the bright
colors (upper 8 colors of the 16 color palette).

The tty port now only uses bold for displaying bright colors as a fallback to
previous behavior for terminals with 8 colors.

3 years agofix github issue #564 - unicorn vs displaced hero
PatR [Sat, 7 Aug 2021 00:59:53 +0000 (17:59 -0700)]
fix github issue #564 - unicorn vs displaced hero

Unicorns attempted to avoid being in direct line with the hero's
actual location even when displacement causes unicorn to think hero
was at some other spot.  Change to avoid lining up with presumed
location even if that leaves the monster lined up with the hero.

While in mon.c, reorder the static function declarations near the
beginning of the file to match their order within it.

Fixes #564

3 years agotribute update: The Amazing Maurice
PatR [Fri, 6 Aug 2021 00:44:04 +0000 (17:44 -0700)]
tribute update:  The Amazing Maurice

Add four new passages to The Amazing Maurice and His Educated Rodents,
bringing total to 14.

When wishing, accept truncated title "The Amazing Maurice" as well as
the full title.

3 years agodescription of stair destination for level 1 up
PatR [Thu, 5 Aug 2021 20:46:20 +0000 (13:46 -0700)]
description of stair destination for level 1 up

Having the opposite side of the stairs up from level 1 be unknown is
weird because the hero conceptually just came down those stairs at
the start of the game.  But it's tricky because remote destination
varies depending on whether the Amulet is being carried.  This gives
an accurate description of where the stairs lead (if you step on
them with the 'mention_decor' option On, or use the ':' command when
already on them).

|"There is a staircase up out of the dungeon here."
or
|"There is a branch staircase up to the Elemental Planes here."

It gives away a little information when carrying the Amulet, but not
much and anyone who gets that far deserves a break.

3 years agofix engraving with miscellaneous items
PatR [Thu, 5 Aug 2021 19:32:30 +0000 (12:32 -0700)]
fix engraving with miscellaneous items

Reported directly to devteam:  when selecting an item to engrave
with, "getobj refactor"'s stylus_ok() classified none-of-the-above
objects as not viable instead of allowing arbitrary things to
engrave in the dust or give specific can't-use-that messages like
for food.  Make the suggested fix:  change default result when
checking an inventory item for applicability from GETOBJ_EXCLUDE
to GETOBJ_DOWNPLAY.

Engrave feedback rather than getobj selection:  splash of venom
isn't necessarily wizard mode-only so don't reject attempting to
engrave with it as using an illegal object.  And remove the extra
question mark from its "poison pen" message.

3 years agowizard mode light source bug
PatR [Wed, 4 Aug 2021 20:26:56 +0000 (13:26 -0700)]
wizard mode light source bug

In wizard mode if you're already polymorphed and you choose your
role's form when polymorphing again, polyself() calls rehumanize()
to restore your original shape.  rehumanize() turns off any light
the hero is emitting from polymorph form.  After it returned,
polyself() then tried to do the same thing based on a cached value.
If the previous form had been emitting light, that resulted in an
impossible() warning "del_light_source: not found type=1, id=N".

Couldn't happen in normal play because a request to polymorph into
any role monster is usually rejected; it's only honored in wizard
mode for current role.  Noticed when testing something while in
gold dragon form but this bug predates addition of that monster.

Clear the cached value when rehumanize() returns to polyself().

3 years agoNetHackW before and after tile additions
nhmall [Wed, 4 Aug 2021 19:48:17 +0000 (15:48 -0400)]
NetHackW before and after tile additions

The NetHackW.res file wasn't being forced to be rebuilt if
the tiles were changed as they were recently.

Fix the Makefile.msc dependency so that it is.
Also have 'nmake clean' clear the generated *.res files.

3 years agoSlightly better stone tile
Pasi Kallinen [Wed, 4 Aug 2021 10:58:49 +0000 (13:58 +0300)]
Slightly better stone tile

Replacing the placeholder stone tile with something that has
similar color scheme to the dungeon walls.

3 years agofix github issue #562 - baby gold dragon
PatR [Tue, 3 Aug 2021 22:00:03 +0000 (15:00 -0700)]
fix github issue #562 - baby gold dragon

wouldn't grow up into gold dragon because the pairing was omitted
from the little-to-big list.

Fixes #562

3 years agodiagonal movement glitch
PatR [Tue, 3 Aug 2021 00:44:03 +0000 (17:44 -0700)]
diagonal movement glitch

|..X..
|.X}X.
|..X..
When testing the odd Samuari moats, I discovered that you could
easily walk diagonally between any two of the solid stone pillars
and fall into the water but you would always drown because it's a
no-teleport level and the crawl routine wouldn't let you back out
via that same diagonal.

The crawl routine is also being used by travel for the last step--a
post 3.6 change--so there was an unnecessary restriction on diagonal
movement there too.

3 years agoSamurai "moat"
PatR [Tue, 3 Aug 2021 00:40:28 +0000 (17:40 -0700)]
Samurai "moat"

Samurai home level has two isolated moat spots, each within a set
of four solid stone pillars (depicted here as 'X' instead of blank).
|..X..
|.X}X.
|..X..

Having them be described as "moat" looked pretty silly.  Keep them
moat but special case their description to be "water".  It would be
simpler to change them to be pools, but that would make a slight
change in behavior (pools can be boiled away to become pits, moats
can't; probably should have made the simpler change anyway...).

3 years agotribute update: The Last Hero
PatR [Sat, 31 Jul 2021 00:28:00 +0000 (17:28 -0700)]
tribute update: The Last Hero

Add six passages, bringing total to 13.

3 years agoknown_branch_stairs
PatR [Fri, 30 Jul 2021 21:11:26 +0000 (14:11 -0700)]
known_branch_stairs

New routine known_branch_stairs() was performing two different things
and was unnecessarly complicated because of that.  Split off newer
routine stairs_description() to handle one of those.

3 years agoImplement wishing for walls in wizmode
Pasi Kallinen [Fri, 30 Jul 2021 17:50:45 +0000 (20:50 +0300)]
Implement wishing for walls in wizmode

3 years agoReveal branch stairs only after traversing them
Pasi Kallinen [Fri, 30 Jul 2021 16:32:26 +0000 (19:32 +0300)]
Reveal branch stairs only after traversing them

3 years agoMore movement tests
Pasi Kallinen [Fri, 30 Jul 2021 15:40:57 +0000 (18:40 +0300)]
More movement tests

3 years agoMore movement tests
Pasi Kallinen [Fri, 30 Jul 2021 15:09:28 +0000 (18:09 +0300)]
More movement tests

3 years agoDebug flag allowing overwriting stairs
Pasi Kallinen [Fri, 30 Jul 2021 13:35:33 +0000 (16:35 +0300)]
Debug flag allowing overwriting stairs

And using it in the movement tests, so running doesn't stop
at stairs.

3 years agoRemove unused params
Pasi Kallinen [Fri, 30 Jul 2021 12:35:00 +0000 (15:35 +0300)]
Remove unused params

3 years agounrevert some unintentionally reverted bands
nhmall [Thu, 29 Jul 2021 20:01:55 +0000 (16:01 -0400)]
unrevert some unintentionally reverted bands

fixes #560

3 years agoTry fixing interrupted travel oddities
Pasi Kallinen [Thu, 29 Jul 2021 18:18:20 +0000 (21:18 +0300)]
Try fixing interrupted travel oddities

My earlier commit (433f0cc) changed traveling, and caused some
strange problems when travel was interrupted. This seems to
fix those problems.

3 years agowizard mode ^T
PatR [Thu, 29 Jul 2021 17:25:18 +0000 (10:25 -0700)]
wizard mode ^T

Noticed while testing the stair labeling, knowing the teleport away
spell (and without innate teleport ability--not sure whether that's
a factor), using ^T always attempted to cast the spell, even if you
used m^T to explicitly request wizard mode telport on demand.  Since
my samurai had no chance to cast such a high level spell, I couldn't
use ^T any more.

With a different character, I ended up with 15(2) energy after a ^T
attempt failed.  I've put in a fix for this but after the other one
I don't think it matters.

3 years agoAllow meta-keys in getloc
Pasi Kallinen [Thu, 29 Jul 2021 11:43:41 +0000 (14:43 +0300)]
Allow meta-keys in getloc

Fix altmeta again, to (re)allow meta-keys in getloc, for example
fast-moving the cursor with altmeta and number_pad.

3 years agoconcealing unknown branch stairs
PatR [Thu, 29 Jul 2021 10:32:58 +0000 (03:32 -0700)]
concealing unknown branch stairs

First cut at displaying branch stairs/ladder up/down as ordinary
stairs/ladder up/down if the destination hasn't been visited yet.

Stepping on stairs with 'mention_decor' enabled, or using ':' when
already on them, will report regular stairs' destination level.
Probably not very useful since it's just N+1 for downstairs or N-1
for upstairs when currently on level N.

It's based on whether the destination level has been visited, not
on whether the stairs have been traversed, so reaching a level via
trap or level teleporation can make the level's stairs known when
their destination really shouldn't be discovered yet.

3 years agoLua: Allow setting debug_flags
Pasi Kallinen [Thu, 29 Jul 2021 04:36:08 +0000 (07:36 +0300)]
Lua: Allow setting debug_flags

3 years agogoto_level parameters
PatR [Wed, 28 Jul 2021 23:59:45 +0000 (16:59 -0700)]
goto_level parameters

Don't want this comment bit to get mixed up with some other stuff
I'm working on.

3 years agofix #K2154 - monster wearing alchemy smock
PatR [Wed, 28 Jul 2021 20:45:56 +0000 (13:45 -0700)]
fix #K2154 - monster wearing alchemy smock

For the hero, a worn alchemy smock confers both poison resistance
and acid resistance.  For monsters, it was only conferring poison
resistance.  Change ut to add acid resistance too.

3 years agoAdd more movement tests
Pasi Kallinen [Wed, 28 Jul 2021 17:47:12 +0000 (20:47 +0300)]
Add more movement tests

3 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Wed, 28 Jul 2021 16:24:07 +0000 (12:24 -0400)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

3 years agoStart of movement tests
Pasi Kallinen [Wed, 28 Jul 2021 16:11:30 +0000 (19:11 +0300)]
Start of movement tests

Adds the following lua functions:

- nh.pushkey("x")
    Pushes a key into the command queue. Support is spotty,
    currently only the keys handled in rhack.
- nh.doturn()
    Runs one turn of main loop, or if optional boolean param
    is true, until g.multi == 0
- nh.monster_generation(false)
    Disable monster generation, and kill off all monsters.

Adds a testmove.lua script to test hero movement. Currently
covers only hjklyubn and HJKLYUBN.

3 years agoFix: crash when appending to long engraving
Michael Meyer [Thu, 22 Jul 2021 00:07:28 +0000 (20:07 -0400)]
Fix: crash when appending to long engraving

If an engraving was appended to repeatedly, it could eventually exceed
BUFSZ and cause a crash.  Add some checks to prevent this from happening
and inform the player when she runs out of space to engrave on a
particular square.

3 years agoAdd branch stairs to symbols
Pasi Kallinen [Wed, 28 Jul 2021 04:57:16 +0000 (07:57 +0300)]
Add branch stairs to symbols

3 years agoExplicitly set the altlabels array size
Pasi Kallinen [Wed, 28 Jul 2021 04:45:21 +0000 (07:45 +0300)]
Explicitly set the altlabels array size

This will allow the compiler to complain after you add new glyphs.

3 years agotypo
nhmall [Tue, 27 Jul 2021 19:56:47 +0000 (15:56 -0400)]
typo

3 years agobe explicit on the array name in tiletext.c
nhmall [Tue, 27 Jul 2021 19:55:04 +0000 (15:55 -0400)]
be explicit on the array name in tiletext.c

3 years agocron daily Guidebook.txt update
nhmall [Tue, 27 Jul 2021 19:40:16 +0000 (15:40 -0400)]
cron daily Guidebook.txt update

3 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Tue, 27 Jul 2021 19:37:18 +0000 (15:37 -0400)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

3 years agotile-build follow-up for new CMAP entries
nhmall [Tue, 27 Jul 2021 19:36:04 +0000 (15:36 -0400)]
tile-build follow-up for new CMAP entries

3 years agounfixed bug #H2668 - hitting disenchanter w/ rings
PatR [Tue, 27 Jul 2021 19:31:32 +0000 (12:31 -0700)]
unfixed bug #H2668 - hitting disenchanter w/ rings

From 8 or so years ago, hitting a disenchanter without wielding a
weapon and without wearing gloves while wearing a possitively
'charged' ring should reduce the ring's enchantment.  This doesn't
fix that, it just adds a brief comment about it.

3 years agofix #H2797 - avoid "vision clears" if hero can't see
PatR [Tue, 27 Jul 2021 19:29:46 +0000 (12:29 -0700)]
fix #H2797 - avoid "vision clears" if hero can't see

From 8 years ago, sitting on a throne and getting the confers-see-
invisible result gave "your vision becomes clear" message even when
hero was blind (who stays blind at the time).  Give an alternate
message if hero is blind, with another alternate when the blindless
is due to being poly'd into something without eyes.

3 years agodrowning monster's [lack of] corpse
PatR [Tue, 27 Jul 2021 19:18:55 +0000 (12:18 -0700)]
drowning monster's [lack of] corpse

From the newsgroup 6.5 years ago,
| Subject: Re: Reviving drowned pets impossible
if you displaced your pet into water and it drowned, it would never
leave a corpse.  That seems to be moot these days because a pet or
peaceful monster which would drown will refuse to swap places, but
change corpse handling anyway.

3 years agogaze vs hider
PatR [Tue, 27 Jul 2021 18:58:44 +0000 (11:58 -0700)]
gaze vs hider

From a 7 or 8 year old bug report from a beta tester.  A pyrolisk's
gaze against a mimic didn't unhide that mimic.  Somewhere along the
line that has been fixed, but some apparently redundant code inside
'if (visible)' should be done even when not visible.

3 years agodate bump to match 267ac5 update to Guidebook source
nhmall [Tue, 27 Jul 2021 18:47:46 +0000 (14:47 -0400)]
date bump to match 267ac5 update to Guidebook source

3 years agoaltmeta revisited
PatR [Tue, 27 Jul 2021 18:03:20 +0000 (11:03 -0700)]
altmeta revisited

Put the flag that parse() uses to tell readchar() that the next
keystroke is a command into the program_state structure instead of
having it be a static variable in cmd.c.  Conceivably an interface
could make use of it, and even if none do, it is program state....

More #558

3 years agoIncrement editlevel
Pasi Kallinen [Tue, 27 Jul 2021 15:56:46 +0000 (18:56 +0300)]
Increment editlevel

Added the new branch stairs glyphs, forgot to increment editlevel.

3 years agoAdd colored branch stairs
Pasi Kallinen [Tue, 27 Jul 2021 14:11:02 +0000 (17:11 +0300)]
Add colored branch stairs

Different color for stairs that go to another dungeon branch.

Adds four new glyphs, S_br{up,dn}{stair,ladder}, which use the
same character as normal stairs/ladders, but yellow color.
In tiles, the up/down arrow is yellow-green instead of while-blue.

This feature has been around a lot and is in several different
variants, but this is implemented from scratch so tiles work too.

3 years agoBugle playing should not scare some monsters
Pasi Kallinen [Mon, 26 Jul 2021 18:40:19 +0000 (21:40 +0300)]
Bugle playing should not scare some monsters

Make awaken_soldiers match awaken_monsters in what monsters
it can scare.

3 years agoAdd more shop tests
Pasi Kallinen [Sun, 25 Jul 2021 19:52:42 +0000 (22:52 +0300)]
Add more shop tests

3 years agofix github issue #558 - 'altmeta' input
PatR [Sun, 25 Jul 2021 17:52:11 +0000 (10:52 -0700)]
fix github issue #558 - 'altmeta' input

Setting the 'altmeta' option affects how ESC is handled.  Normally it
is for terminals/emulators which transmit two character sequence ESC c
when the user types Meta+c, but it can also be used to construct meta
characters 'manually' by typing ESC c.  Unfortunately setting this
option has a side-effect of requiring a second character after ESC
before our readchar() will return, so it is only honored when parse()
wants the next command, not for general input.

When readchar() was recently split into two parts, the use of static
variable 'alt_esc' by parse() and readchar() was removed.  That
resulted in requiring the user to type a second character whenever
ESC was typed, instead of just when it was transmitted or typed as
the prefix of a command that uses a meta-character keystroke.

Instead of just putting 'alt_esc' back, do things differently by
adding static 'getting_cmd' flag instead.

Fixes #558

3 years agoHide internal commands from key list
Pasi Kallinen [Sun, 25 Jul 2021 08:57:09 +0000 (11:57 +0300)]
Hide internal commands from key list