Commit Graph

14898 Commits

Author SHA1 Message Date
SHIRAKATA Kentaro
32080bc7fd split offering to different alignment alter into a separate function 2023-02-06 16:05:35 -08:00
PatR
5d5445d85b fix github issue #972 - moving while trapped
Reported by elunna:  a monster trapped in a pit or web that was
adjacent to a polymorph trap could enter that trap to change shape.
It would remain flagged as trapped but there's no way to escape
from a polymorph trap so it would be stuck.

Fix supplied by entrez:  when a monster is picking MUSE strategy,
don't allow it choose "enter polymorph trap" if it is currently
trapped.

I entered the changes from the diff manually and added a bunch of
minor formatting bits.

Fixes #972
2023-02-06 15:50:39 -08:00
PatR
1d06fa62a9 attempt to fix github issue #965 - place_object
Issue reported for a hardfought player by k2:  dying in a shop wall
produced "place_object: <item> [0] off map <0,0>" when hero's invent
was dropped.  It happened in Mine Town where multiple shopkeepers are
present and it is possible to have two shops share a wall.

I could not reprouce the problem, even after setting up--and dying
various times at a gap in--a wall shared by two shops.

paybill() -> inherits() -> set_repo_loc() sets up the destination
prior to disclosure and finish_paybill() -> drop_upon_death() later
places invent at the spot iff bones are going to he saved.  inherits()
is convoluted and evidently took at least one path that failed to
call set_repo_loc().  Change it to always call set_repo_loc() when
returning 'True' so that the destination should always be set if
really_done() calls finish_paybill().

Some followups by entrez are probably still useful.

Closes #965
2023-02-06 11:47:37 -08:00
Pasi Kallinen
7401b44fa1 Walls of lava
Add "walls of lava", basically lava which blocks vision and
require a bit more than just levitation or flight to move through.

No levels use this yet, as testing isn't thorough enough.
2023-02-06 19:23:42 +02:00
Pasi Kallinen
b85fb2a197 Split itemaction key pushing to separate function 2023-02-05 21:29:19 +02:00
Pasi Kallinen
dbfd7879df Split engulfer explosion message into separate function 2023-02-05 20:26:52 +02:00
nhmall
20c6e1b6e6 macsound: 2 params are UNUSED always 2023-02-05 11:53:19 -05:00
nhmall
f6b135f3e1 fixes3-7-0.txt update 2023-02-05 11:45:05 -05:00
nhmall
47c44e4907 typo fix in macsound.m 2023-02-05 11:41:59 -05:00
nhmall
43af05a6b8 Unchanging and improvisations
Adds a reveal.

Increments EDITLEVEL.
2023-02-05 11:32:58 -05:00
nhmall
5034f7f936 update macsound to support 'volume' interface parameter 2023-02-05 11:32:12 -05:00
Pasi Kallinen
d3430bed9f Prevent certain items from random erosion
Prevent wished for items (unless specified), artifacts,
armor and weapons of NPC heroes, and ammo from Longbow of Diana
being generated eroded.
2023-02-05 16:46:54 +02:00
Pasi Kallinen
ee3daba8c9 Split peaceful responses into separate functions 2023-02-05 08:24:34 +02:00
copperwater
50b18b1324 Fix: default lregion exclusion area occupied real space on the map
The intuitive behavior of des.levregion or des.teleport_region when
"exclude" is left unspecified is that there is no exclusion area.
However, this wasn't actually the case: since l_get_lregion defaulted
the exclusion area to (0,0,0,0) and exclude_islev to 0, this meant that
the 0,0 space on the map would always be excluded from regions. In cases
where a region was specified with its inclusion area constrained to the
0,0 space of the map, this would create a "Couldn't place lregion"
impossible message.

This fixes that issue by defaulting the exclusion area to (-1,-1,-1,-1),
and if the exclusion area is left unspecified, forces exclude_islev=1.
This means that the exclusion zone will be outside the walkable space of
the level where it can't cause any problems.

