Commit Graph

1800 Commits

Author SHA1 Message Date
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
nhmall
24fa83e5dc Report of no error msg deliverd by NetHackw.exe for some startup issues 2019-05-11 21:55:27 -04:00
Pasi Kallinen
217671e00f Remove built-in speaker support
The changes to amiga, mac and msdos builds are untested.
2019-05-11 11:10:00 +03:00
nhmall
02826c4ebc Merge branch 'NetHack-3.6' 2019-05-10 22:54:38 -04:00
nhmall
7f64422ca4 comment bit 2019-05-10 15:08:59 -04:00
nhmall
145bb3f172 Merge branch 'NetHack-3.6' 2019-05-10 15:01:59 -04:00
nhmall
5f56440956 instead of BETA or not, have devel states of release, wip, beta
Now that development sources are made public prior to
BETA testing, it is useful to have a work-in-progress
state prior to BETA.
2019-05-10 14:59:03 -04:00
nhmall
edc1cbb23a Merge branch 'NetHack-3.6' 2019-05-10 13:51:41 -04:00
nhmall
dd93a1b0d4 ensure go-forward builds of branch NetHack-3.6 don't still say 3.6.2 2019-05-10 13:47:59 -04:00
Pasi Kallinen
60f1b7e35b Fix compiling without DLB 2019-05-09 19:44:34 +03:00
nhmall
63858f39de mark development 3.7 builds as such 2019-05-09 07:47:10 -04:00
nhmall
3be48695a5 Merge branch 'NetHack-3.6.2' 2019-05-07 21:18:51 -04:00
nhmall
39320dec2b NetHack 3.6.2 release-related updates 2019-05-07 14:39:24 -04:00
nhmall
db25fe56a8 Merge branch 'NetHack-3.6.2' 2019-05-05 23:30:50 -04:00
PatR
a8550fc0e7 ball&chain sanity checking
Add a bc sanity check.  It seems to work ok--in other words, not
trigger--under normal punishment.  I don't have any test cases to
exercise its warnings.

This dragged in a couple of minor bc changes that were pending.  I
should have cleared those out before tackling the sanity checking.
2019-05-05 13:33:30 -07:00
nhmall
d15496ba31 Merge branch 'NetHack-3.6.2' 2019-04-22 14:36:58 -04:00
nhmall
82353f1965 enum bit 2019-04-22 14:27:41 -04:00
nhmall
dcf4da2150 preserve dknown field between fakeobj instances
Preserve temporary fake object's previous dknown value by storing it
as a flag value within the m_ap_type field of the posing monster, and
recalling it when it is needed.

This is intended to help eliminate observable differences in price display
between real objects and mimics posing as objects.

98% of this is just switching the code to utilize macro M_AP_TYPE(mon)
everywhere to ensure that the flag bits are stripped off when needed.
2019-04-22 14:17:18 -04:00
nhmall
e4ac043747 Merge branch 'NetHack-3.6.2' 2019-04-21 04:08:57 -04:00
PatR
edd412e56c VMS config1.h
Some port of yacc was generating '#include <stdlib.h>' before our
'#include "config.h" and needed a specific define from config1.h to
be supplied on the command line to avoid conflicting contents within
that header file, but then config1.h drew complaints about redefining
the macro.  Guard against that.
2019-04-19 12:42:35 -07:00
nhmall
8e4ee7847f Merge branch 'NetHack-3.6.2' 2019-04-17 14:30:19 -04:00
PatR
7088247883 vms update revisited
Redo the UCHAR_P handling from df84da3ec2
(5 weeks ago) and 02b21865fd followup.
The earlier #define was happening too late in the #include sequence;
tradstdc.h is processed before global.h+(vmsconf.h,unixconf.h,...).

Also, DEC C in 'common' mode complains about indented '#' starting a
line but not in column 1.  Putting #pragma in column 2 was deliberate
in case of an ancient compiler which doesn't understand that directive.
Splitting the difference via non-indented '# pragma' may or may not
mollify the latter when it's bypassing conditionally excluded code.
2019-04-15 13:48:27 -07:00
nhmall
c4465c35ed Merge branch 'NetHack-3.6.2' 2019-04-13 22:40:44 -04:00
PatR
0776a864f1 slightly better shop repair feedback
During shop repair, give a message about the shopkeeper using a spell
(if hero is close enough) before "Suddenly, <various repairs occur>."
And when shop repair is for a single untrap of landmine or bear trap
adjacent to shk (and the hero can see it happen), say "<Shk> untraps
<trap>" rather than just "Suddenly, a trap is removed from the floor!"
2019-04-13 17:28:26 -07:00
PatR
86e5022293 fix #H8534 - thrown pick-axe vs "scum!"
Change in meaning of mnearto()'s return value wasn't progagated to
shkcatch().  Make it an int instead of boolean so that it can
communicate both 'moved successfully' and 'moved but had to move
another monster out of the way to do so'.
2019-04-11 15:38:51 -07:00
nhmall
08af2b3b92 Merge branch 'NetHack-3.6.2' 2019-04-10 13:06:37 -04:00