Commit Graph

15704 Commits

Author SHA1 Message Date
PatR
c1045cc18a sanity check: avoid "you over monster" impossible
I did this several months ago to avoid a sanity check warning (and
consequent fuzzer panic) when an engulfer expels the hero on a full
level.  I was hoping to refine it but never went back; install it
now before forgetting about it entirely.

If a chameleon changes from wall-phazer to engulfer while in a spot
the hero can't move onto and engulfs him/her, expelling the hero
after the engulfer has taken the hero's spot might be forced to put
the hero on top of the engulfer or another monster when unable to
use the engulfer's former spot.  Rather than try to figure out all
the possible ways this might happen and attempt to deal with each
of them, just prevent an engulf attack from succeeding if the hero
wouldn't be able to move to the engulfer's spot.  (Does not prevent
an air elemental over water from engulfing the hero.)
2023-11-02 09:12:37 -07:00
nhmall
196fd41817 comment out font warning argument to groff 1.23
The font warnings are no longer being generated as of b73e4815,
so there is no need for the '-W font' argument to groff at this time.
2023-11-02 10:31:50 -04:00
PatR
8cd032a6aa thawing ice fix
Ice in front of a raised drawbridge was desccribed as "[ice:19?]"
and didn't present any thaw status when hero was close.
2023-11-02 01:13:18 -07:00
PatR
a985fa1167 comment fixup for saving cond_xyz
This started as a typo/thinko fix but ended up rewording the comment.
2023-11-01 22:07:43 -07:00
PatR
b73e4815fa Guidebook.txt: silence groff complaints about CR
Don't attempt to switch to CR font (used to get fixed-width characters
when generating output that uses proportional width ones) when output
is already fixed-width (plain text).

The most recent release of groff (version 1.23) complains when a font
can't be found, then keeps going.  Earlier versions just silently kept
going.  Failing to load the CR font when already producing fixed-width
chars makes 'keep going' acceptable but the font-load-failure warnings
are a nuisance.
2023-11-01 21:35:56 -07:00
PatR
986596b26d tweak to #K4026 fix 2023-11-01 02:08:39 -07:00
PatR
fa0f3751a3 fix #K4026 - "object lost" panic during theft
"object lost" panic occurred when hero's worn amulet of magical
breathing was stolen.  This prevents drown() -> emergency_disrobe()
from dropping an item while in the midst of it being stolen, avoiding
the possibility of it no longer being in inventory when the theft
completes.  There may be variations other than drowning that lead to
unwear -> drop-or-destroy that are still vulnerable, and this fix can
potentially cause items to vanish from hangup save files.

It also has a side-effect of not being able to drop levitation boots
to lighten encumbrance enough to crawl out of water if the drowning
occurs while they are being taken off, not just when being stolen,
even though they should be easily droppable in such circumstance.  The
hero will just need to drop other things instead.
2023-11-01 01:54:32 -07:00
PatR
c8a84acfa5 handle C++ vs enum arithmatic differently
The cast to (int) was much simpler but this seems better overall.
2023-10-31 15:04:14 -07:00
PatR
8d98b920f4 comment typo 2023-10-31 11:49:29 -07:00
PatR
c13b0953c2 still more #saveoptions and cond_ options
If any cond_xyz options came from the old RC file or were changed with
'm O' but they were all back to their default values when #saveoptions
was executed, the new RC file would end up with 'OPTIONS=\n' at the
end.  Then if that RC file gets loaded in a subsequent game, there
will be a warning about "Empty statement".
2023-10-31 11:21:04 -07:00
nhmall
5c87596597 support builds incl Qt6 with clang-14,15,16,17 2023-10-31 13:08:32 -04:00
Pasi Kallinen
4b70213677 #saveoptions fixme comment 2023-10-31 18:16:56 +02:00
nhmall
56f8292579 move fixes entry to more appropriate section 2023-10-31 10:27:43 -04:00
nhmall
ae2bc073ad update fixes3-7-0.txt 2023-10-31 10:24:43 -04:00
nhmall
ead8053f91 outdated dependency for alloc.o in Makefile.utl 2023-10-31 10:11:15 -04:00
Pasi Kallinen
1d9726f821 More #saveoptions and cond_ options
Only save the cond_ options that are different from the default.
2023-10-31 14:57:36 +02:00
PatR
4ecc798d20 fix #4024 - C++ complaint about enum arithmatic
Not tested with a compiler that cares.  Still builds with Qt4 and an
older one.
2023-10-31 01:49:09 -07:00
PatR
6303141f1d fix #K4025 - #saveoptions vs cond_ options
Confusion between 'o_status_cond' and 'pfx_cond_'.  Still confusing
but I think now working as intended and expected.

If any cond_xyz option has been loaded from the RC file or changed via
'm O', #saveoptions still saves the full set rather than just the ones
that are different from their default value.
2023-10-31 01:19:20 -07:00
PatR
f25b5c4627 curses: digit as menu selector
Menus in the curses interface would honor a digit as a selector
character ("letter" :-) for PICK_ANY menus but forced it to start a
count in PICK_ONE menus.  This fixes that, although the menu where I
was using digits as selectors (not included) has been changed to use
letters so this fix isn't being exercised anymore.

