Commit Graph

15036 Commits

Author SHA1 Message Date
nhmall
32ca917d2c sym-changes - add engravings to the map
1. Add "engraved room floor" pchar sym (S_engroom). The symbol that
displays at the engraved part of a room (not a corridor though).
The default symbol is '`' which is currently never shown if people
have defined the boulder symbol to '0' and statues are displayed as
monster symbols. It is bright blue.

Add some stylized variations of the S_engroom symset to some of
the symsets.

2. Add "engraved corridor" pchar sym (S_engrcorr). The symbol that
displays at the engraved part of a corridor. The default symbol is
'#', and it matches the symbol for corridor from for whatever the
current symset uses. It is bright blue to match the color of the
S_engroom symbol. Using the normal corridor symbol for display
preserves the lines of the corridor so is not as visually-disruptive
as a smaller symbol would be. Explicit entries that match the S_corr
symbol have been added to the symset file.

Magic mapping and clairvoyance impacts yet to be determined.

The Guidebook updates will come later.
2023-03-05 17:35:49 -05:00
Pasi Kallinen
0b5956ba34 Tutorial: reset inventory letters 2023-03-05 17:54:14 +02:00
Pasi Kallinen
c2d6bde9cd More tutorial level
Add more stuff to the tutorial level:
 - closing a door
 - cursed armor
 - taking off armor
 - shuffled descriptions
 - removing curses
 - reading scrolls
2023-03-05 16:38:24 +02:00
Pasi Kallinen
db0441bf02 Split level temperature message into function 2023-03-05 12:34:33 +02:00
Pasi Kallinen
3cd6b00ab7 Split stuck-cannot-go-up/down into separate function 2023-03-05 11:58:23 +02:00
Pasi Kallinen
ce0d25129e Spell of knock can knock back small monsters
Differentiates the spell from the wand of opening,
and the spell name sounds like it should do that ...
2023-03-04 19:07:34 +02:00
Pasi Kallinen
c6a2803f49 Better algo for picking a room to put stairs in 2023-03-04 18:04:38 +02:00
Pasi Kallinen
10df388245 Untrap tip 2023-03-04 11:02:06 +02:00
PatR
e85c7ff94f fixes entry for pull request #993 - curses' >>
Pull request from entrez:  when the curses interface was deciding
whether ">>" could fit on the bottom line of the message window, it
was off by two (based on the initial report) and ">>" clobbered the
last two characters.

Reported case was "Welcome to level " when that was appended to
another short message.  It should have ended with "6. " but that had
been chopped off by ">> ".  Reproducible by assigning a long name to
something, dropping an item, dropping the something, and dropping
just enough other stuff so that the named item will be reported on
the bottom message line during pickup-all, forcing --More-- before
continuing to the item below it.  The item with the long name needs
to fit in the message window's width (when formatted with invent
letter prefix and trailing period) without being wrapped and not
leaving enough unused space to fix ">> ".

Closes #993
2023-03-03 11:16:13 -08:00
Michael Meyer
2bb73b8fd8 Prevent curses 'More' (>>) from overwriting msg
In some scenarios where a message prompted a 'more' (in curses shown as
'>>'), the '>>' could overwrite the last one or two characters of the
message.

