]> granicus.if.org Git - nethack/log
nethack
3 years agoMerge branch 'pr775' into NetHack-3.7
nhmall [Sat, 28 May 2022 23:42:21 +0000 (19:42 -0400)]
Merge branch 'pr775' into NetHack-3.7

3 years agoswitch to using a flag parameter on newcham()
nhmall [Sat, 28 May 2022 23:35:48 +0000 (19:35 -0400)]
switch to using a flag parameter on newcham()

3 years agoMerge branch 'cancel-revert-msg' of https://github.com/copperwater/NetHack into pr775
nhmall [Sat, 28 May 2022 23:33:11 +0000 (19:33 -0400)]
Merge branch 'cancel-revert-msg' of https://github.com/copperwater/NetHack into pr775

3 years agomore PR #771 - blast vs spell
PatR [Sat, 28 May 2022 21:09:31 +0000 (14:09 -0700)]
more PR #771 - blast vs spell

Add the patch from entrez to describe the tower of flame effect from
a scroll of fire as "the blast" rather than "your spell" if it reveals
a secret door.

3 years agodisplay lua warnings instead of ignoring them
PatR [Sat, 28 May 2022 19:49:08 +0000 (12:49 -0700)]
display lua warnings instead of ignoring them

This will be an annoyance for wizard mode until someone actually
figures out and fixes the problem.  The complaints from lua during
garbage collection aren't new, they were just being ignored before.

3 years agolua sandbox code reformatting
PatR [Sat, 28 May 2022 19:35:44 +0000 (12:35 -0700)]
lua sandbox code reformatting

Remove a ton of tabs in nhlua.c and add missing whitespace to a bunch
of 'if(test){' lines and to a few casts.

Also simplify? obj handling during garbage collection (does not fix
the current gc problem) in nhlobj.c.

3 years agoMerge branch 'pr776' into NetHack-3.7
nhmall [Sat, 28 May 2022 17:53:31 +0000 (13:53 -0400)]
Merge branch 'pr776' into NetHack-3.7

3 years agoMerge branch 'little-fixups' of https://github.com/copperwater/NetHack into pr776
nhmall [Sat, 28 May 2022 17:53:12 +0000 (13:53 -0400)]
Merge branch 'little-fixups' of https://github.com/copperwater/NetHack into pr776

3 years agoRemove unused "mazeflag" parameter from mkfount()
copperwater [Sat, 28 May 2022 14:42:14 +0000 (10:42 -0400)]
Remove unused "mazeflag" parameter from mkfount()

This parameter appears to have been in the code for a very long time,
but never used, since no version of NetHack I can find had mazes with
randomly placed fountains in them. Certainly isn't used now, so this can
be reduced to the same call to find_okay_roompos used by similar
functions such as mksink.

3 years agoUse RANDOM_CLASS instead of magic number 0 for mksobj_at()
copperwater [Sat, 28 May 2022 01:42:25 +0000 (21:42 -0400)]
Use RANDOM_CLASS instead of magic number 0 for mksobj_at()

3 years agoCorrection and clarification for "balk" math comment
copperwater [Sat, 28 May 2022 01:35:05 +0000 (21:35 -0400)]
Correction and clarification for "balk" math comment

Andrio pointed out at some point that the "below 25% HP: pet will not
attack at all" mentioned in this comment was wrong. It will not attack
*peaceful monsters* at all, but will still attack hostile monsters.

Also, the math behind the balk variable has confused several people,
thinking it's off by one and allowing the pet to attack one level higher
than stated. This is not the case, since it's the lowest level they
*won't* attack. Clarify that.

3 years agoFix a stray magic number in pick_lock
copperwater [Sat, 28 May 2022 01:26:58 +0000 (21:26 -0400)]
Fix a stray magic number in pick_lock

3 years agoUse looted rather than doormask when it pertains to a throne
copperwater [Sat, 28 May 2022 01:25:18 +0000 (21:25 -0400)]
Use looted rather than doormask when it pertains to a throne

They're both just aliases for rm.flags, but "doormask" doesn't mean
anything conceptual for a throne.

3 years agoRemove pointless lighting statement in Val-strt
copperwater [Sat, 28 May 2022 01:23:31 +0000 (21:23 -0400)]
Remove pointless lighting statement in Val-strt

The whole level was already lit up, so lighting up a smaller area of it
does nothing.

