]> granicus.if.org Git - nethack/log
nethack
4 years agofix pull request #540 - don't autoquiver aklys
PatR [Sun, 11 Jul 2021 02:09:17 +0000 (19:09 -0700)]
fix pull request #540 - don't autoquiver aklys

If player throws a wielded aklys and it fails to return, and quiver
is empty when picking it back up, don't put it into that slot because
it needs to be wielded to achieve best throwing effect.  A player who
had wielded it and was using 'f' to throw it might not notice that
it isn't returning until it hasn't returned several times.  Moot if
quiver already has some missile readied.  Don't autoquiver even if
some other weapon is wielded because that might have been done just
to go retrieve the aklys.

The game doesn't keep track of whether a previously thrown item was
wielded at the time, and shouldn't be changed to auto-wield in such
situation.  Leaving quiver empty so that player is prompted for what
to throw is sufficient.

Fixes #540

4 years agogold kicking bit
PatR [Sun, 11 Jul 2021 00:37:38 +0000 (17:37 -0700)]
gold kicking bit

One of the gold kicking changes I had pending.  The "Thwwpingg"
message is obviously intended as a sound effect so shouldn't be
given if the hero is Deaf.

4 years agowishing fixes
PatR [Sun, 11 Jul 2021 00:13:46 +0000 (17:13 -0700)]
wishing fixes

Changes in wish parsing included with figurine gender implementation
3 or so weeks ago accidentally broke asking for "large box" and
possibly other stuff.

Re-do "paperback book" handling to accept "paperback" and "paperback
book" but to reject previously accepted "paperback spellbook" when
wishing for a novel by description.

4 years agofixes37.0 update for gold scatter()
nhmall [Sat, 10 Jul 2021 23:46:38 +0000 (19:46 -0400)]
fixes37.0 update for gold scatter()

4 years agodeal with gold leaving shop via scatter()
nhmall [Sat, 10 Jul 2021 23:41:55 +0000 (19:41 -0400)]
deal with gold leaving shop via scatter()

fixes #538

4 years agoget rid of some recent signed/unsigned mismatches
nhmall [Sat, 10 Jul 2021 11:42:27 +0000 (07:42 -0400)]
get rid of some recent signed/unsigned mismatches

src/mkroom.c(529): warning C4389: '!=': signed/unsigned mismatch
src/sp_lev.c(981): warning C4389: '==': signed/unsigned mismatch
src/sp_lev.c(983): warning C4389: '==': signed/unsigned mismatch
src/sp_lev.c(985): warning C4389: '==': signed/unsigned mismatch
src/sp_lev.c(987): warning C4389: '==': signed/unsigned mismatch
src/sp_lev.c(989): warning C4389: '==': signed/unsigned mismatch

4 years agoindex out of bounds eating standard eggs
nhmall [Sat, 10 Jul 2021 11:25:12 +0000 (07:25 -0400)]
index out of bounds eating standard eggs

Closes #547

4 years agoMerge branch 'pr547' into NetHack-3.7
nhmall [Sat, 10 Jul 2021 11:20:49 +0000 (07:20 -0400)]
Merge branch 'pr547' into NetHack-3.7

4 years agoFixed two index out of bounds errors when eating standard eggs. Their corpsenm is...
janne-hmp [Sat, 10 Jul 2021 08:47:22 +0000 (11:47 +0300)]
Fixed two index out of bounds errors when eating standard eggs. Their corpsenm is -1, resulting in index being out of bounds in mons array.

4 years agonovel named Thud!
PatR [Sat, 10 Jul 2021 02:56:10 +0000 (19:56 -0700)]
novel named Thud!

Accept "Thud" as an alternate spelling for "Thud!" when parsing novel
titles.

4 years agowishing for "paperback book"
PatR [Sat, 10 Jul 2021 02:40:52 +0000 (19:40 -0700)]
wishing for "paperback book"

Something I noticed recently:  a wish request for "paperback book"
yielded "Nothing fitting that description exists in the game."
Asking for "paperback spellbook" worked though.

I'm not sure whether this is the best way to handle this particular
exception but wishing for "paperback book" now works.

4 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Fri, 9 Jul 2021 15:24:07 +0000 (11:24 -0400)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

4 years agoFix des.room doors
Pasi Kallinen [Fri, 9 Jul 2021 17:31:47 +0000 (20:31 +0300)]
Fix des.room doors

Fix special level des.room shop doors broken by my recent commit.
Mark the shopdoor error as impossible, so the fuzzer stops there.

