]> granicus.if.org Git - nethack/log
nethack
5 years agoreadobjnam() tidying
PatR [Thu, 9 Jan 2020 02:01:04 +0000 (18:01 -0800)]
readobjnam() tidying

Move wizard mode wishing for traps and terrain from readobjnam() to a
separate routine.

5 years agomore wishing for Amulet of Yendor
PatR [Thu, 9 Jan 2020 01:21:47 +0000 (17:21 -0800)]
more wishing for Amulet of Yendor

Make wish for "amulet of yendor" be the same as "real amulet of yendor"
instead of preserving the 3.6.x behavior of having a 50% chance of it
yielding "fake amulet of yendor".

Both the "real" and "fake" prefixes are still accepted, but "real" has
become a no-op:
 !real and fake, real and fake => fake
 real and !fake, !real and !fake => real
so fake vs !fake always decides the result.

5 years agoUnpaid globs showed weight info unconditionally outside of wizmode
Patric Mueller [Wed, 8 Jan 2020 10:26:40 +0000 (11:26 +0100)]
Unpaid globs showed weight info unconditionally outside of wizmode

globwt() didn't check for wizmode, so unpaid globs would be shown with weight
information even for normal player.

Eliminated globwt() completely and consolidated the output of aum in one place
as we don't really care about the ordering of debug info in wizmode.

5 years agofix #K112 - fumbling vs autoopen
PatR [Wed, 8 Jan 2020 01:57:38 +0000 (17:57 -0800)]
fix #K112 - fumbling vs autoopen

