Commit Graph

10358 Commits

Author SHA1 Message Date
Pasi Kallinen
fe3dae85d5 Make lua selection filter_mapchar create a new selection 2020-02-22 17:51:29 +02:00
Pasi Kallinen
50eaf95c27 Make lua selection grow create a new selection 2020-02-22 16:58:45 +02:00
Pasi Kallinen
6648ecfe04 Make lua selection randline create a new selection 2020-02-22 16:34:50 +02:00
Pasi Kallinen
b3f337bdf6 Make lua selection rect and fillrect create a new selection 2020-02-22 15:23:30 +02:00
Pasi Kallinen
44f7d44e94 Make lua selection line create a new selection
... instead of modifying the one given as a parameter.

Also add some tests for it.
2020-02-22 14:23:36 +02:00
Pasi Kallinen
00a32c6039 Make lua selection percent filter create a new selection
... instead of modifying the one given as a parameter.

Also add some tests for it.
2020-02-22 13:31:47 +02:00
Pasi Kallinen
42a05e9595 Make lua selection boolean opers create a new selection
... instead of modifying one of the given selections.

Also add tests for the operations.
2020-02-22 12:17:03 +02:00
Pasi Kallinen
e8ee044468 Make lua selection negate return a new selection
... instead of modifying the one given as a parameter.

Also add tests for it.
2020-02-22 12:17:03 +02:00
PatR
29321c6f80 fix github issue #302 - divide by 0 crash
The traceback points directly to the problem:  divide by 0 happens
if the 'bogusmon' file only contains the "do not edit" line, which
would happen if 'bogusmon.txt' is empty.  makedefs probably ought to
complain about that.

There is now one hardcoded bogus monster to fall back to:  'bogon'.

Random tombstone epitaphs report divide by 0 if their text source is
empty, but it is done by rn2() rather than rn2_for_display_rng() so
is just a warning for pre-release code.  It would crash for release
version though.

I tried placing an empty engravings file and expected similar results
but didn't see any response.  Not sure what that means.

After the fix, empty epitaph file yields blank result so graves that
want a random epitaph won't have any epitaph.

