]> granicus.if.org Git - nethack/log
nethack
2 years agoa couple of follow-ups
nhmall [Sat, 2 Jul 2022 13:21:58 +0000 (09:21 -0400)]
a couple of follow-ups

2 years agobe more consistent with coordinates
nhmall [Sat, 2 Jul 2022 13:10:03 +0000 (09:10 -0400)]
be more consistent with coordinates

2 years agoteleport feedback for STRAT_APPEARMSG mon
PatR [Fri, 1 Jul 2022 22:53:53 +0000 (15:53 -0700)]
teleport feedback for STRAT_APPEARMSG mon

Reported by entrez:  if a monster with the STRAT_APPEARMSG flag is
seen to teleport away from its current position, an arrival message
would always be given too.  If you couldn't see that arrival, you'd
get nonsensical "It suddenly appears!".

Minor fix:  when a monster is seen to vanish at one spot and appear
at another, if it was not close you'd get either "appears closer to
you" or "appears farther from you" even if the new spot was the same
distance as the old spot.

2 years agoregex handling
PatR [Fri, 1 Jul 2022 20:08:43 +0000 (13:08 -0700)]
regex handling

Change the regex_error_desc() interface.  Have the caller pass in
a pointer to a buffer of at least BUFSZ characters and have
regex_error_desc() populate that.  No need for static buffers or
extra dynamic alloction.

Also, change it to never return Null.  None of its callers were
checking for that and could have passed Null to config_error_add()
or raw_print().  printf("%s", NULL) produces "null" on OSX but other
systems would probably crash if a Null result ever actually occurred.

The error explanation returned by cppregex included a trailing period.
config_error_add() adds one, so the message ended up with two.  Have
regex_error_desc() check for final period and strip it off if found.
(My test case used a menucolor pattern of "[" which triggers an error
about mismatched brackets.)

Reformat cppregex.cpp; treat 'extern "C" {' as if it isn't introducing
a nested block.  Fix the '#include <hack.h>' that 'make depend' was
ignoring.

2 years agoupdate visual studio project files
nhmall [Fri, 1 Jul 2022 15:47:02 +0000 (11:47 -0400)]
update visual studio project files

2 years agoWindows console limits
nhmall [Fri, 1 Jul 2022 12:37:10 +0000 (08:37 -0400)]
Windows console limits

2 years agodon't alter perm_invent during fuzzer
nhmall [Fri, 1 Jul 2022 12:36:33 +0000 (08:36 -0400)]
don't alter perm_invent during fuzzer

2 years agocomment update
nhmall [Fri, 1 Jul 2022 12:36:03 +0000 (08:36 -0400)]
comment update

2 years agotypedef follow-up
nhmall [Fri, 1 Jul 2022 12:23:31 +0000 (08:23 -0400)]
typedef follow-up

3 years agochange xchar to other typedefs
nhmall [Fri, 1 Jul 2022 03:48:18 +0000 (23:48 -0400)]
change xchar to other typedefs

One of the drivers of this change was that screen coordinates require a
type that can hold values greater than 127. Parameters to the window
port routines require a large type in order to be able to have values
a fair bit larger than COLNO and ROWNO passed to them, particularly for
their use to the right of the map window.

This splits the uses of xchar into 3 different situations, and adjusts
their type and size:

                        xchar
                          |
               -----------------------
               |          |          |
            coordxy     xint16     xint8

coordxy: Actual x or y coordinates for various things (moved to 16-bits).

xint16:  Same data size as coordxy, but for non-coordinate use (16-bits).

xint8:   There are only a few use cases initially, where it was very
         plain to see that the variable could remain as 8-bits, rather
         than be bumped to 16-bits.  There are probably more such cases
         that could be changed after additional review.

Note: This first changed all xchar variables to coordxy. Some were
reviewed and got changed to xint16 or xint8 when it became apparent that
their usage was not for coordinates.

This increments EDITLEVEL in patchlevel.h

3 years agoRevert "follow-up: use only the memory that's required"
nhmall [Fri, 1 Jul 2022 02:38:14 +0000 (22:38 -0400)]
Revert "follow-up: use only the memory that's required"

This reverts commit 4a0654c70875964fbe769165e04aebe2713cbe34.

3 years agoRevert "follow-up 2: follow the conventional approach"
nhmall [Fri, 1 Jul 2022 02:37:12 +0000 (22:37 -0400)]
Revert "follow-up 2: follow the conventional approach"

This reverts commit 6920632df0fee38b7b33c6fa13a4eecc3e574981.

3 years agoRevert "follow-up 3"
nhmall [Fri, 1 Jul 2022 02:36:45 +0000 (22:36 -0400)]
Revert "follow-up 3"

This reverts commit cd57dfa5ffa3a408f07b24b24e2c758301fed143.

3 years agoRevert "follow-up 4"
nhmall [Fri, 1 Jul 2022 02:36:21 +0000 (22:36 -0400)]
Revert "follow-up 4"

This reverts commit 9e38fb661d92558b6c590b8d96bb8fdbd587a7e5.

3 years agofollow-up 4
nhmall [Thu, 30 Jun 2022 17:42:14 +0000 (13:42 -0400)]
follow-up 4

3 years agofollow-up 3
nhmall [Thu, 30 Jun 2022 17:27:46 +0000 (13:27 -0400)]
follow-up 3

3 years agofollow-up 2: follow the conventional approach
nhmall [Thu, 30 Jun 2022 17:15:58 +0000 (13:15 -0400)]
follow-up 2: follow the conventional approach

3 years agofollow-up: use only the memory that's required
nhmall [Thu, 30 Jun 2022 17:10:56 +0000 (13:10 -0400)]
follow-up: use only the memory that's required

3 years agocppregex regex_error_desc()
nhmall [Thu, 30 Jun 2022 16:58:19 +0000 (12:58 -0400)]
cppregex regex_error_desc()

Address sanitizer caught a use after free.
cppregex.cpp regex_error_desc() was not returning a pointer
to a static buffer, yet the posixregex was. Follow suit.

3 years agoupdated window_procs
nhmall [Thu, 30 Jun 2022 03:21:19 +0000 (23:21 -0400)]
updated window_procs

Add a non-string identifier to window_procs for use in runtime
identification of the current window port being used.

Use a macro WPID to add the identification at the top of the
various existing window_procs declarations. It expands to the
existing text string, as well as the newly added field wp_id
with a wp_ identifier.

For example, WPID(tty) expands to: "tty", wp_tty

The generated wp_tty must be present in the wp_ids enum at
the top of include/winprocs.h.