4 years agoKeep swamp within the room boundaries
Pasi Kallinen [Fri, 9 Jul 2021 15:34:42 +0000 (18:34 +0300)]
Keep swamp within the room boundaries

If a swamp special room was generated in an irregular room, it could
go outside the boundaries of that room.

Fixes #546

4 years agoAdd a new bigroom variant "boulder maze"
Pasi Kallinen [Fri, 9 Jul 2021 15:16:48 +0000 (18:16 +0300)]
Add a new bigroom variant "boulder maze"

4 years agofix pull request #544 - fire vortex engulf
PatR [Fri, 9 Jul 2021 13:51:10 +0000 (06:51 -0700)]
fix pull request #544 - fire vortex engulf

of hero carrying burning objects shouldn't cause those to be
extinguished.  Ditto when fire vortex or poly'd hero engulfs
monsters.

Fixes #544

4 years agoImprove special level shop and door linking
Pasi Kallinen [Fri, 9 Jul 2021 10:13:26 +0000 (13:13 +0300)]
Improve special level shop and door linking

When creating a shop via des.region, allow creating the shop door
either with a map character in a des.map, or with des.door
before or after the shop region.

Also allow a shop door to open directly into another shop.

4 years agotribute update: Carpe Jugulum
PatR [Fri, 9 Jul 2021 02:13:26 +0000 (19:13 -0700)]
tribute update: Carpe Jugulum

Add four new passages to Carpe Jugulum, bringing total to 12.

A couple of fixes for the Fifth Elephant are mixed in:  page reference
and italics for passage #1, correct the spelling of "doublet" in #9.

4 years agoMark some extended commands as no-fuzzer
Pasi Kallinen [Thu, 8 Jul 2021 08:35:40 +0000 (11:35 +0300)]
Mark some extended commands as no-fuzzer

... instead of checking the fuzzer being on in the commands themselves.

4 years agoFix error marking scroll as used up
Pasi Kallinen [Thu, 8 Jul 2021 07:22:10 +0000 (10:22 +0300)]
Fix error marking scroll as used up

Forgot to change this when reorganizing the scroll effects
into separate functions.

4 years agoFix movecmd always returning a direction
Pasi Kallinen [Thu, 8 Jul 2021 04:49:28 +0000 (07:49 +0300)]
Fix movecmd always returning a direction

My recent commit broke the 'm' (menu request) -prefix, because
a thinko in movecmd made it always return a direction.

4 years agoSplit can-engrave checks out of engraving function
Pasi Kallinen [Wed, 7 Jul 2021 13:41:58 +0000 (16:41 +0300)]
Split can-engrave checks out of engraving function

4 years agodo vs2017 warnings.h a little differently than vs2019
nhmall [Wed, 7 Jul 2021 13:05:22 +0000 (09:05 -0400)]
do vs2017 warnings.h a little differently than vs2019

fixes #545

4 years agoSplit potion effects into separate functions
Pasi Kallinen [Wed, 7 Jul 2021 09:54:35 +0000 (12:54 +0300)]
Split potion effects into separate functions

4 years agoSplit scroll effects into separate functions
Pasi Kallinen [Wed, 7 Jul 2021 09:02:59 +0000 (12:02 +0300)]
Split scroll effects into separate functions

4 years agofix github issue #542 - clumsy "it" message
PatR [Mon, 5 Jul 2021 00:47:04 +0000 (17:47 -0700)]
fix github issue #542 - clumsy "it" message

when encountering a hiding monster that's still unseen after being
revealed (so most likely invisible when hero lacks see invisible).
Change
|Wait!  There's an it hiding under <an object>!
to
!Wait!  There's something hiding under <an object>!
when hero tries to move onto the object.

Also, when a hidden monster reveals itself by attacking, change
|It was hidden under <an object>!
usually followed by "It hits." or "It misses."
to
|Something was hidden under <an object>!
without changing whatever follows.

Fixes #542

4 years agoAllow using rush/run prefix to fastmove in getloc
Pasi Kallinen [Sat, 3 Jul 2021 14:22:25 +0000 (17:22 +0300)]
Allow using rush/run prefix to fastmove in getloc

4 years agoMovement key reworking
Pasi Kallinen [Sat, 3 Jul 2021 12:19:53 +0000 (15:19 +0300)]
Movement key reworking

Put the rush and run movement keys into g.Cmd instead of bit twiddling
the normal walk keys in multiple places to get the run and rush keys.