This could happen if a single message on its own was the length of the
message space minus 2 (e.g. for an 80 character terminal, "h - a concave
amulet named this is an amulet name, it is very long, and so on."), or
if an addition to an existing line brought it to the length of the
message space minus 1 or 2 (e.g. "You materialize on a different level!
You remember this level as testlevlname.").  The two scenarios had
slightly different causes.

I think this fixes both of those scenarios.  I believe this is the
cause of the problem described in GitHub issue #990 but there isn't
enough detail to know that for a fact.
2023-03-03 11:13:54 -08:00
Pasi Kallinen
08a2a2a1a4 Saving grace
Once per game, if receiving a killing blow from above 90% HP,
allow the hero to survive with 1 HP.
2023-03-03 17:38:48 +02:00
Pasi Kallinen
2c092bb641 Tutorial: pushing boulders 2023-03-03 16:14:22 +02:00
Pasi Kallinen
075c2832a1 Adjust archeologist and valkyrie intrinsics
I felt it was strange that archeologist started out both
fast and stealthy, but didn't gain searching until level 10.
So, archeologists now start with searching, gain stealth at 5,
and fast at 10.

Similarly valkyries starting out stealthy felt odd, so now they'll
get it at level 3.

This leaves only the rogue starting out innately stealthy, which
feels appropriate.
2023-03-03 11:50:44 +02:00
Pasi Kallinen
3b519c7023 Minor tutorial tweak
Remove the autoopen setting, as it alraedy defaults to on.
Add an engraving mentioning some actions may take multiple tries.
2023-03-03 09:57:49 +02:00
nhmall
64eeafc2d7 remove package from visual studio solution for now 2023-03-02 22:17:51 -05:00
nhmall
11d83bbad3 retarget Visual Studio SDK 2023-03-02 22:06:14 -05:00
nhmall
87d339cd85 fix achievement sounds in the macsound interface
> With sounds on, using #levelchange to drop more than one level only
> gave the level-loss sound effect once.

Fix the underlying issue within macsound.m by allowing the currently
playing sound to run to its completion prior to starting the next.

This also backs out the acknowledgment --More-- that was added after
the sound issue first materialized and puts it back to the way it was
the past several releases.
2023-03-02 20:30:05 -05:00
nhmall
b55d11b4f2 Revert "up/down level feedback"
This reverts commit 9ce98594a4.
2023-03-02 20:14:04 -05:00
PatR
f35abea80b change 'm #tip' behavior
Using the 'm' prefix with #tip was putting up a menu to pick between
one or more floor containers and 'choose from invent', but that
interfered with choosing Tip as a context-sensitive item-action for
carried container.  Change 'm' to behave like it does with #eat and
\#quaff and several other commands:  skip possible candidates on the
floor and go directly to picking something from inventory.

That prevents using 'm' to force a menu of
|a - <floor container>
|i - pick a container being carried
for any menustyle when there is one floor container.  For menustyles
other than traditional, I think that's inconsequential; player needs
to answer 'n' for floor container and then get the choose-from-invent
prompt instead of 'i' and then choose.  When there are two or more
containers on hero's spot, 'm' prefix isn't needed to get that menu.

Unfortuately using 'm' to override menustyle:Traditional is still a
thing players might want to do.  Keep the prior behavior for that
style when multiple containers are present (dotip() already skipped
that menu despite 'm' when there was just one container).  Use the
new behavior (skip floor containers) when one (or none) is present.
That's inconsistent but seems more useful than alternatives.  It is
relatively unlikely that anyone who uses traditional non-menu item
selection will also use newfangled inventory item-actions so the menu
isn't likely to interfere with the latter.  Update the Guidebook to
describe how Traditional differs just in case.
2023-03-02 05:33:16 -08:00
nhmall
6836eb07d8 follow-up bit for cursmisc.c 2023-03-01 20:05:43 -05:00
nhmall
d801736d09 opt out of bgcolor highlighting via bgcolors 2023-03-01 19:17:47 -05:00
nhmall
5a4d983104 fix uppercase alt key combinations with PDCurses 2023-03-01 17:06:15 -05:00
nhmall
d14a6b03fa Merge branch 'missing_framecolor' of https://github.com/entrez/NetHack into NetHack-3.7 2023-03-01 16:04:33 -05:00
Michael Meyer
68d1db2203 Initialize scrollbar 'framecolor' before use
Caused an asan crash because the value is used to index an array.
2023-03-01 15:23:46 -05:00
nhmall
76e82d1312 fix remaining contrived issues re HANGUPHANDLING 2023-03-01 12:01:43 -05:00
Pasi Kallinen
77f241581c Split dungeon.lua level reading to separate function 2023-03-01 18:33:24 +02:00
nhmall
fd3057483f fix an issue when HANGUPHANDLING isn't defined
This is a contrived issue since HANGUPHANDLING is probably
defined for UNIX
2023-03-01 10:54:04 -05:00
nhmall
d241dab992 typo fix 2023-03-01 10:43:35 -05:00
nhmall
0bb94002ff update minimal build test in CI
This could trigger a couple of additional follow-up commits if the build fails.
2023-03-01 10:41:21 -05:00
copperwater
69d37be878 Fix: using a selection in a lit des.region modified it
The intuitive behavior when passing a selection to des.region, e.g.

    local foo = selection.area(07,02,10,24)
    des.region(foo, "lit")

is that foo will remain unmodified for further use. However, this wasn't
the case whenever making a lit region from it, because in order to light
walls adjacent to the lit area, the selection was having a grow
transformation applied as well. (This also seems like a problem - it
grows the selection even if what is being lit is not surrounded by
walls. I added a note in lua.adoc about this behavior.)

This fixes the selection mutation by cloning the passed-in selection and
growing the clone which leaves the original one unaffected.

This should not affect any special levels currently because the only
instance of des.region being used with a selection appears to be in
bigrm-2, which specifies *unlit* areas, which did not get grown.
2023-03-01 17:32:15 +02:00
Pasi Kallinen
ea2cd80349 done_hup is compile-time optional for some reason 2023-03-01 17:08:16 +02:00
Pasi Kallinen
fc7a32b86e Tutorial level
Add a tutorial level to teach commands to new players.
Very much a WIP.

Breaks save and bones compat.
2023-03-01 14:00:29 +02:00
nhmall
7aead98a49 fix a soundeffects typo 2023-02-28 16:15:56 -05:00
PatR
844e71e18e drawbridge revisited
Take the DEADMONSTER() check back out.  It adds some protection
against something that should never happen but also adds confusion
that it might actually happen.  Dead monsters aren't on the map.

Avoid 'if (cond) foo();' without braces if foo() might expand into
nothing.

Clean up the occupants[] array when finishing with drawbridge.
2023-02-28 12:14:23 -08:00
PatR
ffdaa5556e drawbridge fix - double death
Make sure a dead monster that hasn't been purged from the fmon list
yet can't be hit by opening/closing/destroyed drawbridge.  I don't
think that could happen because the monster gets removed from the
map, but add some bullet-proofing.

Also, give drawbridge smash/crash sound effects even when player
can see whatever is happening instead of just when only hearing the
activity.
2023-02-28 10:33:44 -08:00
PatR
6ba11256ba partial fix for #K3869 - curses: meta characters
Meta-key fix for curses interface running on top of ncurses library.
Previously only digits and lower case letters would produce a meta
character when combined with Alt (or Option on Apple keyboards), now
it should work for any basic character (not arrows or other function
keys).  It only works on terminals that send two characters ESC k
for Alt+k but that is not a change in behavior.

curses interface running on top of PDcurses library uses different
code which isn't fixed by this.  The alt key fixup it does have was
already present in curses_read_char() and recently got duplicated in
curses_convert_keys().  At least one other routine calls the latter
so it was necessary, but curses_read_char() calls that routine so
doesn't need to keep its own copy of the fixup.
2023-02-28 10:14:25 -08:00
nhmall
7c0d65718c paste error 2023-02-28 00:09:37 -05:00
nhmall
42e337c306 return correct ALT-key sequences with PDCurses
They weren't working at all because the values of ALT_A through ALT_Z
were out of the normal char range with PDCurses, and caught by the default
case in the switch, where reject got set.

/* use key as-is unless it's out of normal char range */
        reject = ((uchar) ret < 1 || ret > 255);
2023-02-28 00:05:04 -05:00
nhmall
d31db79558 more macOS.370 macro usage 2023-02-27 11:47:09 -05:00
nhmall
a2047714d1 fix a 'make bundle' error
make[1]: *** No rule to make target `../util/uudecode', needed by `/Users/testuser/nethack/NHsource/bundle/NetHackTerm.app/Contents/Resources/NetHackTerm.icns'.  Stop.
make: *** [bundle] Error 2
2023-02-27 11:08:51 -05:00
nhkeni
c2f7e7a0ac Start using 3 part version numbers. 2023-02-27 10:18:14 -05:00
nhmall
8736bf2517 remove an unused, incorrectly-spelled soundeffect 2023-02-26 15:44:04 -05:00
nhmall
d56558ee31 follow-up for seffects.h
Make it emit nothing without one of the expected #defines.
2023-02-26 09:46:45 -05:00
nhmall
abdc8e6cbe Revert "update Makefile.nmake"
This reverts commit 8c7922635e.
2023-02-26 09:42:35 -05:00
PatR
dda1cbdf83 pull request #973 - antagonostic undecagonstring
Pull request from Kufat:  add new hallucinatory monster from Iain
M. Banks' _The_Culture_ book series:  "antagonistic undecagonstring".

I was a bit concerned about the length, but it is quite a bit
shorter than the longest entry:  "one-eyed one-horned flying purple
people eater".

Closes #973
2023-02-25 23:55:22 -08:00
Kufat
b435cd840a Bogusmon from The Culture (Iain M. Banks)
Add the antagonistic undecagonstring from The Hydrogen Sonata as a hallucinatory monster.
2023-02-25 23:54:07 -08:00
nhw_cron
261d1c0f22 This is cron-daily v1-May-8-2022. 000files updated: Files 2023-02-25 16:30:24 -05:00
nhmall
8c7922635e update Makefile.nmake 2023-02-25 16:28:58 -05:00
nhmall
cb0c7e00d1 update Xcode project 2023-02-25 16:20:10 -05:00
nhmall
4b7c3e6a5e new file include/seffects.h 2023-02-25 16:07:29 -05:00