Fixes #302
2020-02-22 01:41:04 -08:00
PatR
9366307210 extra ^X info (mon's location) for u.ustuck 2020-02-21 13:46:03 -08:00
PatR
12016966b1 build warning 2020-02-21 13:45:17 -08:00
Pasi Kallinen
d76ffe43b7 Don't bother flipping oracle level 2020-02-21 21:32:18 +02:00
Pasi Kallinen
88aa0793dc Allow flipping levels horizontally or vertically
When a special level is created, there's a chance it gets flipped
horizontally and/or vertically.

Add new level flags "noflip", "noflipx", and "noflipy" to prevent
flipping the level. Add a wiz-mode command #wizlevelflip to test
the flipping on current level - although this doesn't flip everything,
as level flipping is meant to happen during level creation.
2020-02-21 18:16:14 +02:00
nhmall
86f5e73ef3 ensure condition menu always starts the same way even under "play again" 2020-02-20 20:36:37 -05:00
nhmall
3bc346868e flag an unused parameter 2020-02-20 20:23:33 -05:00
nhmall
67df8dd784 add an entry for the start_menu change to fixes37.0 2020-02-20 20:19:49 -05:00
nhmall
9462b230c6 Merge branch 'menu-interface' into NetHack-3.7 2020-02-20 20:17:40 -05:00
nhmall
d81c096ce6 window port interface change - add mbehavior flags to start_menu()
Provide a way to communicate additional behaviors and/or appearances
desired from NetHack window port menus.

This is foundation work for changes to follow at a future date.
2020-02-20 20:12:51 -05:00
PatR
d9672823f9 better ^X feedback when swallowed/engulfed 2020-02-20 14:34:58 -08:00
nhmall
8e6e4922f8 preserve menu sort between 'O' commands in same instance
Also, only execute the change settings loop when the
menu response was > 0
2020-02-20 16:56:05 -05:00
nhmall
d50c3577e9 some more status condition follow-up
- Don't display 'Held' when swallowed.
- Don't display 'Held' when the hero is doing the holding; add a condition display
  entry "UHold" for that (the opt_in option is "holding")
- Allow resorting of the 'O' menu for status condition fields. Default is alphabetical, but you
  can sort by condition field ranking now.
2020-02-20 01:22:27 -05:00
PatR
cfd425d5db Wounded_legs condition
Mounting a steed while legs are wounded would offer to cure them
but wasn't going through the heal_legs() routine so didn't update
the status line when Wounded_legs condition is enabled.

Move some common code for describing left/right/both legs into a
new routine used for feedback by jumping, kicking, and ridiing.

For ^X, distinguish between one wounded leg and both but don't
bother with left vs right when it is just one.
2020-02-19 15:47:55 -08:00
Patric Mueller
16d32b3002 Remove left over NH_DEVEL_STATUS bits from makedefs.c
Left bits from previous version info code caused compilation errors
if NH_DEVEL_STATUS was not set to NH_STATUS_WIP.
2020-02-19 01:43:51 +01:00
PatR
8659dcd7bc monster sound changes
MS_MOO was placed among the humanoid sounds, resulting in a minotaur
being able to articulate "I'm hungry".  Move it to the animal sounds,
which causes almost all the sounds to be renumbered.

Give MS_MOO to rothes.

Change mumak from MS_ROAR to new sound MS_TRUMPET and mastodon from
silent to that.

I changed MS_ORC from a synonym for MS_GRUNT into a distinct type
which also just grunts.  Grunt is in the animal group of sounds and
orc is now in the 'other' group (neither animal nor understandable
humanoid).  [There are a bunch of other humanoid monsters (gnomes and
ogres, for example) that still use MS_GRUNT.  They aren't animals so
that's not right.]

Have pets who beg for food but happen to have 'other' sounds between
animal and humanoid be described as looking hungry instead of being
skipped.

Hat tipped to a peaceful humanoid will behave as non-peaceful if
Conflict is active (without giving the monster a resistance check).

Despite mons[].msound getting new values, save files should be ok.
2020-02-18 13:33:00 -08:00
Pasi Kallinen
49069d6d62 Split bound_digging function to two
Also remove a DCC 3.0 specific bug define,
doubt anyone is using that anymore ...
2020-02-18 16:53:14 +02:00
PatR
814adb41b8 fix #K376 - tipping cap
Allow #tip to do something if you pick your worn helmet instead of
a container.  It's mostly just a variation of #chat but probably adds
several new bugs....
2020-02-18 03:14:22 -08:00
nhmall
f177675cbc Guidebook.txt update from cron-NetHack-3.7 2020-02-17 14:39:24 -05:00
nhmall
73ffb61e7e typo in .tex and replacement of obsolete OS reference 2020-02-17 13:39:04 -05:00
Patric Mueller
4b270099ec Stop monsters from interacting with protected items on the floor
This fixes the issue of chests with the wand of wishing on the castle level
being stolen by soldiers.

Commit b12ea03d1 revealed that searches_for_item() didn't check for onscary()
and allowed monsters to pick up items even though they were protected by a
scroll of scare monsters.
2020-02-17 10:41:03 +01:00
PatR
3981e3e6e5 controlling u.ustuck
Setting or clearing u.ustuck now requires that context.botl be set,
so make a new routine to take care of both instead of manipulating
that pointer directly.
2020-02-16 13:04:12 -08:00
Pasi Kallinen
c7ec28f4c7 Fix symset menu
Symset entry index numbers weren't initialized when the symsets were
read from file, making the menu behave erratically. This looks like
a merge mistake.
2020-02-16 21:49:13 +02:00
Pasi Kallinen
f76aba4d7f Prevent segfault in can_blnd 2020-02-16 11:22:18 +02:00
nhmall
f9c9c8262c Guidebook.txt and Files from cron daily 2020-02-16 00:26:43 -05:00
PatR
63c3ec21b8 yet more Guidebook tweaks
A couple of indentation adjustments:  a bit more space for continued
lines in the table for suits of armor, and restore the indentation of
the list of Achievements in the Postscript version (lost when dealing
with the wouldn't-span-page-boundary issue).
2020-02-15 17:44:41 -08:00
PatR
2d150d323b new status conditions
Several conditions result in stale data on the status line when
starting or stopping because things which didn't used to affect it
haven't been setting context.botl to force an update.  This wasn't
systematic; there are bound to be lots more.
2020-02-15 15:41:24 -08:00
PatR
c78a69bc44 Guidebook.dat typo
A typo in Gbk-1pg-sfx.mn resulted in " /" as a "last word" on the
end-of-data marker line of the intermediate 12345 line single page.
That was effectively invisible because it immediately got deleted
during the post-processing which strips off that marker through to
the end (producing a 5266 line single page at present).
2020-02-15 14:42:00 -08:00
PatR
c21921668a fix github issue #293 - raven vs raven
The saying /corvus oculum corvi non eruit/ (Latin) means "a crow
doesn't pluck out the eye of another crow" (roughly).  Something
along the lines of "like-minded people stick together".  Honor the
literal meaning by preventing a raven's blinding attack that gets
directed at another raven from being able to cause blindness.

Fixes #293
2020-02-15 13:55:51 -08:00
PatR
998d8b1fd4 more Guidebook tweaks
Add a missing word to Guidebook.tex and add a couple of new sentences
to both Guidebook.{mn,tex}.

Also, add Guidebook.dat to .gitignore.
2020-02-15 13:08:34 -08:00
nhmall
f37dd40110 Guidebook date bump and .txt sync 2020-02-15 13:24:48 -05:00
PatR
5c2c517c35 Guidebook.tex catch up 2020-02-15 05:45:27 -08:00
PatR
4bd3fdbd57 Achievements documentation
> Todo:  redo the recently revised Achievements table again.  Current
> formatting isn't spanning page boundaries, resulting in a big chunk
> of blank space preceding it so that it will start on the next page.

The '.SD i' environment was causing this, and also changing the font
somehow when forcing the text to start on the next page (but not when
it fit on current page?).  Taking '.SD i' out loses the indentation
that Guidebook.ps had (one of the explicit differences between it and
Guidebook.txt), which looks a little inferior, but fixes the page
boundary issue.
2020-02-15 05:19:23 -08:00
PatR
91b569e6c4 Guidebook.dat, one-page edition of Guidebook.txt
Update sys/unix/Makefile.doc to be able to build Guidebook.dat, an
unpaginated copy of the plain text Guidebook.  It's generated from
the 'roff source rather than by attempting to post-process the
regular text Guidebook.

No doubt there are easier ways to do this.
2020-02-14 18:15:25 -08:00
PatR
eb919d3cdb fix #K355 - grammar issues with monster+container
Mon rummages in <container> and Mon takes <item> from <container>
was missing an() for the container itself and should have been
using doname() rather than xname() for any items taken out (when
done adjacent to hero).
2020-02-14 16:24:49 -08:00
PatR
629e417bba Guidebook update
This adds a new figure that shows the 3-line status.  Also expands
a couple of status items.

In the commands section, redo the hjkl direction diagram to make
"Figure 2" (now Figure 3) line up with the rest of the table.  Lot's
of trial and error involved, and the plain text version didn't come
out as expected (but still looks better than before).

Modify suit of armor table to wrap an additional line and make the
table narrower.  Having the pair of columns closer together is a bit
easier on eyes when tracking from the suit names to the AC number.

Todo:  redo the recently revised Achievements table again.  Current
formatting isn't spanning page boundaries, resulting in a big chunk
of blank space preceding it so that it will start on the next page.
(Only noticeable at the moment with the Postscript output; plain
text had enough room on its current page to not need to force next.)

Guidebook.tex is lagging again.
2020-02-14 15:28:28 -08:00
nhmall
334db31cd0 Guidebook update from latest cron-daily 2020-02-13 22:10:37 -05:00
nhmall
751f1f47ab Windows options dynamically
There are two executables int the windows binary, each of which
have different options and capabilities. Sharing of one dat/options
file hasn't really been an accurate approach.

Produce that information dynamically for the Windows exe files.

This impacts alt-v results.
2020-02-13 21:24:24 -05:00
PatR
cbe27c7702 unseen pet drowning
The "you have a sad feeling for a moment" message was only given when
one monster kills another (and the latter is an unseen pet).  Give it
for drowning too.  There are probably a bunch of other circumstances
which warrant it as well but I've settled for handling minliquid().
2020-02-13 15:38:59 -08:00
nhmall
878ec6ee2a Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-13 18:19:35 -05:00
nhmall
a213811975 stone/unexplored glyph follow-up
typo
2020-02-13 17:37:55 -05:00
Pasi Kallinen
5885962efd Alloc sizeof struct instead of pointer-to-struct 2020-02-13 22:06:50 +02:00