3 years agoHave newcham() give messages when monsters polymorph in more cases
copperwater [Fri, 1 Dec 2017 21:36:34 +0000 (16:36 -0500)]
Have newcham() give messages when monsters polymorph in more cases

This is a descendent of an earlier patch I wrote. The main idea is still
to clearly communicate to the player *what* something is turning into,
without the need to farlook afterwards, and give them the opportunity to
add MSGTYPE for when something jumps on a polymorph trap and becomes an
arch-lich. If it happens out of sight, the player also might get a whiff
of the monster's smell, giving a bit of advance warning.

There is one new case in here, in normal_shape(), which came about
because I noticed a weird message sequence: "The magic-absorbing blade
cancels the python!  You kill the chameleon!" with no intervening
message indicating the python reverted to a chameleon.

3 years agocouple of is_clinger bits
PatR [Fri, 27 May 2022 22:28:49 +0000 (15:28 -0700)]
couple of is_clinger bits

The grounded() macro wasn't fully handling is_clinger().  Not sure
what impact this fix will have.

Add ability to cling to the ceiling to enlightenment feedback.  If
it gets fixed up to a state where it is useable while polymorphed,
some or all of it should be moved to non-magic ^X feedback.

3 years agoMerge branch 'pr551' into NetHack-3.7
nhmall [Fri, 27 May 2022 20:43:00 +0000 (16:43 -0400)]
Merge branch 'pr551' into NetHack-3.7

3 years agowriting type-named scrolls pr#551
nhmall [Fri, 27 May 2022 20:41:46 +0000 (16:41 -0400)]
writing type-named scrolls pr#551

entrez commented in https://github.com/NetHack/NetHack/pull/551 on Jul 16,
2021:
"When using a marker, it is possible to write a scroll based on the
 type-name assigned to it by the user. Somewhat unintuitively, this
 system broke down if the assigned name was identical to the real name of
 a scroll type: trying to write a scroll by its previously-assigned name
 'scare mon' or 'id' would be guaranteed to succeed, but this wouldn't be
 the case if the user-assigned name was 'scare monster' or 'identify'.

 Revise dowrite(write.c) to prefer a user-assigned type-name to the
 real name of a scroll that isn't already formally known, while
 continuing to prefer the real name of an identified scroll to both."

Closes #551 (Github pull request)

Also,
Closes #436 (Github issue)

3 years agoMerge branch 'fix-write-named-scroll' of https://github.com/entrez/NetHack into pr551
nhmall [Fri, 27 May 2022 20:35:30 +0000 (16:35 -0400)]
Merge branch 'fix-write-named-scroll' of https://github.com/entrez/NetHack into pr551

3 years agorestrict a Windows console message to debug
nhmall [Fri, 27 May 2022 20:33:22 +0000 (16:33 -0400)]
restrict a Windows console message to debug

3 years agoMerge branch 'pr659' into NetHack-3.7
nhmall [Fri, 27 May 2022 20:16:49 +0000 (16:16 -0400)]
Merge branch 'pr659' into NetHack-3.7

3 years agoMerge branch 'homebrewed-curses' of https://github.com/perryprog/NetHack into pr659
nhmall [Fri, 27 May 2022 20:16:25 +0000 (16:16 -0400)]
Merge branch 'homebrewed-curses' of https://github.com/perryprog/NetHack into pr659

3 years agoMerge branch 'pr773' into NetHack-3.7
nhmall [Fri, 27 May 2022 20:08:55 +0000 (16:08 -0400)]
Merge branch 'pr773' into NetHack-3.7

3 years agomdisplacem stoning and gloves had test backwards
nhmall [Fri, 27 May 2022 20:07:27 +0000 (16:07 -0400)]
mdisplacem stoning and gloves had test backwards

Closes #773

3 years agoMerge branch 'mdisplacem-stoning' of https://github.com/entrez/NetHack into pr773
nhmall [Fri, 27 May 2022 20:05:17 +0000 (16:05 -0400)]
Merge branch 'mdisplacem-stoning' of https://github.com/entrez/NetHack into pr773

3 years agoFix: mdisplacem stoning and gloves
Michael Meyer [Fri, 27 May 2022 18:54:35 +0000 (14:54 -0400)]
Fix: mdisplacem stoning and gloves

