Commit Graph

128 Commits

Author SHA1 Message Date
nhmall
bfb278fd38 Merge branch 'NetHack-3.7' 2019-11-15 22:23:55 -05:00
nhmall
29d378116e fix unplanned perm change 2019-11-15 22:22:19 -05:00
nhmall
4e05c874bf Merge branch 'NetHack-3.7' 2019-11-15 22:13:00 -05:00
nhmall
b0d8e86c8c Merge branch 'NetHack-3.6' 2019-11-15 22:12:12 -05:00
nhmall
298af2294f quiet some macosx warnings 2019-11-15 21:20:38 -05:00
PatR
ae415589e9 have --showpaths show DUMPLOG file
While not a path exactly, the dumplog file isn't placed somewhere
fixed so being able to see where it is placed could be useful.

This cascaded a bit during testing.  Fix one of the warnings from
hardfought (fqn_prefix_names[]).  And a few more that came up with
SYSCF disabled (panictrace_gdb, two unused variables if files.c).
2019-11-15 17:51:20 -08:00
nhmall
3bc26e6c65 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-11 14:33:31 -05:00
nhmall
900a826e8e Merge branch 'NetHack-3.6' 2019-11-11 14:32:09 -05:00
nhmall
91b4bd0da9 new prefix_locked bits conditionalized to WIN32 2019-11-11 11:46:49 -05:00
nhmall
bcb627100b Merge branch 'paxed-lua-merged3' into paxed-lua-v2-merged 2019-11-06 12:56:21 -05:00
Pasi Kallinen
fd55d9118e Use lua for special level files
Game is playable, and should compile on linux and Windows.
Assumes you have a lua 5.3 library available.

Removes level compiler and associated files.
Replaces special level des-files with lua scripts.
Exposes some NetHack internals to lua:
 - des-table with commands to create special levels
 - nh-table with NetHack core commands
 - nhc-table with some constants
 - u-table with some player-specific data (u-struct)
 - selection userdata

Adds some rudimentary tests.

Adds new extended command #wizloadlua to run a specific script,
and #wizloaddes to run a specific level-creation script.

nhlib.lua is loaded for every lua script.

Download and untar lua:
  mkdir lib
  cd lib
  curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
  tar zxf lua-5.3.5.tar.gz

Then make nethack normally.
2019-11-06 18:43:20 +02:00
Bart House
f0707fee6e More tweaks to how windows deals with directory paths. 2019-11-03 13:31:17 -08:00
nhmall
34d38dcf82 Merge branch 'NetHack-3.6' 2019-10-28 00:45:56 -04:00
nhmall
3ccc6e5308 Merge branch 'NetHack-3.6' 2019-10-17 20:52:10 -04:00
PatR
389c496055 zap colors
One of the comments for pull request #234 mentions that the colors
for sleep and poison are backwards.  Yellow dragons had green breath.
Green dragons would have had yellow breath if they used the normal
zap symbols, but they use the poison cloud one which is green so
they had green breath.  I rarely have color enabled and had never
noticed.  (At the moment I can't find where the switch from zap to
cloud is being done.)

Pull request #234 is based on #231, about control of the shield
effect animation when resisting.  But it changes struct flags so
would break 3.6.x save file compatibility.
2019-10-17 15:50:33 -07:00
nhmall
642f698a7a Merge branch 'NetHack-3.6' 2019-10-01 20:44:57 -04:00
nhmall
29946b551b autopickup exception priority in pull request 226
The pull request #226 commentary follows:

One major limitation of the autopickup exception system is that you can't
define an exception from an exception, despite both menucolors and msgtypes
prioritizing rules based on the order they are defined in .nethackrc. This
is because the "always pickup" and "never pickup" exceptions are tracked in
different lists, and at runtime, when the player steps over an object, the
game checks these lists seperately, with "never pickup" taking precedence.
This means that if you want to pick up some but not all items matching a
given expression, you may need to write a long and kludgy list of regexes
to get the behavior you want.

I've edited the autopickup exception code to remove this necessity: now
the exceptions are stored in one list, and conflicts between them are
resolved based on their relative position in that list. Whether an
exception was inclusive or exclusive was already tracked individually;
I don't know why they were stored separately in the first place. This
edit makes the system both more convenient and more consistent with the
semantics of menucolors and msgtypes.

With these changes, the 33 autopickup exception rules in the wiki article
linked above may be replaced with the following 7 much simpler rules for
the exact same effect:

AUTOPICKUP_EXCEPTION=">.* corpse.*"
AUTOPICKUP_EXCEPTION="<.* newt corpse.*"
AUTOPICKUP_EXCEPTION="<.* lichen corpse.*"
AUTOPICKUP_EXCEPTION="<.* lizard corpse.*"
AUTOPICKUP_EXCEPTION="<.* floating eye corpse.*"
AUTOPICKUP_EXCEPTION="<.* wraith corpse.*
AUTOPICKUP_EXCEPTION=">.*\>.*"

