Commit Graph

5307 Commits

Author SHA1 Message Date
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
RainRat
7656804ae9 fix typos 2024-04-10 00:46:21 -07:00
PatR
f545ca8f22 fix #K4138 - untrapping a monster while blind
If a tame or peaceful monster was trapped and blind hero hadn't seen
the trap yet, attempting to swap places would report that the monster
couldn't "move out of that trap".  And if the 'tips' option was True,
the game would suggest attempting #untrap.  But #untrap would report
that the hero wasn't aware of any trap at the spot, and fail.

Change the original message to "move out of that <type-of-trap>" and
if hero hasn't seen it yet, map it and vary the wording slightly
"... a|an <type-of-trap>".  If #untrap is attempted, it will now be
dealing with a known trap.
2024-04-07 16:56:02 -07:00
Pasi Kallinen
712a735111 Guidebook: hitpointbar is also available in curses 2024-04-07 12:24:19 +03:00
PatR
2b6b056f0e fix github issue #1230 - sleeping orc catches gold
Issue reported by Ryton:  a sleeping orc caught a thrown gold piece.
Throwing one at some other sleeping monster woke it up.

That is actually intentional.  Sleeping monsters with the 'greedy'
attribute will wake up without becoming angry and catch thrown or
kicked gold that is aimed at hit them.  The fix here is to augment
the catch message to say so.  Non-greedy monsters wake up and treat
it as an attack, but the gold always misses.

Both cases only happen for monsters who are asleep for an indefinite
period of time.  Any monster that is asleep (or paralyzed, or busy
putting on armor) for N turns effectively doesn't notice.  If it can
be seen, the gold "harmlessly hits" (if it can't be seen, the gold
misses), and the target continues doing--or not doing--whatever it
is doing.  That's suboptimal; another case where lumping multiple
can't-move situations into a single monst->mfrozen countdown timer
causes timed sleep to be indistinguishable from timed paralysis.

Closes #1230
2024-04-06 18:39:11 -07:00
Pasi Kallinen
28ed8e7962 Unblind telepathy range
Unblind telepathy range depends on the number of telepathy granting
items worn.

Breaks saves.
2024-04-04 23:22:28 +03:00
Pasi Kallinen
8762ab38ef Silent monsters in stinking clouds don't cough
... and you can hear the coughing some distance away,
even if you can't see the monster.
2024-04-04 12:32:31 +03:00
Pasi Kallinen
defb5d5f80 Pets considered any noise made by hero as whistling
In 3.6.2 parts of the wakeup code were merged together, and this
caused pets consider any noise made by the hero - such as hitting
iron bars or digging - as whistling for them to come to the hero.

Change it to only consider actual whistling and ringing a bell.
2024-04-03 12:46:15 +03:00
Pasi Kallinen
e821274382 Excalibur is much harder to get if hero is not a knight 2024-04-02 20:41:54 +03:00
Pasi Kallinen
7030b0b9fe tty: hide cursor unless waiting for user input
Use vi (cursor_invisible) and ve (cursor_normal) to hide and show
cursor, if the terminal supports those.  This way on a slower
connection the cursor doesn't jump all over the place when doing
map or menu updates.
2024-04-02 10:28:20 +03:00
Pasi Kallinen
c71e8ec8d4 Sunsword can be invoked to create a blinding ray 2024-03-31 19:43:33 +03:00
PatR
636432e883 variant spellings of "master lich"
From a reddit thread:  after genociding "arch-lich", player's next
target was "master-lich".  The character was a monk who immediately
died of genocide.

("Master<almost anything>" other than "master mind[ ]flayer" or
"Master Thief" or "Master Assassin" matches level 30 monk rank "Master".)