Also, add a couple of comments about persistent inventory.
2023-10-30 16:26:54 -07:00
nhmall
df4d945395 The same warnings resulted with groff 1.23 on macOS 2023-10-30 16:59:58 -04:00
nhmall
a70cae04a3 Linux: refine warning suppression
groff 1.23 is known to have the issue
2023-10-30 16:20:49 -04:00
nhmall
f42108d255 suppress warnings with recent *roff
This does not fix the actual problem that is causing the warnings.
It merely suppresses the hundreds of warnings until the actual
problem is corrected.

If there is no NROFF_FLAGS defined in a hints file, there should be
no change in behavior.

At this time, only sys/unix/hints/linux.370 sets NROFF_FLAGS.
2023-10-30 12:52:48 -04:00
nhmall
a3f452bbe0 Verbose reversion follow-up 2023-10-29 21:02:47 -04:00
nhmall
6cbefc7c2d Revert "granular verbose message suppression mechanics"
This reverts commit be76727265.
2023-10-29 20:39:07 -04:00
nhmall
9bd9bbc57c Revert "granular verbose message suppression mechanics updated"
This reverts commit 95a39d0b71.
2023-10-29 20:29:11 -04:00
nhmall
67a695ac56 Revert "more Verbose"
This reverts commit 377be376fe.
2023-10-29 20:28:19 -04:00
Pasi Kallinen
03ee609ca0 Saving grace stops multi-turn actions, sleeping, and fainting 2023-10-29 18:01:28 +02:00
nhmall
351a1eb9d5 suffix tag files for directories in Makefile.nmake 2023-10-29 08:51:24 -04:00
Pasi Kallinen
16ed7e49c3 Separate level flags for premapped and sokoban 2023-10-29 12:35:32 +02:00
Pasi Kallinen
638c487c59 Split deadbook undead pacify effect into separate function
Also make the monster chain iterator functions more robust,
in case the called function changes the next monster pointer.
2023-10-28 19:01:46 +03:00
PatR
204cf6bf10 comment typos 2023-10-26 03:39:18 -07:00
PatR
d7799279e4 reverse accidental config.h change
I thought these had been stashed so that I could use 'git commit -a'
but evidently I got careless.
2023-10-26 03:15:10 -07:00
PatR
4dc8429d9e thawing ice followup
Modifying an() [actually just_an()] to treat "<thickness> ice" and
"frozen <hallucinatory liquid>" as special cases which shouldn't be
prefixed with "a" or "an" affected using something like "shaved ice"
or "frozen yogurt" as named fruit.
 |a) shaved ice
 |b) frozen yogurt (weapon in hand)
now have article "a" preceding them:
 |a) a shaved ice
 |b) a frozen yogurt (weapon in hand)
However, the existing cases
 |c) iron bars
 |d) an iron bars (weapon in hand)
still get item 'c' wrong.  'd' is slightly odd but that's because the
fruit name is ambiguous as to whether it's singular or plural.
2023-10-26 01:28:56 -07:00
PatR
04d6789c98 report ice's thaw state
Classify nearby ice as "solid" (no melt timer), "sturdy" (more than
1000 turns left), "steady" (101 to 1000 turns left), "unsteady" (51
to 100 turns left), "thin" (15 to 50 turns left), or "slushy" (1 to
14 turns left, matching walking on ice with the Warning attribute).
[I'm not thrilled with "steady" and particularly "unsteady".]

I was originally going to do this just for probing downward, but ended
up also doing it for look-here and getpos's autodescribe.  It nearly
got out of hand and touched more files than anticipated.

'mention_decor' ought to treat moving from ice firmer than thin to
thin or slushy, from thin to slushy, from slushy to any other, and
from thin to firmer as if moving onto different terrain but I haven't
attempted to tackle that.

The melt timer could work more like a candle's burn timer, triggering
at intermediate stages and resetting itself, so that ice which changes
to a weaker state under the hero could be reported to the player.  But
this doesn't implement that.
2023-10-25 13:26:03 -07:00
Pasi Kallinen
7bf3888118 Shopkeepers consider monster type for some items
Tins, eggs, and corpses will now cost different amounts
based on what intrinsics the monster type could give
2023-10-25 18:45:16 +03:00
Pasi Kallinen
48b10a1c8d MSDOS: example hilite_status in default config 2023-10-25 09:50:47 +03:00
Pasi Kallinen
614e6c9d5e MSDOS: implement inverse text attribute 2023-10-24 18:34:15 +03:00
Pasi Kallinen
76471e890b MSDOS: Fix VESA mode text background color 2023-10-24 09:37:36 +03:00
PatR
1a5eaf78e6 probing vs underwater items
When probing is zapped downward while hero is at a water or lava spot
and hero isn't beneath the surface, show any objects 'hidden' by the
water or lava at that spot.
2023-10-23 13:07:15 -07:00
PatR
814a69f061 update a couple of tty perm_invent comments
Gold can be quivered but not wielded, so remove the reference to the
latter.  Inuse-only mode gets passed lamps and leashes when they're
actively used, so remove the reference to that being different from
Qt's paperdoll.  (It is actually different, but not because they
won't be shown as in-use.  The paperdoll only shows one of each but
inventory of in-use items might have more than one of either or both.)
Add a what-if comment to tools_in_use().
2023-10-22 16:44:49 -07:00
PatR
85a5c3125e TTY_PERM_INVENT fix header for empty perm_invent
and reimplement 'sparse' mode (TTYINV=2 or TTYINV=3).

