Commit Graph

1825 Commits

Author SHA1 Message Date
nhmall
7dfffbb712 Merge branch 'NetHack-3.6' 2019-07-10 21:58:58 -04:00
Bart House
bc65112ce0 Added experimental feature NEW_KEYBOARD_HIT. 2019-07-09 22:30:34 -07:00
nhmall
ae33500409 Merge branch 'NetHack-3.6' 2019-07-07 21:58:25 -04:00
PatR
ceb2d51426 ^X/disclosure of night, moon, Friday 13th
For ^X and final disclosure, report external issues that affect game
play:  midnight, other night, new or full moon, and Friday the 13th.

The 'new feature' entry in the fixes file rambles a bit but if it
heads off even one spurious bug report, it'll have been worth it.
2019-07-07 13:52:24 -07:00
nhmall
ca6dbd4b71 Merge branch 'NetHack-3.6' 2019-07-02 22:46:53 -04:00
PatR
1e7fb839a3 status_hilite for Xp and Exp by percent rules
Extend support for highlight rules that specify percentages from HP
and spell power to experience level and experience points.  For both
of those, the percentage is based on progress from the start of the
current Xp level to the start of the next Xp level.  100% isn't
possible so is used to enable highlighting a special case:  1 point
shy of next level, most likely to occur after losing a level.

This is something I had in mind a long time ago and then forgot all
about until fiddling with the final disclosure of experience points
recently.  It turned out to be trickier than expected because it needs
to check whether Xp should have a status update when it hasn't changed
but Exp has gone up.  The latter might hit a percentage threshold that
switches to another highlight rule.  Fortunately changes to Exp, at
least that aren't part of level gain or loss (which always trigger
status updating), are all funnelled through a single place (I hope).
2019-07-02 17:39:23 -07:00
nhmall
0a32747794 Merge branch 'NetHack-3.6' 2019-06-28 18:30:32 -04:00
nhmall
bd2cd75f7a PDCurses requires PDC_NCMOUSE for compatibility with ncurses
The PDC_NCMOUSE has to be defined on the command line
or above the #include entries in win/curses/cursmisc.c.

This does the former command line change.
2019-06-27 23:12:06 -04:00
PatR
aada9e2706 mouse_support for win/curses using ncurses 2019-06-26 15:46:44 -07:00
nhmall
47c5a14ff4 Merge branch 'NetHack-3.6' 2019-06-24 19:38:02 -04:00
Bart House
ed08938ada Fix dangling chain bug.
If a punished player picks up the iron ball, gets engulfed and
saves, then the saved game will have missed saving the dangling
chain since it was not on the floor or in the inventory.  Upon
restoring the saved game, the game will be in a bad state since
the ball will be worn but the chain will be missing.
2019-06-23 21:39:22 -07:00
nhmall
7698e27eed Merge branch 'NetHack-3.6' 2019-06-20 22:33:33 -04:00
PatR
05958e9b3a comment typo for "transient" 2019-06-20 10:59:48 -07:00
nhmall
2a5d7ed536 Merge branch 'NetHack-3.6' 2019-06-20 10:18:32 -04:00
PatR
2a5080e6f9 update contact URL
Reviewing the help choices revealed an out of date one.
2019-06-20 01:24:10 -07:00
nhmall
3640c3c2b2 merge bit 2019-06-18 21:50:51 -04:00
nhmall
30cfcf3b12 Merge branch 'NetHack-3.6' 2019-06-18 21:43:54 -04:00
PatR
c9962c9d34 mkroom.h update
Give room type enums explicit values so that it is easier to find
them when searching by value rather than by name.