Rather than muck about with fairly complicated matching code, just add
"master-lich" and "masterlich" as explicit variations.
2024-03-28 03:10:38 -07:00
PatR
c6992777f5 end-of-game attribute disclosure in wizard mode
Disclosing final inventory while wearing an alchemy smock reported
the apron's slogan accurately but then disclosing attributes gave
different text if it was conferring poison resistance and/or acid
resistance.  The extra text was unneeded/unwanted there anyway, so
simply suppress it rather than force it to be accurate.

3.6.x had the same issue but it wasn't detectable there because it
only had extra text for T-shirts and they don't confer attributes.
2024-03-27 23:52:37 -07:00
PatR
18baf188ea fix github issue #1220 - shattering unseen weapon
Reported by NetSysFire:  if hero dealt a weapon-shattering melee
blow to an unseen target, the weapon was accurately described in
the accompanying message
|Its <formatted-weapon-description> is shattered from the force...!

If the hero can't see or sense the monster, report
|Its weapon is shattered from the force of your blow!

If the monster isn't seen but is sensed, then
|<Monster>'s weapon is shattered from the force of your blow!

Fixes #1220
2024-03-26 13:29:29 -07:00
Pasi Kallinen
720c62c340 Ring of aggravate monster increases level difficulty 2024-03-23 12:35:54 +02:00
Pasi Kallinen
9a870b5f06 Option to use a menu to answer yes/no prompts
Add a new boolean option 'query_menu'. If on, game will pop up
a menu for specific yes/no questions, instead of using an input prompt.
2024-03-22 19:19:57 +02:00
PatR
f801863e5c misbehavior by #adjust
Reported directly to devteam:  using '#adjust a a' to collect
invent stacks compatible with the one in slot 'a' all into 'a' gave
feedback of "Merging: a - ..." even though "Collecting: a - ..."
was intended.  Also, if there weren't any such compatible stacks,
so that the whole operation didn't accomplish anything, it reported
"Collecting a - ..." without the intended colon between the action
and the inventory letter.

Test case was trivial:  start with a stack of 2 of something in 'a'
and use '#adjust 1a b' to split into two stacks, then '#adjust a a'
to collect them back again.

While fixing this, I noticed that '#adjust a b' and '#adjust b a'
(from same starting situation) just swapped a and b instead of the
intended behavior of merging them back together.
2024-03-21 22:32:31 -07:00
PatR
a8fbb96f2b 'windowcolors' documentation
The construct "\\'#rrggbb'" seemed strange and while fixing that
I made several other changes.  There's an escape sequence for
apostrophe but "#rrggbb" doesn't actually need any quoting in the
first place (except for "\#" in the TeX version).

There was unwanted indentation after the OPTIONS=windowcolors line
in the 'roff version.  For the TeX version, avoid 'verbatim' since
it contains both literal text and placeholders that are now being
distinguished with italics.

Also, "trueblack" is Windows-specific rather than an ordinary named
color.
2024-03-21 09:59:43 -07:00
PatR
a0bea150e1 rephrase fixes entry about tutorial obj discovery
The fixes entry about object info carrying over when normal play
was resumed could have been mistrued as stating that the objects
themselves were carrying over.
2024-03-21 08:58:48 -07:00
PatR
a79d6d8e63 partly fix issue #1134 - tutorial leaks obj info
Reported by AndrioCelos, a handful of objects in the tutorial can
be discovered via use, and such discoveries were carrying over to
normal play when the tutorial ended.

This causes the hero to forget such discoveries.  The player will
still be able to remember them.  The proper fix would be to discard
the initialized but not-yet-started game when entering the tutorial
and then start a whole new one when exiting so that saving and
restoring game state would become unnecessary.  This doesn't do that.

This also causes monster birth and death statistics to be reset when
exiting the tutorial.  Affects the #vanquished command and potentially
extinctionist play.

Closes #1134
2024-03-21 08:32:58 -07:00
Pasi Kallinen
23d1657dca Add walking on traps to default paranoid_confirm 2024-03-20 19:31:09 +02:00
Pasi Kallinen
55263050df Doc: windowport putmsghistory 2024-03-19 18:59:23 +02:00