Commit Graph

12193 Commits

Author SHA1 Message Date
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
nhmall
43e3ea2836 tile-build follow-up for new CMAP entries 2021-07-27 15:36:04 -04:00
PatR
81b3b56296 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.
2021-07-27 12:31:32 -07:00
PatR
068fa6c658 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.
2021-07-27 12:29:46 -07:00
PatR
3c49cd2074 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.
2021-07-27 12:18:55 -07:00
PatR
e3712dbb31 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.
2021-07-27 11:58:44 -07:00
nhmall
b4d0d6fa58 date bump to match 267ac5 update to Guidebook source 2021-07-27 14:47:46 -04:00
PatR
31d6b27481 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
2021-07-27 11:03:20 -07:00
Pasi Kallinen
d332720336 Increment editlevel
Added the new branch stairs glyphs, forgot to increment editlevel.
2021-07-27 18:56:50 +03:00
Pasi Kallinen
267ac5add2 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.
2021-07-27 17:21:01 +03:00
Pasi Kallinen
141a7915d6 Bugle playing should not scare some monsters
Make awaken_soldiers match awaken_monsters in what monsters
it can scare.
2021-07-26 21:40:23 +03:00
Pasi Kallinen
83c2eb5645 Add more shop tests 2021-07-25 22:52:42 +03:00
PatR
b70f00578c 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
2021-07-25 10:52:11 -07:00
Pasi Kallinen
c88bdb0a32 Hide internal commands from key list 2021-07-25 11:57:09 +03:00
nhmall
227ef401df change NetHack's MACOSX references to MACOS 2021-07-24 17:52:47 -04:00
nhw_cron
fe5c61bf24 This is cron-daily v1-Jan-20-2020. files updated: Files 2021-07-24 17:29:40 -04:00
nhmall
50f9db55e5 add .gitattributes to test 2021-07-24 16:27:39 -04:00
nhw_cron
f0f4de8998 This is cron-daily v1-Jan-20-2020. files updated: Files 2021-07-24 16:23:40 -04:00
PatR
2e43f83db0 wizard mode enlightenment tweaks + Glow status fix
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).
2021-07-24 11:30:52 -07:00