The WINDOWPORT(x) macro has been updated to expand to a simple
value comparison (port.wp_id == wp_x), instead of a
string comparison.

3 years agono quotes in WINDOWPORT macro invocation
nhmall [Thu, 30 Jun 2022 02:13:28 +0000 (22:13 -0400)]
no quotes in WINDOWPORT macro invocation

3 years agopull request #797 - running past quest leader \
PatR [Thu, 30 Jun 2022 01:28:01 +0000 (18:28 -0700)]
pull request #797 - running past quest leader \

and not stopping if tossed out of the quest

Pull request from entrez:  a running or travelling hero who passes
next to the quest leader and gets tossed back through the portal for
some reason would keep on running on the far side.

Closes #797

3 years agoFix: running through quest expulsion
Michael Meyer [Fri, 10 Jun 2022 14:51:15 +0000 (10:51 -0400)]
Fix: running through quest expulsion

If a player was in the process of running past the quest leader when she
got expelled from the quest, she would continue running out of the quest
portal on the portal level.  Interrupt any running (or other multi-turn
action) when expelling the hero from the quest level.

3 years agopull request #792 - pet w/ engulf+digest \
PatR [Thu, 30 Jun 2022 01:08:50 +0000 (18:08 -0700)]
pull request #792 - pet w/ engulf+digest \

can gain intrinsics by swallowing monsters whole

Pull request #792 from entrez:  monsters can gain instrinsics now but
the case for an engulfer digesting a live monster was overlooked.

Add the same for non-pet monsters digesting other monsters, likely
under the influence of conflict but possibly counter-attacking a pet.

Closes #792

3 years agoAllow intrinsic gain from pet's digestion attack
Michael Meyer [Mon, 6 Jun 2022 20:03:51 +0000 (16:03 -0400)]
Allow intrinsic gain from pet's digestion attack

Add possible pet intrinsic gain from swallowing a monster in one gulp
(in situations where a corpse is created and eaten by the engulfer),
making it equivalent in this regard to eating the corpse off the floor.

One possible extension or modification would be to reduce the chance of
receiving an intrinsic when the corpse is consumed via digestion attack,
similar to how the corpse nutrition is 50% of its normal value.  I
didn't incorporate that into this commit since the chance of receiving
an intrinsic is tied to monster level rather than nutrition, so I wasn't
sure if it made sense.

3 years agofix 'D' vs obj->bypass
PatR [Wed, 29 Jun 2022 18:46:31 +0000 (11:46 -0700)]
fix 'D' vs obj->bypass

Reported by entrez:  dropping items with the 'D' command sets
obj->bypass which prevents an otherwise compatible item from merging
with non-bypass floor stack.

'D' sets the bypass bit to avoid trouble if a dropped item triggers
an explosion that destroys some of inventory (making straightforward
invent traversal be unreliable).  Having bypass set prevented merging
with a floor stack that had that flag bit clear.  That was very
noticeable if a subset of a stack was picked up and then 'D' used to
drop it again, resulting in two stacks instead of recombining into
the original.

Change the test for mergability to ignore bypass so items will merge
when one has it set and other doesn't.  And when successfully merging
set bypass on the combined stack if either part had that set.

3 years agopull request #806 - remove unnecessary variable
PatR [Tue, 28 Jun 2022 19:53:16 +0000 (12:53 -0700)]
pull request #806 - remove unnecessary variable

Pull request from argrath: in destroy_one_item(), 'physical_damage'
is set to False with no provision for changing that it True, so the
'if (physical_damage) xxx' is never executed.  Remove it.

Closes #806

3 years agoremove unnecessary code on destroy_one_item()
SHIRAKATA Kentaro [Sat, 26 Feb 2022 11:40:43 +0000 (20:40 +0900)]
remove unnecessary code on destroy_one_item()

`physical_damage` is initialized to FALSE, and no codes change it.

3 years agopull request #800 - displaying detected traps
PatR [Tue, 28 Jun 2022 19:41:51 +0000 (12:41 -0700)]
pull request #800 - displaying detected traps

Pull request from argrath:  move display of detected traps into
separate routine to eliminate some 'goto's.

Closes #800

3 years agosplit displaying trap map into separate function
SHIRAKATA Kentaro [Sun, 8 May 2022 11:32:27 +0000 (20:32 +0900)]
split displaying trap map into separate function

3 years agoavoid becoming stunned due to level teleporting
PatR [Tue, 28 Jun 2022 19:37:06 +0000 (12:37 -0700)]
avoid becoming stunned due to level teleporting

Reported by entrez:  the code to have a hero become stunned for 1..3
turns when going though a level teleporter trap effectively negated
teleport control (except in wizard mode which is probably why this
slipped through).  Make the effect happen after level_tele instead of
before, change it from being stunned to being confused, and only
happen if hero lacks teleport control.

The association between confusion and level teleportation already
exists and this might be just enough of a hint for someone who isn't
aware of that yet to figure it out.  (Probably just wishing thinking.)

Magic portal traversal hasn't changed; it still causes brief stun.

3 years agofix build without TTY_PERM_INVENT defined
nhmall [Mon, 27 Jun 2022 21:43:47 +0000 (17:43 -0400)]
fix build without TTY_PERM_INVENT defined

3 years agocomment still not right
nhmall [Mon, 27 Jun 2022 12:34:41 +0000 (08:34 -0400)]
comment still not right

3 years agocomment update
nhmall [Mon, 27 Jun 2022 12:21:37 +0000 (08:21 -0400)]
comment update

3 years agosome tty perminvent follow-up()
nhmall [Mon, 27 Jun 2022 12:13:37 +0000 (08:13 -0400)]
some tty perminvent follow-up()

3 years agofix #K3627 - impossible placing long worm at <0,0>
PatR [Sun, 26 Jun 2022 19:22:09 +0000 (12:22 -0700)]
fix #K3627 - impossible placing long worm at <0,0>

When migrating, a long worm is removed from the map to take off the
tail, then its head is put back to be treated like other monsters.
If that occurred when being forced to re-migrate during failure to
arrive from a prior migration, it wouldn't have valid coordinates
and the place_monster attempt produced an impossible warning.
(Other types of monsters don't get removed and put back so didn't
trigger the problem.)

The routine to format a monster when the data is suspect mistakenly
thought it was dealing with a long worm tail because the monster
didn't match level.monsters[0][0], so the warning inaccurately
reported the problem as "placing long worm tail".

3 years agoFix underflow in free_window_info
Brian Campbell [Sun, 26 Jun 2022 14:30:58 +0000 (15:30 +0100)]
Fix underflow in free_window_info
At the end this is called after `WIN_MESSAGE` is reset to `-1`, so we
need a check here.

