Commit Graph
280 Commits
Author SHA1 Message Date
nhmall d132093595 Merge branch 'NetHack-3.6' 2019-11-18 15:15:37 -05:00
nhmall 450957bfe9 further refine k-sound pluralization 2019-11-18 13:23:13 -05:00
nhmall db52f15101 Merge branch 'NetHack-3.6' 2019-11-16 17:01:49 -05:00
nhmall d74718fc2b likely final pluralization change for today 2019-11-16 14:17:11 -05:00
nhmall 5b7940ecb5 Merge branch 'NetHack-3.6' 2019-11-16 10:22:52 -05:00
nhmall cdbad827fe reinstate bit - gak! 2019-11-16 10:15:55 -05:00
nhmall 340851ecf5 Revert "more pluralization"
This reverts commit 6a3dcc6a38.
2019-11-16 10:13:49 -05:00
nhmall 6a3dcc6a38 more pluralization 2019-11-16 10:08:21 -05:00
nhmall 8b1c6148f6 improve pluralization on some words ending with a k-sound
fixes #245
2019-11-16 08:27:07 -05:00
nhmall 75d22a2dbf separate MAIL functionality from MAIL-related structure inclusion
With 3.7+ aspirations of improving savefile interoperability between 32-bit
and 64-bit builds, as well as between platforms, it is better to not have
the underlying struct/array content be conditional.

This splits off some of the MAIL code into MAIL_STRUCTURES code. In theory,
since MAIL_STRUCTURES is unconditionally included, the macro could
just go away and leave that code unconditional, but this commit doesn't
go that far.
2019-11-09 16:19:05 -05:00
nhmall afec87a766 Merge branch 'NetHack-3.6' 2019-11-09 12:24:10 -05:00
PatR 0615387f95 fix #H9391 - slippery gloves
Slippery fingers would transfer from bare hands to gloved hands if
you put gloves on.  The reverse, transfering from gloves to bare
hands when taking gloves off, was already being prevented for
directly taking them off, but still allowed the slipperiness to
transfer when gloves were lost.  This prevents putting on gloves
when fingers are slippery and attempts to handle cases where gloves
get unworn by ways other than 'T' (or 'R') or 'A'.

There's no slippery attribute for objects (way too much work for too
little value); slippery gloves is just the combination of wearing
gloves and having slippery fingers (which now has to have happened
while already wearing those gloves).  This changes inventory to use
"(being worn; slippery)" when applicable and much of the patch deals
with funnelling Glib changes through new make_glib() to try to make
sure that persistent inventory adds or removes "; slippery" right
away when changes happen.