Report complained that having autoopen not work when fumbling was
inconvenient and mentioned that the "ouch! you bump into a door"
result didn't take any time.  This updates the documentation to
state that autoopen won't work while fumbling (so the inconvenient
behavior persists) but changes movement so that bumping into a door
now takes time.  (Despite "ouch!", it doesn't inflict any damage.)

Also, document the recently added autounlock option.

5 years agotethered aklys description
PatR [Tue, 7 Jan 2020 12:40:20 +0000 (04:40 -0800)]
tethered aklys description

Recent object formatting changes for wielded weapon put some pline
arguments in the wrong order.
 a - aklys (weapontethered  in hand)
or worse, when dual-wielding
 a - aklys (wieldedtethered  in right hand)
Change back to
 a - aklys (tethered weapon in hand)
or
 a - aklys (tethered weapon in right hand)

I considered (tethered weapon wielded in right hand) for the two-
weapon case, but I think that's too verbose.

5 years agofix #K119 - wishing for Amulet of Yendor
PatR [Tue, 7 Jan 2020 10:59:25 +0000 (02:59 -0800)]
fix #K119 - wishing for Amulet of Yendor

Wizard mode wishing for "Amulet of Yendor" has a 50% chance of
yielding a cheap plastic imitation.  Allow asking for "real Amulet
of Yendor" and "fake Amulet of Yendor" to provide precise control.
Asking for "real Amulet of Yendor" in normal play will be accepted
but then overridden with the fake amulet as usual.

Without the prefix, there's still a 50:50 chance for either amulet.
"real fake amulet of yendor" and "fake real amulet of yendor" both
yield a fake one.

When handling "amulet of yendor", any of "cheap", "plastic",
"imitation", "cheap plastic", "cheap imitation", and "plastic
imitation" are now recognized to mean "cheap plastic imitation".
Unlike prefixes such as "blessed rustproof" vs "rustproof blessed",
these two-word ones (or the three-word whole thing) need to be in
specific order and after the general prefixes.  Also, any of those
force "fake" even if an explicit "real" prefix came before them.

5 years agoAdd missing NULLs to lua function reg array
Pasi Kallinen [Tue, 7 Jan 2020 06:44:36 +0000 (08:44 +0200)]
Add missing NULLs to lua function reg array

5 years agoFixes for degenerate RNG
Pasi Kallinen [Mon, 6 Jan 2020 09:48:16 +0000 (11:48 +0200)]
Fixes for degenerate RNG

Assume a degenerate RNG that always returns the same number.
With these fixes, the game starts and is almost playable.
There are still some places that will go into infinite loop, eg.
the mines level generation.

5 years agofix #K125 - autounlock vs touching artifacts
PatR [Mon, 6 Jan 2020 07:54:11 +0000 (23:54 -0800)]
fix #K125 - autounlock vs touching artifacts

Apply makes a touch_artifact check on the tool being applied, but
autounlock would pick an unlocking tool to use without doing that.
Noticed while fixing that:  autounlock took no time.

Since picking an artifact unlocking tool might now blast the hero,
change the tool selection.  First choice: any key except another
role's quest artifact; second: any lock-pick except another role's
quest artifact; third: any credit card except another role's quest
artifact; fourth, fifth, sixth: other roles' quest artifact key,
lock-pick, or credit card.  The fifth category (artifact lock-picks)
is empty.  Rogues will pick non-cursed Master Key over any other
key (special case for first choice).  Tourists will pick a key or
a lock-pick over their PYEC (first and second choices over third).

5 years agoMerge branch 'copperwater/sokoban_penalties' into NetHack-3.7
Patric Mueller [Mon, 6 Jan 2020 00:00:46 +0000 (01:00 +0100)]
Merge branch 'copperwater/sokoban_penalties' into NetHack-3.7

Closes #260

5 years agoRemove Sokoban luck penalties for things you can't cheat with
copperwater [Tue, 11 Sep 2018 15:57:24 +0000 (11:57 -0400)]
Remove Sokoban luck penalties for things you can't cheat with

Jumping, Newton's 3rd Law hurtling, and throwing an iron ball:
attempting to do any of these in such a way that you would diagonally
pass between boulders/walls causes the Luck penalty. However, none of
these actually get you through the diagonal gap, thus they can't be used
to cheat and the penalty doesn't make sense.

5 years agoMove enhance_tip into context and don't show tip if #enhance has been used before
Patric Mueller [Sun, 5 Jan 2020 15:10:50 +0000 (16:10 +0100)]
Move enhance_tip into context and don't show tip if #enhance has been used before

Breaks save and bones compatibility.

5 years agowizard mode wishing for secret doors
PatR [Sun, 5 Jan 2020 21:13:21 +0000 (13:13 -0800)]
wizard mode wishing for secret doors

Allow wishing for secret doors and secret corridors.  It's a bit
more strict about where the wish is performed than wishing for
furniture.  Implemented in order to test drum of earthquake effects.

I spent a lot of time figuring out SDOOR details that somebody
already knew at some point but evidently didn't document--you can't
specify D_CLOSED for them or the display code will issue impossible
warnings about wall mode angles.

5 years agomore earthquake
PatR [Sun, 5 Jan 2020 19:30:38 +0000 (11:30 -0800)]
more earthquake

When a drum of earthquake targets a secret door, reveal it (which
is always followed by collapsing the door), and when it targets a
secret corridor, reveal that corridor.  Both situations also place
a pit at the location.

5 years agoUnify random light state for rooms or level
Pasi Kallinen [Sun, 5 Jan 2020 11:30:25 +0000 (13:30 +0200)]
Unify random light state for rooms or level

5 years agofix #K105 - earthquake chasms
PatR [Sun, 5 Jan 2020 09:20:15 +0000 (01:20 -0800)]
fix #K105 - earthquake chasms

Drum of earthquake can try to destroy fountains, thrones, altars,
sinks, and graves but it wouldn't do so because maketrap() had been
changed to prevent clobbering furniture with traps.  So you might get
"the throne falls into a chasm" but the throne would remain intact.

Change furniture to be floor before trying to create a pit.  The gist
of the patch is the 'if' after 'do_pit:' and also some changes to the
revealing of hidden monsters.  The rest is reformatting.

5 years agotwoweapon tweaks
PatR [Sun, 5 Jan 2020 02:22:04 +0000 (18:22 -0800)]
twoweapon tweaks

Don't allow dual-wielding if either wielded or alternate weapon
(or both) is a launcher:  bow, crossbow, or sling.  (I thought that
this had been addressed ages ago.)

Refine the "can't twoweapon" feedback.  The message for having
either or both hands empty is the same, but sentence construction
is different.  The not-a-weapon feedback is slightly different, now
mentioning whether it's the wielded or alternate weapon which isn't
allowed.  The case where neither are acceptable still just reports
uwep; mentioning both it and uswapwep would be too verbose.

Make more things be described as "(wielded)" instead of "(weapon in
hand)".  It was just stacks with quantity more than 1.  That's now
joined by ammo and missiles (any stack size, but in reality just 1
since greater was already being caught here) and any quantity of
non-weapon, non-weptool.  It's overridden if dual-wielding so that
right/left stay matched.