Allow meta keys in getpos. Use the normal running keys to fast-move
in getpos, instead of explicit HJKL - I polled couple places online,
and number_pad users did not use the HJKL keys in getpos.

Make meta keys work even after a prefix key.

4 years agofix pull request #541 - itemized shop billing
PatR [Sat, 3 Jul 2021 01:52:17 +0000 (18:52 -0700)]
fix pull request #541 - itemized shop billing

when perm_invent is displayed.  The persistent inventory window
showed unpaid items with their prices, but when using itemized
billing those prices went away when an item was purchased.

The prices and item-by-item prompting continued correctly with
remaining unpaid items; only the perm_invent display was affected.

Fixes #541

4 years agoSplit coord truncate-to-map into separate function
Pasi Kallinen [Thu, 1 Jul 2021 11:29:04 +0000 (14:29 +0300)]
Split coord truncate-to-map into separate function

4 years agofix #K3378 - quaffing lit potion of oil
PatR [Thu, 1 Jul 2021 00:33:18 +0000 (17:33 -0700)]
fix #K3378 - quaffing lit potion of oil

should cure sliming.  Implement the suggestion that quaffing a
burning potion of oil while turning into green slime will cure the
latter.

It's somewhat iffy since the slime is on the outside moving in and
the burning oil ends up on the inside, but the message sequence is
|You burn your face.
|The slime that covers you is burned away!
and it could be that igniting part of the slime quickly spreads to
the rest.

Implemented for monsters as well as for the hero.  They will light
and drink the oil in a single turn in the extremely rare situation
where they actually have a potion of oil and need to use it.

4 years agoFix swapped DIR_UP and DIR_DOWN
Pasi Kallinen [Mon, 28 Jun 2021 20:31:32 +0000 (23:31 +0300)]
Fix swapped DIR_UP and DIR_DOWN

I don't think this had any effect on gameplay, but it was still wrong.

4 years agoMissed couple direction enum places
Pasi Kallinen [Mon, 28 Jun 2021 14:41:04 +0000 (17:41 +0300)]
Missed couple direction enum places

4 years agoUse enums and defines for directions
Pasi Kallinen [Sun, 27 Jun 2021 12:31:00 +0000 (15:31 +0300)]
Use enums and defines for directions

4 years agoweb spinning tweak for Sokoban
PatR [Sun, 27 Jun 2021 00:06:37 +0000 (17:06 -0700)]
web spinning tweak for Sokoban

When spiders try to spin webs, don't let them do so in Sokoban
unless the level has already been solved or the spider can see the
stairs up (which was the simplest way I could achieve something
close to "is in the same room as the stairs up") where it can't
interfere with solving the level.

4 years agoExplicitly check for not STONE in corridor join
Pasi Kallinen [Sat, 26 Jun 2021 13:59:07 +0000 (16:59 +0300)]
Explicitly check for not STONE in corridor join

... instead of relying STONE being 0

4 years agoClear all room data
Pasi Kallinen [Sat, 26 Jun 2021 12:10:38 +0000 (15:10 +0300)]
Clear all room data

Restoring a level cleared residence pointer from those subrooms
which were in the restored level, but if the previous level had
more subrooms, those pointers weren't cleared.
This caused weird problems when a shopkeeper data was looked
up based on the subroom number.

Just to be safe, clear all the room data when freeing the level.

4 years agoFix strange object mimic in shop sanity error
Pasi Kallinen [Sat, 26 Jun 2021 10:00:32 +0000 (13:00 +0300)]
Fix strange object mimic in shop sanity error

Shop population code set the mimic shape to strange object
without checking for protection from shape changers.
Let set_mimic_sym (via makemon) handle it correctly instead.

4 years agostill more "<mon> appears in a cloud of smoke"
PatR [Fri, 25 Jun 2021 21:43:14 +0000 (14:43 -0700)]
still more "<mon> appears in a cloud of smoke"

For Angels who appear in a flash of light, temporarily light the
spot where they arrive.  If not previously visible, it will go back
to dark and change the angel to the remembered, unseen monster glyph,
usually before the player even notices.

Add more monsters to msummon_environ() so that it has latent support
for various light, fire, and lava creatures from mondata.h even
though these extra ones, like previous vortices, don't get summoned
by msummon().

4 years agotribute update: The Last Continent
PatR [Fri, 25 Jun 2021 21:29:07 +0000 (14:29 -0700)]
tribute update: The Last Continent

