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.
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.
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.
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.
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.
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
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.
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
For extended monster detection, show the number of turns remaining
during enlightenment (wizard mode only). The value is also
available via #timeout but various enlightenment entries already do
something like this.
For confuse monster, show the number of hits left for glowing hands
(again, wizard mode only).
And for the latter, the 3.7 conditional status condition set up was
storing u.umconf, an unsigned int, into contests[bl_glowhands].test,
a boolean, so would yield the wrong value if glowing hands managed
to become high enough to be a multiple of 256 (assumes 8-bit char
for boolean).