When dual-wielding, list primary as "(wielded in right hand)" and
secondary as "(wielded in left hand)" instead of "(weapon in hand)"
and "(wielded in other hand)".  The vaguer wording was better for
bows since they're held in the off hand but now that they can't be
dual-wielded that doesn't matter.  (Single-wielding a bow is still
"(weapon in hand)".)

When not dual-wielding, the item in the alternate weapon slot is
still described as "(alternate weapon; not wielded)" even if it's
not actually a weapon.  I couldn't think of better phrasing.

5 years agocandelabrum vs candles bit
PatR [Sun, 5 Jan 2020 01:22:18 +0000 (17:22 -0800)]
candelabrum vs candles bit

Move declaration to start of block so that C99 isn't required.

5 years agoApplying a spellbook hints about read charges left
Patric Mueller [Sat, 4 Jan 2020 12:17:18 +0000 (13:17 +0100)]
Applying a spellbook hints about read charges left

Applying a spellbook allows the player to flip through the pages, providing an
indication of how many reads it has left before turning blank.

Originally from UnNetHack but code almost completely refactored and updated
for post 3.4 changes like deafness and novels.

5 years agoWhen hallucinating, see hallucinated currencies instead of bits for an ale
Patric Mueller [Sat, 4 Jan 2020 13:55:55 +0000 (14:55 +0100)]
When hallucinating, see hallucinated currencies instead of bits for an ale

5 years agoMerge branch 'copperwater_consolidated_pull_request_265'
Patric Mueller [Sat, 4 Jan 2020 22:12:34 +0000 (23:12 +0100)]
Merge branch 'copperwater_consolidated_pull_request_265'

This includes most commits from GitHub pull request #265 with some code
adjustment and documentation in doc/fixes37.0.

5 years agoUpdate fixes37.0
Patric Mueller [Sat, 4 Jan 2020 22:03:45 +0000 (23:03 +0100)]
Update fixes37.0

5 years agoShow the teleportation messages only with flags.verbose
Patric Mueller [Sat, 4 Jan 2020 21:46:58 +0000 (22:46 +0100)]
Show the teleportation messages only with flags.verbose

5 years agoAlways print a message when the hero level teleports
copperwater [Tue, 12 Jun 2018 15:33:36 +0000 (11:33 -0400)]
Always print a message when the hero level teleports

For much the same reason as the horizontal teleport message: various
forms of level teleportation produce no message indication at all that
you just ended up somewhere else.

5 years agoAlways print a message when the hero teleports
copperwater [Tue, 29 May 2018 02:12:47 +0000 (22:12 -0400)]
Always print a message when the hero teleports

It's useful to get a message as indication you suddenly moved somewhere.
For instance, MSGTYPE=stop can be used on this to avoid bumbling in the
wrong direction after a spontaneous uncontrolled teleport.

5 years agoTeach non-mindless monsters about the Castle trapdoors
copperwater [Fri, 1 Feb 2019 17:21:42 +0000 (12:21 -0500)]
Teach non-mindless monsters about the Castle trapdoors

This feature is originally from SliceHack, but the original code
directly edited the monmove code, whereas I thought it was cleaner to
use the existing mtrapseen code. Thus, this commit just marks trapdoors
as "seen" for all non-mindless monsters generated in the Castle level
(the same way all monsters in Sokoban are marked aware of pits and
holes).

This change prevents these Castle monsters from moving onto trapdoors
97.5% of the time. (A determined player can still patiently sit and wait
for everyone in the castle to plunge like lemmings into the trapdoors,
but it will now take 40 times as long.) Also unlike SliceHack, this only
excludes mindless monsters - not all non-humanoids. There are plenty of
intelligent non-humanoid monsters generated right next to the trapdoors,
after all.

This is aimed at better flavor (the inhabitants of the castle should
know about the traps in their own area) and better scenery in the Valley
(doesn't seem as much of a valley of the dead if there are hordes of
soldiers milling around down there).

I considered sticking an in_mklev condition onto this if statement, so
that monsters spawned into the Castle after its creation will fall down
the trapdoors, but ultimately decided against it.

5 years agoDefault shk sell prompt to N
copperwater [Tue, 12 Jun 2018 13:36:54 +0000 (09:36 -0400)]
Default shk sell prompt to N

It can get annoying when you accidentally sell something you didn't mean
to by hitting space or enter at this prompt.

5 years agoUnderwater fire scroll causes vaporization regardless of confusion
copperwater [Fri, 25 Jan 2019 20:57:09 +0000 (15:57 -0500)]
Underwater fire scroll causes vaporization regardless of confusion