Add page citation to passage 2.

Add four new passages, bringing total to 14.

4 years agoAdjust shopkeeper damage fixing
Pasi Kallinen [Fri, 25 Jun 2021 16:50:02 +0000 (19:50 +0300)]
Adjust shopkeeper damage fixing

Allow shopkeeper to remove webs and pits.

Change the damage fix messaging to be more specific when
shopkeeper removes a trap. Before this the message was
"A trap was removed from the floor", which sounds really silly
when it comes to holes.

Change the damage fixing so the shopkeeper will fix one damage spot
at a time (instead of all at once), so it's more like a monster action.

Some code cleanup, splitting into smaller functions.

While doing this, I noticed that shopkeepers don't actually bill
the hero for the damage, but that'll have to be another commit...

4 years agoFix thinko in the shk litter indexing
Pasi Kallinen [Fri, 25 Jun 2021 10:39:26 +0000 (13:39 +0300)]
Fix thinko in the shk litter indexing

4 years agoReorg shopkeeper litter routine
Pasi Kallinen [Fri, 25 Jun 2021 10:22:19 +0000 (13:22 +0300)]
Reorg shopkeeper litter routine

When shopkeeper fixes a wall and there are items on that location,
shopkeeper tries to move those items into their shop. Split
the code dealing with that into separate functions.

4 years agoExpose stairway data to lua
Pasi Kallinen [Thu, 24 Jun 2021 15:55:20 +0000 (18:55 +0300)]
Expose stairway data to lua

4 years agowarning in trap.c that recently appeared
nhmall [Thu, 24 Jun 2021 12:52:43 +0000 (08:52 -0400)]
warning in trap.c that recently appeared

src/trap.c(5410): warning C4389: '==': signed/unsigned mismatch

4 years agoAllow some makemon flags in lua monster creation
Pasi Kallinen [Thu, 24 Jun 2021 11:38:01 +0000 (14:38 +0300)]
Allow some makemon flags in lua monster creation

Also document the des.monster hash parameter values.

4 years agoAllow spiders to spin webs
Pasi Kallinen [Wed, 23 Jun 2021 19:42:29 +0000 (22:42 +0300)]
Allow spiders to spin webs

Revisited this feature, and the chance of a spider spinning a web
depends now on the number of webs already present on the level.

For a giant spider to spin a web in the middle of a room with no
supports, the limit of existing webs is 4, next to one support 9,
next to two supports 14, and so on. Cave spider limits are much lower.

4 years agomore "<mon> appears in a cloud of smoke"
PatR [Tue, 22 Jun 2021 00:47:51 +0000 (17:47 -0700)]
more "<mon> appears in a cloud of smoke"

Now that the appear message isn't limited to summoning by demon,
seeing "the Angel of <foo> appears in a cloud of smoke" seems
strange.  Angels weren't covered by the vapor/dust/&c change for
elementals.  Make angels appear in a flash of light.

4 years agomonster name formatting
PatR [Tue, 22 Jun 2021 00:44:35 +0000 (17:44 -0700)]
monster name formatting

While testing monster summoning by using a debugger to force the
outcome, I saw "the renegade Angel of <foo> appears in a cloud of
smoke" as if only one such creature existed.  Trying to change
that to "a renegate Angel" pointed out some problems:  type names
like Angel, Green-elf, and Uruk-hai fool an() into using "the"
because of their capital letter.  Fixing that was a bit of a hack
and worked for Green-elf and Uruk-hai but not for Angel because
it has the eminion extension so uses priestname() instead of the
guts of x_monnam().  Fixing that involved more hackery and now I
feel unclean, but it seems to be working.

It wasn't as noticeable as it might have been because most of the
time that "the Angel of <foo>" or "the priest of <bar>" was shown,
the caller is requesting "the" rather than "a/an".

4 years agok-sound follow-up
nhmall [Mon, 21 Jun 2021 19:56:14 +0000 (15:56 -0400)]
k-sound follow-up

4 years agorevisit k-sounding ch suffix
nhmall [Mon, 21 Jun 2021 19:42:49 +0000 (15:42 -0400)]
revisit k-sounding ch suffix

put k-sounding suffix exception checks into a function

4 years agoDehardcode number of glass gems
Pasi Kallinen [Mon, 21 Jun 2021 07:06:46 +0000 (10:06 +0300)]
Dehardcode number of glass gems

4 years ago"<foo> appears in cloud of smoke."
PatR [Sun, 20 Jun 2021 23:45:42 +0000 (16:45 -0700)]
"<foo> appears in cloud of smoke."

