Commit Graph

10241 Commits

Author SHA1 Message Date
PatR
84daf75981 'travel' option
Change '!travel' to only prevent travel-by-mouse and leave '_' alone.
2020-02-07 14:37:51 -08:00
Pasi Kallinen
7ca4ae7c4b YAFM tweak 2020-02-07 23:44:06 +02:00
Pasi Kallinen
4943fe23b3 YAFM when sitting on a towel
(via xNetHack)
2020-02-07 23:16:23 +02:00
Pasi Kallinen
a9c41d2ae0 YAFM when restoring a game while hallu
(via xNetHack)
2020-02-07 23:08:18 +02:00
Pasi Kallinen
eed37c9a84 Allow #wizgenesis quantity in the prompt
The #wizgenesis command can also accept a quantity in the input prompt,
previously it only accepted a command repeat prefix.

(via UnNetHack, originally from NetHack4)
2020-02-07 19:11:18 +02:00
PatR
b4d8475b95 populate insight.c
Move enlightenment and conduct from cmd.c to insight.c.  Also move
vanquished monsters plus genocided and/or extinct monsters from end.c
to there.  And move the one-line stethoscope/probing feedback for
self and for monsters from priest.c to there.

Achievement feedback has been overhauled a bit.  When no achievements
have been recorded, the header for them (after conducts) won't be
shown, and when at least one has been recorded, make the prompt for
asking whether to disclose conduct be about disclosing conduct and
achievements.  Also, describe achievements in the Guidebook.

I ran out of gas before updating Guidebook.tex; it will catch up to
Guidebook.mn eventually.

Some of the MS-DOS Makefiles haven't been updated yet so linking
without insight.{o,obj} will break there.
2020-02-06 17:42:15 -08:00
nhmall
690e072a49 is_elf(), is_dwarf(), is_gnome(), is_orc(), is_human()
Those tests were only checking the permonst mflags2 field
so anytime those tests were used in the code, they came
up false for things like an elven ranger. An elven ranger
should return true for an is_elf() test, as an example.

That happens because the profession monsters in monst.c
are defined with M2_HUMAN.

This augments those is_*() race tests to also check for a
matching player race as well.
2020-02-06 12:09:24 -05:00
nhmall
0673328696 resolve a couple of build failures when STATUS_HILITES is not defined
This addresses the build failures but it is unknown
whether the logic remains sound.
2020-02-05 12:24:15 -05:00
nhmall
c234f5a97d version bit 2020-02-04 07:57:43 -05:00
nhmall
0f27a8e71d fix copy-and-paste error 2020-02-03 03:54:14 -05:00
nhmall
816e2285ea add recent file addition to msdos Makefile2.cross 2020-02-03 03:51:30 -05:00
nhmall
1dfab5fe11 remove an argument that is no longer necessary from a few functions
Passing a boolean 'ghostly' argument to some functions that are also passed
an NHFILE * is unnecessary now.
2020-02-02 22:54:44 -05:00
nhmall
56b196772e windows vs Makefile follow-up bit 2020-02-02 21:04:45 -05:00
nhmall
80a602d344 add recent file addition to windows visual studio project and Makefile 2020-02-02 20:59:41 -05:00
nhmall
f41e0b9eec add recent file addition to Xcode project 2020-02-02 20:43:00 -05:00
PatR
00ce339c15 muse looting
Give better feedback than "<Monster> rummages through something"
when hero sees a monster looting a container.

Have monster take out up to 4 items at a time instead of always 1.
(Hero can take out an arbitrary number in one move.)

When deciding what to try to take out, 'count' (now 'nitems') was
initialized to 1 instead of 0, giving the monster a 1 out of N+1
chance of not trying to take anything out.  It wasn't clear whether
that was intentional (there's already a chance for not taking things
out when deciding whether to use the container).  I kept that result
in and made it more explicit now.

When deciding whether the chosen item could be moved from container
to monster's inventory, the can_carry(item) check was counting the
weight of the item twice, once explicitly when considering adding it
to minvent but also implicitly as part of the carried container's
weight already in minvent.
2020-02-02 15:22:42 -08:00
Patric Mueller
29da34b799 Adding missing basic taste "umami" as hallucinatory color 2020-02-02 20:16:13 +01:00
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
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