nhmall [Sun, 13 Mar 2022 02:49:32 +0000 (21:49 -0500)]
warning fix artifact.c
artifact.c: In function 'dump_artifact_info':
artifact.c:1088:37: warning: '%s' directive writing up to 255 bytes into a region of size 218 [-Wformat-overflow=]
1088 | Sprintf(buf, " %-36.36s%s", artiname(m), buf2);
| ^~ ~~~~
In file included from ../include/config.h:652,
from ../include/hack.h:10,
from artifact.c:6:
../include/global.h:255:24: note: 'sprintf' output between 39 and 294 bytes into a destination of size 256
255 | #define Sprintf (void) sprintf
artifact.c:1088:13: note: in expansion of macro 'Sprintf'
1088 | Sprintf(buf, " %-36.36s%s", artiname(m), buf2);
| ^~~~~~~
PatR [Sun, 13 Mar 2022 01:25:54 +0000 (17:25 -0800)]
artifact tracking again
Redo the recent artifact creation stuff by replacing several nearly
identical routines with one more general one. Also adds a tracking
bit for one or two more creation methods. That changed artiexist[]
from an array of structs holding 8 or less bits to one holding 9, so
bump EDITLEVEL in case the total size changed.
PatR [Sun, 13 Mar 2022 01:07:28 +0000 (17:07 -0800)]
livelog of breaking food conducts
Shorten the livelog messages for food conduct a little by changing a
bunch of "the first time" to just "first time". Will result in fewer
instances of tty condensing whitespace for a too-wide line written
into a text window. That includes stripping off indentation, which
messes up the alignment of #chronicle output.
Also, eliminate one redundant livelog printf. Breaking vegan conduct
by eating wax when poly'd can be folded into same message for eating
leather/bones/dragon hide. [The breaking vegetarian conduct for those
says "eating meat" which seems wrong but hasn't been changed.]
PatR [Fri, 11 Mar 2022 19:00:44 +0000 (11:00 -0800)]
more artifact tracking
This should have been broken up into multiple pieces but they're
all lumped together. I did ultimately throw away a fourth change.
Implement artiexist[].bones and artiexist[].rndm artifact creation
tracking bits that were added recently. Doesn't need to increment
EDITLEVEL this time.
Add a new wizard mode feature: if you use `a to show discovered
artifacts, it will prompt about whether to show the tracking bits
for all artifacts instead. If not using menustyle traditional,
you need at least one artifact to have been discovered in order to
have 'a' choice available when selecting what class of discovered
objects to show for the '`' command.
artifact_gift(), aritfact_wish(), and so forth return a value that
none of the existing callers use, so cast their calls to (void).
PatR [Thu, 10 Mar 2022 22:57:15 +0000 (14:57 -0800)]
discovered objects within class for a and u
If any artifacts are discovered and menustyle traditional is in use,
the player can type `a to get the artifact subset of discovered items.
Likewise with `u to for unique items (the invocation tools and the
real Amulet). For normal object classes, `<class> works for every
class, even when there aren't any discoveries for it (where you get
told "you haven't discovered any yet" if you pick such). But `a
and `u were only allowed if at least one thing in the corresponding
category had been discovered. Change to allow it even when none have
been. The feedback of "you haven't discovered any {unique items,
artifacts} yet" was already in place.
Doesn't apply for picking the class via menu. Menus don't have any
concept of "allowed as a response even though not listed as a choice".
PatR [Thu, 10 Mar 2022 00:11:14 +0000 (16:11 -0800)]
keep track of how artifacts got created
Since the struct used for elements of artiexist[] has a lot of unused
bits, add some new ones to extend it to indicate how artifacts have
been created. It had
| .exists (has been created) and
| .found (hero is aware that it has been created)
introduce
| .gift (divine gift),
| .wish (player wish),
| .named (naming elven weapon Sting or Orcrist)
| .viadip (made Excalibur by dipping long sword into fountain)
| .rndm (randomly created), and
| .bones (from bones file--how it got created in earlier game isn't
tracked). The first four are implemented, fifth and sixth aren't.
Some of the feedback when receiving an artifact or spellbook has been
revised.
When artiexist[] was changed from an array of booleans to an array of
structs a couple of days ago, EDITLEVEL should have been incremented
but I overlooked that at the time. This commit does so now.
nhmall [Wed, 9 Mar 2022 17:02:37 +0000 (12:02 -0500)]
some sys/windows build updates
Place built libraries for Lua and pdcurses into lib instead of the
more transient src/o subfolder.
Remove a kludge involving sys/windows/stub-pdcscrn.c.
Don't link pdcurses into NetHackW.exe (required a couple of stubs
since NetHack.exe and NetHackW.exe currently share object files
under the visual studio nmake build.
(Note: This may require a couple of follow-on minor modifications
to the mingw build. If so, the CI will flag that for us after this
commit)
PatR [Wed, 9 Mar 2022 15:06:37 +0000 (07:06 -0800)]
divine gift of spell knowledge
Remove the conduct-specific aspect of receiving spells as prayer boon.
Anyone now has a 25% chance of having the spell directly implanted
into their head, not just characters who have maintained illiterate
conduct. It can now also restore a forgotten spell or refresh one
that is nearly forgotten. It still tries to choose a spell which
isn't already known (new: or was known but has been forgotten) but if
it picks one that is known and doesn't need refreshing, a redundant
book will be given, same as the behavior in earlier versions.
The chance for receiving a blank spellbook is higher when that item
is undiscovered. When given as a prayer reward, make it become
discovered even if hero doesn't read it so that it will be less likely
to be given again. There's a 1% chance for that auto-discovery to
happen with other bestowed books. Unlike blank boots, having the book
be discovered doesn't lessen their chance of being repeat gifts.
Minor bug fix: for a spell implanted from scratch, the book remains
unknown. That's ok; it's actually more interesting than discovering
a book you haven't seen yet. But after acquiring and reading the book
you could get "you know <spell> quite well already" and the book would
stay undiscovered even though you were just told what spell it's for.
PatR [Mon, 7 Mar 2022 23:12:12 +0000 (15:12 -0800)]
fix github issue #691 - non-lawful Angels \
get lawful artifacts
Reported by vultur-cadens, Angels can be given Sunsword or Demonbane
for starting equipment even when they aren't lawful so won't attempt
to use those.
PatR [Mon, 7 Mar 2022 22:38:26 +0000 (14:38 -0800)]
fixes3-7-0 entry for PR #692, typos in dat/tribute
Pull request #692 from zomGreg. One comment misspells "transcription"
and Death quote #29 coming from Reaper Man misspells "metaphor". Fixed
by separate commits.
PatR [Mon, 7 Mar 2022 21:21:17 +0000 (13:21 -0800)]
more artifact tracking
Move some code that was used to decide whether to call distant_name
or doname into distant_name so that the places which were doing that
don't need to anymore and fewer places can care about whether an
artifact is being found. There were two or three instances of
distant_name maybe being called, based on distance from hero, and
yesterday's artifact livelog change added two or three more and made
all of them override the distance limit for artifacts.
After that change to distant_name, make sure that conditional calls
to it become unconditional--just not displayed for the cases where
!flags.verbose had been excluding them. That way distant_name can
decide whether an item is up close and arrange for xname to find it
if it as an artifact.
Also, implement an old TODO. Wearing the Eyes of the Overworld
extends the distance that an item can be from the hero and still be
considered near anough to be seen "up close" when monsters pick it
up or drop it. The explicit cases were using distu(x,y) <= 5, the
distance of a knight's jump. Each quadrant around the hero is a 2x2
square with the diagonal corner chopped off. The replacement code in
distant_name calculates a value of 6, which is functionally equivalent
since the next value of interest beyond 5 is 8. Wearing the Eyes
(deduced by having Xray vision) extends that threshold an extra step
in addition to overriding blindness and seeing through walls: 15,
a 3x3 square in each quadrant, still with the far diagonal corner (16)
treated as out of range.
PatR [Mon, 7 Mar 2022 11:33:01 +0000 (03:33 -0800)]
livelog event for finding artifacts
Log artifacts found on the floor, or carried by monsters if hero sees
those monsters do something with them. Shown to player via #chronicle
and included in dumplog.
For most cases, finding is based on having the artifact object be
formatted for display. So walking across one won't notice it if pile
size inhibits showing items at its location, even if the artifact is
on top. Taking stuff out of a container won't notice an artifact if a
subset of the contents chosen by class or BUCX filter doesn't include
it unless player has used ':' to look inside. Seeing an artifact be
picked up by a monster (even if the monster itself is unseen) or being
dropped (possibly upon death) will find an artifact even if beyond the
normal range of having it be treated as seen up close. Random treasure
drop items are excluded since they are placed directly on the floor
rather than going into a dying monster's inventory and then dropped
with its other stuff.
PatR [Mon, 7 Mar 2022 10:06:55 +0000 (02:06 -0800)]
found_artifact() groundwork
Lay groundwork for generating a log event when finding an artifact
on the floor or carried by a monster. This part should not produce
any change in behavior.
Move g.artidisco[] and g.artiexist[] out of the instance_globals
struct back to local within artifact.c. They are both initialized
at the start of a game (and only used in that file) so don't need
to be part of any bulk reinitialization if restart-instead-of-exit
ever gets implemented.
Convert artiexist[] from an array of booleans to an array of structs
containing a pair of bitfields. artiexist[].exists is a direct
replacement for the boolean; artiexist[].found is new but not put to
any significant use yet. If will be used to suppress the future
found-an-artifact event for cases where a more specific event (like
crowning or divine gift as #offer reward) is already produced.
Remove g.via_naming altogether and add an extra argument to oname()
calls to replace it.
PatR [Sat, 5 Mar 2022 23:14:18 +0000 (15:14 -0800)]
livelog event for crowning gift
There is an event for being crowned "Hand of Elebereth" and so forth
and an event for being given an artifact (any, not just the first) as
reward for #offer, but there wasn't one for the item usually given
along with being crowned.
Now there is. It's not something that an observer (of the events
being logged) can deduce since sometimes an alternative is given
(wizard and monk) and other times nothing is given (artifact already
exists or lawful character isn't wielding non-artifact long sword).
I flagged the spellbook given to a wizard or a monk as
'divinegift | artifact | spoiler'. 'artifact' since even though it
isn't actually an artifact, it is standing in the place for one. And
'spoiler', to hide from #chronicle, in case the hero doesn't know the
spellbook yet.
Pasi Kallinen [Sat, 5 Mar 2022 16:30:30 +0000 (18:30 +0200)]
Can't swallow trapped monsters
Gulping can move the trapped monster to another location, while
still being marked as trapped. I don't want to deal with this,
so just say purple worms can't swallow trapped monsters...
Pasi Kallinen [Sat, 5 Mar 2022 14:42:42 +0000 (16:42 +0200)]
Illiterate and blank spellbooks from gods
Make gods avoid giving blank spellbooks as gifts, if you're
illiterate. But if you do get a blank spellbook as a gift,
don't force-learn that non-existent spell.
Pasi Kallinen [Sat, 5 Mar 2022 11:42:24 +0000 (13:42 +0200)]
Fix monster trapped in nonexistent trap, pt 2
Monster hiding under an item on a location with a land mine,
a rolling boulder trap launches a boulder which blows up the mine,
and all the items scatter away. If the hider survived that, it
was still hiding.
Pasi Kallinen [Sat, 5 Mar 2022 09:26:39 +0000 (11:26 +0200)]
Fix monster trapped in nonexistent trap
A monster trapped in a bear trap on ice, exploding fiery monster
turned the ice into water turning the trap into object, the trapped
monster claimed to be still trapped in the nonexistent trap.
Pasi Kallinen [Sat, 5 Mar 2022 08:06:01 +0000 (10:06 +0200)]
Fix segfault with uball
Drowning in a pool while punished and carrying the ball,
and the only available space to crawl back on dry land
has a magic trap, which unpunishes you.
PatR [Sat, 5 Mar 2022 03:39:45 +0000 (19:39 -0800)]
EDITLEVEL increment
The change to report which item was acquired in the logged event for
Sokoban completion changed the context struct so changed the contents
of save files but neglected to update EDITLEVEL to reject old save
files. Do so now.
PatR [Fri, 4 Mar 2022 21:07:14 +0000 (13:07 -0800)]
livelog tweaks, mostly sokoban
Demote "completed sokoban {1,2,3,4}" from major achievement to minor
at the request of hardfought. OR on the 'dump' flag so that those
entries appear in dumplog.
Change "completed Sokoban" (for the whole branch) to "acquired the
Sokoban <prize object>" since that's what triggers the event and it
is possible to pass through the first level without completing that.
This event is still classified as a major achievement. It has has
the 'spoiler' flag added to prevent #chronicle from showing that event
which now discloses the type of item the prize is. (Note: suppression
of spoiler events is ignored in wizard mode.)
The "attained rank N" achievements are classified as minor for ranks
1..3 (gaining levels 3, 6, 10); OR the 'dump' flag for those. [Rank 0
for levels 1 and 2 isn't an achievement and 4..8 for Xp levels 14, 18,
22, 26, and 30 are classified as 'major' achievements so don't need
that flag to make it into dumplog.]
Pasi Kallinen [Fri, 4 Mar 2022 17:58:17 +0000 (19:58 +0200)]
Fix couple cases of unhiding monsters
Hidden monster might be forced to move to a location where it
can't hide, perhaps because it's mostly surrounded by other monsters.
Hidden monster in a pit under items, getting hit by a rolling boulder,
the boulder will fill the pit burying the items, making the monster
unable to hide there.
PatR [Fri, 4 Mar 2022 14:51:40 +0000 (06:51 -0800)]
Guidebook tweaks (mainly DUMPLOG)
In the sysconf section, "the following options affect the score file:"
had some score options and then several non-score options. Change to
"following four options" which reads a little strange but is precise.
Some other inserted line after those four options describing what
follows would read better but the stuff that follows is essentially
random based on the order that support for them was implemented.
Guidebook.mn: the 'placeholders' for DUMPLOG file name substitution
had the description column line up but the proportional font for the
'%x' column looked bad. Force fixed-width font there. Also add some
indentation. I wasn't sure whether '.in' should in inside .PS ... .PE
or outside. The final result looks the same either way.
Guidebook.tex: the new LIVELOG entry was accidentally placed after
the \elist line when it should come before that. (Not tested.)
Pasi Kallinen [Fri, 4 Mar 2022 14:42:11 +0000 (16:42 +0200)]
Fix checking monster moving into a trap return value
When I added a new trap return value, this was one place that
should've checked it.
This was really annoying to debug - it manifested as a temp level
file loading error, because a monster moved on to a level teleport
trap, which zeroes out (mx, my), then later in the monster movement,
a web spinner created a web at (0,0), and then hero leaving the level,
the traps were saved into the level file ... and when loaded, the code
thought a trap with x == 0 meant there were no more traps.
PatR [Thu, 3 Mar 2022 15:47:56 +0000 (07:47 -0800)]
github issue #688 - end of game livelog event
Requested by k21971 (hardfought admin): classify the gameover event
as something other than achievement so that live-logging can exclude
it in order to use the xlogfile end-of-game entry instead.
It had been classified as an achievement because that was the only
category being treated as 'major' so written to final dumplog. Give
is a new classification 'dump' which is distinct from achievement
and intended to explicitly request that an event go into dumplog.
The gameover event is the only one in that category, at least for now.
Add a bunch of other classifications besides achievement and dump to
be treated as 'major' for dumplog. The new list is
wish, achieve, umonst (death of unique monster), divinegift,
lifesave (via amulet, not explore-/wizard-mode decline to die),
artifact, genocide, dump
and may still need further tuning. Currently excluded are
conduct (first violation of any conduct), killedpet, alignment
(changed, either via helmet or conversion), minorac (minor
achievement such as level gain or entering the mines), and spoiler
(currently only applies to finding Mines' End luckstone which is
also 'achieve' so will be in dumplog).
This doesn't remove the reference to unimplemented LLC_TURNS that is
mentioned in the template sysconf.
PatR [Thu, 3 Mar 2022 13:38:34 +0000 (05:38 -0800)]
raw_print() usage
Get rid of a couple of mis-formatted casts in lock_file(). raw_print()
is declared as void so casting its result to (void) was pointless.
Presumeably at one point it has used printf() or fprintf(stderr,...)
where the cast would have been useful to pacify 'lint'.
PatR [Thu, 3 Mar 2022 13:27:05 +0000 (05:27 -0800)]
fix issue #689 - ?: warning
From copperwater: a recently added use of <test> ? <if> : <else>
had a ptrdiff_t (signed) expression for <if> and a size_t (unsigned)
expression for <else> which triggered a sign-compare warning when
the two expressions are implicitly converted into the same type.
Use casts to convert both expressions to long rather that convert
the size_t half to ptrdiff_t or vice versa. The final result gets
cast to int already.
PatR [Wed, 2 Mar 2022 22:43:12 +0000 (14:43 -0800)]
clear_bypasses() should operate on buried objects
Fix an object sanity check failure: a buried object with its bypass
bit set.
clear_bypasses() was supposed to be clearing the bypass bit on every
object but was neglecting the buried objects list and the billed
objects list (and inventory of the mydogs list, but that is expected
to always be empty at the time when clear_bypasses() gets called).
We already had an issue with billed objects, revealed by the fuzzer
soon after sanity checking was extended to test bypass/in_use/nomerge
bits. That one was fixed by clearing the bypass bit of specific
objects as they are being added to a shop bill. This fix should make
that earlier one become obsolete, but isn't removing it.
PatR [Wed, 2 Mar 2022 21:09:42 +0000 (13:09 -0800)]
some livelog cleanup
The gamelog structure's type/flags field is 'long' but the
corresponding livelog event type field and the argument passed to
gamelog's logging were 'unsigned'. They take the same values and
those values mean the same things so change them all to long.
The actual livelog logging assumed that time_t is a long number of
seconds, and was also using a boolean as an array index. Perform
proper type conversions.
sysconf parsing used 'int' to hold strtol() value; change to long.
Also it was using raw_printf() instead of config_error_add() to
complain about any problems. Clearly the livelog patch was not
updated to the current code base before being incorporated.
PatR [Wed, 2 Mar 2022 01:23:41 +0000 (17:23 -0800)]
livelog: killing unique monsters revisited
Treat all kills of the Wizard and of any of the Riders as major events
for inclusion in dumplog. For other unique monsters, that only happens
when they're killed for the first time.
PatR [Wed, 2 Mar 2022 00:51:41 +0000 (16:51 -0800)]
livelog: killing unique monsters
Treat the first kill of any unique monster as a major event (for
inclusion in dumplog). Revival and repeat kill is not major but
can still be seen during the game via the #chronicle command.
Show the minor event more often: in addition to death #1 it was
being shown on death 5, 10, 50, 100, 150, 200, and 250. Add 2, 3,
and 25 to that list.
PatR [Tue, 1 Mar 2022 22:11:58 +0000 (14:11 -0800)]
eat.c formatting
This is just reformatting some relatively recently added code.
There's a lot of redundancy in eating conduct tracking and livelog
reporting of that, but this doesn't attempt to streamline it. I may
try again some other time....
PatR [Tue, 1 Mar 2022 21:53:57 +0000 (13:53 -0800)]
livelog level entry events
Fix up the level descriptions used when logging an "entered new level"
event. Most of the change is for adding an extra argument to calls
to describe_level(). The curses portion is in a big chunk of old code
suppressed by #if 0.
I didn't notice that the level entry events are classified as LL_DEBUG
until all the work was done. This promotes the entry events for the
four Plane of <Element> levels from debug events to major ones instead.
It doesn't do that for the Astral Plane because the entered-the-Astral-
Plane achievement already produces a major event for that. Most other
key level entry events are in a similar situation--or will become that
way once another set of achievements eventually gets added--so there
aren't any other event classification promotions.
Alex Smith [Tue, 1 Mar 2022 13:23:10 +0000 (13:23 +0000)]
Avoid panic on zero-byte writes to save files
This is a well-defined operation, so bwrite() should be able to
handle it. However, when running under glibc, fwrite() produces an
unexpected return value for 0-byte writes, which makes bwrite()
think that the write failed (causing a panic).
This change implements 0-byte writes by not calling into libc at
all, so that we don't have to worry about how to decode the return
value of fwrite().
PatR [Tue, 1 Mar 2022 12:15:55 +0000 (04:15 -0800)]
fix github issue #687 - logging of major events
Reported by k21971, the dumplog section labeled "major events" showed
all logged events rather than just the ones classified as major.
Filter out the non-major ones when writing dumplog.
At the moment only a couple of ones other than achievements are major.
Probably various other types should be too.
The #chronicle command still lists all logged events unless they're
flagged as 'spoiler'. So far the mines' end luckstone is the only
one flagged that way. Unfortunately a player with access to live
logging could still learn whether or not the gray stone that has just
been picked up on the last mines level is the target luckstone by
viewing the log from outside of the game.
The #chronicle command would be more useful if it gathered all the
categories of events present and put up a menu allowing the player to
choose which ones to view. I haven't attempted to implement that.
PatR [Mon, 28 Feb 2022 21:46:59 +0000 (13:46 -0800)]
livelog revisions
Some changes to fix things I noticed in the dumplog referenced by
github issue #687 about showing all logged events under the header
"major events". (This doesn't address that. I figured it was
intentional while #chronicle is having any bugs worked out.)
Sequencing: show the event corresponding to an achievement for
entering a dungeon branch before the livelog-specific event of
entering a level for the first time. You enter the branch before
arriving at the new level.
Missing feedback: the you-won achievement didn't produce any
"ascended" event. That turned out to be a side-effect to suppressing
achievements that take place after the gameover flag has been set
(so blind-from-birth and/or nudist when applicable plus duplicate
obtained-amulet and ascended due to manipulation to reposition the
amulet achievement to be right before ascended so that the alternate
wording it has in the achievements listing looks better). Instead of
just forcing the ascended achievement to produce an ascended event,
this adds a more general game-over event.
While in there, change the classification of attaining level 14 from
minor livelog event to major since questing keys off of it.
nhkeni [Mon, 28 Feb 2022 00:57:16 +0000 (19:57 -0500)]
cmdcount_t
Add a type to force g.{command_count,last_command_count,multi} to have the
same type (because cmd.c: g.multi = g.command_count;) and some resulting
cleanup.
PatR [Sun, 27 Feb 2022 20:20:20 +0000 (12:20 -0800)]
document new 'tune' achievement
Add /tune/ to the achievement section of the Guidebook.
The 'note' part is a bit of a spoiler and risks making the prayer
boon of "Hark! To enter the castle you must play the right tune."
redundant for players who actually read the Guidebook (so hardly
anybody). Since that's the first stage of a two-stage reward I've
left it alone.
PatR [Sun, 27 Feb 2022 09:55:25 +0000 (01:55 -0800)]
new achievement: drawbridge tune
Use up the last available bit for achievements:
"You learned the tune to open and close the castle's drawbridge."
(More can still be added but xlogfile will need another field to
track a second set of 31 in order to keep its achievement bitmask(s)
within portable size.)
As achievements go, it's not very exciting, but players who normally
destroy the drawbridge have to choose whether to earn an achievement
first since once it's gone, there's no way to find out the tune
(either via prayer reward or successful Mastermind). I'm guessing
that most will probably decide to ignore this achievement since it
has no effect on the outcome of the game. However, that might not
be true for future tournament play.
There's no need to bump EDITLEVEL for this; room for recording one
additional achievement is already allocated.
PatR [Sat, 26 Feb 2022 18:15:58 +0000 (10:15 -0800)]
choose_stairs() revisited
Rewrite choose_stairs(). Use of '&& !builds_up()' was a no-op in
normal branches and forced picking the down stairs/ladder in Vlad's
Tower (or Sokoban) rather than reversing the usual up/down choice.
Also, the logic used was backwards: Kops always surrounded the up
stairs instead of the down stairs as intended. Non-Kops picked the
opposite direction of what the arguments asked for but since they based
their choice of up versus down on hidden mon->m_id, the reversal wasn't
noticeable.
Extend the choosing so that if nothing in the requested direction can
be found, it tries the opposite direction. Otherwise when Vlad's m_id
happens to force the direction to be 'up', he has nowhere to teleport
to now that being in his Tower doesn't force 'down' anymore. He goes
to down ladder when on the top level but if you level teleport to the
next level down and he accompanies you, he might go to either the down
ladder or the up ladder when he tries to get away from you to heal.
PatR [Sat, 26 Feb 2022 06:35:04 +0000 (22:35 -0800)]
fix github issue #686 - dead code
Reported by argrath: the code in choose_stairs() intended as last
resort wouldn't do anything because the loop's test condition always
started out false. Fix suggested by entrez.
Pasi Kallinen [Fri, 25 Feb 2022 19:49:38 +0000 (21:49 +0200)]
Unify domove and lookaround trap/liquid avoidance code
Nearly same code was in two places - the only difference was
how g.context.run == 1 was handled. Previously, if you were
blind, and knew about the water or lava, you still ran into it.
Now, we always avoid the dunking if running/rushing.
PatR [Fri, 25 Feb 2022 18:39:45 +0000 (10:39 -0800)]
remove references to old Qt 'moc' timestamp files
src/moc.qt[56] existed briefly but got replaced by src/Qt[56].h-t
(controlled by hints/include/compiler.370). The old names were
deliberately left in src/.gitignore and sys/unix/Makefile.src's
'clean' target to give some time for anyone who had generated them
to run 'make clean' to get rid of them. That time is now up. It's
only been about three weeks but if I wait any longer I'll probably
forget.
PatR [Fri, 25 Feb 2022 15:10:30 +0000 (07:10 -0800)]
more thrown object cleanup
Handle thrown or kicked object that's in transit for hangup save and
panic save in addition to normal end of game. Affects ball and chain
placement too, if they've been temporarily taken off the map.
PatR [Fri, 25 Feb 2022 02:10:52 +0000 (18:10 -0800)]
lost objects thrown by monsters
Reported by entrez: if a monster or explosion kills the hero with an
object that has timers or is a light source, it could trigger a panic
when end of game cleanup can't find it because it has been removed
from the map or monster's inventory and not placed back on the map
yet. This isn't much different from something thrown by hero which
had a similar situation dealt with a long time ago. Fix by setting
'thrownobj' for monster-launched and explosion-launched missiles.
That way done_object_cleanup() called from really_done() will place the
missile on the map where saving bones or general cleanup can find it.
It doesn't bother dealing with exploding a lit potion of oil that
kills the hero by missile damage before the potion explodes. If that
ends up in bones, it should still be lit and might blow up before the
new character reaches it. (Not verified.)
The code for a hero polymorphed into a unicorn and catching a thrown
gem has been moved into its own routine. No change in behavior, just
less clutter in the thrown-object-hits-hero section of the monster
throwing routine.