Commit Graph

12167 Commits

Author SHA1 Message Date
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
Pasi Kallinen
120a8c0173 Add shop creation test script 2021-07-24 20:29:15 +03:00
Pasi Kallinen
e2c6cbe347 Fix missing Izchak shop
My recent commit broke Izchak's shop in minetn-6.
Fix it as per the suggestion from entrez.
Fixes #555
2021-07-24 20:18:44 +03:00
Pasi Kallinen
7f39d53ad3 Lua: improve level testing
Add des.finalize_level() used for testing in conjunction with
des.reset_level().
Add nhc.DLB to return 0 or 1 if DLB was defined at compile-time.
Change the test_lev.lua to give more informative messages instead of
just lua error when required file doesn't exist.
Add bigrm-11 to the level tests.
2021-07-24 10:49:06 +03:00
Pasi Kallinen
93b66ff8da Prevent segfault on nonexistent mapseen
Cannot happen on normal play, but with some lua trickery ...
2021-07-23 21:09:39 +03:00
Pasi Kallinen
f07829045a Prevent impossible with secret doors in sokoban
Doesn't currently happen as no Soko levels use secret doors,
but handle them anyway gracefully.

Secret doors have their doormask set, but it's overloaded wall_info.
The display routines aren't happy with D_CLOSED in wall_info.
2021-07-23 20:58:45 +03:00
PatR
5a09a01a13 gold dragon and scales
Add two new monsters and two new objects:
 gold dragon
 baby gold dragon
 gold dragon scale mail
 set of gold dragon scales

A couple of variants seem to have added these already, but this came
off my ancient list of monsters to add and was done from scratch.
It's a clone of silver dragon, but instead of having reflection and
breathing cold, a gold dragon emits light and breathes fire; because
of the latter it can be seen with infravision like a red dragon.
Adult gold dragons are lawful as in the AD&D Monster Manual rather
than chaotic as the wiki pages show for the variant versions.

Worn gold dragon scales operate similar to wielded Sunsword:  when
blessed, radius is 3 (same as a lamp), if uncursed, radius is 2, and
if cursed, radius is 1 (but functions as 2 when worn by the hero,
otherwise there would be no tangible effect).  Gold dragon scale mail
gets an extra +1, making blessed gold DSM have a bigger radius than
lamps.  Embedded scales have radius 1 regardless of BUC state; light
for that case comes from the gold dragon monster form the hero is in.
When not worn, gold scales and scale-mail don't emit any light.

The tiles use a mix of yellow (for gold) and red.  The two object
tiles seem reasonable variations of the corresponding silver dragon
ones.  The two monster tiles definitely need work since the silver
ones were mostly cyan and changing that to red did not produce very
good result; subsequent attempt at a mixture was haphazard at best.
2021-07-23 10:41:57 -07:00
PatR
8e2f168544 tribute update: Thief of Time
Add a page citation to passage #1; add six new passages (bringing
total to 14).
2021-07-22 17:02:06 -07:00
Pasi Kallinen
043cd7e108 Lua: lit="random" is not allowed anymore
Random is the default lit state, so leave it out.
2021-07-22 19:38:04 +03:00
PatR
9c71b7dc4a Unix 'make clean' bit
When deleting obsolete generated files (monstr.c, vis_tab.[ch])
for src 'make clean' or clean called from src 'make spotless' or
from top Makefile, don't complain if they aren't present.

Deletion failure wasn't stopping 'make' but did result in looking
like something might be wrong.
Before:
 rm monstr.c vis_tab.c ../include/vis_tab.h  #obsolete generated files
 rm: monstr.c: No such file or directory
 rm: vis_tab.c: No such file or directory
 rm: ../include/vis_tab.h: No such file or directory
 make[1]: [clean] Error 1 (ignored)
After:
 rm -f monstr.c vis_tab.c ../include/vis_tab.h #obsolete generated files
(no extra feedback from rm or make).
2021-07-22 08:32:25 -07:00
Pasi Kallinen
dbac44596e Lua: Allow boolean params in level_init 2021-07-22 18:02:58 +03:00
Pasi Kallinen
b566bbda38 Split calculating your movement speed out of moveloop 2021-07-22 12:28:15 +03:00
Pasi Kallinen
5cf0bb1de9 Split moveloop into preamble and core 2021-07-22 12:01:26 +03:00
Heinrich Kuttler
28b3902ea7 termcap.c: Don't use hilites[CLR_BLACK] = NULL for ANSI_DEFAULT
This didn't crash since xputs is defensive and checks if it got a NULL
string, but it also didn't display black entries (dragons, unicorns,
orcish arrows, ...) as black or otherwise different from gray entries.
2021-07-22 11:11:23 +03:00
Pasi Kallinen
932b6d03c9 Lua: Make des.monster use boolean params 2021-07-22 11:05:40 +03:00
Michael Meyer
23cfa24ee9 Fix: engraving with dry magic marker
Engraving with a marker can use up remaining charges to write
semi-permanently in ink, or--if the marker has no remaining charges--can
draw in the dust as with a normal blunt item.  Handling in engrave after
a recent refactor (9c6a5fc423) didn't fully cover this second case, and
as a result using an empty marker to engrave would deduct a charge per
attempt and cause an impossible.  This could be exploited by repeatedly
engraving with the same empty marker to underflow the marker charges.
2021-07-22 07:21:40 +03:00
Michael Meyer
e8cb683ad0 Fix: off-by-one error in movecmd
The for loop which iterates through the list of movement keys in
movecmd(cmd.c) was updated in 5abf948116 to count down to 0 instead of
up to the end of the list.  This commit inadvertently introduced an
off-by-one error which started the loop one past the actual end of the
array.  On my system this made 'H' stop working as the 'run West' key.
2021-07-21 22:43:46 +03:00
nhmall
bed1645f5b Guidebook.txt to July 21, 2021 current (retry) 2021-07-21 14:58:06 -04:00
nhmall
5841e31f3e Guidebook.txt update to July 21, 2021 current 2021-07-21 14:33:44 -04:00
nhmall
2f35b2ac54 Guidebook date bump to reflect most recent update 2021-07-21 11:29:35 -04:00
nhmall
cd87283ba4 recognize vs2019 16.10.4 in sys/windows/Makefile.msc 2021-07-21 11:23:10 -04:00
Pasi Kallinen
893a14e2bd Remove special doinv key
The same thing can be done in config file with BIND=0:inventory
2021-07-21 16:33:10 +03:00
Pasi Kallinen
a5e5435619 Make mouselook use internal extended command
... instead of faking a key press
2021-07-21 12:23:25 +03:00
Pasi Kallinen
bfe8727c59 Add retravel to Guidebook.tex 2021-07-21 11:03:36 +03:00
Pasi Kallinen
433f0cc15f Add new command: #retravel
Retravel travels to the previously selected destination.

Also changes the travel-via-mouse to execute the extended command
instead of faking a special key.
2021-07-21 10:59:08 +03:00
Pasi Kallinen
76bb205367 Add some plural/an tests 2021-07-17 23:29:30 +03:00
PatR
fc62610ee3 a uke
Fix a copy+paste blunder.
2021-07-17 12:16:03 -07:00