This is originally from the variant SliceHack. Rationale: there's still
fire being summoned, so it should vaporize some water.

5 years agoBetter reporting directions for impossible()
copperwater [Thu, 19 Dec 2019 03:25:12 +0000 (22:25 -0500)]
Better reporting directions for impossible()

Rather than just informing the player that saving and reloading might
fix the problem, they are now encouraged to report the problem to the
value of DEVTEAM_EMAIL. If the sysconf specifies SUPPORT, that is also
presented as an option.

5 years agoAdd a default message for chatting to gnomes
copperwater [Tue, 5 Feb 2019 03:45:45 +0000 (22:45 -0500)]
Add a default message for chatting to gnomes

Message is a reference to The Silver Chair. Most of the other races had
their own messages already, but gnomes would just default to discussing
dungeon exploration, which doesn't make that much sense most of the
times when you would be chatting to them in their own mines.

The quotation is edited from the source to reflect the dungeon
environment, but the sentiment is actually pretty spot-on given the
average player's win ratio.

Note: this doesn't interfere with the South Park gnome speech added to
3.6 a while ago; that only occurs when hallucinating and this only
occurs when not hallucinating.

5 years agoCall potion bottles by nonsensical names if hallucinating
copperwater [Fri, 25 Jan 2019 14:27:55 +0000 (09:27 -0500)]
Call potion bottles by nonsensical names if hallucinating

From SliceHack. Note that this refers to the description of the physical
bottle; it's a substitute for "phial", "carafe", "flask", etc. such as
are seen when a potion crashes on someone's head. They don't obscure the
randomized appearance or actual potion identity.

The SliceHack version evidently went through several revisions; just
take the current one.

5 years agoNeutral sacrifices disappear in a cloud of smoke
copperwater [Sat, 22 Dec 2018 14:38:40 +0000 (09:38 -0500)]
Neutral sacrifices disappear in a cloud of smoke

The general idea here came from SpliceHack -- give each alignment a
unique effect in what happens to its sacrifices -- but the "puff of
smoke" in Splice seemed too small.

5 years agoGive player message informing them they can use #enhance
copperwater [Sat, 8 Dec 2018 18:51:23 +0000 (13:51 -0500)]
Give player message informing them they can use #enhance

Triggers when you feel more confident in your skills. This is to address
a problem I have heard about several times from newer players: unless
you pay close attention to the guidebook, nothing in the game actually
indicates that you can level up your abilities and how to do it.