Apparently this is a bug that's existed since mon-vs-mon displacement
was introduced in 2003 (in 89c785e): if a monster displaced a footrice,
having gloves on would make it vulnerable to being stoned, while having
bare hands would protect it.  Switch it around so wearing gloves blocks
petrification, as it does under other circumstances.

Also add a message explaining why the displacing monster was stoned (if
the displacement attempt is visible to the hero), so the "Foo turns to
stone!" message has some context.

3 years agocron daily Guidebook.txt update
nhmall [Fri, 27 May 2022 15:39:34 +0000 (11:39 -0400)]
cron daily Guidebook.txt update

3 years agodaily cron update to Files
nhmall [Fri, 27 May 2022 14:40:33 +0000 (10:40 -0400)]
daily cron update to Files

3 years agomanual bump of guidebook date to match last commit
nhmall [Fri, 27 May 2022 14:38:54 +0000 (10:38 -0400)]
manual bump of guidebook date to match last commit

3 years agogithub pull request #772 - displaying new glob
PatR [Wed, 25 May 2022 19:38:07 +0000 (12:38 -0700)]
github pull request #772 - displaying new glob

If a monster killed a pudding, the resulting glob was dropped on
the map but might now be shown depending upon interaction--or lack
of such--with nearby globs.

The commit also changed the indentation of a label; I've reversed
that.  Having labels always be indented one space means there's
no need to look into nested blocks to find them.  But having no
indentation at all interferes with GNU diff (which is used for git
diff) showing the function that a band of changes occurs in (done
by augmenting the change bars in front of the band).  That is based
on the most recent preceding line having a letter in the leftmost
column.  Back when we had K&R-style function definitions which
didn't indent their arguments, that diff feature wasn't useful.
But after switching to ANSI-style definitions it is--except when an
unindented label interferes.

3 years agoFix: invisible pudding globs
Michael Meyer [Wed, 25 May 2022 17:24:47 +0000 (13:24 -0400)]
Fix: invisible pudding globs

When a pudding was killed by a monster (player-caused deaths were exempt
because of a 'backup' newsym call in xkilled), and the resulting glob
ended up on the pudding's square (whether because there were no adjacent
globs, or because the adjacent glob merged into the new one rather than
vice-versa), the glob wouldn't be drawn onto the map until the squre was
redrawn with ^R or similar.  This was because the early return for globs
in make_corpse skipped the typical newsym call near the end of the
function.

In this commit I just added a newsym call to the glob case in
make_corpse, but adding a newsym call to monkilled as a guard against
similar cases (equivalent to the one in xkilled) seems like a possible
extension.  I wasn't sure if there's a particular reason it's not
included in monkilled, so I didn't mess with it.

3 years agotimer code readability
PatR [Wed, 25 May 2022 19:30:48 +0000 (12:30 -0700)]
timer code readability

Something else noticed while looking for something unrelated.  The
original code is correct but I think the revised code is a little
easier to take in when looking at it.

3 years agomaybe_finished_meal() comment bit
PatR [Wed, 25 May 2022 19:20:48 +0000 (12:20 -0700)]
maybe_finished_meal() comment bit

An end of line comment that spans multiple lines needs to start the
continuation line(s) with '*' or clang-format will convert it into
a block comment that follows the initial line.

  foo(); /* call foo
            but not bar */
would become
  foo();
  /*
   * call foo but not bar
   */
however
  foo(); /* call foo
          * but not bar */
would stay as-is.

All that for a one-line change, and then I've changed this particular
instance to be
  /* call foo but not bar */
  foo();

There are lots of these that should eventually be fixed.  I just
happened to notice this one when looking for something else.

3 years agozap_over_floor comment typo
PatR [Tue, 24 May 2022 01:34:09 +0000 (18:34 -0700)]
zap_over_floor comment typo

3 years agoextend Guidebook description of #wizkill
PatR [Tue, 24 May 2022 01:06:33 +0000 (18:06 -0700)]
extend Guidebook description of #wizkill

3 years agomore github issue #771 - feedback for oil potion \
PatR [Tue, 24 May 2022 00:49:37 +0000 (17:49 -0700)]
more github issue #771 - feedback for oil potion \

explosion that reveals a secret door

Make the fix to feedback when an exploding potion of oil reveals a
door and then destroys it not affect other zap_over_floor feedback.
This incorporates the followup comment from entrez.

3 years agonamed fruit vs glob bit
PatR [Mon, 23 May 2022 18:31:48 +0000 (11:31 -0700)]
named fruit vs glob bit

