Commit Graph

13518 Commits

Author SHA1 Message Date
nhmall
0aba9ff77e restrict a Windows console message to debug 2022-05-27 16:33:22 -04:00
nhmall
6ea2e8e222 Merge branch 'pr659' into NetHack-3.7 2022-05-27 16:16:49 -04:00
nhmall
4d212e9864 Merge branch 'homebrewed-curses' of https://github.com/perryprog/NetHack into pr659 2022-05-27 16:16:25 -04:00
nhmall
947d65a27d Merge branch 'pr773' into NetHack-3.7 2022-05-27 16:08:55 -04:00
nhmall
2af1acce8b mdisplacem stoning and gloves had test backwards
Closes #773
2022-05-27 16:07:27 -04:00
nhmall
0eabe97c4a Merge branch 'mdisplacem-stoning' of https://github.com/entrez/NetHack into pr773 2022-05-27 16:05:17 -04:00
Michael Meyer
4e3812b5e4 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.
2022-05-27 15:58:12 -04:00
nhmall
3a1d49710c cron daily Guidebook.txt update 2022-05-27 11:39:34 -04:00
nhmall
d3ff89f5ec daily cron update to Files 2022-05-27 10:40:33 -04:00
nhmall
c414f3a648 manual bump of guidebook date to match last commit 2022-05-27 10:38:54 -04:00
PatR
e7923bafe9 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.
2022-05-25 12:38:07 -07:00
Michael Meyer
66c70eb453 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.
2022-05-25 12:34:59 -07:00
PatR
8a092aef0e 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.
2022-05-25 12:30:48 -07:00
PatR
a021424af8 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.
2022-05-25 12:20:48 -07:00
PatR
f592b9dfdb zap_over_floor comment typo 2022-05-23 18:34:09 -07:00
PatR
4c5465a150 extend Guidebook description of #wizkill 2022-05-23 18:06:33 -07:00
PatR
11de1496b1 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.
2022-05-23 17:49:37 -07:00
PatR
99cacd3105 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.
2022-05-23 11:31:48 -07:00
PatR
4cb397b502 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).
2022-05-23 11:19:38 -07:00
nhmall
9a21e55830 comment update 2022-05-23 13:32:25 -04:00
nhmall
0e9f53a624 oil burning secret door described as spell #771
Closes #771
2022-05-23 13:25:12 -04:00
Patric Mueller
ced5c2a92f Curses: fix clipped map crash due to uninitialized memory 2022-05-23 00:03:15 +02:00
PatR
a962a4f6ea 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.
2022-05-22 00:21:58 -07:00
nhmall
05d628752e warning fix 2022-05-21 21:26:21 -04:00
nhmall
7b506c715c Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-05-21 21:22:42 -04:00
nhmall
68d7ef440f follow-up (from entrez) 2022-05-21 21:22:20 -04:00
PatR
af55e3d027 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.
2022-05-21 17:40:52 -07:00
PatR
15882c5bee 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.
2022-05-21 15:19:48 -07:00
nhmall
f19ccde709 make currently unhandled switch cases apparent 2022-05-21 09:13:02 -04:00
nhmall
441840c737 expand info a wee bit on revive() panic 2022-05-21 09:08:23 -04:00
nhmall
35b56fb94b incorporate the later force push on pr767 2022-05-20 19:45:07 -04:00
nhmall
d93f8ebf69 fixes3-7-0.txt entries for pr765 and pr767 2022-05-20 17:59:42 -04:00
nhmall
eb49ca7c5a Merge branch 'pr765-767' into NetHack-3.7 2022-05-20 17:41:18 -04:00
nhmall
69a6e1dd01 Merge branch 'makeplural-gateaux' of https://github.com/entrez/NetHack into pr765-767 2022-05-20 17:40:22 -04:00
nhmall
b72b70ea99 Merge branch 'fix-pray-goto' of https://github.com/argrath/NetHack into pr765-767 2022-05-20 17:40:04 -04:00
Michael Meyer
0c0262eab0 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'.
2022-05-20 17:37:02 -04:00
SHIRAKATA Kentaro
3baa00bb1e adjust the function name in impossible() 2022-05-21 00:33:53 +09:00
nhmall
95da0beffa fix MSDOS cross-compile
After some Make variables and additional override for CROSS_TO_MSDOS
is required.
2022-05-19 19:53:48 -04:00
nhmall
29236fc22d don't force manual edit of config.h for Lua 5.3.6 and earlier 2022-05-19 19:22:43 -04:00
nhmall
629b5d67a9 fix 'make all' from src directory 2022-05-19 19:00:47 -04:00
PatR
46e34b0826 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.
2022-05-19 14:40:27 -07:00
Pasi Kallinen
c6a3ae5c6c Curses: Obey timed_delay option 2022-05-19 18:40:15 +03:00
nhmall
27119907a7 use updated lua library name in make spotless 2022-05-19 08:18:52 -04:00
nhmall
f57555ae6b differentiate lua object library names by Lua ver 2022-05-19 07:44:29 -04:00
nhkeni
8a6c3d8de5 5.3.5 is not currently compatible with NHL_SANDBOX, but make it compile
with 5.3.5 and !NHL_SANDBOX
2022-05-18 14:11:00 -04:00
SHIRAKATA Kentaro
0315cd876a split fixing curse trouble into separate function 2022-05-19 02:42:31 +09:00
nhkeni
c81dcf6713 Don't sanity check LUA_VERSION for sandbox if no sandbox. 2022-05-18 13:24:13 -04:00
nhmall
fafe54869d tested newer versions of visual studio
Also fixes a missing ')' typo in Makefile.nmake
2022-05-18 12:17:00 -04:00
Pasi Kallinen
8532b8d990 Add missing void 2022-05-18 18:59:01 +03:00
PatR
2ef0291d15 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.
2022-05-18 01:17:14 -07:00