Experienced players don't need this message, of course; they can hide it
via MSGTYPE if they really hate it, but I additionally added a clause
that prevents this message from being displayed more than once per game
session. (It didn't seem important enough to make a save field for.)

5 years agoSuppress "Unknown command" messages in the dumplog.
copperwater [Thu, 13 Sep 2018 18:27:06 +0000 (14:27 -0400)]
Suppress "Unknown command" messages in the dumplog.

Backported from TNNT. Only affects dumplog pline history, not any other
form of pline history.

The impetus for this is to avoid dumplogs full of "Unknown command foo."
messages which don't provide any value for people reading the file. In
many cases, these messages crowd out the actual message history, making
it hard to reconstruct what happened.

5 years agoRemove "iron hook" unidentified description
copperwater [Tue, 24 Apr 2018 03:09:40 +0000 (23:09 -0400)]
Remove "iron hook" unidentified description

It's confusing and served no purpose; a spoiled player knew what it is,
an unspoiled player might think it was a hook-hand or something. Now
they all show up as grappling hook.

5 years agoChoir chanting, bathing in darkness before Moloch snuffs out your life
copperwater [Wed, 6 Dec 2017 02:27:06 +0000 (21:27 -0500)]
Choir chanting, bathing in darkness before Moloch snuffs out your life

Inspired by a Dudley's Dungeon strip. No gameplay change, just flavor.

5 years agoShow "You feel very comfortable here" message when crowned
copperwater [Tue, 23 Jan 2018 19:34:59 +0000 (14:34 -0500)]
Show "You feel very comfortable here" message when crowned

5 years agoCandelabrum now reads "(n of 7 candles attached)"
Patric Mueller [Sat, 4 Jan 2020 12:08:08 +0000 (13:08 +0100)]
Candelabrum now reads "(n of 7 candles attached)"

It wasn't obvious enough before that the Candelabrum has seven candle
slots. This makes it show it clearly.

5 years agoOnly output candelabrum tip if candles are in inventory
Patric Mueller [Sat, 4 Jan 2020 11:59:09 +0000 (12:59 +0100)]
Only output candelabrum tip if candles are in inventory

5 years agoApplying a candelabrum with no candles gives a tip
copperwater [Sun, 1 Jul 2018 15:51:55 +0000 (11:51 -0400)]
Applying a candelabrum with no candles gives a tip

"This candelabrum has no candles. To attach candles, apply them instead
of the candelabrum."

5 years agoReplace awful "You feel cold" message for freezing a door you can't see
copperwater [Mon, 2 Jul 2018 12:03:47 +0000 (08:03 -0400)]
Replace awful "You feel cold" message for freezing a door you can't see

That message implied something to do with an effect happening to the
hero that causes them to feel cold, such as taking cold damage.
Change it to "You hear a deep cracking sound" instead.

5 years agoFix unused param warning
Pasi Kallinen [Sat, 4 Jan 2020 15:26:53 +0000 (17:26 +0200)]
Fix unused param warning

5 years agoAdd some player lua methods
Pasi Kallinen [Sat, 4 Jan 2020 14:55:50 +0000 (16:55 +0200)]
Add some player lua methods

Adds u.clear_inventory() and u.giveobj(new.obj("rock")) and some other minor stuff.

5 years agofix inaccuracies in comment
nhmall [Sat, 4 Jan 2020 12:35:53 +0000 (07:35 -0500)]
fix inaccuracies in comment

5 years agodisplay of data.base entries
PatR [Sat, 4 Jan 2020 11:35:11 +0000 (03:35 -0800)]
display of data.base entries

Make data.base display perform a couple of extra data integrity
checks and meet tabexpand()'s expectation about buffer size.

Also be a little more forgiving in case someone uses spaces instead
of a tab to indent new text lines.

5 years agoadd some bullet-proofing to tabexpand()
PatR [Sat, 4 Jan 2020 11:33:57 +0000 (03:33 -0800)]
add some bullet-proofing to tabexpand()

Include some bounds checking for tabexpand, but it assumes caller
passes a BUFSZ buffer rather than having that caller pass the actual
size.

5 years agoUpdate map glyph when placing obj on map via lua
Pasi Kallinen [Sat, 4 Jan 2020 09:35:17 +0000 (11:35 +0200)]
Update map glyph when placing obj on map via lua

5 years agoold bits in doc files
nhmall [Wed, 1 Jan 2020 16:59:43 +0000 (11:59 -0500)]
old bits in doc files

5 years ago2020
nhmall [Wed, 1 Jan 2020 15:12:16 +0000 (10:12 -0500)]
2020

5 years agoLua struct obj improvements
Pasi Kallinen [Wed, 1 Jan 2020 11:25:55 +0000 (13:25 +0200)]
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.

5 years agoReplace "money" in in-game texts with "gold"
Patric Mueller [Tue, 31 Dec 2019 13:10:24 +0000 (14:10 +0100)]
Replace "money" in in-game texts with "gold"

When GOLDOBJ was activated unconditionally, several texts started referencing
"money" instead of "gold".

As we don't have the intention to introduce a complex coin system with
different denominations, change it back and also some other places that
reference "money".

5 years agofixes37.0 catch-up
nhmall [Tue, 31 Dec 2019 15:09:37 +0000 (10:09 -0500)]
fixes37.0 catch-up

5 years agotwoweapon message adjustment
nhmall [Tue, 31 Dec 2019 15:02:54 +0000 (10:02 -0500)]
twoweapon message adjustment

There was a concern that some things resulted in "is not a weapon"
when trying to twoweapon, then were subsequently refered to in
menus as "weapon in hand."

Remove any perceived inconsistency by simply adjusting the first
message.

5 years agomiscellaneous reformatting
PatR [Tue, 31 Dec 2019 02:37:42 +0000 (18:37 -0800)]
miscellaneous reformatting

Some new code was using 3.4.3 era formatting (operators at end of
first half of a continued line rather than at start of second half).
Also a few cases of 'g.' prefix making lines be too wide.  I imagine
there will be a lot more of these over time.

5 years agofix github issue #273 - named orc mummy
PatR [Mon, 30 Dec 2019 02:55:44 +0000 (18:55 -0800)]
fix github issue #273 - named orc mummy

The test for whether a migrating object generated as plundered
mine-town loot should be delivered to any orc created and then giving
that orc a bandit name was kicking in for orc mummies and orc zombies
as well as for regular orcs.

Also, the loot could include tins or eggs and their species would
get clobbered by the overloading of obj->corpsenm.  During delivery
when the overloading was reset they would become giant ant eggs/tins.
(Not seen in actual play.)

5 years agofix github issue #275 - artifact life drain
PatR [Sun, 29 Dec 2019 23:30:55 +0000 (15:30 -0800)]
fix github issue #275 - artifact life drain

A monster using Stormbringer or Staff of Aesculapius to drain life
from another monster would heal the hero instead of the attacker.

5 years agoFix heap-use-after-free when rewielding partial stack
Pasi Kallinen [Sun, 29 Dec 2019 15:28:15 +0000 (17:28 +0200)]
Fix heap-use-after-free when rewielding partial stack

5 years agoFix another out-of-bounds error
Pasi Kallinen [Sun, 29 Dec 2019 14:31:51 +0000 (16:31 +0200)]
Fix another out-of-bounds error

Monster trying to decide if a tin could cure stoning looking at
a special or empty tin would do acidic(&mons[-1])

5 years agoremove a few obsolete notes
nhmall [Sat, 28 Dec 2019 21:35:26 +0000 (16:35 -0500)]
remove a few obsolete notes

5 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Fri, 27 Dec 2019 17:14:13 +0000 (12:14 -0500)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

5 years agomsdos cross-compile bits
nhmall [Fri, 27 Dec 2019 17:13:41 +0000 (12:13 -0500)]
msdos cross-compile bits

5 years agofix Xcode warning
nhmall [Fri, 27 Dec 2019 15:32:06 +0000 (10:32 -0500)]
fix Xcode warning

5 years agopull requests #174 and #128 for hallucinatory traps and autounlock
nhmall [Fri, 27 Dec 2019 14:05:27 +0000 (09:05 -0500)]
pull requests #174 and #128 for hallucinatory traps and autounlock

Pull requests:
hallucinatory traps
autounlock

This breaks existing save files.

Closes #174
Closes #228

5 years agomerge bit
nhmall [Fri, 27 Dec 2019 14:02:51 +0000 (09:02 -0500)]
merge bit

5 years agoMerge branch 'NetHack-3.7'
nhmall [Fri, 27 Dec 2019 13:52:42 +0000 (08:52 -0500)]
Merge branch 'NetHack-3.7'

5 years agoAdd lua object references
Pasi Kallinen [Thu, 26 Dec 2019 16:43:39 +0000 (18:43 +0200)]
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.

5 years agofix github issue #272 - meat rings, +0 protection
PatR [Tue, 24 Dec 2019 12:31:41 +0000 (04:31 -0800)]
fix github issue #272 - meat rings, +0 protection

Meat rings were causing increased hunger even though they don't do
anything.  Not mentioned in the report, but cheap plastic imitation
amulets increased hunger too and they don't do anything either.
Trickier to fix, +0 rings of protection were excluded from hunger
on the grounds that +0 rings don't do anything, but since 3.6.0
+0 protection provides +1 to magic cancellation if protection isn't
coming from anywhere else.  Two +0 rings of protection are trickier
still since only one of them provides the MC bonus.

Fixes #272

5 years ago'w-' object lost panic
PatR [Tue, 24 Dec 2019 11:26:34 +0000 (03:26 -0800)]
'w-' object lost panic

After the "make 'w' parallel with 'Q'" patch, wielding bare hands
was erroneously treating object id 0 as a split of zeroobj.  That
isn't in inventory so seems 'lost'.  Fixed by testing for nonzero.
There was another bug:  you could wield a partial stack even if your
current weapon was cursed.  Fixed by reordering if/else-if/end-if.

5 years agofix github issue #268 - worm tooth & crysknife
PatR [Tue, 24 Dec 2019 10:41:19 +0000 (02:41 -0800)]
fix github issue #268 - worm tooth & crysknife

Change the composition of worm tooth from none-of-the-above to bone
and crysknife from mineral to bone, same as is used for unicorn horn.
I think the only significant difference will be that worm teeth used
up during polypiling will produce skeletons rather than flesh golems.

Fixes #268

5 years agoThis is cron-daily v1-Dec-12-2019. files updated: Files
nhw_cron [Tue, 24 Dec 2019 04:17:11 +0000 (23:17 -0500)]
This is cron-daily v1-Dec-12-2019.  files updated: Files

5 years agoMerge branch 'chasonr-msdos-build' into NetHack-3.7
nhmall [Tue, 24 Dec 2019 03:27:13 +0000 (22:27 -0500)]
Merge branch 'chasonr-msdos-build' into NetHack-3.7

5 years agoMerge branch 'msdos-build' of https://github.com/chasonr/NetHack into chasonr-msdos...
nhmall [Tue, 24 Dec 2019 03:25:20 +0000 (22:25 -0500)]
Merge branch 'msdos-build' of https://github.com/chasonr/NetHack into chasonr-msdos-build

5 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Tue, 24 Dec 2019 02:45:26 +0000 (21:45 -0500)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

5 years agocentralize the invert decision logic to avoid updates to 7 ports
nhmall [Tue, 24 Dec 2019 02:44:34 +0000 (21:44 -0500)]
centralize the invert decision logic to avoid updates to 7 ports

This will make it easier to tinker for best results.

5 years agocurses_add_menu warning suppression
PatR [Tue, 24 Dec 2019 01:24:17 +0000 (17:24 -0800)]
curses_add_menu warning suppression

5 years agogiant {spider,beetle} fixes entry
PatR [Tue, 24 Dec 2019 00:35:12 +0000 (16:35 -0800)]
giant {spider,beetle} fixes entry

5 years agoFixes to build NetHack 3.7.0 on FreeDOS
Ray Chason [Mon, 23 Dec 2019 23:03:26 +0000 (18:03 -0500)]
Fixes to build NetHack 3.7.0 on FreeDOS

5 years agoadd a requested interface adjustment for menu invert operations
nhmall [Mon, 23 Dec 2019 15:44:07 +0000 (10:44 -0500)]
add a requested interface adjustment for menu invert operations

Originally requested by one of the hardfought admins

Adjust all active window ports (tty, curses, win32, Qt, X11) to store
the itemflags that they receive with each item.

Also, make those active window ports understand the new
MENU_ITEMFLAGS_SKIPINVERT flag by skipping any menu items with that
setting during invert_all and invert_page operations.

Build testing and rudimentary functionality testing was carried out
on each of the window ports listed above.

The code was also modified on some non-active window ports (Qt3, gem,
gnome) but it was not tested for build or function there.

The desired functionality expressed was to be able to select a
single object category, and use the @ "invert all" function to
exclude that one and select all the others.

The "invert all" function's behavior of also including things
like "select all" and BUCX menu items made the feature unuseful
for that purpose.

5 years agoFix Qt compile
Pasi Kallinen [Mon, 23 Dec 2019 15:24:41 +0000 (17:24 +0200)]
Fix Qt compile

5 years agoFix X11 compile
Pasi Kallinen [Mon, 23 Dec 2019 14:45:25 +0000 (16:45 +0200)]
Fix X11 compile

5 years agoadd a use of MENU_ITEMFLAGS_SKIPINVERT to pickup.c
nhmall [Mon, 23 Dec 2019 14:26:08 +0000 (09:26 -0500)]
add a use of MENU_ITEMFLAGS_SKIPINVERT to pickup.c

5 years agotty update
nhmall [Mon, 23 Dec 2019 14:05:01 +0000 (09:05 -0500)]
tty update

5 years agocurses updates
nhmall [Mon, 23 Dec 2019 13:53:58 +0000 (08:53 -0500)]
curses updates

5 years agoadd support for MENU_ITEMFLAGS_SKIPINVERT
nhmall [Mon, 23 Dec 2019 13:36:44 +0000 (08:36 -0500)]
add support for MENU_ITEMFLAGS_SKIPINVERT

Able to test:
win/tty
win/win32
win/curses

Unable to test:
win/X11
win/Qt
win/Qt3
win/gem
win/gnome

5 years agogithub issue #267 - giant {beetle,spider}
PatR [Mon, 23 Dec 2019 10:26:59 +0000 (02:26 -0800)]
github issue #267 - giant {beetle,spider}

Increase weight of giant spider from 100 to 200; leave nutrition at 100.
Increase weight of giant beetle from 10 to 200; increase nutrition from
10 to 50.  Both are still size 'large'.

I've left giant ant with weight 10, nutrition 10, size 'tiny' so that
it doesn't become bigger than soldier and fire ants.

Fixes #267

5 years agoThis is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt
nhw_cron [Sun, 22 Dec 2019 22:17:11 +0000 (17:17 -0500)]
This is cron-daily v1-Dec-12-2019.  guidebook updated: doc/Guidebook.txt

5 years agofix mysterious force bug
PatR [Mon, 23 Dec 2019 01:22:07 +0000 (17:22 -0800)]
fix mysterious force bug

Subtracting one dungeon depth value from another had the subtraction
backwards and that yielded a negative value where a positive one is
expected.  If NH_RELEASE_STATUS were to be set to NH_STATUS_RELEASED
then this was at risk of crashing (if the bad subtraction yields -2,
rn2(diff+2) would divide by 0) since rn2()'s argument isn't validated
for released version.

fixes37.0 was confused, listing a couple of things that aren't bugs
in 3.6 as general fixes.  I suspect that the DLB one was fixed before
being exposed via git, so shouldn't be there at all.

5 years agoX11_add_menu()
PatR [Mon, 23 Dec 2019 01:05:42 +0000 (17:05 -0800)]
X11_add_menu()

5 years agodoc bit
nhmall [Mon, 23 Dec 2019 00:04:35 +0000 (19:04 -0500)]
doc bit

5 years agounintended change fix
nhmall [Sun, 22 Dec 2019 23:53:39 +0000 (18:53 -0500)]
unintended change fix

5 years agogroundwork for window port interface change to add_menu
nhmall [Sun, 22 Dec 2019 23:28:24 +0000 (18:28 -0500)]
groundwork for window port interface change to add_menu

groundwork only - window port interface change

This changes the last parameter for add_menu() from a boolean
to an unsigned int, to allow additional itemflags in future
beyond just the "preselected" that the original boolean offered.

There shouldn't be any functionality changes with this groundwork-only
change, and if there are it is unintentional and should be reported.

5 years agowielding partial stack
PatR [Sun, 22 Dec 2019 22:51:05 +0000 (14:51 -0800)]
wielding partial stack

If you're wielding a stack of N items, issuing the command to quiver
them asks whether you want to quiver N-1 of them (implicitly leaving
one wielded).  If you answer no then you're asked whether to quiver
all of them.  You could also give a count when picking the item to be
quivered and the stack would be split based on that.

However, if you have a stack of N items quivered, issuing the command
to wield them just did so, leaving the quiver empty.  And picking an
item ignored any count, so even explicitly asking for 1 (out of N)
wielded the whole stack.  Change 'w' to parallel 'Q'; if you try to
wield a quivered stack, you'll be asked whether to wield just 1 of
them.  For no, ask whether to wield the whole stack.  Or you can give
an explicit count when picking any stack in inventory to wield.

Both 'w' and 'Q' probably ought to handle the alternate/secondary
weapon similarly when it contains a stack.  This doesn't address that.

5 years agourealtime.realtime was being calculated incorrectly
nhmall [Sun, 22 Dec 2019 22:23:18 +0000 (17:23 -0500)]
urealtime.realtime was being calculated incorrectly

Looks like a merge gone awry perhaps.

Fixes #270

5 years agourealtime.realtime was being incorrectly calculated
nhmall [Sun, 22 Dec 2019 22:21:02 +0000 (17:21 -0500)]
urealtime.realtime was being incorrectly calculated

Looks like a branch merge gone awry perhaps.

fixes #270

5 years ago'quick_farsight' option
PatR [Sun, 22 Dec 2019 21:40:59 +0000 (13:40 -0800)]
'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.

5 years agofix github issue #266 - timed clairvoyance
PatR [Sun, 22 Dec 2019 21:30:25 +0000 (13:30 -0800)]
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

5 years agoUnix Makefile.utl
PatR [Sun, 22 Dec 2019 00:57:53 +0000 (16:57 -0800)]
Unix Makefile.utl

Build feedback filtered by a script which filters out -Dthis -Wthat:
gcc -g -I../include -I../lib/lua-/src -c ../win/share/tilemap.c

The second -I is obsolete or else its bogus value would have caused
build failure.  When removing it, I noticed that there was still quite
a bit of obsolete yacc and lex stuff in there.  Remove that too.

5 years agoThis is cron-daily v1-Dec-12-2019. files updated: Files
nhw_cron [Sat, 21 Dec 2019 20:17:23 +0000 (15:17 -0500)]
This is cron-daily v1-Dec-12-2019.  files updated: Files

5 years agoPrevent crash caused by division by zero in NetHackW.
Bart House [Sat, 21 Dec 2019 23:34:57 +0000 (15:34 -0800)]
Prevent crash caused by division by zero in NetHackW.

5 years agoGet Visual Studio builds working once again.
Bart House [Sat, 21 Dec 2019 23:34:31 +0000 (15:34 -0800)]
Get Visual Studio builds working once again.