3.7 has a new size prefix for globs that 3.6 didn't.  The code that
decides whether player is naming slime molds after an actual object
needs to know about it.

3 years agozap.c non-zap buglets
PatR [Mon, 23 May 2022 18:19:38 +0000 (11:19 -0700)]
zap.c non-zap buglets

A couple of things I noticed when trying--and failing, so far--to figure
out the revive panic:
1) revive() treated y==0 as out of map bounds (x==0 is out of bounds
   but y==0 isn't);
2) get_mon_location() might yield stale coordinates for steed (but
   moot since that's only used for mobile lights and no light emitting
   monster can wear a saddle; didn't affect light emitting objects
   carried or worn by monsters).

3 years agocomment update
nhmall [Mon, 23 May 2022 17:32:25 +0000 (13:32 -0400)]
comment update

3 years agooil burning secret door described as spell #771
nhmall [Mon, 23 May 2022 17:25:12 +0000 (13:25 -0400)]
oil burning secret door described as spell #771

Closes #771

3 years agoCurses: fix clipped map crash due to uninitialized memory
Patric Mueller [Sun, 22 May 2022 22:03:15 +0000 (00:03 +0200)]
Curses: fix clipped map crash due to uninitialized memory

3 years agotweak #wizkill
PatR [Sun, 22 May 2022 07:21:58 +0000 (00:21 -0700)]
tweak #wizkill