Have water demons appear in a cloud of vapor rather than a cloud of
smoke.  This adds a few other alternatives but they'll never happen.
Elementals could only be summoned by Angels but Angels never call
msummon() as far as I can tell.  Vortices aren't summoned at all
but the smoke/vapor/&c routine has provisions for them.

The cloud of smoke message used to be given only when the summoner
is a demon.  Now it will be given if the last--or only--summoned
creature can be seen to arrive, no matter whether summoned by a
demon, a non-demon (which I think isn't possible), or post-Wizard
harassment.

4 years agofix monarch pluralization
nhmall [Sun, 20 Jun 2021 11:51:53 +0000 (07:51 -0400)]
fix monarch pluralization

4 years agotribute: Jingo
PatR [Fri, 18 Jun 2021 21:51:21 +0000 (14:51 -0700)]
tribute: Jingo

Add two new passages to Jingo, bringing the total to 14.

4 years agogender for figurines
PatR [Thu, 17 Jun 2021 23:03:45 +0000 (16:03 -0700)]
gender for figurines

Use (obj->spe & CORPSTAT_GENDER) for figurines as well as for
statues and corpses.

Support wishing for
 "{female,male,neuter} {corpse,statue,figurine} [of <monster>]".
and
 "{female,male,neuter} <monster> {corpse,statue,figurine}".
Also
 "{corpse,statue,figurine} of {female,male,neuter} <monster>"
where the qualifier might be in the middle instead of a prefix.

4 years agofix the "fix obj_pmname() fix"
PatR [Wed, 16 Jun 2021 21:22:03 +0000 (14:22 -0700)]
fix the "fix obj_pmname() fix"

Avoid using montraits when determining pmname of a corpse or statue.

4 years agoSilence couple warnings of possibly uninitialized vars
Pasi Kallinen [Wed, 16 Jun 2021 19:08:04 +0000 (22:08 +0300)]
Silence couple warnings of possibly uninitialized vars

4 years agoMinor code reorg: finding longest option name
Pasi Kallinen [Wed, 16 Jun 2021 11:53:05 +0000 (14:53 +0300)]
Minor code reorg: finding longest option name

4 years agoAdd assistance to fire-command
Pasi Kallinen [Wed, 9 Jun 2021 06:02:31 +0000 (09:02 +0300)]
Add assistance to fire-command

Allows the fire-command to autowield a launcher; it will now
do either swapweapon or wield an appropriate launcher, if you
have ammo quivered.

This assistance can be turned off with the fireassist boolean option.

Adds a rudimentary command queue, which allows the code to add keys
or extended commands into the queue, and they're executed as if
the user did them.  Time passes normally when doing the queue,
and the queue will get cleared if hero is interrupted.

4 years agofix bullwhip-induced panic
PatR [Wed, 16 Jun 2021 01:42:30 +0000 (18:42 -0700)]
fix bullwhip-induced panic

While testing some corpse/statue name manipulation changes I managed
to trigger a panic during end-of-game cleanup.  Using a bullwhip to
snatch a wielded cockatrice corpse from a monster's inventory into
the hero's inventory and being turned to stone due to lack of gloves
took the corpse out of the monster's inventory but didn't place it
anywhere.  If no life-saving took place, it led to an "obj_is_local"
panic during timer cleanup when freeing the level.

This patch includes some of the stuff I've been testing rather than
just the fix for the panic (which is the very last bit of the diff).

4 years agofix obj_pmname() fix
PatR [Tue, 15 Jun 2021 21:13:55 +0000 (14:13 -0700)]
fix obj_pmname() fix

The omonst 'data' pointer is always Null so taking mons[].pmname from
saved traits would be skipped all the time.

4 years agofixes37.0 entry update
nhmall [Tue, 15 Jun 2021 20:30:07 +0000 (16:30 -0400)]
fixes37.0 entry update

4 years agonull pointer dereference in do_name.c
nhmall [Tue, 15 Jun 2021 19:49:31 +0000 (15:49 -0400)]
null pointer dereference in do_name.c

fixes #534

4 years agomon_pmname(), obj_pmname()
PatR [Sat, 12 Jun 2021 10:07:30 +0000 (03:07 -0700)]
mon_pmname(), obj_pmname()

Revive some code from 5 or so years ago that's been sitting in a
defunct local git branch.  There are a couple of references to
figurines having gender; the old, unfinished code did already have
support for that, the current code doesn't.  It probably won't take
much effort to add it in but I want to get this first part out of
the way.

Replace some of the
pmname(mon->data, Mgender[mon]) calls with simpler
mon_pmname(mon) and some
pmname(&mons[statue->corpsenm],
   (statue->spe & CORPSTAT_GENDER) == ... ? ... : ...) with simpler
obj_pmname(obj).  There are other instances of them which haven't
been changed but could be.

4 years agocorpse/statue gender fix when wishing
PatR [Sat, 12 Jun 2021 09:25:16 +0000 (02:25 -0700)]
corpse/statue gender fix when wishing

Wishing for "{corpse,statue} of gnome queen" would produce a corpse or
statue of a gnome queen, but wishing for "gnome queen {corpse,statue}"
would produce corpse or statue of a gnome king.  The matching for
gender-specific monster name was only passing back the corresponding
gender when an exact match occurred (which happens for "foo of pmname"
but not for "pmname foo" since 'pmname' through end of string is what
the name_to_mon() matching code is looking at).

4 years agonethack --showpaths output tweak
nhmall [Thu, 10 Jun 2021 16:12:31 +0000 (12:12 -0400)]
nethack --showpaths output tweak

Don't display a portable_device_path in --showpaths output if it is
empty or not being used.

4 years agotribute update: Hogfather
PatR [Wed, 9 Jun 2021 23:45:37 +0000 (16:45 -0700)]
tribute update: Hogfather

Add three new passages for Hogfather, bringing total to 13.

4 years agoFollow-up to earlier warning correction with Microsoft compiler
nhmall [Wed, 9 Jun 2021 01:51:55 +0000 (21:51 -0400)]
Follow-up to earlier warning correction with Microsoft compiler

The earlier warning is architecture-dependent.

The warning showed up under an x64 build, but not an x86 build.
The __unaligned keyword is not supported under an x86 build.

Refine the preprocessor conditional.

4 years agoissue #531 followup
PatR [Tue, 8 Jun 2021 23:38:43 +0000 (16:38 -0700)]
issue #531 followup

Set gender before creating monster rather than after the fact
to force display to show it correctly.

4 years agoMicrosoft compiler warning building tile2bmp.c
nhmall [Tue, 8 Jun 2021 18:38:47 +0000 (14:38 -0400)]
Microsoft compiler warning building tile2bmp.c
..\win\share\tile2bmp.c(234): warning C4366: The result of the unary '&'
operator may be unaligned

4 years agoanother nhsetup.bat tweak
nhmall [Tue, 8 Jun 2021 18:15:36 +0000 (14:15 -0400)]
another nhsetup.bat tweak

4 years agono need to check vs version in nhsetup.bat
nhmall [Tue, 8 Jun 2021 17:56:02 +0000 (13:56 -0400)]
no need to check vs version in nhsetup.bat

4 years agofix github issue #531 - genderless corpses
PatR [Tue, 8 Jun 2021 10:43:46 +0000 (03:43 -0700)]
fix github issue #531 - genderless corpses

Dead monsters that had traits saved with the corpse would revive as
the same gender, but ordinary corpses revived with random gender so
could be different from before they got killed.

Since corpses of monsters lacked gender, those for monsters with
gender-specific names were described by the neuter name.

This is a fairly big change for a fairly minor problem and needs a
lot more testing.

Fixes #531

4 years agocurses color cleanup
PatR [Sun, 6 Jun 2021 22:23:39 +0000 (15:23 -0700)]
curses color cleanup

The color handling changes for curses left a set of variables
unused, so get rid of them.

4 years agofix github issue #530 - weapon skill enlightenment
PatR [Sun, 6 Jun 2021 20:38:49 +0000 (13:38 -0700)]
fix github issue #530 - weapon skill enlightenment

^X feedback and end of game disclosure reported
 Your two weapon skill {is,was} [also] limited by being <skill rating>
 with with <secondary weapon>.
when the skill rating for the secondary weapon is/was less than the
skill rating for two-weapon combat.  The corresponding message for
primary weapon did not duplicate the word "with".

Fixes #530

4 years agoChange autopickup and color default values
Pasi Kallinen [Sun, 6 Jun 2021 16:02:10 +0000 (19:02 +0300)]
Change autopickup and color default values

Change the default value of autopickup to off. Having it on is
harmful for new players, making them very easily burdened.
We can't expect new players to know how to configure
pickup_types, pickup_burden, and pickup exceptions.

Change the default value of color to on. We can safely assume
new users have a terminal that supports color, and most people
want color.

4 years agocurses menu: support backspace/delete for counts
PatR [Sun, 6 Jun 2021 12:54:53 +0000 (05:54 -0700)]
curses menu: support backspace/delete for counts

Have curses call the core get_count() routine instead rolling its
own so that backspace and delete are supported.  That part was
trivial to accomplish.  Unfortunately it brought the disappearing
menu phenomenon back so it became more complicated overall.

4 years agofix #K3357 - curses menu disappears
PatR [Sat, 5 Jun 2021 23:11:50 +0000 (16:11 -0700)]
fix #K3357 - curses menu disappears

This fixes the disappearing menu, but not curses menu count entry
failing to honor backspace/delete.  Entering two or more digits
to get a "Count:12" message, followed by non-digit which removes
that, resulted in the menu for apply/loot in-out container operation
vanishing while it was still waiting for a choice.  (Typing a choice
blindly did work.)

The code intended to handle this.  I don't understand why refresh()
wasn't working.  Reordering stuff didn't help until I changed that
from refresh() to wrefresh(win).

The original Count:123 display was limited to 25 characters and
menus to half the main window, so they didn't overlap.  I made the
count display wider--because it is now also used for 'autodescribe'
feedback when moving the cursor around the map--so made something
that originally was impossible become possible.  One line of the
menu does get erased while "Count:" is displayed, but then gets put
back by the wrefresh().

4 years agofix pull request #527 - cursed levitation
PatR [Sat, 5 Jun 2021 22:37:03 +0000 (15:37 -0700)]
fix pull request #527 - cursed levitation

The stair handling reorganization changed drinking a cursed potion
of levitation to only check whether stairs up existed on the level
instead of whether the hero drank the potion while at their spot.
That resulted in always attempting to go up and then getting "you
can't go up here" when not at stairs instead of the intended "you
hit your head on the ceiling".

Fixes #527

4 years agofix pull request #526 - 'menucolor' help message
PatR [Sat, 5 Jun 2021 22:17:55 +0000 (15:17 -0700)]
fix pull request #526 - 'menucolor' help message

being given when it shouldn't be.  A change for perm_invent handling
back in March screwed up the if/then/else logic for code executed
when finishing MENUCOLOR manipulation via the 'O' command.  That
resulted in the reminder to set menucolors to True being given even
when it was already True if perm_invent happened to be False.

I noticed this myself recently, then neglected to investigate it or
even write it down anywhere.

Fixes #526

4 years agocurses: remove unnecessary special handling for dark gray
Patric Mueller [Fri, 4 Jun 2021 09:06:47 +0000 (11:06 +0200)]
curses: remove unnecessary special handling for dark gray

On terminals with at least 16 colors there should be no need for special
handling dark gray.

The curses code uses COLORS < 16, COLORS <= 16, COLORS > 16, or COLORS >= 16
at several places although I'm not sure if they are correct or which could
possibly be off-by-one errors.

But realistically in this case, we only need to distinguish between 8 color
terminals and terminals supporting more than 8 colors as this will mean the
terminal supports at least 256 colors.

4 years agocurses: don't change the terminal's default colors
Patric Mueller [Fri, 4 Jun 2021 08:36:56 +0000 (10:36 +0200)]
curses: don't change the terminal's default colors

The curses port changed some of the basic 8 terminal colors and all 8 bright
colors on terminals supporting changing colors.

4 years agonuget restore task
nhmall [Sat, 5 Jun 2021 03:01:49 +0000 (23:01 -0400)]
nuget restore task

4 years agowindows substitution error in gcc Makefile
nhmall [Sat, 5 Jun 2021 01:46:03 +0000 (21:46 -0400)]
windows substitution error in gcc Makefile

4 years agoa few formatting bits for zap.c
PatR [Fri, 4 Jun 2021 22:51:36 +0000 (15:51 -0700)]
a few formatting bits for zap.c

4 years agowindsys.c name tidbit
nhmall [Fri, 4 Jun 2021 12:51:42 +0000 (08:51 -0400)]
windsys.c name tidbit

4 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Fri, 4 Jun 2021 12:49:47 +0000 (08:49 -0400)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

4 years agomsdos Install.dos tidbit
nhmall [Fri, 4 Jun 2021 12:49:20 +0000 (08:49 -0400)]
msdos Install.dos tidbit

4 years agoDon't bind quit to any key by default
Pasi Kallinen [Fri, 4 Jun 2021 06:13:27 +0000 (09:13 +0300)]
Don't bind quit to any key by default

Quit is not a commmand you usually need very often, and generally
don't want to use by accident.

Apparently, on Spanish keyboard layout, n-with-tilde is interpreted
by the Windows NetHack as M-q, and the key is next to l. Loot also
asks for confirmation, just like quit.

Prevent stuff like this by not binding the quit command to any key.

4 years agocron daily Files update
nhmall [Fri, 4 Jun 2021 04:27:20 +0000 (00:27 -0400)]
cron daily Files update

4 years agowindows doc update tidbit
nhmall [Fri, 4 Jun 2021 04:24:46 +0000 (00:24 -0400)]
windows doc update tidbit

4 years agoWindows build warning and Makefile update
nhmall [Fri, 4 Jun 2021 04:14:37 +0000 (00:14 -0400)]
Windows build warning and Makefile update

.\hack.c(2657): warning C4389: '!=': signed/unsigned mismatch
Visual Studio autodetection update for Makefile.msc

4 years agopipelines update
nhmall [Fri, 4 Jun 2021 04:01:37 +0000 (00:01 -0400)]
pipelines update

4 years agowindows and visual studio follow-up bit
nhmall [Fri, 4 Jun 2021 03:43:32 +0000 (23:43 -0400)]
windows and visual studio follow-up bit

4 years agochange references from winnt to windows
nhmall [Thu, 3 Jun 2021 16:14:27 +0000 (12:14 -0400)]
change references from winnt to windows

rename sys/winnt to sys/windows
move vs (visual studio) folder out of win/win32 and into sys/windows
rename include/ntconf.h to include/windconf.h
rename winnt.c to windsys.c
place visual studio projects into individual subfolders.

This will hopefully resolve GitHub issue #484 as well.

4 years agounix/Makefile.top fetch-Lua bit
PatR [Thu, 3 Jun 2021 00:13:56 +0000 (17:13 -0700)]
unix/Makefile.top fetch-Lua bit

% make spotless
% sh sys/unix/setup.sh sys/unix/hints/macOS.2020
% make fetch-Lua

worked, but the last ended with

|rm include/nhlua.h
|rm: include/nhlua.h: No such file or directory
|make: [fetch-Lua] Error 1 (ignored)

which might frighten skittish users (like me).  Check whether the
constructed header file exists (so is assumed to be for an earlier
Lua version) and only delete it in that case.  No more scary report
of benign failure when it isn't there (after 'make spotless' or for
brand new source setup).

