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.
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.
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).
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.
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
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.
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.
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.
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().
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.
|..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.
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...).
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.
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.
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.
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.
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.
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.