Commit Graph

10428 Commits

Author SHA1 Message Date
Pasi Kallinen
b12ea03d11 Allow monsters to rummage through containers 2020-02-02 11:05:43 +02:00
PatR
2ebbe61f53 fix github issue #285 - spellcasting monster
After casting a spell, a monster got a chance to make a regular attack
despite the apparent attempt to set up a return value indicating that
it wouldn't move.

When looking over the return value situation, I noticed 'wormhitu()'
for the first time.  It gives worms additional attacks when the hero
is adjacent to some of the tail, that only works if the head is within
reach of a melee attack.  The hidden tail segment at head's location
always met that criterium so gave an extra attack that didn't make
sense; change wormhitu() to skip that segment.

Do some formatting in mcastu.c; no change in actual code there.

Fixes #285
2020-02-02 00:55:26 -08:00
nhmall
bfd180a5ac mention a pair of recent file additions in Cross-compiling
[skip travis]
2020-02-01 22:49:21 -05:00
nhmall
09d82164fc msdos fix from chasonr 2020-02-01 22:08:41 -05:00
nhmall
04b609a020 Merge branch 'chasonr-statue-glyphs' into NetHack-3.7 2020-02-01 22:08:22 -05:00
nhmall
eaebc2c9e0 Merge branch 'statue-glyphs' of https://github.com/chasonr/NetHack into chasonr-statue-glyphs 2020-02-01 22:05:55 -05:00
PatR
7bc799f06b insert omitted 'static' for two sp_lev.c variables 2020-02-01 18:27:36 -08:00
keni
76b7e63888 Guidebook.tex: fix formatting typos 2020-02-01 21:17:49 -05:00
PatR
158ea1a23f failing level change messsage confusion
While testing the changes to dungeon and special level handling, I got
|A mysterious force prevents you from descending!
|You materialize on a different level!
The mystery force is handled by goto_level() so level_tele() doesn't
know that the failure is going to happen when it sets up the message
for deferred delivery.  Suppress the message if you don't change levels.
2020-02-01 17:53:07 -08:00
PatR
5d6b3b6f51 get_table_str use
Some cleanup when chasing a memory leak.  get_table_str() and
get_table_str_opt() return a value from dupstr() and it wasn't always
being freed.  I'm not sure that I found the problem--maybe it involved
pointers turned over to Lua garbage collection--but did find a couple
of suspicious things in dungeon setup.
2020-02-01 17:33:50 -08:00
PatR
32f0520fe0 sp_lev.c private variables
Make a start at reducing the size of 'g' by removing some special
level stuff that doesn't need to be there.
2020-02-01 15:44:42 -08:00
Ray Chason
1fb1967e42 Enable statue glyphs for cross compile 2020-02-01 16:48:37 -05:00
Ray Chason
f9b4ebae87 Remove code fragment causing compile error 2020-02-01 16:48:07 -05:00
Pasi Kallinen
dcdb8d437b Dehardcode sanctum temple secret door 2020-02-01 21:30:50 +02:00
Pasi Kallinen
bb1925a957 Dehardcode wizard1 morgue secret door 2020-02-01 20:20:25 +02:00
PatR
10b8356a15 splitting cmd.c, phase 1B
I neglected to use -f with 'git add' and the stub file didn't make
it into the previous commit.
2020-02-01 09:14:18 -08:00
PatR
70611afc48 splitting cmd.c, phase I
Preparation for moving enlightenment and conduct into new source
file insight.c.  Right now it's a stub that shouldn't break anything
whether included or omitted.  Once makefiles and project files have
been updated to compile and link it, the actual code will be moved.

