Commit Graph

5328 Commits

Author SHA1 Message Date
PatR
59fbffd170 Guidebook update: "Map (rest of screen)"
The description of the default map display was out of date:

Sinks aren't conditional anymore, and were changed from '#' to '{'.
Statues were still listed as '`' but aren't displayed as that.
Room and corridor engravings weren't mentioned.
Wall of water and wall of lava weren't mentioned.
Drawbridge portcullis ('#' when closed) and span ('.' when open)
weren't mentioned.

This splits introductory "- and |" into two entries.

I've forced CR font (similar to TeX's tt font) for the initial
character of all the entries.

The formatting of letters for monsters left something to be desired
so I've tried to redo it.  The 'roff edition seems ok (as least when
there's no page break in the middle of it) but I'm not sure how the
LaTeX version will fare.  I didn't try to include the trailing "and"
on the first two lines the way the 'roff version does since I wasn't
sure how to accomplish that.
2024-07-16 14:49:34 -07:00
PatR
61affaed37 fix #K4202 - O/mO for prompted values treated \
player's input as a comma-separated list of option:value settings

Several compound values that aren't amenable to menus prompt for a
line of input and pass it to parseoptions() as if it came from the
run-time configuration file.  That shouldn't be treating commas as
option separators.

The fix is trival, at least for handling the text properly without
introducing new warnings to complain about rejections.  Some options
notice an unwanted comma and complain, others don't notice and the
extra text gets ignored.
2024-07-15 13:13:01 -07:00
PatR
72d2b0414c fix github issue #1257 - nymph theft while blind
Issue reported by Meklon2007:  some theft feedback during nymph
attacks refers to the attacker as "she" and others as "it" if hero
is blind.

The "she" references are intentional.  However, mixing them with
"it" references when a series of messages occurs is jarring.  This
changes "it" to "someone", which is still different from "she" but
hopefully enough less so to be tolerable.

That resulted in monkeys also being referred to as "someone" because
they're classified as humanoid.  Change x_monnam()'s AUGMENT_IT
handling, which chooses between "someone" and "something" when the
monster is not seen, to override humanoid for animals (affects 'Y'
class) and for mindless (affects zombies, mummies, and golems).
So an unseen monkey will be "it" again.

The final message for current item was relying on a cached monster
name value.  If an unseen nymph or monkey stole a worn blindfold
so that hero's vision was restored:  "It <stole> item" before the
changes and "Someone|Something <stole> item" after.  So update the
cached name if sight gets regained, to give "<Mon> stole <item>."
(If the item is worn armor and the thief is a nymph, it was and
still is "She stole <item>".)

The message for having any worn item be stolen, which got split
into two parts within the past year, was giving "<Mon> takes off
<alt weapon>".  When not dual-wielded, the alternate weapon isn't
really worn.  Rather than suppress it outright, change the message
for uwep/uswapwep/uquiver to say "disarms" instead of "takes off".
For accessories, change "takes off" to "removes".  Those are more
or less interchangeable these days but "removes" matches R instead
of T.

While testing, my pet evidently killed a nymph (I was blinded and
couldn't see it happen) while she stole my gloves and the next
message I got was "You finish taking off your suit."  The gloves
weren't worn anymore so equipname() defaulted to suit.  Get rid of
equipname() altogether and switch to armor_simple_name() which
doesn't rely on the worn-armor pointers.

Fixes #1257
2024-07-13 12:30:59 -07:00
PatR
0b30a7b18a farlook vs "wall of lava"
Implement a couple of missing bits for wall of lava terrain.  It was
immune to being distorted by hallucination, unlike molten lava and
wall of water.  And the presence of wall of lava made molten lava,
after being shortened to "lava", no longer be listed as something
represented by the "}" character.

I started to renumber S_water, which would eliminate some hackery
from farlook's do_screen_description(), but that will require an
EDITLEVEL increment and make it necessary to reorder/renumber the
corresponding tiles so I stopped short.

This adds NHDT tags to the first line of defsym.h.
2024-07-09 15:49:48 -07:00
Pasi Kallinen
cf44c3046e Join wall spines with walls of water and lava 2024-07-09 18:08:19 +03:00
PatR
ee08c05e03 quest leader|guardians seeing hero attack peaceful
If the quest leader observes the hero attacking a peaceful monster,
only become angry if that peaceful monster is a quest guardian.  And
when becoming angry, stop waiting for the hero to approach.

If a quest guardian observes the hero attacking any peaceful monster,
don't run away.
2024-07-09 02:48:05 -07:00
Pasi Kallinen
d4ac146c5f Pets avoid a possible boulder pushing location in Sokoban 2024-07-06 23:12:19 +03:00
PatR
10c85d68bb fix #K4172 - selling all into container
When using #loot to put items into a shop-owned container on a shop's
floor, you are asked "Sell it? [ynaq] (n)" for each item, but the 'a'
and 'q' choices only worked as y or n for the current item.  By the
next one, the preferred answer had been reset to default and ynaq was
asked again.

Set a flag in use_container() to have in_container() set the sell vs
don't sell state for the first item but not for any others.  Reset
the state at the end of use_container() instead of after each item in
in_container().

This bug was present in 3.6.x, also in 3.4.3, and probably earlier.
2024-07-03 23:28:05 -07:00
PatR
7fa328fda3 redo itemized shop billing for containers
Finish shop changes begun in 2674a9904d.

Fix the longstanding bug where shop paying with itemized buying would
reveal container contents if any unpaid items were inside containers,
regardless of whether the containers' contents were known yet, even
when the container was a locked box/chest or a cursed bag of holding.
Paying by menu made that be more noticeable but it has been present
ever since itemized paying was introduced.  I can't find any old bug
reports for it though.  I did find an old message of mine that claims
it's in bugzilla with a "#Hnnnn" tag.

This changes how buying containers and their contained items behaves.
It's now an all or nothing operation.  Itemized billing will list
the container but not contents, and to buy what is inside you need
to pay for the whole thing as a single unit.  If the container itself
is unpaid then its price is part of that item's total cost.  If it is
hero-owned than it is listed as an item to buy but doesn't increase
the cost derived from its unpaid contents.  (If you decline to pay,
hero will still own the container and still owe for unpaid contents.)
2024-07-02 14:52:49 -07:00
PatR
54138bbbe3 'Ix' fix
This took me a while to track down.  I noticed it while drinking
unpaid potions but didn't expect the issue to be potion-specific.
Affects paying shop bill in addition to examining [former] inventory.

Start with a stack of 3 unpaid potions.
Iu
a - 3 potions of healing (unpaid)
Ix
no used up items

Drink one.
qa
Iu
a - 2 potions of healing (unpaid)
Ix
x - potion of healing

So, far everything's normal.  Note that 'x' is an arbitrary letter
used for expended items when shown in inventory style rather than an
inventory letter or menu choice.

Drink another.
qa
Iu
a - a potion of healing (unpaid)
Ix
x - potion of healing
x - potion of healing

Drink the last one.
qa
Iu
no unpaid items
Ix
x - potion of healing
x - potion of healing
x - potion of healing

In 3.4.3, these last two Ix cases would have had single lines of
'x - 2 potions of healing' and 'x - 3 potions of healing', respectively.

After this fix, they will again--unless potion stack 'a' was wielded,
readied as alt-weapon, or quivered.
2024-06-21 15:32:46 -07:00
PatR
a2c2e0b1c6 fix github issue #1250 and #1229 - ^A issues
Reported by ars3nly as "#1250: Repeating #sit causes a sitting loop",
with a followup comment describing how to reproduce easily, and by
Umbire as "#1229: Curses and extended command menus".  Repeat count
from previous command carried over to current command when ^A was
used to re-run the current one.

Reset 'last_command_count' every time a repeat count is obtained,
even when the new one is 0.  This is a much simpler fix than what
was used with several previous attempts, but it seems to be working.

The do-again code is convoluted, but the tricky bit was the fact
that this problem only happened when number_pad was On with repeat
counts entered as 'n<digits>'.  I still don't understand that aspect,
but it wasn't happening for count of simple '<digits>', making
reproducing it by someone who doesn't use number_pad be difficult....

Closes #1229
Closes #1250
2024-06-17 15:17:50 -07:00
PatR
c2f717cd65 altmeta vs number_pad
While testing a potential fix for issue #1250, I discovered that
using the altmeta option, to simulate typing Alt+x to get M-x via
typing 'ESC x', didn't work after a count prefixed by 'n' when in
number_pad mode.  It did work as intended for !number_pad when a
repeat count prefix is entered via digits without 'n'.

This doesn't solve #1250, which also occurs for number_pad but not
for !number_pad.
2024-06-17 04:23:34 -07:00
Pasi Kallinen
951401e52a Allow fixed-destination teleport traps
Add a theme room with multiple visible teleportation traps
which will always teleport to specific locations in the same level.

Teleport trap change from xNetHack by copperwater <aosdict@gmail.com>.
2024-06-14 19:50:20 +03:00
PatR
24e06171db fix issue #1256 - no_of_wizards incorrect \
if Wizard escapes the dungeon

Reported by vultur-cadens:  a fix to prevent quest feedback when quest
nemesis is removed from the game during bones creation introduced a
regression for an earlier fix that kept context.no_of_wizards up to
date if the Wizard of Yendor escapes the dungeon without dying.

Change 'wizdead()' to 'wizdeadorgone()' and call it from m_detach()
for mongone() as well as for mondead().

Fixes #1256
2024-06-13 12:18:17 -07:00
PatR
bc897ac69c fixes entry type fix, plus expansion 2024-06-09 14:30:40 -07:00
PatR
d7008f8fe5 fix #K4189 - dorecover() bug
Restoring was hiding unhidden mimics and if that chose an object
other than boulder of gold pieces, it called mkobj() before an
array used by that routine was initialized.  The result was warning
"rnd(0) attempted" when NH_DEVEL_STATUS wasn't set to 'released' or
divide by 0 crash if it was set to that.

Restore should not be catching up for lost time when unpacking a
save file into individual level files, and if it hadn't done that
it wouldn't hide mimics who aren't currently hidden.

In addition to avoiding that, this also moves the initialization of
the offending mkobj array sooner.

[3.6 didn't use that array so wasn't susceptible to this.  It is
hiding unhidden mimics during what should be a strictly bookkeeping
operation though.]
2024-06-08 13:34:12 -07:00
PatR
cfb053157a fix github issue #1253 - shape change vs Elbereth
Issue reported by chadministratorwastaken:  were-creature that was
ignoring Elbereth while in human form would make one more attack
after changing into creature form.

Have new_were() make an onscary() check when changing to beast form
while next to the hero.  Do likewise for polymorphing creature.

Fixes #1253
2024-06-04 23:59:39 -07:00
PatR
8652262105 DEBUGFILES
Fetching a value of DEBUGFILES from the environment to enable
debugpline() messages was intended to operate in wizard mode only
but that wasn't enforced.
2024-06-04 14:53:17 -07:00
PatR
cf2a97dea4 tty invisible cursor
Make the cursor visible when performing a shell escape or pushing
nethack into the background.
2024-06-04 14:45:00 -07:00
Pasi Kallinen
2bec685bae Pyrolisk eggs explode when broken 2024-06-02 10:50:58 +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
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
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
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
nhw_cron
8e6f3ccc7d This is cron-daily v1-Apr-1-2024. 005manpages updated: makedefs.txt 2024-05-13 10:16:03 -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
Pasi Kallinen
ed5c7114ab Untrapping containers or doors gives some experience 2024-05-08 20:10:32 +03:00
PatR
5abd1be175 fix github issue #1239 - incorrect tile for Ixoth
Issue reported by Shrigis1:  the tile for Ixoth depicts a demon that
resembles Nalzok but it ought to be a red dragon.

The issue entry included a binary tile attachment.  Rather than try
to deal with that, I've cloned red dragon and included the old tile's
eyes.  The issue describes them as green but they look gray to me.
(Ordinary red dragon has white eyes.)

3.4.3 had same issue.  I don't remember whether Ixoth was originally
a demon but his tile seems to have always shown one.

Fixes #1239
2024-05-02 11:16:25 -07:00
PatR
37a7e62be5 pull request #1237 - bill_dummy_object() is
overcharging when using up a stack instead of single item

Pull request by entrez:  shop bill was being inflated by item count
if more that one unpaid item got used up at once.  Lighting N unpaid
candles charged N * N * single_candle_price instead of the intended
N * single_candle_price.

This PR was in response to issue #1236 by Xdminsy:  usage fees for
applying more unpaid candles are multiplied by amount once more.

Closes #1237
Closes #1236
2024-04-27 23:20:27 -07:00
PatR
1f8db3a0f3 pull request #1238 - pit interaction when pool
underneath gets boiled away

Pull request by disperse:  when a water walking hero zaps a wand of
fire downward and it boils away the water, hero should fall into the
resulting pit.

The PR commit didn't handle monsters (who don't zap wands downward
but could be on/in water that's boiled out from under them).  And
while testing it I noticed that the existing code had message
sequencing issues (being enveloped in a cloud of steam before seeing
the water evaporate).  This ended up redoing the fix rather than
using the commit.

Fixes #1238
2024-04-27 18:37:42 -07:00
PatR
ec99383b81 engraving with stack of cursed weapons
Fix a FIXME added for issue #1233.  When engraving, if the writing
implement is a stack of cursed weapons which are welded to the hero's
hand, just write in the dust rather than engrave in the floor, in
order to keep the whole stack welded.

Only applies when the stack is actively welded.  Other stacks of
cursed weapons will have one split from the stack to perform the
engraving, otherwise engraving could be used to determine whether a
stack is cursed without the risk of wielding it.
2024-04-25 17:41:06 -07:00
PatR
a49444ea39 fix github issue #1233 - egraving with stacks
Issue reported by NetSysFire:  engraving with a stack of multiple
weapons dulls the whole stack where it ought to only dull one of them.

This was actually trickier than it ought to have been, and will need
a lot more testing.  When engraving with a stack, split one off and
use just that one.  If inventory is full, it will be dropped (after
writing the first 2 characters and becoming duller).  I've avoided
moving it into the overflow slot, otherwise engraving repeatedly with
an arbitrarily large stack could be used to produce an arbitrary
number of overflow items.

Engraving with a weapon of known enchantment us somewhat more verbose
than it used to be.

From the report:
" It would be a great quality of life change if only one item of the
" specified stack was used, as with #forceing open chests.

One person's improved quality of life is another's outrage.  Players
who want to dull a stack of +6 daggers down to +5 in order to have
another try of enchanting to +7 are not going to like this....

Closes #1233
2024-04-20 17:00:04 -07:00
PatR
29b4c47bdf fix #K4142 - camera flash vs mimic
When a camera flash hit a mimic which was posing as something, the
feedback mentioned the mimic but didn't bring it out of hiding.

Change to make light pass over a mimic impersonating an object but
unhide one impersonating furniture.  Ones impersonating some other
monster are woken up but wakeup doesn't force it back to mimic shape.

Trying to get the messages right brought on more code changes than
antipated.  I changed one of the arguments to mhidden_description()
so had to change its callers; fortunately there aren't very many.
2024-04-16 23:34:26 -07:00
PatR
cf8ab3137f 'fix typos' fix
The big typos fix commit changed the misspelling "wharever" to
"wherever" but it should have been "whatever".

Plus a punctuation bit I had sitting around.
2024-04-14 11:21:24 -07:00
RainRat
af3a321acb Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-13 23:45:32 -07:00
RainRat
262c9e763c Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-13 09:15:39 -07:00
Pasi Kallinen
3086f16386 Shopkeepers bill you for using their bear trap or land mine 2024-04-13 15:10:15 +03:00
Pasi Kallinen
a57d0e6f4f Curses: add support for the palette config option
Depends on CHANGE_COLOR compile-time option.

Also allow multiple palette-definitions in the config file.
2024-04-13 12:01:43 +03:00
PatR
749f2ffb0e update 'hitpointbar' documentation 2024-04-12 11:52:26 -07:00
RainRat
6445c97a4e Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-12 09:03:48 -07:00
Pasi Kallinen
00d0700e75 Pit fiends can easily climb out of pits 2024-04-12 11:13:24 +03:00
RainRat
ef7046e9bf Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-11 18:29:38 -07:00
RainRat
7b0ba4a562 Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-11 14:00:18 -07:00
Pasi Kallinen
f15035868c Change Nalzok and Minion of Huhetotl to bright red
Disambiguate them from all the other red major demons.
The tiles are already bright red.
2024-04-11 21:39:22 +03:00
PatR
7da370d74a experimental hitpointbar change
For tty, make hitpointbar blink if current HP falls to the critical
HP threshold.  Doesn't require status highlighting.  Not changed:
when status highlighting is active, use the HP color but force the
attribute to be inverse (plus blink if the criterium is met) rather
than whatever the HP highlight specifies.

For curses, do the same thing.  It used to honor HP attribute for
hitpointbar, now it behaves the same as tty:  always inverse, maybe
combined with blink.  The new code assumes that inverse and color
can be turned off without turning off active blink in the process.

I had intended to make hitpointbar be a full-fledged status field
(which happens to be rendered on top of title) so that it could be
highlighted differently from hit points (mainly so that one could
highlight up and down changes while the other showed percentages).
This is less versatile than that but much simpler.
2024-04-11 11:06:29 -07:00
Pasi Kallinen
f1c77aa2fd Pets avoid a location hero just kicked
If hero kicks a location, pets and peacefuls will avoid moving
into that location for that turn.
2024-04-11 18:05:18 +03:00
RainRat
2787bfdcbd Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-10 23:26:14 -07:00
Pasi Kallinen
62b78ba037 Hero movement affects water bubble direction 2024-04-10 21:57:05 +03:00