Commit Graph

16948 Commits

Author SHA1 Message Date
PatR
30f5f0055d more Brides of Dracula
Extend PR #1240 by giving the three brides names.

It looks a bit odd when they're in bat/fog/wolf form rather than in
base vampire lady form but I think that we can live with that.
2024-05-31 11:06:22 -07:00
Kestrel Gregorich-Trevor
d956ab502d pull request #1240 - Brides of Dracula
In the original Bram Stoker novel, Dracula has three brides,
colloquially referred to as the [Brides of Dracula]
(https://en.wikipedia.org/wiki/Brides_of_Dracula).  I thought it would
be a nice touch for NetHack to quietly reflect this by ensuring three
of the vampires of his court are vampire ladies.  While this
technically increases the difficulty of Vlad's Tower, the vampires in
Vlad's court are not necessary to fight, and the experience level of
a hero at this point in the game is likely to cause them to spawn as
vampire lords or ladies in any case.

No established names exist for these characters, so I have left them
unnamed.

[Cherry picked rather than merged into order to reformat the commit's
log message.  PatR]

Closes #1240
2024-05-31 10:38:05 -07:00
PatR
2caa26a24a pull request #1228 - mon_escapes()
Pull request from argrath:  split monster escaping from the dungeon
via the stairs on level 1 into a separate function.

Closes #1228
2024-05-31 10:29:44 -07:00
SHIRAKATA Kentaro
ce9abbc52d split monster escaping the dungeon into separate function 2024-05-31 10:27:31 -07:00
PatR
914744665b pull request #1168 - nothing_special()
Pull request from argrath:  replace 'goto nothing_special' with calls
to new routine nothing_special().

Needed some conflict resolution from 'git rebase' after sitting for
such long time.

Closes #1168
2024-05-31 10:16:54 -07:00
SHIRAKATA Kentaro
c68f870819 split 'nothing_special' of arti_invoke() into separate function 2024-05-31 10:15:25 -07:00
PatR
34d6c3cf7c github PR #1185 - refactor give_u_to_m_resistances
Pull request from entrez:  redo the code that confers intrinsics
acquired by dying hero to the monster it becomes in bones.

Closes #1185
2024-05-31 09:52:50 -07:00
Michael Meyer
4ac8241917 Use a macro for all foo_RES to MR_foo conversions
This makes it easier to understand what is happening in each of those
places, and also much easier to find the places that conversion between
hero and monster resistances happens (since you can now just grep for
"res_to_mr").  I think I got all the instances where the macro should be
used but I'm not 100% sure since there wasn't a single unique term to
search for to find them all.

I replaced the modifications to give_u_to_m_resistances made in the
previous commit, so that it now uses the same macro as other
conversions, since otherwise it would be much harder to find the
complete list of places where conversions between hero and monster
properties happen.
2024-05-31 09:23:20 -07:00
Michael Meyer
a71866d7d9 Refactor (very slightly) give_u_to_m_resistances
I think that using two arrays in tandem like give_u_to_m_resistances
originally did is frequently considered a bad idea, because one can
easily be added to or subtracted from without modifying the other --
that could obviously cause problems.  Combining the arrays like this
avoids that potential problem.
2024-05-31 09:23:20 -07:00
Pasi Kallinen
2ba42cf78c Fix accessing freed landmine trap
Landmine blew up, scatter exploded a potion of oil, which melted
the ice on which the landmine was, resulting in the landmine trap
being deleted.  The code then tried to access it to make a pit.
2024-05-31 10:28:44 +03:00
Pasi Kallinen
0490f7736c Fix couple cases of boulders over pits
When a zombie claws itself out of the ground.
When a polymorph is zapped on a pile of objects over a pit,
and one of them turns into a boulder.
2024-05-31 07:46:55 +03:00
Pasi Kallinen
5b94745658 Fix only flying monsters able to evade some traps 2024-05-30 17:51:56 +03:00
PatR
5641e2560f fix issue #1248 - drowning on Plane of Water
Issue reported by Umbire:  if hero dies by drowning on the Plane
of Water, cause of death was reported as "drowning in a limitless
water".

Reported for livelogging but applied to tombstone and logfile too.
Omit the article "a" in this situation.

For 3.6.7, it would have started as "drowning in a water" and been
updated on the fly to be "drowning in deep water".  3.7 changed
terrain type WATER to be "wall of water", where "a" is expected,
and also added "limitless water" for Plane of Water, but it was
neglecting to include a similar fixup for the latter.  The "deep
water" fixup is still present but doesn't get triggered anymore.

Fixes #1248
2024-05-29 14:24:10 -07:00
Pasi Kallinen
61e54c2a87 Fix monster hp being above max hp
If the monster took damage from a fire trap, got killed, and then
lifesaved, the trap effect then reduced the map hp below the hp.
2024-05-28 20:58:03 +03:00
Pasi Kallinen
2ebbd13f79 Fix boulder over a hole or a pit dug by a monster
When a monster digs down and creates a pit or a hole,
drop the boulder at the location into it.
2024-05-28 19:10:36 +03:00
Pasi Kallinen
800b3b4b4b Fix swallower being in the same location as hero
A monster swallowed hero, hero teleported the monster away, but the level
was full of monsters, so the swallower ended up not moving anywhere,
so it was in the same location as hero, but hero wasn't swallowed by it.
Move the monster into limbo instead.
2024-05-28 18:12:55 +03:00
Pasi Kallinen
5fe872bf98 Pet titan killed itself with a boulder
A pet titan dropped a boulder over a pool, and the code killed
the titan, because the code was considering the titan to be in
the water.

If a flyer or a floater is over the pool, don't kill them off
if a boulder is dropped in there.  Also make the pet movement
code handle the case where the pet might've died while dropping
items.
2024-05-28 17:57:16 +03:00
PatR
6b750cb551 hit points sanity checks 2024-05-25 17:48:17 -07:00
PatR
537fd6dd74 fix gremlin cloning fix
The revised code returned an uninitialized variable if the new test
failed.

The cloneu() case was ok but this changes it to keep parallel to the
clone_mon() case.
2024-05-25 13:49:12 -07:00
Pasi Kallinen
9df851d5da Fix split monster with 0 max hp
A gremlin first hit a fire trap, reducing its max hp to 1, and
then it plunged into water, making the split gremlin have 0 max hp.
2024-05-25 18:32:37 +03:00
PatR
4217eee07b wizard mode #migratemons fixes
Noticed while doing rudimentary testing of the mnearto() fix for
mimics.  #migratemons wouldn't add monsters to migrating_mons if
getlin() was compiled with EDIT_GETLIN defined unless you manually
deleted the invisible default value that wiz_migrate_mons() was
passing.  It took a while to puzzle that one out.

The command list has conditional description of what #migratemons
does and it was using the wrong spelling of the macro used to
control that.  So '# ?' described the behavior of #migratemons as
it operates without DEBUG_MIGRATING_MONS enabled even when that is
enabled, adding to the getlin() confusion.
2024-05-24 16:23:15 -07:00
PatR
3a49b4c463 fix #K4179 - failed sanity check for mimic
When mnearto() places a monster, it might remove another one to make
room, then try to put that second one back.  If it can't do that, it
puts that other monster onto the migrating monsters list.  But having
it already be off the map interferred with regular take-mon-off-map
handling that happens when setting up a migration.

If the other monster was a hider or concealed mimic, it wouldn't be
brought out of hiding.  With 'sanity_check' enabled, that triggers
a warning when the occupants of migrating_mons get checked.

Testing this requires more effort than I'm willing to expend so there
might be unexpected consequences.
2024-05-24 16:21:10 -07:00
PatR
c623ddf2e2 fix github issue #1246 - fading spellbook
Issue reported by chadministratorwastaken:  persistent inventory
window didn't update if reading a spellbook caused that book to fade
to blank paper.

Issue was reported for 'curses' but it was general.  The core made
the possibly-revised book type become discovered but that wouldn't
update perm_invent unless the type of book hadn't been discovered.
So if plain spellbook wasn't known yet, the persistent inventory
window did update as intended, but if spellbook of blank paper was
already discovered, the window continued to show the old book type
instead of changing to reflect the revised type (until subsequent
activity triggered another perm_invent update).

Fixes #1246
2024-05-22 22:22:59 -07:00
PatR
f634bb863f refine context-sensitive inventory action 'w'
|w - wield this item in your hands
is "suboptimal" when poly'd into some form which lacks hands.  Don't
offer 'w' as a choice if in a form what can't wield anything, and
substitute "claws" for "hands" when in forms that warrant it.

Include iron ball as a type of item leading to 'w - wield as weapon'
instead of falling through to 'w - wield in hands'.
2024-05-21 14:27:49 -07:00
PatR
a1692a8061 update context-sensitve inventory actions
Since inventory actions can be used as teaching aids for regular
command usage, change picking a potion in inventory from
|q - Quaff this potion
to
|q - Quaff (drink) this potion

When picking the uquiver item in inventory, add
|f - {Shoot|Throw} this item
and for the shoot case, tack on "with wielded <launcher>".

That makes 't - {Shoot|Throw} this item' nearly redundant (but only
for an item in uquiver slot) so tack on "(same as 'f')".

For the 'Q' choice (only offered for weapons or rocks/gems), have it
mention what the quiver is for rather than just that choosing that
menu entry would put the stack in the quiver slot.

For 'E - Write on the floor with this object', change the verb to
"Engrave" when the object is a bladed weapon, hard gem, hard gem
ring, or wand.  It also changes 'floor' to surface() which might
need some refinement.

For non-weapons, change 'w - Hold this tin opener...' and 'w - Hold
this item in your hands' to 'w - Wield this...'.  The concept of
holding an item in hero's hands isn't applicable in general, and in
particular any "held" item replaces wielded weapon.

For a bunch of instances of "this item", when the quantity of the
selected inventory entry is more than 1, change to "one of these
items" or "this stack" depending on how the specified action deals
with stacks.
2024-05-21 11:28:12 -07:00
Pasi Kallinen
38a5dac08c Tutorial: add farlooking 2024-05-20 17:51:56 +03:00
PatR
d0bc457279 Perseus's statue location on medusa-3 and medusa-4
Coming up to medusa-3 from the level below revealed that Perseus's
statue was not there.  It was placed randomly in one of the three
chambers where Medusa might be rather than in the one where she
actually was.  Medusa-4 behaved similarly.

Initially I was forcing the statue to be adjacent to Medusa rather
than on her spot, but medusa-1 and medusa-2 don't do that so I've
gone with a simplified revision.
2024-05-19 14:44:10 -07:00
PatR
1f86001e27 chain lightning vs sleeping monster
Wake up a sleeping target that gets hit by chain lightning.  Also,
bring mimics and hiders out of hiding.

Don't let chain lightning pass into the water on Plane of Water (or
water-wall elsewhere); not sure whether that makes sense physics-wise
but it would have feedback problems due to visibility issues.  Do let
it pass over lava.
2024-05-17 16:10:22 -07:00
PatR
d5546d3384 revise curses_raw_print()
For curses, behave like tty by keeping a count of messages issued via
raw_print, then if that is non-zero issue a prompt and require the
player to acknowledge them before it erases the screen.  Mainly so
that complaints during RC file processing will be seen.