If gloves are taken off involuntarily (shapechange to a form that
can't wear them, destruction via scroll of destroy armor or monster
spell of same or via overenchantment, theft), slippery fingers ends
right away instead of the usual few turns later.
2019-11-09 01:07:09 -08:00
nhmall 3dd7325ff1 Merge branch 'NetHack-3.6' 2019-10-19 12:30:38 -04:00
PatR f114675739 containers in shops
Fix a couple of bugs I stumbled across while testing something else.
The sell prompt for a container dropped in a shop had phrasing issues.
This fixes a couple but there are more.  The message composition
assumes that contents fall into two categories:  those already owned
by the shop and those the shopkeeper is offering to buy from the hero.
But there is a third:  stuff the shopkeeper doesn't care about so
won't buy.  The count_contents() routine can supply total contents or
shop-owned contents.  Subtracting one from the other yields combined
hero-owned without any way to separate out shk-cares and don't-care.
2019-10-18 15:00:16 -07:00
nhmall 0d34f43830 remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR from core 2019-07-14 17:24:58 -04:00
nhmall 505c1e4b02 Merge branch 'master' into NetHack-3.7 2019-07-13 00:38:40 -04:00
nhmall 77fd719e05 Merge branch 'NetHack-3.6' 2019-07-13 00:38:10 -04:00
nhmall 638d9f9363 if prototype is declared static make function static to match
Today, a compiler was encountered that considered it an error
to have the prototype declared static and the function body
not
2019-07-13 00:17:23 -04:00
nhmall ddf816ba96 Merge branch 'master' into NetHack-3.7 2019-07-03 18:27:11 -04:00
nhmall 21de4c06ef Merge branch 'NetHack-3.6' 2019-07-03 18:25:55 -04:00
PatR 4a74968a58 shk doname for containers
Rescue some old code from bit rot.  It may be useful if the shop
side of things ever gets fixed.  (Itemized billing reveals container
contents.  I'm sure that it's in the bugzilla list but can't find it.)
2019-07-03 13:43:24 -07:00
nhmall ba0f6ed47f updated files 2019-06-23 00:57:38 -04:00
nhmall 7698e27eed Merge branch 'NetHack-3.6' 2019-06-20 22:33:33 -04:00
PatR 2fe57af3f3 fix #H8833 - wishing for "<foo> amulet"
and receiving a random amulet instead of an "amulet of <foo>".
Although the failure to produce the 'right' amulet wasn't a regression
compared to earlier versions as the report indicated, supporting that
wish is straightforward.
2019-06-20 18:42:35 -07:00
nhmall fea4fd0e00 Merge branch 'NetHack-3.6' 2019-06-10 18:04:45 -04:00
PatR 9ee6e1c839 wizweight vs globs
The wizard mode runtime option 'wizweight' appends an object's weight
to its formatted description, but that was skipped for globs on the
assumption that it had already been included.  But that inclusion only
happens in shops so most globs lacked weight feedback.
2019-06-10 09:52:34 -07:00
PatR a27ca52b03 vampshifting by poly'd hero
Hero polymorphed into a vampire or v.lord can use #monster to switch
to vampire bat or fog cloud [or wolf for lord] but it was a one shot
polymorph.  Remember when current form is a shape-shifted vampire and
allow #monster in shifted form to pick another shifted form or the
vampire form.

Genocide of the alternate shape forces back to base vampire.  Genocide
of base vampire does too, then reverts to human (or dwarf, &c) as
vampires go away.  Being killed while shafe-shifted reverts all the
way to human rather than to vampire.  [Just realized:  interaction
with Unchanging wasn't taken into consideration so hasn't been tested.]

Since 'youmonst' isn't saved and restored, I had to add a field to 'u'
to hold youmonst.cham during save/restore.

Tested with 3.6.2+ and seemed to be working (except saving while
shape-shifted restored as ordinary bat/cloud/wolf because new u.mcham
wasn't there to hold youmonst.cham yet).  Builds with 3.7.0- but not
execution tested yet (I didn't want to clobber my current playground).
2019-06-06 16:51:43 -07:00
nhmall bfc4445537 Merge branch 'NetHack-3.6' 2019-06-05 08:08:32 -04:00
PatR 43afa91ff8 fix #H8850 - bless/curse state in perm_invent
Changing an inventory item's bknown flag wasn't followed by a call to
update_inventory() in many circumstances, so information which should
have appeared wasn't showing up until some other event triggered an
update.
2019-06-04 10:50:24 -07:00
nhmall 9867e9a5d0 Merge branch 'NetHack-3.6' 2019-05-22 00:48:39 -04:00
PatR 1e2e3bf492 ball and chain sanity check revisited
Move some duplicated debugging code into its own routine.
2019-05-21 17:40:57 -07:00
nhmall 8e972874b2 Merge branch 'NetHack-3.6' 2019-05-18 16:30:43 -04:00
nhmall 670fc9ca34 further improve additional glob interaction scenarios within a shop
Scenarios:
1. shop_owned glob merging into shop_owned glob
2. player_owned glob merging into shop_owned glob
3. shop_owned glob merging into player_owned glob
4. player_owned glob merging into player_owned glob
2019-05-18 16:24:48 -04:00
PatR 345c1b719f unpaid glob formatting
Make unpaid (shop owned, that is) globs show same weight information
as for-sale globs.  And don't treat required arguments to globwt() as
if they were optional.
2019-05-17 13:38:34 -07:00
nhmall c33f17940c Merge branch 'NetHack-3.6' 2019-05-17 16:31:26 -04:00
nhmall 2d07b45582 warning bit 2019-05-17 16:30:52 -04:00
nhmall c5fbae0a4c Merge branch 'NetHack-3.6' 2019-05-17 12:06:58 -04:00
nhmall 2aee73642d fix some billing and pricing issues when globs coalesce
payment issue caused by glob coalescing
glob pricing did not consider coalesced weight
2019-05-17 12:04:01 -04:00
nhmall d15496ba31 Merge branch 'NetHack-3.6.2' 2019-04-22 14:36:58 -04:00
nhmall dcf4da2150 preserve dknown field between fakeobj instances
Preserve temporary fake object's previous dknown value by storing it
as a flag value within the m_ap_type field of the posing monster, and
recalling it when it is needed.

This is intended to help eliminate observable differences in price display
between real objects and mimics posing as objects.

98% of this is just switching the code to utilize macro M_AP_TYPE(mon)
everywhere to ensure that the flag bits are stripped off when needed.
2019-04-22 14:17:18 -04:00
nhmall 4f679352b7 Merge branch 'NetHack-3.6.2' 2019-02-27 08:20:38 -05:00
PatR 4df491e47d more wearing armor vs perm_invent window
Realized while fixing #H8271:  if persistent inventory got an update
while wearing or taking off was in progress (not within user's control
since hero is busy) the item in question was flagged as "(being worn)"
even though it wouldn't be worn if putting on got interrupted.  Update
doname() to show "(being donned)" or "(being doffed)" instead of
"(being worn)" when corresponding operation is in progress. (During
testing, I was able to observe "being doffed" but never managed to see
"being donned".)
2019-02-25 15:44:21 -08:00
nhmall b84ff772cc Merge branch 'NetHack-3.6.2' 2019-01-28 16:36:46 -05:00
PatR 30237c73ec fix #H8072 - failing wish segfaults
Having an artifact wish be refused uses zeroobj and code which
followed was attempting to update its weight, triggering a segfault
now that zeroobj is 'const'.
2019-01-28 09:10:52 -08:00
nhmall 58f2218c4e Merge branch 'NetHack-3.6.2' 2019-01-09 07:24:18 -05:00
PatR dd13b10cf2 make zeroany, zeromonst, zeroobj 'const'
They're never modified.  Minor complication:  &zeroobj is used as
a special not-Null-but-not-an-object value in multiple places and
needs to have 'const' removed with a cast in that situation.
2019-01-09 01:13:01 -08:00
nhmall ba67274dbf Merge branch 'NetHack-3.6.2' 2019-01-05 10:28:34 -05:00
PatR ab1bee1778 fix #H7865 - shop prices for container contents
The recent attempt to have looking inside a container show shop
prices had multiple problems.  Worst one was showing shop prices as
if the hero would be buying for items already owned by the hero.
Item handling inside containers on shop floor was inconsistent:  if
shop was selling those items, they would include a price, but if not
selling--either already owned by hero or shopkeeper didn't care about
them--they were only marked "no charge" if hero owned the container.

This is definitely better but I won't be surprised if other obscure
issues crop up.  Gold inside containers on shop floor is always owned
by the shop (credit is issued if it was owned by the hero) but is not
described as such.
2019-01-05 03:21:39 -08:00
nhmall d7194709bd Merge branch 'NetHack-3.6.2' 2018-12-25 16:54:00 -05:00
PatR 3aca92215c prices of items on shop floor
get_cost_of_item() was giving different information from shop #chat
when dealing with containers owned by hero containing objects owned
by the shop.  And when it was legitimately reporting a price of 0,
doname_with_price() wasn't reporting 'no charge' for items inside a
shop that were owned by hero or that shopkeeper didn't care about.

Extend the shop price reveal to far-look, but only when hero and item
being examined are inside the same shop.
2018-12-25 13:48:51 -08:00