Commit Graph

159 Commits

Author SHA1 Message Date
Patric Mueller
5267a50c7e Move enhance_tip into context and don't show tip if #enhance has been used before
Breaks save and bones compatibility.
2020-01-06 00:50:32 +01:00
nhmall
218cbe9ea6 2020 2020-01-01 10:12:16 -05:00
Pasi Kallinen
7e07cef197 Lua struct obj improvements
If the core frees the obj struct referred by lua, don't free it,
just mark it as OBJ_LUAFREE - lua will free it in gc once all
the references to it are gone.
2020-01-01 13:25:59 +02:00
nhmall
a4dfac2cec pull requests #174 and #128 for hallucinatory traps and autounlock
Pull requests:
hallucinatory traps
autounlock

This breaks existing save files.

Closes #174
Closes #228
2019-12-27 09:05:27 -05:00
Pasi Kallinen
6d8d3a9557 Add lua object references
Whenever a lua script references a core struct obj, increment a counter
in the obj struct. Core code will not free the obj, if there are any
lua references pointing to it, just makes it free-floating.
When lua script ends, the lua gc will free the free-floating objects.

Also exposes u.inventory to lua.

Breaks save and bones compat.
2019-12-26 19:15:24 +02:00
PatR
c3fb94104b 'quick_farsight' option
Bite the bullet and add a special purpose boolean option to control
game behavior for random clairvoyance.  When objects or monsters are
discovered, it normally issues "you sense your surroundings" and
performs a getpos() operation which allows the player to browse the
map by moving the cursor around and getting 'autodescribe' feedback.
But there have been complaints that once the hero has the Amulet
(which triggers random clairvoyance even though hero isn't flagged
as having that attribute) the message and pause-to-browse become too
intrusive.