Also some reformatting.
2019-06-18 02:43:41 -07:00
PatR
9125b5943e 3.7: automatic annotation for vibrating square
Add "Gateway to Moloch's Sanctum" to the vibrating square level if you
step on the square or detect/magic map it as a pseudo-trap, an extra
hint for players who manage to get that far but then don't know what
to do next.  (I think I may also add a randomly placed floor engraving
along the lines of "For a good time, consult the Oracle of Delphi."
as a gag variant of "For a good time, call <name> at <phone number>."
Not very thematic for Gehennom but could conceivably nudge someone in
the right direction.  But it could give away the level for experienced
players who haven't located the vibrating square yet.)

The annotation sticks until the one for "Moloch's Sanctum" gets added.
That happens when the temple on the sanctum level is entered or the
altar there has become mapped (in view or via magic mapping).

Could break existing 3.7.0- save files (but probably won't, since
at least two bits were available unless using an ancient 'Bitfield()
allocates whole bytes' configuration).  That's the reason I didn't
put this into 3.6.2+.
2019-06-11 09:29:14 -07:00
nhmall
f167fe4d7e Merge branch 'NetHack-3.6' 2019-06-10 08:05:46 -04:00
PatR
5d59b288c9 muse wand/horn feedback
One of the claims in #H8849 was that a monster which zapped a wand
that the hero had fully identified made hero's knowledge of it revert
to "a wand".  That doesn't happen; it had to have been a different
wand which hadn't been seen up close yet.  But the hero should lose
track of known number of charges if a wand is zapped outside his/her
view.  When implementing that I noticed that a monster playing a fire
horn to burn away slime was using the routine that gives wand
feedback.  Add a separate, similar routine for magical horn feedback.

Half this diff is due to moving a naming support routine from mhitm.c
to do_name.c.
2019-06-10 03:16:52 -07:00
nhmall
797579399c Merge branch 'NetHack-3.6' 2019-06-09 09:45:14 -04:00
PatR
56d16fc7ee more ^G of "hidden <monster>"
Fix a couple of glitches and add an enchancement.  The monster
attributes structure left the 'hidden' field uninitialized unless user
specified "hidden".  Mimics were being flagged with mon->mundetected
because they pass the is_hider() test but they 'hide' by taking on an
appearance rather than being unseen due to mundetected.  hides_under()
monsters fail the is_hider() test, but can become mundetected if there
is at least one object present.  Eels/other fish are neither is_hider()
nor hides_under() but can be mundetected at water locations.  So alter
'hidden' handling to deal with these various circumstances.

Asking for 'hidden' for any type of creature will result in having its
location be highlighted if it can't be actively seen or detected.  So
using '2000 ^G piranha' will fill up the Plane of Water "normally" but
'2000 ^G hidden piranha' will result in a ton of draw-glyph/delay/
draw-other-glyph/delay sequences and take a painfully long time.  Moral
of the story:  don't combine 'hidden' with a large count unless you
want to spend quite a while watching the level's fill pattern.  Turning
off the 'sparkle' option will cut the flashing in half but still take
a long time.  If you really need to fill a level with hidden creatures
and can't bear the flashing/highlighting, use blessed potion of monster
detection or #wizintrinsics to have extended detect.  Then all created
monsters will be seen so none will trigger location highlighting.

If you create a 'stalker' or 'invisible stalker' or 'invisible <other-
mon>' its location won't be highlighted, but for 'hidden stalker' or
'hidden invisible stalker' or 'hidden invisible <other-mon>' it will
(provided you don't actually see it due to See_invisible or sensemon()).
2019-06-09 06:11:09 -07:00
nhmall
26bf4f1e11 Merge branch 'NetHack-3.6' 2019-06-09 08:43:40 -04:00
nhmall
54d24d0333 make display effect code reusable and move it to display.c 2019-06-08 23:19:29 -04:00
PatR
6553fbb6f5 3.7 monst->mtemplit 2019-06-08 07:38:13 -07:00
nhmall
d0210d9c90 Merge branch 'NetHack-3.6' 2019-06-08 09:38:27 -04:00
PatR
c741d6c7c9 missile light sources
Throwing or kicking a lit lamp, lit candle, or lit potion of oil
wasn't giving off any light as it travelled to its destination.
Now it does, and dungeon features, objects, or monsters that are
temporarily seen as it moves from square to square till appear on
the map.  In the monster case, they go away as soon as the light
moves beyond range, but when it finishes moving the "remembered,
unseen monster" glyph will be drawn at their location.  I think that
part has some room for improvement, but mapping temporarily seen
terrain features is the primary impetus for this change.

Also, any message delivery while the "lit missile" travelled still
showed its light around the hero.  Noticeable for lamps or stacks
of sufficient candles if hero has no other light source.

This cannibalizes the monst->mburied bit for temporarily seeing a
monster.  It has been present but unused for ages.  I needed to
replace a couple of vision macros to make sure they didn't examine
it any more so that overloading for transient lighting doesn't
introduce any vision oddities.  For version $NEXT, monst->mtemplit
can be given its own bit.  It is only set during bhit() execution
and cleared by the time that returns, so has no effect on save files.
2019-06-08 04:50:40 -07:00
PatR
a27ca52b03 vampshifting by poly'd hero
Hero polymorphed into a vampire or v.lord can use #monster to switch
to vampire bat or fog cloud [or wolf for lord] but it was a one shot
polymorph.  Remember when current form is a shape-shifted vampire and
allow #monster in shifted form to pick another shifted form or the
vampire form.

Genocide of the alternate shape forces back to base vampire.  Genocide
of base vampire does too, then reverts to human (or dwarf, &c) as
vampires go away.  Being killed while shafe-shifted reverts all the
way to human rather than to vampire.  [Just realized:  interaction
with Unchanging wasn't taken into consideration so hasn't been tested.]

Since 'youmonst' isn't saved and restored, I had to add a field to 'u'
to hold youmonst.cham during save/restore.

Tested with 3.6.2+ and seemed to be working (except saving while
shape-shifted restored as ordinary bat/cloud/wolf because new u.mcham
wasn't there to hold youmonst.cham yet).  Builds with 3.7.0- but not
execution tested yet (I didn't want to clobber my current playground).
2019-06-06 16:51:43 -07:00
PatR
eebbac1c65 3.7.x saves not compatible with 3.6.x 2019-06-06 15:59:27 -07:00
nhmall
bfc4445537 Merge branch 'NetHack-3.6' 2019-06-05 08:08:32 -04:00
nhmall
a65682f58e allow a parent function to restrict use of placebc
placebc was triggering an impossible sometimes on the plane of
water

It turned out to be because movebubbles issued an
unplacebc(), but a downstream function called
placebc(), so when movebubbles() issued its own
placebc() there was a problem.

The downstream function that beat movebubbles to the placebc()
turned out to be unstuck(). There could be others.
2019-06-04 21:18:46 -04:00
PatR
43afa91ff8 fix #H8850 - bless/curse state in perm_invent
Changing an inventory item's bknown flag wasn't followed by a call to
update_inventory() in many circumstances, so information which should
have appeared wasn't showing up until some other event triggered an
update.
2019-06-04 10:50:24 -07:00
PatR
ac79fedf60 fix github issue #196 - green slime feedback
Fixes #196

If you didn't die from turning into green slime but then died because
green slimes had been genocided, the message given assumed that you
had just seen "OK, you don't die" from answering No to "Really die?".
Its wording didn't make sense if the reason you didn't die was an
amulet of life-saving.  Give a different message for that case.

Also, if you survive turning into slime (via either method) and either
green slimes are still around or you answer No to "Really die?" when
they've been genocided, give a message after "You survived that attempt
on your life" pointing out that you have done so in green slime form.
Useful since prior to 3.6.2 you would have reverted to original form--
despite the Slimed countdown saying you had turned into green slime.
2019-06-04 09:16:00 -07:00
nhmall
fd585a58c2 add some debugging BREADCRUMBS to identify caller of some functions
Only takes effect if a developer uncomments BREADCRUMBS in config.h
2019-06-03 18:37:45 -04:00
nhmall
e84fb24ede Merge branch 'NetHack-3.6' 2019-06-01 18:05:42 -04:00
nhmall
5ee78c5204 improve full level handling in the endgame
Even though a goodpos failure in mnearto() would return 0 to
the caller and trigger proper overcrowding handling for mtmp,
the 'othermon' would be left with its mx,my set to 0,0 under
that circumstance and then trigger a mon_sanity_check()
failure and accompanying impossible() message a short while
afterwards.

This also includes the addition of some flags that proved useful
for troubleshooting the mystery sanity_check failure and helping
to understand some of the code paths the struct monst data had
been through. They are only used for inspection when issues are
reported or when debugging, they don't presently control the
code flow.  Their setting and use is done in an overloaded way
that should not intrude on the existing use of mspare1 for
MIGR_LEFTOVERS. mon->mstate is just a pseudonym for mon->mspare1
and does not alter save file content.
2019-06-01 16:51:10 -04:00
nhmall
7437b0b6e6 Merge branch 'NetHack-3.6' 2019-05-30 18:10:41 -04:00
PatR
791b87833b mnearto/mnexto/enexto
This doesn't solve the <0,0> problem but it does prevent mnexto()
from using uninitialized coordinates if enexto() fails.  It also adds
several debugging messages.

enexto() was ignoring map row #0 (unlike column #0, row #0 contains
valid map locations).  Fixing that doesn't matter for Plane of Water
though since that row is stone there--that's probably a bug.  It was
also repeatedly re-testing the top+1 and bottom rows and left and
right columns after they had already failed to be acceptable.  It
still does some of that, but less.
2019-05-30 07:50:38 -07:00
nhmall
9867e9a5d0 Merge branch 'NetHack-3.6' 2019-05-22 00:48:39 -04:00
PatR
1e2e3bf492 ball and chain sanity check revisited
Move some duplicated debugging code into its own routine.
2019-05-21 17:40:57 -07:00
nhmall
c7ed4920b0 Merge branch 'NetHack-3.6' 2019-05-20 15:50:17 -04:00
nhmall
cbb3dbb5f5 make it tougher for incomplete render_status() to go unnoticed
Adds a sanity check that will write a paniclog
message if a code change prevents completion of
render_status() for each dirty (changed) field.
2019-05-20 01:33:33 -04:00
nhmall
4be2f98063 Merge branch 'NetHack-3.6' 2019-05-19 10:12:39 -04:00
PatR
d1ce0aac89 fixes github issue #190 - EDIT_GETLIN for curses
Fixes #190

Add EDIT_GETLIN support for curses.  It remains disabled by default.
2019-05-18 23:52:04 -07:00
nhmall
c5fbae0a4c Merge branch 'NetHack-3.6' 2019-05-17 12:06:58 -04:00
nhmall
2aee73642d fix some billing and pricing issues when globs coalesce
payment issue caused by glob coalescing
glob pricing did not consider coalesced weight
2019-05-17 12:04:01 -04:00
nhmall
357165cf68 Merge branch 'NetHack-3.6' 2019-05-12 15:31:31 -04:00
nhmall
bcd05308aa support version-specific dlb file
There was a post-3.6.2 discussion on a forum where someone had
tried to copy the NetHack 3.6.2 exe file overtop of an
existing NetHack 3.6.0 playground, and then try to run it.

We have never suggested trying that, nor do we attempt to
provide any backward or forward compatibility between the
supporting files found in nhdat that would allow that. Any
particular version of NetHack expects to have matching
support files designed and matched to that version.

This adds optional support for helping to prevent the
opening of nhdat containing support files from an
unmatched version of NetHack.

If you #define VERSION_IN_DLB_FILENAME in your
platform's include/*conf.h file, it will use a
name such as nhdat362, instead of plain nhdat, and
will exit more gracefully than the fault/crash
mentioned in the discussion if it doesn't find the
file it is looking for.

Developers - please note that if you do
to cause NetHack to look for an nhdat* file with
the version info appended to the name, you will likely
have to modify your build/clean/spotless mechanics
beyond the C compile itself to properly deal with the
new generated file name.
2019-05-12 14:51:26 -04:00
nhmall
69f767ac48 Merge branch 'NetHack-3.6' 2019-05-11 21:58:56 -04:00