Commit Graph

12211 Commits

Author SHA1 Message Date
nhmall
1335eef674 more defsym.h comment adjustments 2021-08-12 10:00:23 -04:00
nhmall
8fb251c65d comment correction in defsym.h 2021-08-12 09:21:06 -04:00
nhmall
de9acca911 fixes37.0 entry for pull request 574 (from entrez) 2021-08-12 09:12:58 -04:00
nhmall
e9ec17f68a Merge branch 'trapdoor-consistency' of https://github.com/entrez/NetHack into pr574 2021-08-12 08:55:29 -04:00
Michael Meyer
a9358eb13d 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.
2021-08-11 08:57:53 -04:00
Michael Meyer
a326f622f6 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.
2021-08-10 20:14:27 -04:00
nhw_cron
d4e9793f93 This is cron-daily v1-Jan-20-2020. files updated: Files 2021-08-10 14:30:42 -04:00
nhmall
9205a0183b comment typo 2021-08-10 14:01:29 -04:00
nhmall
c1af74d8f0 Merge branch 'defsym' into NetHack-3.7 2021-08-10 13:38:35 -04:00
nhmall
2baadd6a29 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).
2021-08-10 13:35:25 -04:00
Pasi Kallinen
7a9dd64cb5 Use mon_visible 2021-08-09 19:16:36 +03:00
Pasi Kallinen
1c401960aa Move movement tests
Rushing will go along a snaking corridor.
2021-08-09 16:13:12 +03:00
Pasi Kallinen
f5b617eaca 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.
2021-08-08 19:30:59 +03:00
Patric Mueller
456e62ef1f 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.
2021-08-07 11:53:36 +02:00
PatR
62e09ae9f3 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
2021-08-06 17:59:53 -07:00
PatR
828cbcf4ab 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.
2021-08-05 17:44:04 -07:00
PatR
8a6c48034f 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.
2021-08-05 13:46:20 -07:00
PatR
91ee7f28ee 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.
2021-08-05 12:32:30 -07:00
PatR
fdf0bfd8a4 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().
2021-08-04 13:26:56 -07:00
nhmall
e16b98b61d 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.
2021-08-04 15:48:17 -04:00
Pasi Kallinen
c9d075910e Slightly better stone tile
Replacing the placeholder stone tile with something that has
similar color scheme to the dungeon walls.
2021-08-04 13:58:54 +03:00
PatR
1e7155df0c 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
2021-08-03 15:00:03 -07:00
PatR
e5f96cd329 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.
2021-08-02 17:44:03 -07:00
PatR
5e4150be9a 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...).
2021-08-02 17:40:28 -07:00
PatR
ef17c0fa82 tribute update: The Last Hero
Add six passages, bringing total to 13.
2021-07-30 17:28:00 -07:00
PatR
8e3fbb3588 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.
2021-07-30 14:11:26 -07:00
Pasi Kallinen
de73a32d7d Implement wishing for walls in wizmode 2021-07-30 20:52:46 +03:00
Pasi Kallinen
d463a9e258 Reveal branch stairs only after traversing them 2021-07-30 19:40:54 +03:00
Pasi Kallinen
4f594659dc More movement tests 2021-07-30 18:40:57 +03:00
Pasi Kallinen
78854aeda6 More movement tests 2021-07-30 18:09:28 +03:00
Pasi Kallinen
b080ea12c2 Debug flag allowing overwriting stairs
And using it in the movement tests, so running doesn't stop
at stairs.
2021-07-30 16:35:36 +03:00
Pasi Kallinen
5580cd6286 Remove unused params 2021-07-30 15:35:00 +03:00
nhmall
cf2475285d unrevert some unintentionally reverted bands
fixes #560
2021-07-29 16:01:55 -04:00
Pasi Kallinen
c0c617c413 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.
2021-07-29 21:21:28 +03:00
PatR
1ada454fbe 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.
2021-07-29 10:25:18 -07:00
Pasi Kallinen
4007640882 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.
2021-07-29 14:43:46 +03:00
PatR
f2019e2ec6 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.
2021-07-29 03:32:58 -07:00
Pasi Kallinen
7bfbe0fba9 Lua: Allow setting debug_flags 2021-07-29 07:36:08 +03:00
PatR
bb23c4f557 goto_level parameters
Don't want this comment bit to get mixed up with some other stuff
I'm working on.
2021-07-28 16:59:45 -07:00
PatR
0891ef4e22 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.
2021-07-28 13:45:56 -07:00
Pasi Kallinen
19599fa751 Add more movement tests 2021-07-28 20:47:12 +03:00
nhw_cron
12c204e73a This is cron-daily v1-Jan-20-2020. files updated: Files 2021-07-28 12:42:12 -04:00
Pasi Kallinen
65b320de39 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.
2021-07-28 19:19:40 +03:00
Michael Meyer
fa8c3f82be 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.
2021-07-28 16:33:25 +03:00
Pasi Kallinen
b16c3732cb Add branch stairs to symbols 2021-07-28 07:57:16 +03:00
Pasi Kallinen
2775a07e5b Explicitly set the altlabels array size
This will allow the compiler to complain after you add new glyphs.
2021-07-28 07:45:25 +03:00
nhmall
7c4244edf7 typo 2021-07-27 15:56:47 -04:00
nhmall
67ca460356 be explicit on the array name in tiletext.c 2021-07-27 15:55:04 -04:00
nhmall
30ede24d98 cron daily Guidebook.txt update 2021-07-27 15:40:16 -04:00
nhmall
e2f28f3a08 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2021-07-27 15:37:18 -04:00