When using 'm #wizkill' to kill monster(s) off without giving the
hero any credit or blame, temporarily force context.mon_moving On
so that collateral damage (other monsters killed by targetted gas
spore's explosion) also don't give the hero any credit or blame.

Make sure that some message identifying the monster is given when
targetted monster is killed even if hero can't see or sense it.

3 years agowarning fix
nhmall [Sun, 22 May 2022 01:26:21 +0000 (21:26 -0400)]
warning fix

3 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Sun, 22 May 2022 01:22:42 +0000 (21:22 -0400)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

3 years agofollow-up (from entrez)
nhmall [Sun, 22 May 2022 01:22:20 +0000 (21:22 -0400)]
follow-up (from entrez)

3 years agoadd new #wizkill command
PatR [Sun, 22 May 2022 00:40:52 +0000 (17:40 -0700)]
add new #wizkill command

Add a way to get rid of specific monsters in wizard mode without
fighting, zapping, &c.  #wizkill command lets you kill creatures by
picking them with getpos().

You can pick multiple monsters by targetting them one after another.
You don't have to be able to see or sense them but if you target a
spot that has no monster, the command ends.

By default, the hero gets credit or blame as if having killed the
targets but #wizkill can be preceded by 'm' prefix to treat their
deaths as if they had been caused by a monster.

3 years agowizard mode wishing bit
PatR [Sat, 21 May 2022 22:19:48 +0000 (15:19 -0700)]
wizard mode wishing bit

I meant to wish for a "wand of cold" and accidentally typed "wand of
ice".  Instead of being told that there's no such thing or receiving
a random wand, the spot I was standing on was changed to ice.

Only check for a terrain-change wish if an object class hasn't been
stripped from the wish text.

3 years agomake currently unhandled switch cases apparent
nhmall [Sat, 21 May 2022 13:13:02 +0000 (09:13 -0400)]
make currently unhandled switch cases apparent

3 years agoexpand info a wee bit on revive() panic
nhmall [Sat, 21 May 2022 13:08:23 +0000 (09:08 -0400)]
expand info a wee bit on revive() panic

3 years agoincorporate the later force push on pr767
nhmall [Fri, 20 May 2022 23:45:07 +0000 (19:45 -0400)]
incorporate the later force push on pr767

3 years agofixes3-7-0.txt entries for pr765 and pr767
nhmall [Fri, 20 May 2022 21:59:42 +0000 (17:59 -0400)]
fixes3-7-0.txt entries for pr765 and pr767

3 years agoMerge branch 'pr765-767' into NetHack-3.7
nhmall [Fri, 20 May 2022 21:41:18 +0000 (17:41 -0400)]
Merge branch 'pr765-767' into NetHack-3.7

3 years agoMerge branch 'makeplural-gateaux' of https://github.com/entrez/NetHack into pr765-767
nhmall [Fri, 20 May 2022 21:40:22 +0000 (17:40 -0400)]
Merge branch 'makeplural-gateaux' of https://github.com/entrez/NetHack into pr765-767

3 years agoMerge branch 'fix-pray-goto' of https://github.com/argrath/NetHack into pr765-767
nhmall [Fri, 20 May 2022 21:40:04 +0000 (17:40 -0400)]
Merge branch 'fix-pray-goto' of https://github.com/argrath/NetHack into pr765-767

3 years agoHandle -eaux plurals in makeplural/makesingular
Michael Meyer [Fri, 20 May 2022 20:40:57 +0000 (16:40 -0400)]
Handle -eaux plurals in makeplural/makesingular

I noticed a comment about -eau pluralizing as -eaux, e.g. "gateau" ->
"gateaux", was not consistent with the actual output of makeplural.
Same thing with "VAX" -> "VAXen" in the line below it; they're very old
comments, so maybe they were originally meant to point out some plurals
makeplural got wrong?  Since they predate the addition of "oxen" and
"geese" to one_off[] (and the array itself), it seems like the other
special cases mentioned in the comments would also have been wrong at
the time they were written.

Address this horrifying pastry-related oversight by adding handling for
'-eaux' plurals to makeplural, with an exception for 'bureau' (plural
'bureaus'; according to the dictionary, 'bureaux' is an acceptable
variant but 'bureaus' is more common, at least in American English).
There's also an exception for 'Bordeaux' (as in a bottle of the wine),
since the singular and plural are the same.

A bit surprised this wasn't already in there, since 'gateau' is a real
food item and seems like a much more likely fruit name than some of the
inedible items makeplural has special rules for.

Also add " au " to compounds[] in singplur_compound, so that 'gateau au
chocolat' will pluralize correctly to 'gateaux au chocolat'.  Without
that change, the result is 'gateau au chocolats'.

3 years agoadjust the function name in impossible()
SHIRAKATA Kentaro [Fri, 20 May 2022 15:33:53 +0000 (00:33 +0900)]
adjust the function name in impossible()

3 years agofix MSDOS cross-compile
nhmall [Thu, 19 May 2022 23:53:48 +0000 (19:53 -0400)]
fix MSDOS cross-compile

After some Make variables and additional override for CROSS_TO_MSDOS
is required.

3 years agodon't force manual edit of config.h for Lua 5.3.6 and earlier
nhmall [Thu, 19 May 2022 23:22:43 +0000 (19:22 -0400)]
don't force manual edit of config.h for Lua 5.3.6 and earlier

3 years agofix 'make all' from src directory
nhmall [Thu, 19 May 2022 23:00:47 +0000 (19:00 -0400)]
fix 'make all' from src directory

3 years agolua 'index'
PatR [Thu, 19 May 2022 21:40:27 +0000 (14:40 -0700)]
lua 'index'

Having the preprocessor rename a variable called 'index' to one
called 'strchr' is not the source of any bugs (in execution; it can
cause pain when trying to ask a debugger to display the value and
then be told no such thing exists).  Change the name to 'indx' to
avoid any confusion.

If we switch to strchr() we should still avoid using 'index' as a
variable name.

3 years agoCurses: Obey timed_delay option
Pasi Kallinen [Thu, 19 May 2022 15:40:15 +0000 (18:40 +0300)]
Curses: Obey timed_delay option

3 years agouse updated lua library name in make spotless
nhmall [Thu, 19 May 2022 12:18:52 +0000 (08:18 -0400)]
use updated lua library name in make spotless

3 years agodifferentiate lua object library names by Lua ver
nhmall [Thu, 19 May 2022 11:44:29 +0000 (07:44 -0400)]
differentiate lua object library names by Lua ver

3 years ago5.3.5 is not currently compatible with NHL_SANDBOX, but make it compile
nhkeni [Wed, 18 May 2022 18:11:00 +0000 (14:11 -0400)]
5.3.5 is not currently compatible with NHL_SANDBOX, but make it compile
with 5.3.5 and !NHL_SANDBOX

3 years agosplit fixing curse trouble into separate function
SHIRAKATA Kentaro [Sun, 8 May 2022 13:50:01 +0000 (22:50 +0900)]
split fixing curse trouble into separate function

3 years agoDon't sanity check LUA_VERSION for sandbox if no sandbox.
nhkeni [Wed, 18 May 2022 17:24:13 +0000 (13:24 -0400)]
Don't sanity check LUA_VERSION for sandbox if no sandbox.

3 years agotested newer versions of visual studio
nhmall [Wed, 18 May 2022 16:17:00 +0000 (12:17 -0400)]
tested newer versions of visual studio

Also fixes a missing ')' typo in Makefile.nmake

3 years agoAdd missing void
Pasi Kallinen [Wed, 18 May 2022 15:59:01 +0000 (18:59 +0300)]
Add missing void

3 years agocontext-sensitive inventory item-action split
PatR [Wed, 18 May 2022 08:17:14 +0000 (01:17 -0700)]
context-sensitive inventory item-action split

When picking an item from inventory and then picking 'I - adjust
inventory by splitting this stack' in the item-action menu,
yn_function("Split off how many?") is used to start getting the
count without needing to wait for <return>.  It includes the response
in message history (so review of history will see that first digit).
The code then uses get_count() to obtain any additional digits.  Tell
the latter to store "Count: N" in message history if N is different
from the first digit.

That's not as good as updating message history to replace the entry
showing the prompt with the first digit with one that shows the full
count but at least it's accurate when the count is 10 or more.

3 years agorestoring in Gehennom
PatR [Tue, 17 May 2022 23:52:06 +0000 (16:52 -0700)]
restoring in Gehennom

When a game is restored while hero is Gehennom, give the "It is hot
here.  You smell smoke..." message after the welcome back message.

For both entering Gehennom and restoring there, switch from "smell" to
"sense" in the second part of that message if poly'd into a form that
doesn't have sense of smell.

Some unrelated stuff that got caught up in this diff:
1) move welcome()'s call to l_nhcore_call() to the start of the routine
   instead of placing that after a potential early return;