3 years agoTTY_PERM_INVENT tweaks
nhmall [Sun, 26 Jun 2022 02:26:18 +0000 (22:26 -0400)]
TTY_PERM_INVENT tweaks

3 years agoinitializers, take 2
nhmall [Sat, 25 Jun 2022 19:29:27 +0000 (15:29 -0400)]
initializers, take 2

3 years agoinitializers
nhmall [Sat, 25 Jun 2022 19:16:57 +0000 (15:16 -0400)]
initializers

3 years agopartial vampire fix
PatR [Sat, 25 Jun 2022 18:26:05 +0000 (11:26 -0700)]
partial vampire fix

From a followup comment to a reddit post:  a vampire who has gained
levels loses them when reverting to base form.  This fixes the case
where it grows into a vampire lord; change the base form from plain
vampire to lord when that happens.

It does not fix the case where shapechanging to fog or bat or wolf
and then back to base form yields a new vampire or vampire lord
instead of the one that built itself up.  Mainly affects pet vampires
since wild oees don't tend to grow very much.

3 years agointerface groundwork for core-side color decisions
nhmall [Sat, 25 Jun 2022 17:21:51 +0000 (13:21 -0400)]
interface groundwork for core-side color decisions

(user-side decisions really, but as it stands right now
user-side decisions/options are made and processed by the core)

add a parameter to add_menu so color can be passed

3 years agoremove now unneeded {} block in switch
nhmall [Sat, 25 Jun 2022 13:32:10 +0000 (09:32 -0400)]
remove now unneeded {} block in switch

3 years agorework mode settings on the windowport-side
nhmall [Sat, 25 Jun 2022 13:17:56 +0000 (09:17 -0400)]
rework mode settings on the windowport-side

3 years agorework the mode settings initialization core-side
nhmall [Sat, 25 Jun 2022 13:06:39 +0000 (09:06 -0400)]
rework the mode settings initialization core-side

3 years agostreamline the tty perm_invent bounder box set up
PatR [Sat, 25 Jun 2022 06:35:26 +0000 (23:35 -0700)]
streamline the tty perm_invent bounder box set up

For the tty perm_invent boundary box initialiation, instead of doing
one of many assignments that do glyph lookup, do one of many symbol
assignments and one glyph lookup.  No change in observable behavior.

Also, use the main dungeon's walls for box rendering instead of
selecting ones for whatever branch the hero happens to be in at the
time perm_invent gets enabled.

3 years agomove TTYINV environ var check outside of if block
nhmall [Sat, 25 Jun 2022 04:15:40 +0000 (00:15 -0400)]
move TTYINV environ var check outside of if block

3 years agoenvironment variable TTYINV ignored
nhmall [Sat, 25 Jun 2022 00:39:15 +0000 (20:39 -0400)]
environment variable TTYINV ignored

> Setting TTTINV in the environment no longer has any effect
> for me.

Variable was set immediately prior to the all-zeros
initialization. Fix the ordering of the two statements.

3 years agofix perm_invent via 'O' border issue
nhmall [Sat, 25 Jun 2022 00:10:11 +0000 (20:10 -0400)]
fix perm_invent via 'O' border issue

> Start with default symbol set and with perm_invent Off.
> Use 'O' to change perm_invent to On.  The inventory with
> boundary box lines will briefly appear, then immediately be
> redrawn without those lines.

3 years agofollow-up
nhmall [Fri, 24 Jun 2022 19:22:38 +0000 (15:22 -0400)]
follow-up

3 years agomove some parts of TTY_PERM_INVENT into core
nhmall [Fri, 24 Jun 2022 19:01:38 +0000 (15:01 -0400)]
move some parts of TTY_PERM_INVENT into core

This starts the tty perm_invent just in time later in the
startup rather than initializing it with the other
game windows.

This also splits the duties:

The core will inquire from the window port about how many
inventory slots it can fill.

The core will handle figuring out the inventory text and
inventory letters, and will do the traversing of internal
data structures like obj chains, and passing customization
options on to the window port.

The window port will look after placing each inventory slot's
text at an appropriate location on the screen.

This, in theory, makes the core-portion available for
window ports other than tty to use, though none currently do.
The decision of what goes in an inventory slot is all left up
to the core with the update_invent_slot interface.

Documentation updates will come later, not at this time.

3 years agofollow-up on corner menu appearance
nhmall [Fri, 24 Jun 2022 01:48:05 +0000 (21:48 -0400)]
follow-up on corner menu appearance

move variable and its init out of ifdef block
add a comment and some range checking

3 years agorefresh content between really long menu pages
nhmall [Fri, 24 Jun 2022 00:35:43 +0000 (20:35 -0400)]
refresh content between really long menu pages

For a long while, I've noticed that if the first page of corner menu is
quite long, and the second page is much shorter, the content obliterated
by the first page is left missing until the menu is fully dismissed.

This attempts to fix that missing content up.

===========================================================================
BEFORE THIS PATCH - menu Page 1
===========================================================================
                                   Amulets
                                   J - a circular amulet
        ------------               Weapons
        |..........|       ------- a - a +0 two-handed sword (weapon in hands)
        |..........|       |...... b - a +0 axe (alternate weapon; not wielded)
       #...........|      #....... w - 7 orcish arrows
       #|{..........#######|...... G - a battle-axe
       #------------       |...... P - 7 ya
       ###                 ------- Armor
         ##                        c - an uncursed +0 ring mail (being worn)
          #                        E - a splint mail
          #                        Comestibles
    ------#                        d - an uncursed food ration
    |.....#                        f - 6 food rations
    |....|                         h - 2 sprigs of wolfsbane
    |....|                         i - a cream pie
    |....-###                      k - 3 tripe rations
    |.<..|  ######  ############## Scrolls
    |.d@..######################## r - a scroll labeled ETAOIN SHRDLU
    ------                 ####    u - a scroll labeled PHOL ENDE WODAN
                              #### z - a scroll labeled XIXAXA XOXAXA XUXAXA
                                   Spellbooks
Wizard the Plunderer           St: o - a tan spellbook
Dlvl:1 $:0 HP:16(16) Pw:2(2) AC:7  q - a wrinkled spellbook
                                   v - a thin spellbook