unix/Makefile.src has been updated;
vms/Makefile.src and vmsbuild.com have been updated but not tested.
2020-02-01 08:59:19 -08:00
Pasi Kallinen
33cd6befe0 Dehardcode minefill
Instead of hardcoding the minefill levels in the core,
allow defining fill levels for a dungeon branch in the dungeon.lua
2020-02-01 18:31:39 +02:00
Ray Chason
a391bf0e7b Update description of OPTIONS=video
Document OPTIONS=video:vesa. Also, OPTIONS=video_width and video_height
work with vesa, not vga; and the TeX guidebook needs some syntax fixes.
2020-02-01 11:03:36 -05:00
PatR
c03ed894de loadlua() simplification
nhl_loadlua() went from too simple to too complicated, now somewhere
in between.  Still doesn't assume that an entire file can be scooped
up with a single fread(), but no longer mucks about with the contents
of the file in order to insert a comment containing the file's name.
In order to have useful filename feedback in Lua error messages, just
use a different liblua routine to feed the file's contents to it.
2020-01-31 13:36:22 -08:00
PatR
625a9a7b79 fix 'Couldn't place lregion type 1' on Orc town
Stairs up from Orcish Town variation of Mine Town were being forced
to be near the bottom of the left side of the level due to a bogus
exclusion region in the level description.  If that small area was all
solid rock then a warning was issued and no stairs up were created.
2020-01-31 12:58:24 -08:00
PatR
fe664435dc royal jelly
Applying royal jelly listed all of inventory as likely candidates for
  what to rub it on, including itself.
Applying it to anything took no time.
After the "you smear royal jelly on <foo>" message,
  unsuccessfully applying it to non-eggs gave no other feedback;
  successfully applying it to eggs gave no additional feedback.

Allow #rub to use royal jelly too.

Also, require hands to apply or #rub anything.

Not done:  fumbling and/or slippery fingers should have a chance to
  drop the jelly or to drop whatever gets rubbed with it.
2020-01-31 05:10:00 -08:00
Pasi Kallinen
d44c83d45f Allow applying royal jelly on an egg
Royal jelly applied on an egg will change a killer bee egg to
a queen bee egg. Cursed jelly will kill the egg, uncursed and blessed
will revive it. Blessed jelly will also make the creature think
you're the parent.

Original patch was by Kenneth Call
2020-01-31 10:39:40 +02:00
PatR
fb05f30167 update EDITLEVEL for achievement tracking 2020-01-30 18:28:55 -08:00
PatR
6c479f2317 more simplification of achievement tracking
Instead of hardcoding the "prize" type and then watching for that
to be created, specify it in the level description.

Also, instead of giving both Sokoban end levels 50:50 chance for
either prize, bias the one that used to always have the bag of
holding to now have 75% chance for that and 25% chance for amulet
of reflection, with the other one having those chances reversed.
So still 50:50 overall.
2020-01-30 17:35:32 -08:00
PatR
be12ed6859 reformatting for sp_lev.c
Also change a bunch of automatic arrays with initializers to static
so that they won't be reinitialized every time their block is entered.

get_table_buc() is changed to support bless/curse specifiers for
"not-cursed", "not-uncursed", and "not-blessed" but they aren't used
yet.
2020-01-30 16:48:55 -08:00
PatR
162163c325 reformatting for nhlua.c 2020-01-30 15:44:55 -08:00
nhmall
a42cdd6cc7 more sys/winnt/Makefile.msc
Remove nmake conditional bits for some things that
aren't optional anymore
2020-01-30 14:04:10 -05:00
nhmall
5f4b0b0003 updates for Windows command line Makefile with visual studio 2020-01-30 13:50:26 -05:00
nhw_cron
5204a05d3f This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-01-29 20:22:46 -05:00
PatR
5dd6879efe Guidebook bits
"The 'm' prefix before a movement command can be used" is awkwardly
worded.

"Various ... variations" is redundant all by itself but doubly so
when "various" is used again two sentences later.

mention_decor is missing a sentence between "Normally only shown
when obscured" and then an exception when it is enabled.
2020-01-29 17:10:38 -08:00
nhw_cron
1a85c0be96 This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-01-29 16:00:19 -05:00
PatR
a219eed6eb 'make depend' for unix/Makefile.src
Add the new header file to HACKINCL which only matters to HSOURCES
which only matters for the 'tags' target.

'make depend' reordered some stuff that could have stayed as-is but
also found a missing dependency for nhlobj.{c,o}.
2020-01-29 12:16:24 -08:00
PatR
1641c864a2 wands vs no-hands
Hero shouldn't be able to zap wands when polymorphed into a form which
lacks hands.