2) remove a redundant glyphmap flags reset line; the routine being
   called starts by setting its flags field to 0 for level change so
   caller doesn't need to do that;
3) look_here() is just a formatting bit.

3 years agosome quest message delivery cleanup
PatR [Tue, 17 May 2022 22:52:50 +0000 (15:52 -0700)]
some quest message delivery cleanup

Construct a synoposis line if a message flagged for delivery by pline
gets changed to delivery by window and doesn't already have one.

deliver_by_pline(), deliver_by_window(), and deliver_splev_message()
were doing more work than necessary.

3 years agocmap_walls_to_glyph() and a couple of others
PatR [Mon, 16 May 2022 16:46:36 +0000 (09:46 -0700)]
cmap_walls_to_glyph() and a couple of others

I wasted a bunch of time yesterday trying to figure out why a maze
level in Gehennom wasn't being shown with orange walls and ended up
reformatting a few glyph handling macros while hunting for the problem.
It turned out that the wall color choosing was working as intended.
I was looking at a maze bordered by solid stone (pale blue with Qt's
tiles, unlike tty's blank space) rather than by walls.

Anyway, a couple of the macros have had a little bit of common code
factored out rather than just be reformatted so I'm putting this in.

[For future, maybe stone should be given branch-specific coloring
similar to walls?]

3 years agofix segfault with #therecmdmenu
PatR [Mon, 16 May 2022 16:41:21 +0000 (09:41 -0700)]
fix segfault with #therecmdmenu

The change to add a menu choice for naming an adjacent monster via
\#therecmdmenu was unintentionally requiring that the monster have
monst->mextra.  So it worked on pets (regardless of whether they
were already named) because they have mextra for 'edog' extension,
but not on the majority of monsters.  And when it failed the program
would crash with a 'segmentation fault' error.

Fix the check for whether a target monster already had a name when
deciding to use "name <mon>" or "rename <mon>" in the menu entry.

3 years agofix github issue #764 - misplaced corpses
PatR [Mon, 16 May 2022 08:30:00 +0000 (01:30 -0700)]
fix github issue #764 - misplaced corpses

Reported by jeremyhetzler and confirmed by k2:  dead monsters weren't
leaving corpses at the spot they died.

Don't set a monster's mx,my coordinates to 0,0 when taking it off the
map (unless it is migrating to another level; mx==0 is the bit of data
used to indicate that).  Corpse drop happens after that and expects
the dead monster's former map coordinates to be intact.

Fixes #764

3 years agopull request #763 - noxious nemeses
PatR [Sun, 15 May 2022 19:20:10 +0000 (12:20 -0700)]
pull request #763 - noxious nemeses

Pull request from vultur-cadens:  some of the quest nemeses death
messages mention releasing noxious gas or noxious fumes so create
a poison gas cloud for them.

Closes #763

3 years agoMake some quest nemeses leave poison clouds when they die.
vultur-cadens [Sun, 15 May 2022 15:47:16 +0000 (08:47 -0700)]
Make some quest nemeses leave poison clouds when they die.

The Archeologist, Caveman, and Priest quest texts describe the
nemesis's body producing a cloud of noxious fumes/gas when killed.

3 years ago\#therecmdmenu #name monster
PatR [Sun, 15 May 2022 18:01:44 +0000 (11:01 -0700)]
\#therecmdmenu #name monster

Implement naming an adjacent monster with #therecmdmenu.

Also plug a memory leak using item-action name or call on objects.

3 years agomore wormgone
PatR [Sun, 15 May 2022 01:10:42 +0000 (18:10 -0700)]
more wormgone

When wormgone() takes a long worm off the map, clear its stale mx,my
coordinates.  None of its callers need those anymore.

Also a bit of potential long worm clean up that occurred to me when
I looked at object bypass handling.  Expected to be a no-op here.

3 years agomigrating monster fix
PatR [Sat, 14 May 2022 10:30:45 +0000 (03:30 -0700)]
migrating monster fix

The change to zero out a monster's map coordinates when it is taken
off the map yesterday messed up migration between levels inside the
Wizard's tower.  (Didn't apply when accompanying the hero between
levels, so probably unlikely to be noticed.)