This was initially combined with the 'timed clairvoyance' fix because
they both bump EDITLEVEL to invalidate existing save files, but their
details don't interact so I separated them.
2019-12-22 13:40:59 -08:00
PatR
48a82fea8c fix github issue #266 - timed clairvoyance
When the hero has random clairvoyance, the code used
| (moves % 15) == 0 && rn2(2) != 0
(where 'moves' is actually the turn number) to decide when it would
kick in and show a portion of the map.  If the hero was fast enough
to get an extra move when the turn value met the (moves % 15) == 0
condition then clairvoyance could happen twice (or more if poly'd)
on the same turn.

The changes (one new field, reordering a few others) in 'struct
context' invalidate existing 3.7.0-x save files.

Fixes #266
2019-12-22 13:30:25 -08:00
nhmall
98976b3141 Merge branch 'NetHack-3.6' 2019-12-18 07:38:59 -05:00
nhmall
96155c7e02 housekeeping updates 2019-12-17 23:38:06 -05:00
nhmall
17feb01d8f Merge branch 'NetHack-3.6' 2019-12-17 14:39:15 -05:00
nhmall
74a5339a5e housekeeping updates for 3.6.4
typos

README update
2019-12-17 14:11:52 -05:00
nhmall
e81f761969 patchlevel 2019-12-08 08:02:39 -05:00
PatR
e9fab48aeb weakening the mysterious force effect
Izchak implemented the mysterious force and as far as I'm concerned,
it's here to stay.  But it can be fine tuned.  This is an experimental
attempt to make it happen less.  Each time it happens, the chance for
it happening again later will usually go down by an amount proportional
to how far it sent the hero back.  So chaotics will be sent back--or
"side to side"--less often than in 3.6.x but the tapering off of such
occurrences will be slower for them.  Lawfuls will also be sent back
less often--still potentially farther down than others--but tapering
off of send backs for them will be quicker.

I'll let somebody else figure out the before and after values for
number of attempts to climb up it takes to finally get out of Gehennom.
The numbers might need tuning.
2019-12-07 19:26:47 -08:00
nhmall
d48a956016 Merge branch 'NetHack-3.6' 2019-12-05 18:07:48 -05:00
nhmall
cfb382c626 more prep bits 2019-12-04 11:51:24 -05:00
PatR
adc455129d 3.7: goldX and other stuff
Move option variable goldX (True: treat gold as BUC unknown, False:
treat gold as uncursed during BUCX filtering) from iflags to flags
so that it persists across save/restore.

Get rid of a few obsolete things from struct flags.

Try to make the 'cursesgraphics' option work although I don't think
that it was ever functional enough for anybody to use so probably
could have been removed instead.

Bump EDITLEVEL; any current save files are invalid.

Demote status from Beta to Work-in-Progress.

I modified src/sfdata.c manually (not included here) to get a full
build.  The Unix Makefile.src needs to be taught when and how to
regenerate it.
2019-11-28 15:00:54 -08:00
nhmall
9de1ecd831 patchlevel.h comment bit 2019-11-08 16:59:38 -05:00
nhmall
50d04bbd61 Merge branch 'NetHack-3.6' 2019-11-07 23:10:47 -05:00
nhmall
96e7e11a5e typo 2019-11-07 10:59:20 -05:00
nhmall
cc3b101a02 Merge branch 'NetHack-3.6' 2019-11-07 10:52:19 -05:00
nhmall
71d229a99d Update README and include/patchlevel.h 2019-11-07 10:50:14 -05:00
PatR
eebbac1c65 3.7.x saves not compatible with 3.6.x 2019-06-06 15:59:27 -07: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
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
f0defb1111 Merge branch 'NetHack-3.6.2' 2019-01-01 19:51:41 -05:00
nhmall
cb25676c43 update for 2019 2019-01-01 11:48:30 -05:00
nhmall
2b52b093e7 expand on patch 2 so far in patchlevel.h 2018-05-27 21:39:20 -04:00
nhmall
9ec7961272 patchlevel.h update 2018-05-27 21:33:35 -04:00
nhmall
82afd4b17c Merge branch 'NetHack-3.6.2' 2018-05-27 21:32:11 -04:00
nhmall
6f82802364 Revert "more pre-release updates"
This reverts commit 175b0b1960.
2018-05-27 11:04:46 -04:00
nhmall
ced7ebafec Merge branch 'NetHack-3.6.2' 2018-05-26 19:02:43 -04:00
nhmall
175b0b1960 more pre-release updates 2018-05-26 18:55:28 -04:00
nhmall
f4e70044be prepare repository for new major version 2018-04-28 12:17:48 -04:00
nhmall
331abfe530 Specify both width and height when creating font for width testing
From Bart...

When we are creating the console font for testing character widths,
we were not specifying width. Because of this, the created font's
average width might be larger then what we expect and we might
falsely detect that the font was inappropriate for playing Nethack.
Fix provides the width that we are expecting when creating the font.
2018-04-28 12:11:19 -04:00
nhmall
7af332529a don't include fixes to post-3.6.0 code in count estimate 2018-04-25 18:59:58 -04:00
nhmall
5101b9efb8 Update some dates and comment out BETA 2018-04-25 17:11:28 -04:00
keni
d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -04:00
nhmall
0ffde7e45f copyright notice to 2018 2018-01-25 23:23:16 -05:00
nhmall
fff3425de4 Happy New Year 2016
Changes to be committed:
	modified:   include/patchlevel.h
2015-12-31 17:26:25 -05:00
nhmall
bc83f28e46 compatibility macro correction
3.6.0 went out with editlevel at 2, not 0
2015-12-16 17:59:10 -05:00
nhmall
fa092f5fe9 housekeeping for 3.6.1
Changes to be committed:
	modified:   Files
	modified:   README
	modified:   dat/history
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   include/global.h
	modified:   include/obj.h
	modified:   include/patchlevel.h
	modified:   src/invent.c
	modified:   src/objnam.c
	modified:   src/shknam.c
	modified:   src/sounds.c
	modified:   src/spell.c
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/nethack.def
	modified:   win/macosx/NetHackGuidebook.applescript
	modified:   win/macosx/NetHackTerm.applescript
	modified:   win/win32/mswproc.c
2015-12-16 17:52:34 -05:00
nhmall
ad50501872 Release prep 1
Changes to be committed:
	modified:   include/global.h
	modified:   include/patchlevel.h
2015-12-02 19:10:12 -05:00
PatR
2d284b0907 include/*.h formatting
I tracked down the widest lines, which sometimes occur due to mis-indent
of block comments (see tradstdc.h for an example), and fixed those up.
For the files affected, I also converted tabs to spaces.
2015-11-17 02:26:17 -08:00
PatR
c40982eb23 tribute enhancement
When reading a novel, select a random passage which hasn't been shown
already.  Once you've run through all the passages, it resets to get
them all again (with new random order that might happen to the be same
order if there aren't many passages).  Switching to a different novel--
even another copy of the same one--will cause the previous passage
selection to be discarded and restarted from scratch if the prior book
is read again.  Passage tracking for the most recently read novel is
kept across save and restore.  (That means I needed to bump EDITLEVEL,
so it will need to be reset to 0 again before release.)
2015-11-15 21:57:15 -08:00
PatR
a14b1f9992 fix PATCHLEVEL
> Somebody has changed versioning so that the game incorrectly states
> 3.6.1 in messages. It looks like someone updated patchlevel instead of
> editlevel?

Yes, that was me.  I meant to increment EDITLEVEL and nobody noticed
the mistake until now....

This changes PATCHLEVEL back to the correct value of 0, and implicitly
resets EDITLEVEL to 0 for release (by not changing it to 1 as it was
supposed to have been for the past 3-4 weeks).

Data files from Oct. 18 through today are actually compatible but will
be rejected once anyone rebuilds with this fix, same as would happen
when EDITLEVEL changs.  Data files from before Oct. 18 will be
incompatible but be accepted by nethack but not work correctly due to
a change in the 'context' structure.
2015-11-11 22:56:57 -08:00
PatR
2c20805b16 unsplitting split object stack
Replace the code that Dean objected to with something a little bit more
robust.  It doesn't rely on the two stacks being adjacent or having the
same inventory letter.  It is still vulnerable to having another
splitobj() occur between the offending split and its attempted unsplit,
or to either of the two halves of a split being extracted from their
object chain.  As before, failure to unsplit only results in the two
halves of the split remaining separate stacks, not anything more drastic
like the panic() that prompted all this.

Simplification of hallucinated currency names got mixed in with this
patch.  I haven't bothered separating it back out.

Whoever reset PATCHLEVEL to 0 jumped the gun.  This patch increments it
since change to the 'context' structure breaks save file compatibility,
so it will need to undergo another reset before release.
2015-10-18 17:37:15 -07:00
Pasi Kallinen
f8b48490aa Comment typofixes 2015-10-17 12:28:52 +03:00
Sean Hunt
1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00