---------------------------------- x - a plain spellbook
|a - +0 two-handed sword (weapon i y - a tan spellbook
|b - +0 axe (alternate weapon; not H - an indigo spellbook
|c - uncursed +0 ring mail (being  W - a light blue spellbook
|d - uncursed food ration          X - a velvet spellbook
|e - uncursed oil lamp             Potions
|f - 6 food rations                g - a brilliant blue potion
|g - brilliant blue potion         j - a fizzy potion
|h - 2 sprigs of wolfsbane         m - an effervescent potion
|i - cream pie                     B - 2 golden potions
|j - fizzy potion                  D - a dark green potion
|k - 3 tripe rations               I - a bubbly potion
|l - moonstone ring                Rings
|m - effervescent potion           l - a moonstone ring
|n - tiger eye ring                n - a tiger eye ring
|o - tan spellbook                 Y - a topaz ring
|p - tinning kit                   Wands
|q - wrinkled spellbook            s - a crystal wand
|r - scroll labeled ETAOIN SHRDLU  Tools
|s - crystal wand                  e - an uncursed oil lamp
|t - oil lamp                      p - a tinning kit
|u - scroll labeled PHOL ENDE WODA t - an oil lamp
|v - thin spellbook                A - a stethoscope
|w - 7 orcish arrows               C - a bugle
|x - plain spellbook               F - an oil lamp
|y - tan spellbook                 Gems/Stones
|z - scroll labeled XIXAXA XOXAXA  L - 4 blue gems
---------------------------------- (1 of 2)

===========================================================================
BEFORE THIS PATCH - menu Page 2

While the second page is displayed, there are gaping missing portions of
the map, status lines, and now the tty perm_invent window.
===========================================================================

                                   V - a white gem
                                   (2 of 2)
        ------------
        |..........|       -------
        |..........|       |......
       #...........|      #.......
       #|{..........#######|......
       #------------       |......
       ###                 -------
         ##
          #
          #
    ------#
    |.....#
    |....|
    |....|
    |....-###
    |.<..|  ######  ##############
    |.d@..########################
    ------                 ####
                              ####

Wizard the Plunderer           St:
Dlvl:1 $:0 HP:16(16) Pw:2(2) AC:7

----------------------------------
|a - +0 two-handed sword (weapon i
|b - +0 axe (alternate weapon; not
|c - uncursed +0 ring mail (being
|d - uncursed food ration
|e - uncursed oil lamp
|f - 6 food rations
|g - brilliant blue potion
|h - 2 sprigs of wolfsbane
|i - cream pie
|j - fizzy potion
|k - 3 tripe rations
|l - moonstone ring
|m - effervescent potion
|n - tiger eye ring
|o - tan spellbook
|p - tinning kit
|q - wrinkled spellbook
|r - scroll labeled ETAOIN SHRDLU
|s - crystal wand
|t - oil lamp
|u - scroll labeled PHOL ENDE WODA
|v - thin spellbook
|w - 7 orcish arrows
|x - plain spellbook
|y - tan spellbook
|z - scroll labeled XIXAXA XOXAXA
----------------------------------

===========================================================================
AFTER THIS PATCH - menu Page 2

The obliterated content of the map, status lines, and tty perm_invent
are refreshed prior to displaying menu Page 2.
===========================================================================

                                   V - a white gem
                                   (2 of 2)
        ------------                                    ----------------
        |..........|       ---------------             #...............|
        |..........|       |.............|             #|..............|
       #...........|      #..............|             #|........^.....|
       #|{..........#######|.........{...|             #-+--------------
       #------------       |.............|             ###############
       ###                 -------------.-                #          #
         ##                             #                 #          #####
          #                            ##       ----------#      --------.-
          #                            #       #+........|#      |........|
    ------#                            #     ###|.........#      |........|
    |.....#                          # #     #  |...>....|   ####.........|
    |....|                         ----.--######..........####   |........|
    |....|                         |.....|#     ----------       |........|
    |....-###                      |.....|#             #        |........|
    |.<..|  ######  ###############+......#                      ----------
    |.d@..#########################|.....|#
    ------                 ####    -------#
                              #############

Wizard the Plunderer           St:18/01 Dx:16 Co:18 In:8 Wi:8 Ch:6 Chaotic
Dlvl:1 $:0 HP:16(16) Pw:2(2) AC:7 Xp:1 Stressed

------------------------------------------------------------------------------
|a - +0 two-handed sword (weapon in hands|A - stethoscope                    |
|b - +0 axe (alternate weapon; not wielde|B - 2 golden potions               |
|c - uncursed +0 ring mail (being worn)  |C - bugle                          |
|d - uncursed food ration                |D - dark green potion              |
|e - uncursed oil lamp                   |E - splint mail                    |
|f - 6 food rations                      |F - oil lamp                       |
|g - brilliant blue potion               |G - battle-axe                     |
|h - 2 sprigs of wolfsbane               |H - indigo spellbook               |
|i - cream pie                           |I - bubbly potion                  |
|j - fizzy potion                        |J - circular amulet                |
|k - 3 tripe rations                     |L - 4 blue gems                    |
|l - moonstone ring                      |P - 7 ya                           |
|m - effervescent potion                 |V - white gem                      |
|n - tiger eye ring                      |W - light blue spellbook           |
|o - tan spellbook                       |X - velvet spellbook               |
|p - tinning kit                         |Y - topaz ring                     |
|q - wrinkled spellbook                  |                                   |
|r - scroll labeled ETAOIN SHRDLU        |                                   |
|s - crystal wand                        |                                   |
|t - oil lamp                            |                                   |
|u - scroll labeled PHOL ENDE WODAN      |                                   |
|v - thin spellbook                      |                                   |
|w - 7 orcish arrows                     |                                   |
|x - plain spellbook                     |                                   |
|y - tan spellbook                       |                                   |
|z - scroll labeled XIXAXA XOXAXA XUXAXA |                                   |
------------------------------------------------------------------------------

3 years agotty perm_invent bits
PatR [Thu, 23 Jun 2022 23:10:17 +0000 (16:10 -0700)]
tty perm_invent bits

Mostly comments.

3 years agoskip update_inventory during character init
PatR [Thu, 23 Jun 2022 20:14:28 +0000 (13:14 -0700)]
skip update_inventory during character init

With a debugging pline() in place, I could see that tty perm_invent
was being redrawn for each item added to hero's initial inventory.
Avoid that.  There is an update_inventory() call just prior to
entering moveloop() which handles all of starting invent as a unit.

3 years agotty perm_invent: fix right-hand panel
PatR [Thu, 23 Jun 2022 20:03:32 +0000 (13:03 -0700)]
tty perm_invent: fix right-hand panel

Introducing 'maxslot' at the last second invalidated a ton of prior
testing.  This should fix all the modes of tty perm_invent, including
the missing bottom boundary for TTYINV=4 (show in-use items only, an
approximation of Qt's "paper doll" and of the '*' command).

The boundary box characters are set using cmap_to_glyph(S_<wall_type>)
which in theory makes them change depending on which branch of the
dungeon the hero is in.  That isn't noticeable since they aren't drawn
as tiles, but it doesn't seem right.

3 years agogroundwork for an interface change
nhmall [Thu, 23 Jun 2022 18:01:35 +0000 (14:01 -0400)]
groundwork for an interface change

Add a new window-port interface function
     perminvent_info *
     update_invent_slot(winid window, int slot, perminvent_info *);

That should be nice and flexible and allow exchanges of useful
information between the core and the window port. Information
to be exchange can be easily modified in include/wintype.h as
things evolve.

Information useful to the core can be exchanged from the
window-port in struct to_core.

Information useful from the core to the window-port can be
passed in struct from_core.

I'm not going to update any docs until much later after things
are fully working and settled.

This also doesn't fix or have anything to do with existing
TTY_PERM_INVENT issues.

3 years agoexperimental change for tty perm_invent
PatR [Thu, 23 Jun 2022 09:05:52 +0000 (02:05 -0700)]
experimental change for tty perm_invent

This checks for 'TTYINV' in the environment and if found, it uses that
as a number describing a bit mask for how to show the perm_invent.
 0 = current behavior, a-zA-Z in two columns (I've started referring
     to those as panels because "column" is already used a lot);
 1 = "show gold" => $a-zA-Z# in two columns; requires 1 more line;
 2 = "sparse" => list all letters a-z in the left panel and A-Z in
     the right whether there is an item in the slot or not, so that
     open slots will be obvious;
 3 = 1|2, "sparse" with $a-zA-Z$ instead of just letters;
 4 = "in use" => full lines instead of side-by-side panels, listing
     only items with non-zero obj->owornmask; currently requires 17
     lines instead of 28 (or 29 for show-gold):  room for top border,
     15 lines of worn/wielded items, and bottom border; normal usage
     would be capped at 3 weapon slots, 7 armor slots, and 4 accessory
     slots, but it is possible to have more items in use (simplest
     case is to pick up the iron ball while punished).
The #4 case isn't displaying its bottom border correctly and I haven't
figured out why.

If this turns out to be useful, perm_invent can become a compound or
some new option for perminv mode could be added.

3 years agotty perm_invent fixes
PatR [Wed, 22 Jun 2022 21:21:57 +0000 (14:21 -0700)]
tty perm_invent fixes

Modify the error message delivery when too-small so that it works for
both NETHACKOPTIONS or .nethackrc and for 'O'.  "Early failure" isn't
very early; using pline() instead of raw_print() ends up writing to
the base window but also works normally when used for failed attempt
to set perm_invent with 'O'.

Fix the off by one error in height which required an extra line that
ended up going unused.

Fix an off by one error in the middle divider.  Forcing the same item
from the left column to the right column, I was seeing
 "f - an uncursed +0 pair of leather glove" ["s (being worn)" truncated]
 "F - an uncursed +0 pair of leather gl"
After the fix I get
 "f - an uncursed +0 pair of leather glov"
 "F - an uncursed +0 pair of leather glo"
(When terminal width is even, the left side is one character wider
than the right.)

Split the invent window creation code out of tty_create_nhwwindow() to
new routine tty_create_invent().  I came across
  if (r == 0 || (newwin->maxrow - 1)
in the process (note lack of 'r ==' in the second part).  I'm not sure
what the initialization code is intended to accomplish but missing
that init for the bottom (boundary box) row didn't seem to be causing
any problem.

This forces the required size to be big enough to handle statuslines:3
regardless of what the setting for that is at the time the perm_invent
window is created.  When the value is 2, there will be a blank line
between status and the boundary box of perm_invent.  When it is 3, the
third line will use that line and the only separator will be the top
boundary box line.  Toggling back and forth with 'O' works as expected.

3 years agoremove spurious edit
nhmall [Wed, 22 Jun 2022 18:21:13 +0000 (14:21 -0400)]
remove spurious edit

3 years agomore optlist verbose follow-up
nhmall [Wed, 22 Jun 2022 18:11:51 +0000 (14:11 -0400)]
more optlist verbose follow-up

3 years agooptlist verbose follow-up
nhmall [Wed, 22 Jun 2022 17:50:53 +0000 (13:50 -0400)]
optlist verbose follow-up

When the NHOPTP syntax was copied and pasted from cond_ a few lines
above, the opt_out/opt_in setting should have been changed to opt_out
to match the verbose boolean.

3 years agoThis is cron-daily v1-May-8-2022. 000files updated: Files
nhw_cron [Tue, 21 Jun 2022 07:24:07 +0000 (03:24 -0400)]
This is cron-daily v1-May-8-2022.  000files updated: Files

3 years agomore '&m'
PatR [Tue, 21 Jun 2022 23:22:44 +0000 (16:22 -0700)]
more '&m'

For what a key does, when operating on 'm' which produces two lines
of output, append a command to the first line so that the combination
forms a complete sentence.  Also, expand on the explanattion of what
is going on in dowhatdoes().

3 years agofix recent Guidebook typo/thinko
PatR [Tue, 21 Jun 2022 22:49:30 +0000 (15:49 -0700)]
fix recent Guidebook typo/thinko

3 years agotentative fix for #K3626 - segfault when swallowed
PatR [Tue, 21 Jun 2022 19:52:29 +0000 (12:52 -0700)]
tentative fix for #K3626 - segfault when swallowed

release_hold() checked for (Upolyd && sticks(g.youmonst.data)) before
checking for (u.uswallow) and it could set u.ustuck to Null while
u.uswallow remained set to 1.  dmove_core() was accessing u.ustuck->mx
and u.ustuck->my after that, resulting in a crash.

This fixes that particular case but there might be others that also
assume sticky poly'd hero should be handled before swallowed hero.
Being swallowed/engulfed needs to be handled first.

3 years agotty perm_invent options again
PatR [Tue, 21 Jun 2022 16:56:59 +0000 (09:56 -0700)]
tty perm_invent options again

I'm not sure what happened but something that worked when I tested
yesterday wouldn't work today.  Have 'O' was pass TRUE rather than
FALSE to tty_perm_invent_toggled() when perm_invent is set to 'on'.
And skip that code for .nethackrc or NETHACKOPTIONS because it was
segfaulting.

3 years agofix [again] exploiting artifact name rejection
PatR [Tue, 21 Jun 2022 15:57:58 +0000 (08:57 -0700)]
fix [again] exploiting artifact name rejection

Reported by entrez:  attempting to name certain undiscovered items
after an artifact could be used to tell whether the item being named
was the same type as the artifact, so trying to name a gray stone
the Heart of Ahriman would let you tell whether it was a luckstone.
That was fixed years ago to reject for any undiscovered gray stone
rather than only for luckstone; you'll get "your hand slips" and the
name would be smudged.  But that fix allowed a loophole and could
still be exploited if the player used lowercase for the name:  it
would get changed to mixed capitalization if the object was the
artifact's type or stay lowercase if it only matched by description.

This changes to the capitalized name even when the type isn't an
exact match, so attempting to name either a luckstone or a touchstone
"the heart of ahriman" will name it "The Aeart of Xhriman" with at
least one smudged letter to avoid the actual artifact name.

Unrelated change:  when attempting to apply a new name to an existing
artifact, it now says "<Artifact> resists" rather than "The artifact
seems to resist" because there's no "seeming" about it.

3 years agofix msdos build in CI
nhmall [Tue, 21 Jun 2022 12:31:52 +0000 (08:31 -0400)]
fix msdos build in CI

3 years agoboolean options parsing bit
PatR [Tue, 21 Jun 2022 08:08:07 +0000 (01:08 -0700)]
boolean options parsing bit

Boolean switches: add an omitted 'break', plus a few 'default' cases
that would matter if someone turned on the warning about a switch
statement with 'enum' index that doesn't have cases for all possible
values of that enum.  I haven't made any attempt to be exhaustive
about those; these few were just right in the same place.

3 years agoupdates for msdos cross-compile
nhmall [Tue, 21 Jun 2022 07:15:25 +0000 (03:15 -0400)]
updates for msdos cross-compile

gcc 12.1.0

also incorporate a libc patch for djgpp

3 years agosome tty perm_invent follow-ups
nhmall [Tue, 21 Jun 2022 01:17:45 +0000 (21:17 -0400)]
some tty perm_invent follow-ups

end-of-game disclosure toggles perm_invent so
react to that to tear down the tty perm_invent

fix if-block layout in tty_create_nhwindow()

3 years agotrouble linking
nhmall [Mon, 20 Jun 2022 23:58:16 +0000 (19:58 -0400)]
trouble linking

Add a switch to the C files if the ++ linker will be used due
to WANT_WIN_QT=1.

3 years agoclear an unused variable warning
nhmall [Mon, 20 Jun 2022 23:57:13 +0000 (19:57 -0400)]
clear an unused variable warning

3 years agotty perm_invent option handling
PatR [Mon, 20 Jun 2022 23:18:50 +0000 (16:18 -0700)]
tty perm_invent option handling

The code for toggling perm_invent when windowtype=="tty" was inserted
into the middle of several switch cases that share 'need_redraw' so
was getting executed for various other options such as 'use_inverse'
that precede it in the list of cases.  It was also continuing on to
general feedback for boolean options, reporting "'perm_invent option
toggled on" even if it failed and the option stayed off.

3 years agosilence -Wunused-parameter warning
nhmall [Mon, 20 Jun 2022 18:17:57 +0000 (14:17 -0400)]
silence -Wunused-parameter warning

3 years agokeep perm_invent option
nhmall [Mon, 20 Jun 2022 17:43:50 +0000 (13:43 -0400)]
keep perm_invent option

Make it apparent why tty perm_invent can't be set in-game
if the terminal cannot support it.

3 years agoEnable TTY_PERM_INVENT
Patric Mueller [Mon, 20 Jun 2022 16:07:24 +0000 (18:07 +0200)]
Enable TTY_PERM_INVENT

The permanent inventory will be automatically shown if the terminal size
allows.
But only output an error message if the player requested it via
perm_invent option.

3 years agoexperimental config option TTY_PERM_INVENT
nhmall [Mon, 20 Jun 2022 14:40:55 +0000 (10:40 -0400)]
experimental config option TTY_PERM_INVENT

Add a rudimentary experimental always-up inventory display
capability to tty when the perm_invent option is in effect.
It requires an additional 28 rows available on the terminal
underneath the bottom status line.

It hasn't been optimized for performance as of yet.

3 years agomore Verbose
nhmall [Mon, 20 Jun 2022 01:02:50 +0000 (21:02 -0400)]
more Verbose

Make verbose a prefix compound option. verbose and !verbose
should still work just as the boolean option did.

verbose0, verbose1, verbose2, verbose3, verbose4 must be
given a decimal value in the config file to set the bits in
verbosity_suppressions[0] through verbosity_suppressions[4].
That can be used to suppress any messages represented by the
verbosity_values defined in include/hack.h.

This also adds a more verbose variation of prinv() where the
total count is included in the message (that particular more
verbose message can be suppressed with OPTIONS=verbose3:134217728).

  Verbose(n,x) name     Hex Value       Decimal             Option
  -------------------------------------------------------------------
  interrupt_multi       0x00000001               1          verbose0
  use_stethoscope       0x00000002               2          verbose0
  Mb_hit                0x00000004               4          verbose0
  adjattrib             0x00000008               8          verbose0
  ballfall              0x00000010              16          verbose0
  use_crystal_ball1     0x00000020              32          verbose0
  use_crystal_ball2     0x00000040              64          verbose0
  digactualhole1        0x00000080             128          verbose0
  digactualhole2        0x00000100             256          verbose0
  mdig_tunnel1          0x00000200             512          verbose0
  mdig_tunnel2          0x00000400            1024          verbose0
  boulder_hits_pool1    0x00000800            2048          verbose0
  boulder_hits_pool2    0x00001000            4096          verbose0
  drop1                 0x00002000            8192          verbose0
  drop2                 0x00004000           16384          verbose0
  drop3                 0x00008000           32768          verbose0
  go_to_level1          0x00010000           65536          verbose0
  go_to_level2          0x00020000          131072          verbose0
  go_to_level3          0x00040000          262144          verbose0
  rot_corpse            0x00080000          524288          verbose0
  getpos1               0x00100000         1048576          verbose0
  getpos2               0x00200000         2097152          verbose0
  off_msg               0x00400000         4194304          verbose0
  on_msg                0x00800000         8388608          verbose0
  Blindf_on             0x01000000        16777216          verbose0
  dog_eat               0x02000000        33554432          verbose0
  dog_invent            0x04000000        67108864          verbose0
  dokick                0x08000000       134217728          verbose0
  toss_up               0x10000000       268435456          verbose0
  consume_tin1          0x20000000       536870912          verbose0
  consume_tin2          0x40000000      1073741824          verbose0
  doengrave1            0x00000001               1          verbose1
  doengrave2            0x00000002               2          verbose1
  doengrave3            0x00000004               4          verbose1
  explode               0x00000008               8          verbose1
  moverock              0x00000010              16          verbose1
  still_chewing         0x00000020              32          verbose1
  trapmove1             0x00000040              64          verbose1
  trapmove2             0x00000080             128          verbose1
  trapmove3             0x00000100             256          verbose1
  trapmove4             0x00000200             512          verbose1
  trapmove5             0x00000400            1024          verbose1
  getobj1               0x00000800            2048          verbose1
  getobj2               0x00001000            4096          verbose1
  doprgold              0x00002000            8192          verbose1
  doorlock1             0x00004000           16384          verbose1
  doorlock2             0x00008000           32768          verbose1
  monpoly1              0x00010000           65536          verbose1
  monpoly2              0x00020000          131072          verbose1
  mswingsm              0x00040000          262144          verbose1
  missmu                0x00080000          524288          verbose1
  mswings               0x00100000         1048576          verbose1
  wildmiss              0x00200000         2097152          verbose1
  gulpmu                0x00400000         4194304          verbose1
  explmu                0x00800000         8388608          verbose1
  meatmetal1            0x01000000        16777216          verbose1
  meatmetal2            0x02000000        33554432          verbose1
  meatmetal3            0x04000000        67108864          verbose1
  meatmetal4            0x08000000       134217728          verbose1
  relobj                0x10000000       268435456          verbose1
  ready_weapon          0x20000000       536870912          verbose1
  wield_tool            0x40000000      1073741824          verbose1
  meatobj1              0x00000001               1          verbose2
  meatobj2              0x00000002               2          verbose2
  meatobj3              0x00000004               4          verbose2
  meatobj4              0x00000008               8          verbose2
  meatcorpse1           0x00000010              16          verbose2
  meatcorpse2           0x00000020              32          verbose2
  mpickgold             0x00000040              64          verbose2
  mpickstuff            0x00000080             128          verbose2
  setmangry             0x00000100             256          verbose2
  mb_trapped            0x00000200             512          verbose2
  m_move1               0x00000400            1024          verbose2
  m_move2               0x00000800            2048          verbose2
  m_move3               0x00001000            4096          verbose2
  m_move4               0x00002000            8192          verbose2
  m_move5               0x00004000           16384          verbose2
  thitu1                0x00008000           32768          verbose2
  thitu2                0x00010000           65536          verbose2
  m_throw               0x00020000          131072          verbose2
  handler_menustyle     0x00040000          262144          verbose2
  handler_autounlock    0x00080000          524288          verbose2
  handler_msg_window    0x00100000         1048576          verbose2
  handler_whatis_coord1 0x00200000         2097152          verbose2
  handler_whatis_coord2 0x00400000         4194304          verbose2
  dolook                0x00800000         8388608          verbose2
  describe_decor1       0x01000000        16777216          verbose2
  describe_decor2       0x02000000        33554432          verbose2
  loot_mon              0x04000000        67108864          verbose2
  dotip                 0x08000000       134217728          verbose2
  polymon               0x10000000       268435456          verbose2
  teleds                0x20000000       536870912          verbose2
  level_tele            0x40000000      1073741824          verbose2
  ghost_from_bottle     0x00000001               1          verbose3
  dodip1                0x00000002               2          verbose3
  dodip2                0x00000004               4          verbose3
  dodip3                0x00000008               8          verbose3
  intemple              0x00000010              16          verbose3
  doread1               0x00000020              32          verbose3
  doread2               0x00000040              64          verbose3
  doread3               0x00000080             128          verbose3
  doread4               0x00000100             256          verbose3
  doread5               0x00000200             512          verbose3
  doread6               0x00000400            1024          verbose3
  doread7               0x00000800            2048          verbose3
  drop_boulder_on_player0x00001000            4096          verbose3
  do_genocide           0x00002000            8192          verbose3
  call_kops1            0x00004000           16384          verbose3
  call_kops2            0x00008000           32768          verbose3
  call_kops3            0x00010000           65536          verbose3
  erode_obj1            0x00020000          131072          verbose3
  erode_obj2            0x00040000          262144          verbose3
  erode_obj3            0x00080000          524288          verbose3
  trapeffect_rocktrap   0x00100000         1048576          verbose3
  climb_pit             0x00200000         2097152          verbose3
  drown                 0x00400000         4194304          verbose3
  mon_adjust_speed      0x00800000         8388608          verbose3
  hit                   0x01000000        16777216          verbose3
  miss                  0x02000000        33554432          verbose3
  makewish              0x04000000        67108864          verbose3
  prinv                 0x08000000       134217728          verbose3
  do_attack             0x00000001               1          verbose4
  known_hitum           0x00000002               2          verbose4
  hmon_hitmon1          0x00000004               4          verbose4
  hmon_hitmon2          0x00000008               8          verbose4
  mhitm_ad_tlpt         0x00000010              16          verbose4
  mhitm_ad_wrap1        0x00000020              32          verbose4
  mhitm_ad_wrap2        0x00000040              64          verbose4
  mhitm_ad_dgst         0x00000080             128          verbose4
  damageum              0x00000100             256          verbose4
  missum                0x00000200             512          verbose4
  hmonas1               0x00000400            1024          verbose4
  hmonas2               0x00000800            2048          verbose4
  hmonas3               0x00001000            4096          verbose4
  hmonas4               0x00002000            8192          verbose4
  passive               0x00004000           16384          verbose4
  flash_hits_mon        0x00008000           32768          verbose4

3 years agofix #2779 - Windows GUI pulldown help menu \
PatR [Sun, 19 Jun 2022 23:55:39 +0000 (16:55 -0700)]
fix #2779 - Windows GUI pulldown help menu \

specifies duplicate accelerator keystrokes

Reported and diagnosed nine and half years ago but never fixed.

In the WinGUI-specific help menu (under the titlebar, not nethack's
'?' command), both "&Long description of the game" and "&Longer list
of game options" use &L as accelerator.  Typing 'L' or 'l' highlights
one of the entries, then <enter> is needed to execute it or typing
another 'L' or 'l' unhighlights it and highlights the other.  Other
accelerators in that menu execute their entries immediately, without
the need for <enter>.

Change the first one to "Long description of the &game" so that 'G'
or 'g' becomes its accelerator.

That menu is missing several things that have been added to the menu
for '?'.  I put in placeholder comments for them but won't pursue
them further.

Untested.

3 years ago\#wizkill feedback
PatR [Sun, 19 Jun 2022 20:50:15 +0000 (13:50 -0700)]
\#wizkill feedback

If is mon not sensed or seen and you use #wizkill to kill it, report
"You kill an unseen mon." rather than just "You kill the mon."  Also,
override hallucination when identifying the victim.

3 years agoanother x_monnam() tweak
PatR [Sun, 19 Jun 2022 18:36:40 +0000 (11:36 -0700)]
another x_monnam() tweak

The former special case for a/an prefix wasn't partlicularly special.

3 years agocode paths through x_monnam()
PatR [Sun, 19 Jun 2022 09:44:18 +0000 (02:44 -0700)]
code paths through x_monnam()

Reduce the number of early returns in x_monnam().  There shouldn't be
any change in observable behavior.

3 years agoyet more magic whistle
PatR [Sun, 19 Jun 2022 09:39:43 +0000 (02:39 -0700)]
yet more magic whistle

'optr' was accidentally left around from an intermediate revision.
There's no reason to keep it as a comment.

3 years agodebugpline() fix
PatR [Sun, 19 Jun 2022 09:30:45 +0000 (02:30 -0700)]
debugpline() fix

Something which occurred to me when looking at the magic whistle code.
It's behavior can vary depending upon whether pline()/You()/&c has
been called and that is detected by checking whether pline() has reset
iflags.last_msg.  Change the debugpline() mechanism to prevent it from
interfering with that.

3 years agosilence three compile warnings
nhmall [Sun, 19 Jun 2022 08:56:48 +0000 (04:56 -0400)]
silence three compile warnings

apply.c:495:22: warning: variable 'optr' set but not used [-Wunused-but-set-variable]
    struct permonst *optr;
                     ^
1 warning generated.
cmd.c:4577:26: warning: variable 'how' set but not used [-Wunused-but-set-variable]
    const char *dothat, *how;
                         ^
cmd.c:4578:29: warning: variable 'viawindow' set but not used [-Wunused-but-set-variable]
    boolean prefixhandling, viawindow;
                            ^
2 warnings generated.

3 years agomagic whistle followup
PatR [Sun, 19 Jun 2022 08:40:07 +0000 (01:40 -0700)]
magic whistle followup

3 years agouse the new Makefile target
nhmall [Sat, 18 Jun 2022 17:52:49 +0000 (13:52 -0400)]
use the new Makefile target

Also, try setting continueOnError: true

3 years agosome documentation-related changes
nhmall [Sat, 18 Jun 2022 17:32:17 +0000 (13:32 -0400)]
some documentation-related changes

add a command-line pdf option to Makefile for use in CI.
fix .tex file errors.

3 years agoThis is cron-daily v1-May-8-2022. 000files updated: Files
nhw_cron [Sat, 18 Jun 2022 15:24:08 +0000 (11:24 -0400)]
This is cron-daily v1-May-8-2022.  000files updated: Files

3 years agofollow-up bit
nhmall [Sat, 18 Jun 2022 15:03:59 +0000 (11:03 -0400)]
follow-up bit

3 years agotypo in last commit
nhmall [Sat, 18 Jun 2022 14:44:22 +0000 (10:44 -0400)]
typo in last commit

3 years agoGuidebook datestamping
nhmall [Sat, 18 Jun 2022 14:29:15 +0000 (10:29 -0400)]
Guidebook datestamping

Allow the hints file to apply a correct timestamp to
the Guidebooks prior to use.

Detect the NH_DATESUB in the Guidebook.mn or Guidebook.tex
files and replace the datestamping line that follows.

If git is available, it determines the hash of the last commit
applied to doc/Guidebook.mn, and then determines the date of
that commit.  The interim Guidebook.dated.mn (or
Guidebook.dated.tex) gets the datestamp applied.

If git isn't available or doesn't correctly provide the hash
for doc/Guidebook.mn, it should just continue to use whatever
hard-coded date in the Guidebook.mn source file (it uses it
instead of the interim file).

3 years agofeedback for bad command prefix usage
PatR [Sat, 18 Jun 2022 00:59:05 +0000 (17:59 -0700)]
feedback for bad command prefix usage

The old code to supply a list of directions if a prefix was followed
by a non-direction didn't work as intended anymore.  Add some more
precise feedback for gGF mis-use and comment out some code that never
gets executed.

A number_pad user can get a complaint about 'G' when using '5' followed
by a non-directional command.  Too bad for them.

Supersedes pull request #803

3 years agomagic whistle bandage
PatR [Fri, 17 Jun 2022 21:58:02 +0000 (14:58 -0700)]
magic whistle bandage

Reported by entrez:  if magic whistle summoned a pet onto a trap, the
messages produced could be in the wrong sequence or contradictory.
The code was collecting counts and name-of-first for shift (was seen
before whistling, seen at different spot after), for appear (wasn't
seen before, now is), and for disappear (was seen before, now isn't)
before dealing with a trap at arrival location.  The trap could issue
a message (including pet killed, pet sent away--teleport trap, hole,
&c--or pet changed shape--which occurred after its name/old shape was
saved for use when it was the only one in its category), and finally
the summary message was issued.

Change the code to handle arriving in a trap before the collection
into the three categories that provide feedback, and skip the latter
if any message was given during mintrap().  That handles the most
glaring anomalies like killed followed by shifted location or takes
on new shape followed by old shape shifted or appeared.  But it no
longer gives specific shift/appear/disappear feedback for those cases.
Pets that don't land on traps or who land on ones that don't issue
any feedback aren't affected.

The accessibility aspect of this--message feedback in order to avoid
tedious screen reading of the map--will need to be satisfied by the
trap feedback unless/until someone comes up with a better solution.
One possibility is an option to allow player to have rloc() always
issue its vanish and appear messages.  Right now it does so when magic
whistle hasn't been discovered yet, then avoids that hyper-verbosity
(if hero has multiple pets) once it has.  Or the whistle code could
count the number of pets first, then behave as if such an option is in
effect when the count is small and only resort to the current summary
method if the count is larger than some threshold.

3 years agoTypo in opthelp
Patric Mueller [Fri, 17 Jun 2022 14:57:03 +0000 (16:57 +0200)]
Typo in opthelp

3 years agoadd macOS-latest entry to CI
nhmall [Fri, 17 Jun 2022 14:23:27 +0000 (10:23 -0400)]
add macOS-latest entry to CI

3 years agouse corrected imagename in CI
nhmall [Fri, 17 Jun 2022 14:15:13 +0000 (10:15 -0400)]
use corrected imagename in CI

3 years agoadd macOS monterey to CI
nhmall [Fri, 17 Jun 2022 14:05:13 +0000 (10:05 -0400)]
add macOS monterey to CI