Noticed while moving some replicated code into its own routine.

3 years agomore writing novels
PatR [Fri, 13 May 2022 23:47:00 +0000 (16:47 -0700)]
more writing novels

Instead of always retaining a blank spellbook when failing to write a
novel, make 2/3 chance to retain and 1/3 chance to destroy.  Same odds
(but separate chance) to attempt to write the Great Yendorian Novel
versus awful fan fiction.

3 years agopull request #761 - writing novels
PatR [Fri, 13 May 2022 23:04:02 +0000 (16:04 -0700)]
pull request #761 - writing novels

Pull request by entrez:  don't create a Pratchett novel by writing
"novel" or "paperback book" on a known blank spellbook with a magic
marker.

Blanking a novel produces a blank spellbook; there isn't any blank
novel.  That's intentional.  Writing "novel" on a blank spellbook
and getting a randomly chosen Pratchett one wasn't intentional.

Closes #761

3 years agoPrevent hero from writing Pratchett books
Michael Meyer [Fri, 13 May 2022 15:53:58 +0000 (11:53 -0400)]
Prevent hero from writing Pratchett books

The hero's ability to channel Pratchett and write his books with a magic
marker once she had read or IDed at least one of them seemed strange,
especially cases like an illiterate hero doing it as her first
introduction to the written word.  Block the hero from writing random
novels with a marker.

The image of the hero sitting down in the dungeon to write a novel is
funny, so it feels like a good spot for a funny message.  I'm not
sure if what I have there is perfect, but it can always be changed.

3 years agopull request #760 - kickobjnam
PatR [Fri, 13 May 2022 22:57:03 +0000 (15:57 -0700)]
pull request #760 - kickobjnam

Add pull request by argrath:  only one of the calls to new kick_ouch()
needs to pass 'kickobjnam'.

Closes #760

3 years agokickobjnam on dokick() is assigned only kicking object
SHIRAKATA Kentaro [Thu, 12 May 2022 11:18:31 +0000 (20:18 +0900)]
kickobjnam on dokick() is assigned only kicking object

3 years agodisplay former possessions of dead monster
PatR [Fri, 13 May 2022 21:46:02 +0000 (14:46 -0700)]
display former possessions of dead monster

Reported directly to devteam by a hardfought player and also by
entrez.  The recent mon_leaving_level() change resulted in objects
dropped by a dying monster not being displayed immediately.

It justed needed the relobj(mon, 0, FALSE) to relobj(mon, 1, FALSE)
change in m_detach() but this does some related cleanup in
mon_leaving_level()'s callers.  wormgone() takes a long worm off the
map but leaves its stale coordinates set because some code relied on
that.  This takes away the need for that but still doesn't actually
clear them.