When hero had no inventory except for gold and perminv display mode is
ignoring gold, the header said "empty" when "only gold" was intended.

Sparse mode populates perminv with inventory letters in the unused
slots instead of leaving them blank.  (The core doesn't need to be
aware of that since it doesn't affect what display_inventory() sends
to the inventory menu.)
2023-10-22 08:54:41 -07:00
PatR
b0ab22a4e6 tty build fix
My repository got out of synch and I had a hell of a time restoring
sanity.

The most recent commit included a line in wintty.c that shouldn't have
been there.
2023-10-22 08:50:33 -07:00
PatR
77ae10f566 more TTY_PERM_INVENT, part 3 of 2
Some changes I made while chasing the slots 'A' and 'B' bug.  These
weren't necessary to fix that and I don't think they produce any
change in behavior, aside from making the "Bad window id N" panic
be more specific if it occurs.
2023-10-22 01:38:13 -07:00
PatR
8e37ea26d8 another data.base bit
Change the stalker entry attribution of "H. G. Wells" to "H.G. Wells"
to match the other attributions.  There was once a mixture of both
styles but at some point all the ones with the expected--and possibly
stylistically preferred--extra space got changed to the condensed form.

The sasquatch quote still contains "J. W. Burns", in the text rather
than in an attribution.  I wasn't sure whether it should be changed
so left it alone.  Presumably the source of the quote had that space.
2023-10-21 16:52:09 -07:00
Pasi Kallinen
79496b079a Fix splitting monster being killed twice
Fuzzer encountered "m_detach: monster already detached?"

A monster hit a black pudding that split. The clone was
created on top of a rolling boulder trap, which triggered,
the boulder hit the original black pudding, and killed it.
The dead pudding then retaliated (as the code didn't check
if it was dead) and a passive attack of the other monster
tried to kill the already dead pudding.

I think one of these checks would be enough, but adding the
DEADMONSTER check just in case.
2023-10-21 19:49:49 +03:00
Pasi Kallinen
ff4f81af1b Make rolling boulders hit walls and trees
While testing something else, I noticed rolling boulders
just ignored walls and trees; in normal play this isn't
a problem - but should probably make boulders handle other
terrain too.  Lava and water is already handled correctly.
2023-10-21 18:42:43 +03:00
Pasi Kallinen
9ea4a3a329 Don't set getdir_click unless we've requested it
This allowed eg. throwing the iron ball anywhere on the map,
by first throwing something else, using the "simulated mouse click"
to select any map location, and then throwing the iron ball and
also using the mouse click feature to select any location.

Currently the only function that actually uses the simulated
mouse click feature is #therecmdmenu
2023-10-21 16:13:22 +03:00
Pasi Kallinen
69a4853851 Fix "no monster to remove" when tame nymph attacked
A tame nymph attacked another monster, stole an item and teleported
away, but dog_move() wasn't passed the information that the nymph
was done, and tried to move the nymph from the old location.

Same with a tame leprechaun.
2023-10-21 16:05:15 +03:00
PatR
f7e5437746 fix #K4019 - "can not"
Report suggested that "can not" should be "cannot".  Both forms are
acceptable.  This switches them to use contractions for various "You
<verb> not subject" phrases:  "You can't subject", "hadn't", and so
forth.  Not exhaustively tested; there may be some sentences where the
informal contraction makes things worse rather than better.

The goal here was compactness rather than efficiency since the code
involved doesn't execute very often.
2023-10-21 03:40:56 -07:00
PatR
a2f80a611a TTY_PERM_INVENT fix, part 2 of 2
The problem with tty perminv slots 'A' and 'B' boiled down to
  slot_limit = SIZE(slot_tracker); /*54*/
  ...
  /* blank out unused slots */
  for (slot = 0; slot < slot_limit; ++slot) {
    ...
    row = (slot % rows_per_side) + 1; /* +1: top border */
    side = slot < rows_per_side ? 0 : 1;
    ttyinv_populate_slot(row,side,...);
  }

Unused slots [52] and [53] (available for show_gold mode to display
"$a..zA..Z#", not filled with inventory for normal tty perm_invent
"a..zA..Z") yielded rows 1 and 2, side 1, so clobbered slots 'A' and
'B' with blanks.

This is a subset of the changes I was working with and didn't get as
much testing as the full set.
2023-10-20 22:52:38 -07:00