For tty, force getret() to be an unconditional routine instead of
sometimes a routine, sometimes a macro which calls another routine.
2024-05-17 14:38:17 -07:00
PatR
80fb8c77d3 shop annotation refinement
Give alternate shop type names for most of the shop types that didn't
already have such.  "General store" is the last remaining exception.
Only matters for automatically generated annotations for #overview.
2024-05-17 12:47:01 -07:00
PatR
178d6b2abe makedefs.6 bit
Noticed in a recent update of doc/makedefs.txt, The man page for
makedefs an unwanted space in front of the comma in its description
of "makedefs -s".
2024-05-16 23:38:54 -07:00
PatR
6aa42750ad Sunsword vs <u.ux,u.uy>
Using #invoke on wielded or carried Sunsword and picking direction
'>' or '<' lights the hero's spot.  But setting levl[u.ux][u.uy].lit
was too simplistic.  Lighting on the Rogue Level operates on full
rooms when done inside a room and doesn't to anything with done in a
corridor.

litroom() gave inappropriate messages in a couple of special cases.
2024-05-16 13:26:46 -07:00
nhmall
26b12f83fe update tested versions of Visual Studio 2024-05-16 2024-05-16 12:27:56 -04:00
PatR
f881eb85b1 new Ixoth tile
Replace the recently revised tile for Ixoth (knight's quest nemesis)
for github issue #1239.  Contributed by veenkeralexschool.
2024-05-13 23:48:35 -07:00
nhmall
38d2294257 revert 184c9e3b and re-commit partial
Reason: The following concern was raised:
"The trademark indicators were not out of sync.  The Guidebook
uses footnotes for that, 'history' uses "(tm)" in the text which
works better when nethack displays the text."
2024-05-13 14:12:38 -04:00
nhmall
5e765679c8 Revert "Merge branch 'update-history' of https://github.com/argrath/NetHack into"
This reverts commit 184c9e3b92, reversing
changes made to 8e6f3ccc7d.
2024-05-13 14:09:01 -04:00
nhmall
86bb71ef76 merge pr #1213
@Umbire wrote:
Very simple change code-wise - if he's gonna use a yumi a hunter of his expertise should presumably have the projectiles match.

Closes #1213.
2024-05-13 12:58:02 -04:00
nhmall
184c9e3b92 Merge branch 'update-history' of https://github.com/argrath/NetHack into
NetHack-3.7

@argrath reported that some of the text had fallen out of sync.

Closes #1225.
2024-05-13 12:52:07 -04:00
nhw_cron
8e6f3ccc7d This is cron-daily v1-Apr-1-2024. 005manpages updated: makedefs.txt 2024-05-13 10:16:03 -04:00
nhmall
68169708dc follow-up
replace dependency that was removed but should not have been
2024-05-13 08:54:56 -04:00
nhmall
29bf3646e0 add makedefs options for producing individual files
This may be useful for some build environments to avoid parallel make
issues, and artificially-concocted order dependencies, leaving the ordering
up to that specified in the Makefile.

The related makedefs options are now:

       ‐s     Generate the bogusmon , engrave and epitaph files.

       ‐1     Generate the epitaph file.

       ‐2     Generate the engrave file.

       ‐3     Generate the bogusmon file.

Also resolves an existing issue encountered in doc/makedefs.6 where "and epitaphfiles"
was being produced in the result.
2024-05-13 08:45:11 -04:00
nhmall
97916007ef restrict font fallback to legacy Windows console
It was misbehaving with ENHANCED_SYMBOLS so restrict the font fallback
to the legacy Windows console for now.
2024-05-12 08:12:30 -04:00
nhmall
329ffae7df simple O menu requires clear screen for symset 2024-05-12 08:10:36 -04:00
nhmall
38e8e99565 Windows symbols copying
Avoid leaving outdated symbols file in place when there is a newer one.
2024-05-12 08:06:41 -04:00
Pasi Kallinen
016ff166c0 Slightly more variance to hellfill maze v5 2024-05-11 10:02:23 +03:00
PatR
ec016f9956 deferred obj deletion bit
I've no idea whether there are any cases where this matters.
2024-05-09 14:17:43 -07:00
PatR
9994f186ec magic map shops and temples
Have magic mapping add special rooms to known overview data.  Only
affects shops and temples because they're the only rooms tracked.

Most other special rooms revert to normal rooms as soon as they're
entered so there wasn't any point in tracking them.  That might no
longer be the case.

Wand of probing zapped at or through a shop door or even at a shop
wall will add the shop annotation to the overview data.  That works
differently for normal shops than for subrooms in the twin business
theme rooms.  I'm not sure whether any fixing is needed there since
the shop type information gets suppressed as soon as more than one
shop becomes known on a level.
2024-05-09 12:54:29 -07:00
PatR
71cfcc6229 simplify simplify #overview shop handling 2024-05-09 11:43:01 -07:00
PatR
4927b2cc1b simplify #overview shop handling
Add the shop type variations used for automatically generated
annotations to the shop structure and get rid of the switch that
has been being used to pick them.
2024-05-08 14:17:11 -07:00
Pasi Kallinen
ed5c7114ab Untrapping containers or doors gives some experience 2024-05-08 20:10:32 +03:00