If a level designer puts negative coordinates in their inclusion or
exclusion parameters, this might not work correctly, but negative region
coordinates aren't currently used anywhere and probably shouldn't be
supported anyway.
2023-02-05 07:49:19 +02:00
PatR
9ce98594a4 up/down level feedback
With sounds on, using #levelchange to drop more than one level only
gave the level-loss sound effect once.  Level-gain sound was better
because the more verbose messaging triggered --More-- before moving
on.  Have both gain and loss use urgent_pline() in case messages
are being suppressed due to ESC, and have both request --More-- to
make the player acknowledge the message.  That has a side-effect of
letting the sound play to conclusion.
2023-02-04 15:28:13 -08:00
PatR
6cf077a684 depend.awk update
cppregex.cpp recently had `#include "extern.h"' added as the last
quoted include.  That gets set to "" while collecting dependencies,
then preceded by a space when output.  So the unexpected trailing
space was new and wasn't caused by a change of awk versions as I
was suspecting.  This removes it.
2023-02-04 12:58:06 -08:00
nhw_cron
967046fd96 This is cron-daily v1-May-8-2022. 000files updated: Files 2023-02-04 15:40:17 -05:00
nhmall
d14ed8b9de enable achievement sounds in macsound
Requires rebuild of your Makefiles via hints file (for new stock wav additions).

If you've been testing by copying the wav files manually to
~/Library/Sounds, you'll need to copy them again to pick up
the additional wav files.
2023-02-04 15:37:17 -05:00
nhmall
36ca64acdb start to add some SOUND_TRIGGER_ACHIEVEMENTS code
Start to add supporting code to windsound and macsound. The latter
remains commented out because I haven't had a chance to try
it on macOS yet.

In order to test it out, I added two more stock sounds:
sa2_xplevelup and sa2_xpleveldown.
2023-02-04 14:28:59 -05:00
Pasi Kallinen
9fd87db543 Ceiling hiders on lava pools
Lava pools are perfectly valid locations for ceiling hiders
if they're hiding there - aka hanging from the ceiling.
2023-02-04 19:39:33 +02:00
Pasi Kallinen
e1b01a5d7c Fix segfault when farlooking monster under generic object
A detected cave spider was hiding under a generic spellbook object;
farlooking at it produced a segfault.  OBJ_NAME is null for the generic
objects, so don't try to strcmp it.
2023-02-04 17:48:57 +02:00
nhkeni
d515538f21 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2023-02-04 09:51:44 -05:00
nhkeni
31d5fecbb2 leave a note on a potential future Lua sandbox issue 2023-02-04 09:50:49 -05:00
nhw_cron
da003c374a This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-02-04 09:45:27 -05:00
nhmall
17aeee27a5 Guidebook update 2023-02-04 08:52:47 -05:00
Pasi Kallinen
2123602d3e Add chronicle and saveoptions to Guidebook 2023-02-04 15:14:28 +02:00
PatR
c212ee44c0 breaking iron bars with weapon
For strength over 18, A_CURR(A_STR) can return up to 125, giving
the chance to break bars by hitting them with a warhammer a 50:50
chance.  Switch to acurrstr() which returns at most 25.

Allow heavy iron balls (wielded or thrown, regardless of whether
they're chained to hero) to have a chance to break bars too.  They
are slightly more complicated because they don't use obj->spe like
a weapon but are otherwise straightfoward.
2023-02-03 17:01:49 -08:00
PatR
87c3d07645 3.7.x 'make depend'
Makefile.src didn't know about 'sndprocs.h' yet.

Something weird is going on with 'make depend'.  It has started
adding a trailing space to
|$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp $(CONFIG_H)
(actual trailing space omitted here).  It's repeatable.  I don't
understand it and have not tried to fix it, just removed the space
from the generated Makefile before putting into place as modified
Makefile.src and making this commit.
2023-02-03 15:48:46 -08:00
nhw_cron
25fab21cc8 This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-02-03 17:28:47 -05:00
nhmall
72bae29bc0 Guidebook update 2023-02-03 16:50:38 -05:00
nhmall
0282e0b1fd doc error for .nethackrc location on Windows 2023-02-03 16:48:54 -05:00
nhmall
f348deb2bc CI not catching macOS sound-related warning/error
Add WANT_MACSOUND=1 to the build so we get informed of warnings
and errors in any of the macsound-related files.
2023-02-03 15:33:47 -05:00
nhmall
9d3dda1e1d mac typo and some warnings 2023-02-03 15:12:42 -05:00
nhmall
a5c7ca1a29 another follow-up: be consistent 2023-02-03 14:43:56 -05:00
nhmall
583848b04c minor wording change 2023-02-03 14:40:58 -05:00
nhmall
eda74d1d0d updated fixes3-7-0 with sound entries 2023-02-03 14:39:07 -05:00
nhmall
d9a6e581a1 paste error 2023-02-03 14:04:12 -05:00
PatR
3e6ea3faed fix #K3857 - hiding while trapped in a non-pit
sanity_check feedback which occurred after using locking magic to
set off a bear trap at the location of a monster hiding under an
object.

Trivial bit: a recent change made stunning via knockback only occur
when not already stunned but was still adding the current stun time
to the new stun time even though current stun is now always zero.

Several formatting bits included.
2023-02-03 10:45:59 -08:00
nhmall
9931d05fc2 follow-up: a couple of documentation errors 2023-02-03 13:40:13 -05:00
nhmall
2acd8e7b29 update soundlib interface
Add SOUND_TRIGGER_AMBIENCE
2023-02-03 13:32:44 -05:00
Pasi Kallinen
1b5414c833 Add some variation to minefill levels
Randomize the number of objects and monsters a little bit,
they're still roughly the same as before.
2023-02-03 19:10:04 +02:00
Pasi Kallinen
d95e6adbdd Fix extern def 2023-02-03 17:12:23 +02:00
Pasi Kallinen
0722a5c2dd Fix punishment iron ball yanking hero on top of a monster
When attached iron ball was in a pit (or a pool) with a monster,
and your levitation ended, you were put on top of the monster.

Add a sanity check for hero over monster.
2023-02-03 08:51:48 +02:00
Pasi Kallinen
cae29f1dfd Comment typofix 2023-02-02 19:07:56 +02:00
Pasi Kallinen
8535b248c8 Fix ceiling hiders on pools
While fuzzing, I saw a sanity checking error complaining about
a ceiling hider being on top of a pool; the rock piercer was
teleported on top of the pool while it was hiding in the ceiling.

Try to be a bit more consistent when a monster is hiding in ceiling,
and if it's valid for it to be on a pool.
2023-02-02 19:04:51 +02:00
Pasi Kallinen
c2a1b97627 Stun from knockback only if not already stunned 2023-02-02 13:50:59 +02:00
Pasi Kallinen
6af26751e6 Monsters never try to pick up ball or chain
Apparently my m_move reorg made it possible for monsters to
pick up the chain attached to hero; explicitly prevent that.
2023-02-01 21:43:26 +02:00
nhmall
b45895c01d correct a predefined preprocessor macro for clang 2023-02-01 14:15:34 -05:00
nhmall
3214335bb5 undefine X11_BUILD after hack.h or config.h
So as not to complicate any onefile efforts by leaving it defined.
2023-02-01 14:04:20 -05:00
nhmall
d4a111083a avoid some issues with c++ and X11 2023-02-01 10:41:04 -05:00