closes #226
2019-09-30 10:54:03 -04:00
nhmall
c26914bb55 Merge branch 'NetHack-3.6' 2019-09-28 20:23:05 -04:00
nhmall
da6c393e43 fix errant verb tense in some messages if pet or mon name ends in 's'
Report stated:
"Poes deliberately slither onto a polymorph trap!" ... it's only one cat, er,
black naga. Why does the parser treat the name as plural? There are lots of
singular words and names that end in -s or -es!

H9249 1780
2019-09-26 11:49:15 -04:00
Bart House
eb055c5152 Fix build break due to introduction of nhassert(). 2019-07-13 09:34:58 -07:00
nhmall
ba0f6ed47f updated files 2019-06-23 00:57:38 -04:00
nhmall
08af2b3b92 Merge branch 'NetHack-3.6.2' 2019-04-10 13:06:37 -04:00
nhmall
abfd80d3d7 Merge branch 'NetHack-3.6.2' 2019-04-02 12:25:16 -04:00
nhmall
fd410148c5 Merge branch 'NetHack-3.6.2' 2019-01-29 07:27:56 -05:00
nhmall
0aa4d62a2c detect rng seed strength at runtime based on algorithm not compile time based on platform features 2019-01-28 10:32:57 +01:00
nhmall
d9b11e791c domove_ variables did not need to be in saved context 2019-01-27 15:12:55 -05:00
nhmall
96f1d0e207 Merge branch 'NetHack-3.6.2' 2019-01-27 12:39:52 -05:00
nhmall
55fdfb9200 domove_core() out of domove(); assess domove_core() results
new domove_core() assessment results

potentially smudge engravings

Proceed to wipe engraving after domove_core() now, but only under
all of the following conditions:
    - you can reach the floor
    - preceding domove_core() move attempt was marked as
      having succeeded in domove_core()
    - there is actually an engraving there to impact at
      your original spot, or your new spot, or both
2019-01-27 11:55:23 -05:00
nhmall
58f2218c4e Merge branch 'NetHack-3.6.2' 2019-01-09 07:24:18 -05:00
PatR
dd13b10cf2 make zeroany, zeromonst, zeroobj 'const'
They're never modified.  Minor complication:  &zeroobj is used as
a special not-Null-but-not-an-object value in multiple places and
needs to have 'const' removed with a cast in that situation.
2019-01-09 01:13:01 -08:00
Bart House
35e6732a89 Fix compiler warning. 2018-12-25 18:34:00 -08:00
Bart House
deb220c7c1 teleport and topten globals moved to instance globals. 2018-12-25 18:30:48 -08:00
Bart House
ed096f74c3 shk followmsg moved to instance globals. early_init introduced. 2018-12-25 17:46:52 -08:00
Bart House
cfb0e3ef78 Use MAX_LAN_USERNAME to determine if we should declare lusername. 2018-12-25 17:25:31 -08:00
Bart House
769ad91cc3 mthrowu, nhlan, options, regions, rip and role globals moved to g. 2018-12-25 16:26:27 -08:00
Bart House
c67f7e5122 globals from files.c moved to instance globals. 2018-12-25 12:56:27 -08:00
Bart House
b1ab64db43 program_state moved to g. 2018-12-25 10:09:04 -08:00
Bart House
16db7498d0 UNIX, VMS, DEF_PAGER, MICRO and MFLOPPY globals moved to g. 2018-12-25 09:34:24 -08:00
Bart House
0763046c38 zeroX, tc_gbl_data and fqn_prefix moved to instance globals. 2018-12-25 08:09:37 -08:00
Bart House
1c65e6afe0 context to g.context 2018-12-25 07:29:38 -08:00
Bart House
9069615861 Global changes for qt, qt4, amiga, x11 and curses. 2018-12-24 21:28:44 -08:00
Bart House
8c1a4d9a97 invent, youmonst, hackdir moved to g. 2018-12-24 21:04:15 -08:00
Bart House
90547edb83 moves, monstermoves, wailmsg, migrating_objs and billobjs moved to g. 2018-12-24 20:22:33 -08:00
Bart House
be5cdcf77a killer, level and rooms move to instance globals. 2018-12-24 19:50:08 -08:00
Bart House
572ee347b9 Another round of instance globals changes. 2018-12-24 16:43:50 -08:00
Bart House
74edf42f1c Moved decl.c globals into instance globals. 2018-12-22 18:44:22 -08:00
Bart House
6c0df43a17 Add check for GCC_WARN before using #prama GCC to turn off warning 2018-12-22 15:12:56 -08:00
Bart House
b863fad3ea Changes needed in the mac terminal port due to globals changes. 2018-12-22 13:53:10 -08:00
Bart House
576eece500 More globals moved to instance_globals. 2018-12-19 21:26:35 -08:00
Bart House
cb42021389 Last big push for moving globals to instance_globals. 2018-12-19 20:01:56 -08:00