This adds redundant 'return' statements at the end of a few void
functions that are longer than fits within a typical screen display.
They make searching for the end of the current routine in an editor
or pager easier without resorting to regular expressions and can
also be used to search for the beginning if/when preceding routine
ends in 'return' too.

3 years agoyet more version buf
nhmall [Fri, 13 May 2022 00:10:27 +0000 (20:10 -0400)]
yet more version buf

3 years agomore version buf
nhmall [Thu, 12 May 2022 23:56:16 +0000 (19:56 -0400)]
more version buf

3 years agobuf sizes in version.c
nhmall [Thu, 12 May 2022 23:38:50 +0000 (19:38 -0400)]
buf sizes in version.c

there were some 'sizeof buf' on a passed pointer variable buf.
pass the actual buffer size in a second argument.

3 years agoun-macro some of display.h
PatR [Thu, 12 May 2022 21:42:20 +0000 (14:42 -0700)]
un-macro some of display.h

I recently captured preprocessor output for a file and the amount of
code being expanded--and subsequently compiled--for canspotmon() was
quite an eye opener.  This converts most of the macros it uses into
function calls.  The resulting executable generated for OSX (built
for x86_64 and containing four interfaces) is about 5.5% smaller! and
there wasn't any difference in speed that I could notice.

The knowninvisible() macro has been in error for as far back as the
git logs go (which include those for the second cvs repository, so
over 20 years now).

3 years agoDon't include /fsanitize=address in vs 2017
nhmall [Thu, 12 May 2022 12:05:28 +0000 (08:05 -0400)]
Don't include /fsanitize=address in vs 2017

Closes #759

3 years agorecharging
PatR [Thu, 12 May 2022 05:11:42 +0000 (22:11 -0700)]
recharging

Make "recharging" and "scroll of recharging" be aliases for "scroll
of charging" when wishing.

I thought this had been put in place years ago.

3 years agoXcode project update
nhmall [Wed, 11 May 2022 20:38:27 +0000 (16:38 -0400)]
Xcode project update

3 years agoredundant "shopkeeper disappears" message
PatR [Wed, 11 May 2022 20:12:25 +0000 (13:12 -0700)]
redundant "shopkeeper disappears" message

Reported directly to devteam by entrez, the rloc() monst vanishes/
appears nearby/&c message was being given before "satisified, <shk>
suddenly disappears" making the latter redundant.  As discussed, the
fix isn't as simple as suppressing one message or the other because
both are given conditionally.

This seems to solve it but has only been lightly tested.

3 years agocorrect the qt5 package instructions for ubuntu
nhmall [Wed, 11 May 2022 13:47:00 +0000 (09:47 -0400)]
correct the qt5 package instructions for ubuntu

3 years agowarning fix
nhmall [Wed, 11 May 2022 01:10:02 +0000 (21:10 -0400)]
warning fix

3 years agoredo magic whistle feedback
PatR [Tue, 10 May 2022 22:53:24 +0000 (15:53 -0700)]
redo magic whistle feedback

Give more information when magic whistle is already discovered and
applying it affects multiple pets, without much increase in verbosity.
For each of the three categories
 1) was already in view and moves to another spot still in view,
 2) was out of view and arrives at a spot within view,
 3) was in view but gets sent to a spot out of view,
show the pet by name (which might be "your <monst>" if it hasn't been
named) when there is just one, or "two creatures", "three...", "four...",
"several...", or "many..." when there are more than one.  The first
category with more than 1 says "creatures".  When there are additional
categories with more than 1, their part of the message says "others" if
prior part(s) already mention "creatures", or it says "other creatures"
if the prior part(s) only list pets by name.

For example
|Three creatures appear.
|Fido shifts location and Fang appears.
|Your pony shifts location and two other creatures appear.
|Many creatures shift locations, several others appear, and two others
disappear.
|Two creatures appear and two others disappear.

3 years agofix one more lua file header
nhmall [Tue, 10 May 2022 15:30:30 +0000 (11:30 -0400)]
fix one more lua file header

3 years agoupdate lua file headers
nhmall [Tue, 10 May 2022 15:26:52 +0000 (11:26 -0400)]
update lua file headers

3 years agoupdate headers on Lua files
nhkeni [Tue, 10 May 2022 11:44:26 +0000 (07:44 -0400)]
update headers on Lua files

3 years agomissed a reference in README
nhmall [Mon, 9 May 2022 21:58:26 +0000 (17:58 -0400)]
missed a reference in README