The other tweaks to dozap() shouldn't produce any change in behavior.
2020-01-29 10:35:02 -08:00
PatR
ea8248e3c6 new 'mention_decor' option
Somewhat similar to 'mention_walls', 'mention_decor' is a way to
request additional feedback when moving around the map.  It reports
furniture or unusual terrain when you step on that.  Normally stepping
on furniture only mentions it when it is covered by object(s).  And
moving onto (rather than into) water or lava or ice doesn't bother
saying anything at all.  With the new option set there will be a
message.  It uses Norep so won't repeat when moving from one water
spot to another or one lava spot to another or one ice spot to another
unless there has been at least one intervening message.  There is also
a one-shot message when moving from water or lava or ice onto ordinary
terrain (not Norep, just once since there's no land to land message).

Having the verbose flag Off doesn't inhibit these new messages but it
does shorten them: "A fountain." instead of "There is a fountain here."

The Guidebook gets a new subsection "Movement feedback" of the "Rooms
and corridors" section and it covers more than just 'mention_decor'.
As usual, Guidebook.tex is untested.

'mention_decor' persists across save/restore, so 'struct flags' has
changed and EDITLEVEL is being bumped, hence save files are invalided.
2020-01-29 09:47:36 -08:00
nhmall
63310076bb fnamesiz comment bit 2020-01-29 10:29:37 -05:00
Pasi Kallinen
c03b6db884 Fix quest text mistake 2020-01-29 17:25:16 +02:00
nhw_cron
d5f92b46f4 This is cron-daily v1-Jan-20-2020. files updated: Files 2020-01-29 10:22:59 -05:00
nhmall
c97cabb92e fnamesiz bit 2020-01-29 10:09:45 -05:00
nhmall
e39ec5ce3e rename new header file to fnamesiz.h
Changes to be committed:
renamed:    include/filesize.h -> include/fnamesiz.h
2020-01-29 09:56:43 -05:00
nhmall
209fab138b recover fix
recover had deviated somewhat from NetHack in its
file expectations:
1) A couple of 3.7 fields needed to be accommodated.
2) hard-coded file size values had deviated.

The file sizes are now in an added header file named "filesize.h",
which is included at the bottom of config.h.

There will likely be another commit to write the filename size ahead
of the file name so that the precise number of characters can be read,
but since that will break existing saves, it can go in along with another
save-breaking commit.

This commit doesn't not alter savefiles written by nethack so does not
require an editlevel bump. It does alter the read-in expectation in
recover to match the game and this get recover working again.
2020-01-29 09:15:55 -05:00
nhw_cron
3c923de0ea This is cron-daily v1-Jan-20-2020. files updated: Files 2020-01-28 19:19:10 -05:00
nhmall
7b8c6d6b84 msdos has been tested with 3.7 2020-01-28 19:16:07 -05:00
nhmall
ab1af58711 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-01-28 19:10:07 -05:00
nhmall
82bfec24f9 update some version bits 2020-01-28 19:09:40 -05:00
PatR
4e59f0ead9 level teleport "you materialize" mesg sequencing
If level teleport took you somewhere special, things like shop entry
or quest summons or valley atmosphere messages were being given first,
then "you materialize on a different level" after.  schedule_goto()
takes before-change-message and after-change-message arguments; it
ought to be extended to have a mid-change-message one too but I didn't
think of that until just now.
2020-01-28 15:28:31 -08:00
PatR
c9166bc00c black and white ice
Like lava when that looks the same as water with color Off, render ice
in inverse video if it looks the same as the floor of a room.  (I tried
bold first but the result didn't look very good.)

Done for tty and curses; others may want to follow suit.
2020-01-28 15:01:41 -08:00
PatR
2f0676c1b8 beauty no longer in eye of the beholder
There was a complaint that despite charisma of 13 being above average,
the character was described as "ugly".  The cut-off was actually >14
for "beautiful" or "handsome" vs <=14 for "ugly".  This adds several
more grades of appearance.
2020-01-28 12:49:38 -08:00
nhmall
9f06c0139e whitespace cleanup on options.c 2020-01-27 20:54:09 -05:00
nhmall
9cd694740d travis bit post-release 2020-01-27 18:17:29 -05:00