Also, some time ago we came to the conclusion that 'if [ ]' was an
extension for GNU 'bash' and wouldn't work with some older actual
'sh' implementations.  This replaces the one post-3.6 instance of
|if [ ! -d foo ] then bar; fi
in Makefile.top with
|if test -d foo; then true; else bar; fi
Testing was successful but done with bash rather than an old sh. :-}

4 years agoMakefile command echo suppression
nhmall [Wed, 2 Jun 2021 23:21:37 +0000 (19:21 -0400)]
Makefile command echo suppression

4 years agosupport for build with current Lua version 5.4.3
nhmall [Wed, 2 Jun 2021 23:12:47 +0000 (19:12 -0400)]
support for build with current Lua version 5.4.3

On some platforms this may require:
make spotless
make fetch-lua

I did attempt to force a reminder message about the latter to
Makefile.top this time, and hope that works correctly for everyone.

4 years agofix pull request #521 - valk+warrior alignment
PatR [Wed, 2 Jun 2021 00:14:50 +0000 (17:14 -0700)]
fix pull request #521 - valk+warrior alignment

Valkyrie player monster was set to be chaotic even though valk
hero is lawful by default and can also be neutral but not chaotic.
Change it to be lawful.  Warrior quest monsters attending leader
were also chaotic; change to lawful to match revised valk.  If
hero is a neutral valk then both the player monster and warriors
get changed to neutral at start of game (and stay that way even
if hero changes alignment).  The leader defaults to neutral but
gets changed to lawful for lawful valk hero.

Attentdant quest monsters with the healer leader were lawful but
if they gain enough experience they get promoted to healer, so
make them neutral like the latter.

I've added some miscellaneous comments and done a small amount of
reformatting.  Comment about alignment changing in bones applies
to all roles that can be played with different alignments, not
just to valkyries.  It isn't new; I just thought that it ought to
be mentioned somewhere.

Fixes #521