Commit Graph

14636 Commits

Author SHA1 Message Date
nhmall
095e4ffe31 add some curses support for coloring of map frame 2023-01-01 20:05:03 -05:00
nhmall
32a030c8c6 introduce X11 support for coloring map frame 2023-01-01 20:04:27 -05:00
nhmall
0a03ca1e99 introduce Qt support for color of map frame 2023-01-01 20:03:30 -05:00
nhmall
2fc0d25d45 introduce support for coloring the frame behind a map location
Also includes support by paxed for polearm targeting using the
frame color.

Also renames USE_TILES to TILES_IN_GLYPHMAP which is a more
accurate description.

Not all window interfaces have full support for the color framing
of the background square yet.

MS-DOS needs further work (to bring it to both VESA and VGA, with
and without tiles.

Windows GUI is missing support.

X11 and Qt have been started, but may require further refinement.
2023-01-01 19:55:02 -05:00
nhmall
1972c8447f update year in copyright 2023-01-01 17:31:34 -05:00
PatR
21b9506d3f comment fix in display.c
A comment in front of unmap_object() was missing the end of a
sentence in the middle of a short paragraph.  That has been the case
as far back as 3.3.0.  I found the sentence's full text in 3.2.0
(without checking 3.2.[123]).  The rest of the paragraph got changed,
presumably at the same time as the missing part got lost.

While in there, change "any more" to "anymore".  According to a
dictionary, the one-word form is the more commonly usage.
2023-01-01 00:21:51 -08:00
PatR
e1a2432233 fix tilemap - no panic()
tilemap isn't linked with util/panic.o so doesn't have access to
panic().  Despite that, linking on OSX found panic() somewhere.
(It doesn't do format argument substitution, just prints out the
argument we pass as format string, then aborts.)

Instead of calling panic(), print a message to stderr, delete the
incomplete tile.c whose construction has failed, and exit with
failure status.  Linking with panic.o wouldn't handle the message
and final failure but not help with the incomplete output file part,
so this hasn't done that.
2022-12-31 13:35:17 -08:00
PatR
765c853a5a pull request #942 - shopkeeper chat changes
Pull request from entrez:  change some pline() messages to verbalize()
and re-enable some chat feedback given when a shopkeeper is poly'd
into some form that can't speak.

Closes #942
2022-12-31 12:42:52 -08:00
Michael Meyer
ee270bfbe0 Use verbalize for shopkeeper price-check #chatting
The shopkeeper is speaking out loud, so use verbalize for consistency
with other types of speech.

I couldn't figure out a way to wrap the multiline version in quotes in a
way that actually worked and looked good, so I restricted this to the
pline responses.
2022-12-31 12:22:13 -08:00
Michael Meyer
f38a40fafd Tweaks to chatting with mute shopkeeper
A mute shopkeeper shouldn't be able to verbally tell you the prices of
objects.  For normal chatting, on the other hand, shk_chat can handle a
mute shopkeeper (by changing from speech to "indications" -- hand signs,
body language, etc), so allow execution to reach that even if the
shopkeeper is mute (in a silent polyform).

Also more generally allow a shopkeeper to continue chatting with normal
shopkeeper responses if polymorphed into another creature, since they
apparently retain their minds (are able to tell you prices, can
transact, etc).

This is mostly inspired by the fact shk_chat has extensive handling for
mute shopkeepers, but it was unreachable as far as I can tell.  It is
also funny to think of a newt or something wriggling around to indicate
it's been making a lot of money lately.
2022-12-31 12:22:13 -08:00
PatR
459b185a98 pull request #939 - revise #wizsmell command
Pull request from entrez:  add a funny message if player targets hero
with #wizsmell command.

I've modified it to put a "remembered, unseen monster" symbol on the
map if sniffing a non-monster location reports a monster's smell and
to remove that symbol if sniffing it reports "no monster there".

Closes #939
2022-12-31 12:13:41 -08:00
PatR
dcd3fe8437 smelling an unseen monster puts 'I' on map 2022-12-31 12:11:28 -08:00
Michael Meyer
be810f3ede Remove canspotmon() requirement from #wizsmell
You can attempt to smell a monster at particular coordinates even if you
can't see it.  Revert the message for the 'can't find a monster there to
smell' case to "That is not a monster", as it was before, since the
change makes it so that you only reach that line if there genuinely is
no monster there (previously it would be reached if there was a hidden
or undetected monster on the specified spot).
2022-12-31 11:37:06 -08:00
Michael Meyer
8c831fcad0 Add a funny message for smelling yourself
I know this is inane, especially for a little-used debug-mode-only
command, but I can't get it out of my head...

The use of the actual monster data instead of the glyph as a proxy ought
to make it somewhat more consistent as well (e.g. hallucination and
'showrace' won't affect the results), though I think that'd hardly be
worth it were it not for the incredibly funny message.
2022-12-31 11:37:06 -08:00
PatR
b3b7e8c19c fixes entry for pull request #920 - paralyzed hero
Pull request from entrez:  hero needs to be able to move in order to
help a nymph or succubus or incubus to remove worn armor.

Closes #920
2022-12-31 11:28:13 -08:00
Michael Meyer
15274fcca1 Make paralysis intefere with seduction attempts
tinklebear on IRC noticed that a hero paralyzed by a floating eye was
still "charmed" and capable of "removing her armor" as part of a nymph's
theft attack.  The same thing was true of foocubus seduction: a
paralyzed hero was still able to respond to the questions about whether
particular pieces of armor should be removed (and also do whatever else
may be involved in a successful attack...).

I think paralysis should prevent both those things.  Nymph theft will
still work, unless she needs the hero's active cooperation in removing a
bulky piece of armor.  Foocubus attacks will be prevented entirely by
paralysis, making it interfere like unconsciousness already does.

Apply a similar constraint to hero vs monster seduction, as well.
2022-12-31 11:25:53 -08:00
PatR
8397b15d83 some tilemap.c cleanup
I'm headed back to the drawing board for some tiles changes I was
attempting, but before tossing what I had I've extracted a modest
amount of cleanup for the code in win/share/tilemap.c.  Some
formatting, a bit of generated formatting, make ENHANCED_SYMBOLS
less intrusive, and an error check to prevent a crash in tilemap
I triggered.  Also avoid one in nethack caused by an object (not
included here) which had a description but no name.
2022-12-30 12:45:02 -08:00
PatR
11b72eb18b Guidebook typo
Fix misspelling of recently added "sortvanquished" option.
Copy+paste propagated it to from Guidebook.mn to Guidebook.tex.
2022-12-28 11:37:14 -08:00
PatR
077fdcfaac followup for miscellaneous objects[] macros
The DUMP_ENUMS definition of 'MARKER()' had the expansion of its
arguments backwards but isn't even needed, so get rid of it rather
than reverse them.  nethack --dumpenums handles them separately
from object definitions.
2022-12-28 11:33:39 -08:00
PatR
ddd358aa03 miscellaneous objects[] macros
Replace FIRST_GEM and LAST_GEM with FIRST_REAL_GEM, LAST_REAL_GEM,
FIRST_GLASS_GEM, and LAST_GLASS_GEM and define those along with
objects[] rather than separately.  Do the latter for FIRST_AMULET
and LAST_AMULET too.  Also new FIRST_SPELL and LAST_SPELL used to
compute MAXSPELLS.  (That value looks wrong to me, but this defines
it with the same value as before.  If it gets fixed, EDITLEVEL will
need to be incremented.)

This started as just proof of concept that extra information could
be collected as objects[] gets initialized at compile time.
2022-12-28 01:50:24 -08:00
nhmall
57dc8891d6 Guidebook datestamp 2022-12-27 21:03:41 -05:00
PatR
fcf2685cc3 'sortvanquished' option in Guidebook.tex
Not tested, but I tried to be more careful than last time....
2022-12-27 14:15:49 -08:00
PatR
249e431e46 new 'sortvanquished' option
Allow the preferred sort order for the vanquished monsters list to
be specified in the run-time config file
|OPTIONS=sortvanquished:X
where X is t, d, a, c, n, or z.  It can also be set to 'A' or 'C'
but those aren't documented and aren't offered as choices when
setting the value interactively, which can be done via 'm O' or by
using 'm #vanquished'.

Guidebook.mn has been updated but Guidebook.tex is lagging again.
2022-12-26 14:56:12 -08:00
PatR
a294fdf179 boomerang bits
Refine the recent throw-and-return catching routine.
2022-12-25 13:28:02 -08:00
PatR
c380234325 {freez,flam,shock}ing spheres difficulty ratings
Adjust mstrength() so it generates difficulty assessments matching
the mons[].difficulty values for freezing spheres, flaming spheres,
and shocking spheres.  #wizmodiff now reports "no discrepancies".
2022-12-25 13:21:56 -08:00
nhmall
a4c9073a7c Guidebook datestamp; updated Guidebook.txt 2022-12-25 10:12:47 -05:00
nhmall
ca716c831b make some corrections to Guidebook.tex 2022-12-25 10:09:43 -05:00
PatR
4436d1eb4a doc update: 'role' changes for Guidebook.tex
Catch the LaTex Guidebook up with the nroff one for the role, race,
gender, and alignment options.

For both formats, comment out the decription of 'altmeta' on Amiga.
2022-12-24 14:29:58 -08:00
PatR
9a9f2d596d fix boomerang equiped in multiple slots
Reported directly to devteam:  with one quivered boomerang and a
compatable stack of one or more boomerangs either wielded or in the
alternate weapon slot, throwing the quivered one, failing to hit any
target or obstacle, and catching the returning boomerang would empty
the quiver, merge the caught boomerang with the wielded weapon or
swap-weapon slot, then re-quiver and yield
|x - 2 boomerangs (wielded) (at the ready)
or
|y - 2 boomerangs (alternate weapon; not wielded) (at the ready)
If 'sanity_check' was On, complaints would ensue.

'autoquiver' may need to be On in addition to the thrown boomerang
being the last item in the quiver.

The unsplit portion of the fix feels unclean.  There's bound to be a
better way.
2022-12-24 00:27:59 -08:00
PatR
9657b78359 dismount tidbit
I just noticed a couple of direction manipulaton macros that I hadn't
been aware of.  Change recenlty added DISMOUNT_KNOCKED to use them.
2022-12-23 15:42:08 -08:00
nhmall
bfe668c7ef memory not freed
Reported directly by feedback form.

Changes from a recent pull request resulted in more array entries
than MAX_GLYPH, so the for loop in free_glyphid_cache() wasn't going far
enough, leaving some dupstr() strings unfreed.
2022-12-23 16:38:53 -05:00
PatR
91e2ab13b2 last? role/race/&c option values update
Keep track of how a role|race|gender|alignment option got its value
so that role:!Tourist in .nethackrc and role:!Priest in NETHACKOPTIONS
yield 'role:!Priest' rather than merging into 'role:!Priest !Tourist'.
It also doesn't write the value into new config file for #saveoptions
if that value comes from environment or command line (not applicable
since the command line arguments for role,&c don't go through options
handling).  Also, the old config file value takes precedence over
the current game's value file so that 'role:random' doesn't become
'role:Healer' or such in a new config after the random value gets
picked for play.

This only tracks the role, race, gender, and alignment options but the
concept could be extended to all options.  The data would need to be
saved and restored if values set interactively need to be retained in
restore sessions (doesn't apply to role,&c since those don't change
during play).
2022-12-22 15:07:33 -08:00
Pasi Kallinen
37f6eee147 Add themeroom filler "Storeroom"
Contains mostly mimics (pretending to be chests), and possibly some chests.
2022-12-22 21:47:13 +02:00
PatR
c77b8b8073 old pull request #609 - neutral #offer feedback
Pull request from Vivit-R was to change feedback when offering on a
neutral altar from "your sacrifice is consumed in a cloud of smoke"
to "... in a puff of smoke".  There were multiple comments, some
agreeing and some disagreeing but no better alternatives offered.

I'm ambivalent to whether any alteration was needed, but think "puff"
sounds rather passive.  I looked at a lot of synonyms and considered
"veil of smoke" and "haze of smoke" and even "puff of vapor", but
finally settled on "plume of smoke".  It isn't something that appears
and is gone in an instant like the lawful flash of light and chaotic
burst of flame, but I think it is more interesting than cloud or puff.

The PR's commit hasn't been used since 100% of its content is being
superseded.

Closes #609
2022-12-21 14:31:13 -08:00
PatR
657f0de5f8 sequencing issue: dismounting from dying steed
Reported by entrez:   if a trap killed hero's steed and dismounting
was fatal for the hero (probably by falling onto the same trap),
impossible "dmonsfree: 1 removed doesn't match 0 pending" warning
occurred during game-over cleanup.

Move the dismount calls in mondead() and mongone() from before their
m_detach() call to the end of m_detach() itself.  This led to a
cascade of problems and attempted fixes until finally zeroing in on
place_monster()'s sanity checks and dismount_steed()'s attempts to
work-around one of them.

This reverts the convoluted hack from four years ago in commit
be327d9822 and deals with the issue in
a simpler way.  After that, the new dismount_steed() placement at
end of m_detach() works cleanly.
2022-12-21 14:02:05 -08:00
PatR
13c1debf26 pull request #951 - Guidebook tweak for #repeat
Pull request from entrez:  in TeX version of Guidebook, the #repeat
command was formatted differently from other extended commands.

(The recent changes to role, race, gender, and alignment options in
Guidebook.mn still haven't made it into Guidebook.tex.)

Closes #951
2022-12-20 23:38:54 -08:00
Michael Meyer
96343924ae Guidebook: formatting for '#repeat' heading
Minuscule change.  #repeat was not monospaced like the other extended
commands.
2022-12-20 23:38:33 -08:00
PatR
3a05ec8055 more PR #902 - excising "Current"
Change ^X feedback of "Current Characteristics" to just
"Characteristics" to match the change for "Status" and "Attributes".
2022-12-20 23:31:49 -08:00
PatR
460dc842b9 pull request #902 - ^X "Current X" -> just "X"
Pull request from zomGreg:  for ^X feedback, change "Current Status"
and "Current Attributes" to "Status" and "Attributes", respectively.

Closes #902
2022-12-20 23:21:32 -08:00
Greg Moselle
86ab924745 The word 'Current' is unnecessary here (and in general). 2022-12-20 23:20:44 -08:00
PatR
33a5dbff37 sleeping vs deafness
Another one from entrez: falling asleep tried to make the hero Deaf,
but was adding a negative value to the timeout.  A negative value
of bigger magnitude that the current timeout could produce weird
values when making that be negative and then stuffing it into an
unsigned field.

This applies a fix to sleep-causes-deafness bug but also disables
that, at least for the time being since nobody seemed to notice that
it wasn't working.  The fix might be noticeable so needs testing.

This also adjusts You_hear() so that if Deaf and sleeping are both
active, it will still yield "You dream that your hear ..." instead
having Deaf override that.
2022-12-20 15:23:40 -08:00
PatR
53a4e3f80a unconscious hero vs Medusa
Reported directly to devteam by entrez:  a sleeping or unconscious
hero would still meet a monster's gaze attack even though those are
supposed to be eye-to-eye rather than just the monster looking at
you.  Don't meet the gaze when Unaware, despite the fact that the
hero isn't blind and vision remains in operation.

Initially being Unaware also blocked Medusa's gaze being reflected
but I changed things so that that still affects her.  It contradicts
the eye-to-eye aspect but is more consistent with her looking at a
blind hero who has reflection.
2022-12-20 14:44:19 -08:00
Pasi Kallinen
5e47afed4f Typofix 2022-12-19 18:20:31 +02:00
Pasi Kallinen
32bbf84ee1 Add strangled to safe_wait
... and ignore vomiting from sickness.
2022-12-18 12:36:34 +02:00
Pasi Kallinen
d7e90fbae2 Expand safe_wait to deadly status afflictions
Searching or waiting with safe_wait on will now consider
sliming, stoning, or deadly illness to be hazardous and prevent
the command.
2022-12-18 00:40:38 +02:00
PatR
60a328bc2c paranoid confirmation prompt
yn() and company show the list of possible responses in square
brackets and the default response in parentheses:
|Do foo? [ynaq] (y)
but paranoid_querty() was using the punctuation chars backwards
|Do foo? (yes) [n]
or
|Do foo? (yes|no)
depending on the level of paranoid.  Change those to be
|Do foo? [yes|n] (n)
(default gets used for <return> but unlike yn(), not for <space>)
and
|Do foo? [yes|no]
(with no default for the latter).
2022-12-16 12:21:23 -08:00
PatR
dfa5bb5941 role,race,&c options: environment vs config file
Due to the unorthodox values for role, race, gender, and alignment,
specifying a negated value or set of values in NETHACKOPTIONS wasn't
overriding a specific value set in the run-time config file.  The
command line should take priority, then environment, then config file,
lastly builtin defaults.

This could probably use some improvement.  It now treats role:!val
as if there was no val role and the entry was role:random rather than
previous role:none (affects prompting).

[I've just realized that role:!foo in environment will be combined
with role:!bar in config file rather than replacing it.  I'm not sure
how to deal with that.]
2022-12-15 15:56:52 -08:00
PatR
df7e575500 fix issue #949 - dropping welded iron ball
If punished and the attached iron ball was both cursed and wielded,
falling while going down stairs would drop it instead of leaving it
welded to hero's hand. ( Didn't happen for iron ball that wasn't
chained to hero's leg.)

I thought that this was going to be a one or two line fix but ball
and chain stuff is never that simple.

Fixes #949
2022-12-15 13:48:59 -08:00
nhmall
995fae39b5 spurious warning with visual studio 2017
Don't force on a particular warning in the nmake Makefile if
compiling using the older visual studio 2017.

Resolves #950
2022-12-15 08:39:30 -05:00
PatR
e4145f7dc1 calling objects
An earlier attempted fix was not working as intended.  This
accomplishes what I was trying to do.  I haven't reverted
interesting_to_discover() to static within o_init.c.
2022-12-14 14:07:22 -08:00