]> granicus.if.org Git - nethack/log
nethack
8 years agofix #H4476 - monster class via member of class
PatR [Fri, 12 Aug 2016 01:53:52 +0000 (18:53 -0700)]
fix #H4476 - monster class via member of class

Blessed genocide of "titans" wiped out all quadrupeds because
"titan" is a prefix of "titanothere".  After class letters and
class descriptions have been rejected, Have name_to_monclass()
resort to name_to_mon() instead of doing its own less detailed
name matching.

8 years agofix #H4475 - shop message about disenchanted item
PatR [Wed, 10 Aug 2016 09:04:09 +0000 (02:04 -0700)]
fix #H4475 - shop message about disenchanted item

drain_item() always assumed player was responsible, so called
costly_alteration() to adjust shop price of disenchanted item.
If it was unpaid and the effect was caused by a disenchanter
attack rather than by the hero, the feedback was nonsensical.

This also lets a disenchanter hit worn rings, amulet, or blindfold
if no armor gets targetted.  Amulets, blindfolds, and most rings
have no charge to be drained, but several types of rings do.

8 years agofix #H4472 & #H4473 - incorrect total_tiles_used
PatR [Sun, 7 Aug 2016 02:30:44 +0000 (19:30 -0700)]
fix #H4472 & #H4473 - incorrect total_tiles_used

The value calculated for total_tiles_used never got adjusted for
displaying statues-as-monsters.  The most common configuration(s)
using tiles don't care, but the combination of X11 plus USE_XPM
needs an accurate value there.

8 years agofix #H4468 - [no-]autopickup in shop
PatR [Sat, 6 Aug 2016 02:17:47 +0000 (19:17 -0700)]
fix #H4468 - [no-]autopickup in shop

Autopickup for pickup_types is disabled for unpaid shop goods, but
always-pick-up autopickup_exception still picked things up, as did
pickup_thrown for thrown objects.  Now they'll only work in shops
for no_charge items (dropped by hero and shk didn't want, or hero
declined to sell).

costly_spot() was being recalculated for every item which passed
pickup_types.  This changes autopickup to check it once for a given
autopickup operation and cache the result.  [Whenever the hero moves,
a room entry check is performed.  That ought to be extended to cache
costly_spot() for <u.ux,u.uy> in iflags or u.]

8 years agooption parsing crash: 'playmode' without value
PatR [Fri, 5 Aug 2016 00:42:26 +0000 (17:42 -0700)]
option parsing crash: 'playmode' without value

Reported directly to devteam, specifying the playmode option without
appending a value caused a segfault during options parsing.  The
argument passed to string_for_opt() ought to have been False for
"not optional" to trigger a "bad syntax" message, but even then the
playmode parsing needs to check for Null to prevent the crash.

"Bad syntax" is awfully vague.  In cases like this, we can be more
precise.  Now it will say "Missing value" instead.

8 years agodungeon overview when escaping the dungeon
PatR [Thu, 4 Aug 2016 01:51:55 +0000 (18:51 -0700)]
dungeon overview when escaping the dungeon

Noticed while testing something.  Final disclosure of dungeon
overview showed "Level 1: <- You were here", which looked a bit odd
when the game ended by climbing the stairs to escape the dungeon.
Change the annotation when escaping to be "<- You left from here".

'Here' will usually be level 1, but not always.

8 years agofix #H4462 - grammar in corpse eating message
PatR [Thu, 4 Aug 2016 00:59:10 +0000 (17:59 -0700)]
fix #H4462 - grammar in corpse eating message

"The the Wizard of Yendor corpse tastes terrible."

"The" was supplied when formatting the sentence, "the" when formatting
the corpse object.  Same applied to several other monsters, those
flagged as unique and without personal name (Oracle, Cyclops, others).

This also changes the corpse eating message to not always specify the
taste as "terrible" when the eater is omnivorous.

It also makes corpses (and tins) of unique monsters be wishable in
wizard mode.  I had killed the Wizard at least half a dozen times
without a corpse being left, so used wishing instead.  Later retries
did finally leave one--lack of corpse turned out to just be by chance.

8 years agolev_comp shifts of negative values
PatR [Wed, 3 Aug 2016 08:17:43 +0000 (01:17 -0700)]
lev_comp shifts of negative values

Apparently the compiler for OSX 10.11 + Xcode 7.3.1 is defaulting
to C99 (or C11?) because it is enabling a gcc warning that is
included by -Wextra (newer name for obscure -W) for C99 or later.

lev_comp.y:2276:20: warning: shifting a negative signed value is undefined
 [-Wshift-negative-value]
       (yyval.i) = SP_OBJ_PACK(-1, (yyvsp[(1) - (1)].i));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/sp_lev.h:248:33: note: expanded from macro 'SP_OBJ_PACK'
\#define SP_OBJ_PACK(o, c) (((o) << 8) + ((char) (c)))
\                            ~~~ ^

SP_MONST_PACK() and SP_OBJ_PACK() are both called with -1, and
SP_MAPCHAR_PACK() is called with either -1 or -2.  The revised
macros add 10 when encoding and subtract it when decoding so that
they can handle -1 through -10 without shifting negative values.

There were also several bitwise ANDs that the bulk reformatting
misclassified as casts of hardcoded addresses.

8 years agolint suppression
PatR [Sun, 31 Jul 2016 02:08:25 +0000 (19:08 -0700)]
lint suppression

botl.c   - unused argument in #if STATUS_HILITES code.

mkmaze.c - "clang version 7.3.0 (clang-703.0.31)", or whatever version
  of gcc it's based on, warns that ''#define register /*empty*/''
  hides a keyword.  '-Wkeyword-macro' isn't mentioned in the recent gcc
  manual I checked, but it is being enabled by specifying '-pedantic'
  (rather than -Wall or -W) to the preprocessor.  It could be turned
  off via '-Wno-keyword-macro' but this removes all mkmaze.c's register
  references instead.  (Sean wanted that, and this might be why....)

8 years agofix #H4460 - tribute typos in /Thud!/
PatR [Sat, 30 Jul 2016 21:53:00 +0000 (14:53 -0700)]
fix #H4460 - tribute typos in /Thud!/

Passage 2: DELIBERATEDLY -> DELIBERATELY
Passage 6: vengence -> vengeance

8 years agoupdate sys/unix/hints/macosx10.10
PatR [Sat, 30 Jul 2016 08:59:27 +0000 (01:59 -0700)]
update sys/unix/hints/macosx10.10

On OSX, one of the XQuartz header files triggers a compiler warning
about using a gcc extension, resulting in a diagnostic for each of
the files compiled with the WANT_WIN_X11 set of CFLAGS.  Use the
same fix as hints/macosx10.8 already does.

8 years agofix #H4457 - grammar nitpick
PatR [Sat, 30 Jul 2016 08:19:44 +0000 (01:19 -0700)]
fix #H4457 - grammar nitpick

"Your pair of speed boots glow silver for a moment." should be
"Your pair of speed boots glows silver for a moment.".  The fix
reverses a post-3.6.0 change to is_plural().  Also, add new
pair_of() to test for object formatted as "pair of Bars".  For verb
usage, that's definitely singular, but for pronoun usage, sometimes
plural seems better (although it might actually be incorrect).

I fixed up the formatting of a block comment in obj.h, but it is
still a candidate for tab cleanup.

8 years agolint cleanup: '!mptr->mmove == 0'
PatR [Sat, 30 Jul 2016 01:09:01 +0000 (18:09 -0700)]
lint cleanup: '!mptr->mmove == 0'

The compiler whined about that, and rightly so.  It happens to yield
the right value by accident, so there should be no change in behavior.

8 years agoadd '(uchar)' casts to ctype calls
PatR [Tue, 19 Jul 2016 12:40:09 +0000 (05:40 -0700)]
add '(uchar)' casts to ctype calls

This is from the pull request for the assertion failure fix.  It
did not mention how to reproduce the assertion failure, just added
casts to a bunch of isspace/isprint/tolower calls that didn't already
have such.

I removed an obsolete change for win/tty/topl.c and changed the
win/win32/mswproc.c code to avoid using an expression with side-effects
(*colorstring++) in calls to tolower() in case someone overrides that
with a macro which evaluates its argument more than once as some pre-
ANSI ones used to do.  Not tested, might have typos....

sys/wince/*.c still needs similar casts.

8 years agofix #H4436 - polyself message sequencing bug
PatR [Wed, 13 Jul 2016 23:16:55 +0000 (16:16 -0700)]
fix #H4436 - polyself message sequencing bug

for digesting a swallowed critter.  The "you kill <critter>" message
was left implicit, but if hero gained a level, that made "welcome
to level N+1" look like it was issued out of sequence because it's
immediate and the "you totally digest <critter>" is delayed.  Giving
the you-kill-it message explicitly makes things be more verbose but
avoids having the new-level message seem out of order.

8 years agofix #H4426 - shapeshifted vampires vs stoning
PatR [Tue, 12 Jul 2016 00:38:02 +0000 (17:38 -0700)]
fix #H4426 - shapeshifted vampires vs stoning

and vs digestion.  minstapetrify() was previously changed to
explicitly revert a shape-shifted vampire back to vampire form
when it was turned to stone.  This does the same for monstone().
It also causes shape-shifted vampires to revert to vampire form
immediately when swallowed, so subsequent death via digestion or
engulfing damage doesn't have to deal with reverting changed shape.

I'm not convinced this is the right fix for either stoning or
being digested.  Unlike with ordinary damage, where multiple hits
are usually needed to kill a vampire after it reverts to 'V' form,
here the vampire will be killed by the next successful stoning or
digestion attack in one hit.  It ought to least try to flee.

8 years agofix #H4428 - mon vs mon thrown cockatrice egg
PatR [Sat, 9 Jul 2016 23:15:37 +0000 (16:15 -0700)]
fix #H4428 - mon vs mon thrown cockatrice egg

There was no code in ohitmon() (for object thrown or launched at a
monster by someone or something other than the hero) to handle an egg
hitting a monster.  Cockatrice egg is monsters' preferred missile,
but if one hit a monster instead of hero it just did minimal damage
without any chance of the side-effect that makes it be preferred.

8 years agoobserving monster become invisible
PatR [Sat, 9 Jul 2016 22:03:03 +0000 (15:03 -0700)]
observing monster become invisible

Requested by one of the beta testers 13 months ago... when a visible
monster becomes invisible and vanishes, mark its map location with
the remembered, unseen monster glyph.  (When the player zaps a
monster with a wand of make invisible, that only happens if the wand
type is known.  I'm not sure that's right but didn't alter it....)

The request suggested also doing it for a monster who disappears by
teleporting away, but I haven't attempted to implement that.

8 years agofix #H4427 - confused scroll of light
PatR [Tue, 5 Jul 2016 11:31:51 +0000 (04:31 -0700)]
fix #H4427 - confused scroll of light

When scroll of light is read while confused and summons a yellow or
black light, if it didn't have a user-supplied type name then user
would be asked to supply one even if scroll of light was identified.
Let effect()'s caller handle docall().

8 years agofix #H3907 - wrinkled spellbook tile
PatR [Thu, 30 Jun 2016 13:03:51 +0000 (06:03 -0700)]
fix #H3907 - wrinkled spellbook tile

Reported 11 months ago for 3.4.3, the tile for wrinkled spellbook
has a spurious brown spot on the far right.  Several other books
have spots drawn outside the book proper for tile decoration, but
that doesn't seem to apply here.  The report suggested changing
'K' to 'M', but that just changes it into a spurious white spot.
Change the stray 'K' to '.' to make the odd spot go away.

8 years agotty message history line-wrapping fix
PatR [Thu, 30 Jun 2016 01:55:02 +0000 (18:55 -0700)]
tty message history line-wrapping fix

Reported directly to devteam last October, for 3.4.3 on NAO,
subject "UI flaw in message history":

"Applying the stethoscope at self informs:
"Status of Xxxxxxxx (piously neutral):  Level 14  HP 138(138)  AC -15, very
"fast, invisible.--More--

This is reproducible with shorter character name "wizard" by being
"nominally neutral" or "nominally chaotic".  I had a 2 digit level
but didn't notice that my AC took up only 1 digit and ended up
using 125ish blessed potions of full healing to get 4 digits of hit
points in order to get the line to wrap between "very" and "fast".

"But the message history with Ctrl-P shows:
"Message History
"
"Status of Xxxxxxxx (piously neutral): Level 14 HP 138(138) AC -15, very
"invisible.

The key was "Message History", indicating msg_window:full or other
setting which causes ^P to bypass the top line message window and
use a general text window to deliver all history lines at once.

The original feedback splits the line by replacing the space
between "very" and "fast" with a newline, which topline handling
notices and processes as special, but then leaves in place.
msg_window:full results in tty_putstr() case NHW_TEXT, which treats
newline as an ordinary character since it doesn't expect to see
that in text.  Squeezing out three doubled spaces made room for
"very\nfast," on the top line.  process_text_window() attempted to
write it there, but putchar() wrote up through "very," on one line,
then output the newline which resulted in "fast," on the next line.
Then explicit cursor positioning set things up to put "invisible"
at the start of that line, overwriting "fast," so making it appear
to be missing.

8 years agofix #H4418/#H4419 - #tip of gold inside shops
PatR [Tue, 28 Jun 2016 00:20:28 +0000 (17:20 -0700)]
fix #H4418/#H4419 - #tip of gold inside shops

The #tip command tries to reduce verbosity by formatting drop messages
with just the object name instead of with full sentences, yielding
  Objects spill out: obj1, obj2, obj3, ..., objN.
where the trailing comma or period is included with each successive
object.  If an intervening message occurs, such "25 zorkmids are
added to your credit", the rest of the objects will no longer be
extending the original sentence and end up looking silly.
  Objects spill out: obj1, obj2,--More--
  25 zorkmids are added to your credit.  obj3, ..., objN.
This fix causes the post-interruption messages to revert to verbose
format.
  Objects spill out: obj1, obj2,--More--
  25 zorkmids are added to your credit.--More--
  obj3 drops to the floor.--More--
...
  objN drops to the floor.

The interrupting message still follows the comma of the partial
sentence, but I don't see any sane way to fix that other than to
abandon the terse format altogether, and doing that makes #tip way
too verbose when the container has a lot of items in it.  But #tip
inside shops now does that, since there will always be buy/not-
interested feedback interrupting the terse format in that situation.
For other situations, a full sentence message might end up following
a partial sentence list of dropped items.

There was a more significant bug.  Dropping a hero-owned container
with gold in it onto shop floor sold the gold to shk, giving hero
credit.  Subsequent #tip gave the hero credit for that same gold
when it spilled out.  addtobill(obj) relies on obj->ox,oy to
determine whether events are taking place in a shop, and #tip was
relying on placement onto floor to set those, too late for shop
billing.  The fix yields suboptimal results:  you're given credit
when you drop the container, then during #tip when you spill the
contents, credit for the gold is removed, then new credit for it
is given.  That's down to shop insanity, not tipping behavior.

8 years agofix #H4414 - orcs vs elven gear
PatR [Mon, 27 Jun 2016 11:56:06 +0000 (04:56 -0700)]
fix #H4414 - orcs vs elven gear

I considered several potential interactions for orcs with elven
armor (and elves with orcish armor), such as longer wear/unwear
delay, reduced AC, or reduced magic cancellation/negation.  None
of them seemed worth doing.  In the end I just went with lembas
wafer tweaks:  new message when orc hero eats one, reduced nutrition
for that combination, different new message when elf hero eats one,
and increased nutrition for this combination.  Also, less increased
nutrition when a dwarf hero eats a cram ration.

I'm not particularly happy with either of the new messages, and
changing nutrition on the fly may lead to bugs.

8 years agoFixes entry
Pasi Kallinen [Mon, 27 Jun 2016 09:03:34 +0000 (12:03 +0300)]
Fixes entry

8 years agoflyers vs kelp
PatR [Sat, 25 Jun 2016 21:59:52 +0000 (14:59 -0700)]
flyers vs kelp

Flying monsters that want to pick up items tend to get stuck above
kelp fronds, particularly on the Medusa level.  They're allowed to
move to the water location, but can't reach an underwater item so
end up doing nothing.

8 years agomore #H4407 - #loot vs cockatrice corpse
PatR [Sat, 25 Jun 2016 07:10:01 +0000 (00:10 -0700)]
more #H4407 - #loot vs cockatrice corpse

Previous fix was 'me' to eat from inventory without checking current
location for edible items.  The report describing the need for that
also mentioned that you could #loot while blind and without gloves
and not touch any objects except for the container you pick to loot.
This adds a corpse touch check, plus `m#loot' to skip floor containers
and go directly to using #loot for adjacent saddled creature.  That,
as well as the open command, will reveal adjacent container in some
circumstances but I'm going to pretend that that doesn't matter.

doloot() has turned into spaghetti.  We should probably add #unsaddle
or something of the sort and return #loot to container-access only.

8 years agofix #H4407 - avoiding floor-food while blind
PatR [Fri, 24 Jun 2016 23:21:53 +0000 (16:21 -0700)]
fix #H4407 - avoiding floor-food while blind

Accept the 'm' prefix for eat, offer, and apply.

Allows 'me' to eat from inventory without checking for floor food.
Primarily for use after blind character used 'm<dir>' to move
somewhere without touching a suspected cockatrice corpse there.

'm#offer' and 'ma<let>' accomplish similar floor-object-skipping
when offering a sacrifice or applying a tinning-kit.  (All three
commands share floorfood() to pick the item to use.)

Report suggested replacing pick-from-floor followed by pick-from-
invent with use of slash'em-style pick-from-invent with explicit
pick-from-floor choice in list of inventory letters "[abc or ,]"
(slash'em used period for 'here'; I've always liked comma better
since the action is to pick an item rather than a location).  I
implemented that for nethack a long time ago, but it was mixed in
with other stuff that wasn't ready for prime time and vanished
when I lost access to the VMS system I used to use).

Using 'm' prefix to skip part of a multi-part operation is a lot
simpler to implement but doesn't include an in-game reminder that
it is available.

Revised Guidebook.mn is tested, Guidebook.tex is not.

8 years agospell lint
PatR [Thu, 23 Jun 2016 13:21:58 +0000 (06:21 -0700)]
spell lint

Mark an unused function argument as UNUSED.  Also, hurtle_step is
the recoil from throwing or kicking while levitating, which isn't
related to the recently added spellcasting line-of-sight check, so
rename spell_hurtle_step to spell_aim_step.

8 years agotiles lint
PatR [Thu, 23 Jun 2016 13:19:45 +0000 (06:19 -0700)]
tiles lint

FDECL(foo, (boolean)) ought to have been using (BOOLEAN_P), but
the tiles code isn't including the header which defines that, so
change the argument to int.

8 years agoUse the graymapping stuff in the tile lib
Pasi Kallinen [Thu, 23 Jun 2016 07:15:55 +0000 (10:15 +0300)]
Use the graymapping stuff in the tile lib

8 years agoX11: Make statue tiles look like grayscale monsters
Pasi Kallinen [Thu, 23 Jun 2016 06:44:07 +0000 (09:44 +0300)]
X11: Make statue tiles look like grayscale monsters

8 years agoMerge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into...
keni [Wed, 22 Jun 2016 23:29:14 +0000 (19:29 -0400)]
Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0

8 years agoadd docs for the cmdhelp conditionals
keni [Wed, 22 Jun 2016 23:28:23 +0000 (19:28 -0400)]
add docs for the cmdhelp conditionals

8 years agoUnify mon throwing missile collision check
Pasi Kallinen [Wed, 22 Jun 2016 18:59:29 +0000 (21:59 +0300)]
Unify mon throwing missile collision check

8 years agomore monkeys
PatR [Wed, 22 Jun 2016 00:32:02 +0000 (17:32 -0700)]
more monkeys

My old monkey patch was a bit more extensive than Pasi's, although
it didn't originally include letting apes be tameable with bananas.
No sense in throwing it away:
1) Make monkeys and apes be omnivores instead of carnivores.
2) Make bananas be preferred food for herbivore/omnivore subset
   of Y-class, so excludes carniverous ape, owlbear, and yeti.
   [Sasquatch remain omnivorous but aren't tameable with bananas.]
3) While updating befriend_with_food(), make horses be affected
   only by food they might eat, not by meat and corpses and tins.
   So they'll be somewhat harder to cope with for characters not
   strong enough to kill them.  [Dogs and cats are unchanged.]

Not included (not even implemented...):
0) Allow archeologists to choose monkey for starting pet.
   [The one in "Raiders of the Lost Ark" didn't actually belong
   to Indiana Jones but spent a lot of time accompanying him.]

8 years agoSilence some compiler warnings
Pasi Kallinen [Tue, 21 Jun 2016 11:14:54 +0000 (14:14 +0300)]
Silence some compiler warnings

8 years agoAdd fixes entries for my commits
Pasi Kallinen [Tue, 21 Jun 2016 10:18:05 +0000 (13:18 +0300)]
Add fixes entries for my commits

8 years ago'$' vs #jump
PatR [Tue, 21 Jun 2016 09:39:21 +0000 (02:39 -0700)]
'$' vs #jump

Hero poly'd into xorn can wear jumping boots or cast jump spell, so
some target destinations which were excluded by '$' (to show valid
destinations during getpos) shouldn't have been.  Doubly so if
wearing the Eyes of the Overworld where xorn'd hero can jump through
walls rather than just into them.

This attempts to deal with diagonal moves vs open doorways sanely,
including allowing knight's move jumps in or out of them when
appropriate.

Also, need to check isok(x,y) before cansee(x,y) instead of after.

8 years agoFix compiler warning
Pasi Kallinen [Mon, 20 Jun 2016 10:21:22 +0000 (13:21 +0300)]
Fix compiler warning

8 years agoCannot tame carnivorous ape with bananas
Pasi Kallinen [Mon, 20 Jun 2016 10:04:50 +0000 (13:04 +0300)]
Cannot tame carnivorous ape with bananas

8 years agoTame simians with bananas
Pasi Kallinen [Mon, 20 Jun 2016 09:56:55 +0000 (12:56 +0300)]
Tame simians with bananas

Bananas are quite rare, and none of the simians are very strong,
so this won't be in any way overpowered - just a bit of flavor.

I think this was originally Derek's change from Sporkhack, but
similar ones have been done in the community multiple times
in the past.

8 years agoFix #H4411: Targeting detected monster through wall with fireball
Pasi Kallinen [Mon, 20 Jun 2016 06:11:52 +0000 (09:11 +0300)]
Fix #H4411: Targeting detected monster through wall with fireball

Fireball and cone of cold could target detected monsters
through a wall when cast at skilled or higher.  This allowed
eg. targeting the Wiz from outside his tower.

Use walk_path to determine the actual location where the
spell will hit, so trying to cast through a wall will
make the explosion happen at the nearest empty space.

8 years agofix #H3723 - eating "YUM YUM" scroll
PatR [Sat, 18 Jun 2016 22:38:00 +0000 (15:38 -0700)]
fix #H3723 - eating "YUM YUM" scroll

From November, 2014, player thought eating a scroll labeled YUM YUM
while polymorphed ought to give a special message.

While implementing it, I noticed that if a g.cube managed to get on
to a spot containing a scroll of scare monster, it would eat that
along with everything else.

8 years agoMerge branch 'bobbydurrett-mailenvfix' into NetHack-3.6.0
Pasi Kallinen [Sat, 18 Jun 2016 17:39:22 +0000 (20:39 +0300)]
Merge branch 'bobbydurrett-mailenvfix' into NetHack-3.6.0

8 years agoMerge branch 'mailenvfix' of https://github.com/bobbydurrett/NetHack into bobbydurret...
Pasi Kallinen [Sat, 18 Jun 2016 17:37:34 +0000 (20:37 +0300)]
Merge branch 'mailenvfix' of https://github.com/bobbydurrett/NetHack into bobbydurrett-mailenvfix

8 years agofix #H4404 - Orc wizard vs ring of poison resist
PatR [Fri, 17 Jun 2016 23:30:50 +0000 (16:30 -0700)]
fix #H4404 - Orc wizard vs ring of poison resist

Orcs are innately poison resistant, so orcish wizard's random ring
shouldn't be poison resistance.  Presumeably an orc who is bright
enough to become a wizard is not so dumb as to bring a useless ring
with him/her into the dungeon....

8 years agofix #H4388 - wishing conduct inconsistency
PatR [Fri, 17 Jun 2016 05:01:27 +0000 (22:01 -0700)]
fix #H4388 - wishing conduct inconsistency

Make wishing for an artifact and not getting it because it already
exists break never-wished-for-artifact conduct.  The wish was made
even if the result wasn't what the player wanted.

8 years agofix #H4401 - grammar bug when hallucinating
PatR [Fri, 17 Jun 2016 00:39:00 +0000 (17:39 -0700)]
fix #H4401 - grammar bug when hallucinating

  You kill poor goblin.
"poor" implies a pet; pet has a name; "the" is omitted for named
creature; hallucination suppresses name, so "the" needs to be
reinstated.
  You kill the poor goblin.

8 years agolycanthropy tweaks
PatR [Fri, 17 Jun 2016 00:11:25 +0000 (17:11 -0700)]
lycanthropy tweaks

Make it be cannabalism for a were<foo> to eat a <foo> corpse.

Let werejackals summon foxes and coyotes in addition to jackals,
and werewolves summon wargs in addition to wolves and winter wolves.

8 years agocmdhelp build bug
PatR [Thu, 16 Jun 2016 07:01:06 +0000 (00:01 -0700)]
cmdhelp build bug

dowhatdoes_core() was using iflags.altmeta unconditionally but
its availability and usefulness is conditional upon #if ALTMETA.

8 years agoconfig file typo
PatR [Thu, 16 Jun 2016 06:58:21 +0000 (23:58 -0700)]
config file typo

8 years agoengulfer tuning
PatR [Wed, 15 Jun 2016 00:37:44 +0000 (17:37 -0700)]
engulfer tuning

Reported by me ;-} during beta testing last Fall, engulfers have a
tendency to re-engulf the hero immediately after expelling him/her.
Use mspec_used (set when expelling rather than engulfing) to make
them wait a turn or two.  Initially that made the too-soon engulf
attacks always miss, so this changes too-soon engulf to a touch or
claw attack instead.  Some tuning in damage or message may be needed.

8 years agoeating off floor while blind
PatR [Tue, 14 Jun 2016 23:43:03 +0000 (16:43 -0700)]
eating off floor while blind

Reported directly to devteam in late December, when blind and
lacking gloves, you could safely locate cockatrice corpses on the
floor by using 'm' prefix to move without pickup followed by 'e'
and then answering no when ask whether to eat a cockatrice corpse.

8 years agofeedback for failed movement attempts
PatR [Tue, 14 Jun 2016 00:46:34 +0000 (17:46 -0700)]
feedback for failed movement attempts

When underwater and an attempt to move onto adjacent land fails
because the destination is a wall or solid rock or closed door,
report that there's an obstacle instead of just silently failing
to make the move.

If the user has 'mention_walls' option set, give feedback for
failing to move diagonally into or out of a doorway instead of
just silently not moving.

Having 'mention_walls' set could yield "you cannot pass through
the bars" when travel was testing (not moving) for a path past
iron bars, and when it happened it tended to be delivered a whole
bunch of times.

8 years agoChange deserted temple ghost messages
Pasi Kallinen [Mon, 13 Jun 2016 08:25:34 +0000 (11:25 +0300)]
Change deserted temple ghost messages

8 years agoMove generic usernames to sysconf
Pasi Kallinen [Mon, 13 Jun 2016 08:01:05 +0000 (11:01 +0300)]
Move generic usernames to sysconf

8 years agoAdd more hallu liquids
Pasi Kallinen [Mon, 13 Jun 2016 07:26:13 +0000 (10:26 +0300)]
Add more hallu liquids

8 years agofix #H4060 - sysconf is re-read if no config file
PatR [Mon, 13 Jun 2016 00:52:12 +0000 (17:52 -0700)]
fix #H4060 - sysconf is re-read if no config file

Config file handling remembers the name of the last config file
read in order for options processing to use it in messages, but
it was also reused as default config file name if user-supplied
config file name failed access() test.  So the SYSCF file became
the default user config file after it was used.  The config file
handling was a real mess.

This patch fixes it for Unix but there is a lot of scope for
typos in the changes for other platforms.  Testing is needed.

8 years agomore cmdhelp
PatR [Sat, 11 Jun 2016 22:35:35 +0000 (15:35 -0700)]
more cmdhelp

Some number_pad handling which wasn't present in the original cmdhelp
but is acted upon in cmd.c.

8 years agoChange fountains to bright blue
Pasi Kallinen [Sat, 11 Jun 2016 19:43:55 +0000 (22:43 +0300)]
Change fountains to bright blue

It's "sparkling water" after all, and makes it more obvious they're
different from water.

8 years agoMake ray bounceback depend on the wall type.
Pasi Kallinen [Sat, 11 Jun 2016 19:26:22 +0000 (22:26 +0300)]
Make ray bounceback depend on the wall type.

8 years agoReduce #turn undead helpless duration
Pasi Kallinen [Sat, 11 Jun 2016 18:33:08 +0000 (21:33 +0300)]
Reduce #turn undead helpless duration

8 years agoWhen attacking a peaceful monster, make other peaceful monsters react.
Pasi Kallinen [Sat, 11 Jun 2016 17:27:55 +0000 (20:27 +0300)]
When attacking a peaceful monster, make other peaceful monsters react.

8 years agoPrevent diagonal jump through open door
Pasi Kallinen [Sat, 11 Jun 2016 16:27:50 +0000 (19:27 +0300)]
Prevent diagonal jump through open door

8 years agodat/symbols: RogueEpyx
PatR [Sat, 11 Jun 2016 07:16:11 +0000 (00:16 -0700)]
dat/symbols: RogueEpyx

I don't know whether this fixes #H4335 but it does eliminate a
bunch of duplicate symbol entries.  And the two whose duplicates
had different values are suspicious ones: using linefeed and tab as
the character for object class symbol, which could easily confuse
the tty interface's cursor position tracking.  But those should
have been overridden by the later entries which specified the
default object class characters--I couldn't find anything in symbol
processing which would cause it to keep the first value instead of
replacing that with the second one.

The report had a link to screen shot which showed a door (I think
an open one despite the '+' shape) in the corner inside a room,
something like
 --+-----------
 |            |
 |       =
 |          ..##
 |          .+#
 ----+---------
where the '+#' in the lower right looks like it belongs two rows up
and one column over, the upper left of the three '#' is white and
the other two gray (lit corridor or empty dooryway or what?), the
'=' is actually three horizontal bars in green, and the lower '.'
has the cursor on it.  There aren't any object class symbols shown
(unless the triple-barred = is one), so linefeed and tab don't look
like likely culprits.

8 years ago"fix" bz 431 - phrasing of alignment description
PatR [Fri, 10 Jun 2016 00:08:37 +0000 (17:08 -0700)]
"fix" bz 431 - phrasing of alignment description

The character attributes (^X) description of alignment includes
information about whether the alignment is different from what it
started out as, and is used in a verbose sentence which names the
entire three-deity pantheon.  Someone thought
  You were chaotic, temporarily on a mission for Foo
  who was opposed by Bar (lawful) and Quux (neutral).
was in need to better phrasing.  It looks straightforward to me
(the temporary aspect indicates that a helm of opposite alignment
was causing 'chaotic').  I was going to mark it "won't fix" until
I noticed that you could also get
  You were lawful, now on a mission for Bar
(when permanent, one-time alignment change was causing 'lawful').

The first one is changed for the present tense:
  You are chaotic, currently on a mission for Foo
and stays the same for end-of-game disclosure past tense.  I
considered using "formerly"--as best past tense of "currently"--
but it could be confused as a reference to the original alignment
rather than the alignment in place when the game ended.

The second is unchanged for present tense:
  You are lawful, now on a mission for Bar
For past tense, it's changed to:
  You were lawful, belatedly on a mission for Bar
Past tense of "now" should be "then", but if used it that message
it would sound absurdly stilted.  "Belatedly" is meant to suggest
that if you intended to be on a mission for Bar, you should have
started out as lawful.  (It's beside the point that some roles or
races couldn't start out at as lawful.)

Both of these changes leave something to be desired, but I'm
going to mark the bz entry closed.

8 years agofix #H4383 - blasted twice by Excalibur
PatR [Thu, 9 Jun 2016 18:42:34 +0000 (11:42 -0700)]
fix #H4383 - blasted twice by Excalibur

...when alignment was toggled by helm of opposite alignment.  The
touch/retouch code is quite convoluted, but I think this simple
change is the right fix.

8 years agomore cmdhelp revamp
PatR [Wed, 8 Jun 2016 23:54:01 +0000 (16:54 -0700)]
more cmdhelp revamp

The if/elif/else/endif interpretor for '&' command data was too
simplistic.  It would allow multiple else clauses, elif clauses
after an else clause, and worst of all, accept a should-be-rejected
conditional block if an else or elif which evaluated true followed
an elif which evaluated false which in turn followed an earlier
true clause.  (dat/cmdhelp trigger any of those bugs.)

8 years agocmdhelp revamp
PatR [Wed, 8 Jun 2016 21:58:35 +0000 (14:58 -0700)]
cmdhelp revamp

Implement a rudimentary if/elif/else/endif interpretor and use
conditionals in dat/cmdhelp to describe what command each keystroke
currently invokes, so that there isn't a lot of "(debug mode only)"
and "(if number_pad is off)" cluttering the feedback that the user
sees.  (The conditionals add quite a bit of clutter to the raw data
but users don't see that.  number_pad produces a lot of conditional
commands:  basic letters vs digits, 'g' vs 'G' for '5', phone
keypad vs normal layout of digits, and QWERTZ keyboard swap between
y/Y/^Y/M-y/M-Y/M-^Y and z/Z/^Z/M-z/M-Z/M-^Z.)

The interpretor understands
 '&#' for comment,
 '&? option' for 'if' (also '&? !option'
                       or '&? option=value[,value2,...]'
                       or '&? !option=value[,value2,...]'),
 '&: option' for 'elif' (with argument variations same as 'if';
                         any number of instances for each 'if'),
 '&:' for 'else' (also '&: #comment';
                  0 or 1 instance for a given 'if'), and
 '&.' for 'endif' (also '&. #comment'; required for each 'if').

The option handling is a bit of a mess, with no generality for
which options to deal with and only a comma separated list of
integer values for the '=value' part.  number_pad is the only
supported option that has a value; the few others (wizard/debug,
rest_on_space, #if SHELL, #if SUSPEND) are booleans.

8 years agosome doc bits
PatR [Wed, 8 Jun 2016 12:35:53 +0000 (05:35 -0700)]
some doc bits

Add fixes36.1 for '&' command's support of altmeta option.

Short command help lacked an entry for '&' command.

Wizard mode help omitted #vanquished and some other obscure commands.

8 years agoHallucinatory liquids for water, lava, and acid
Pasi Kallinen [Tue, 7 Jun 2016 17:57:50 +0000 (20:57 +0300)]
Hallucinatory liquids for water, lava, and acid

8 years agoFix typo
Pasi Kallinen [Tue, 7 Jun 2016 05:58:52 +0000 (08:58 +0300)]
Fix typo

8 years agomore multishot
PatR [Tue, 7 Jun 2016 01:13:04 +0000 (18:13 -0700)]
more multishot

An attempt to simplify handling of missiles which stop at hero's
location (either hit or reached end of range) would have resulted
in missiles that hit the hero not being put on the map.  I had
realized this earlier but for some reason didn't get around to
dealing with it before the previous commit.

8 years agomultishot by monsters, plus reformatting
PatR [Tue, 7 Jun 2016 00:42:58 +0000 (17:42 -0700)]
multishot by monsters, plus reformatting

Some reformatting of the recently added pet ranged attack code.

The redundant--but different--multishot volley code has been replaced
so that there are only two versions (hero and monster) instead of
three (hero and monster vs hero and pet vs other monster).  The monst
version was out of date relative to post-3.4.3 changes to the hero one.
The pet version was way out of date and had some bugs:  wielding an
elven bow gave a +1 multishot increment to volley count for fast weapon
even when throwing something rather than shooting arrows, wielding any
weapon which had at least +2 enchantment gave 1/3 enchantment bonus to
volley count when throwing instead of shooting shoot ammo, and a pet
which got killed in the midst of a multishot volley--perhaps by a gas
spore explosion or some other passive counterattack--would keep on
shooting/throwing until the volley count was exhausted.

Pet use of ranged weapons is not ready for prime-time.  Pets don't
hang on to missiles or launchers+ammo, they just drop them if there is
no target immediately available.

8 years agoRemove extraneous curses gfx define
Pasi Kallinen [Mon, 6 Jun 2016 18:16:01 +0000 (21:16 +0300)]
Remove extraneous curses gfx define

8 years agoFix crash with MAIL env variable
Bobby Durrett [Mon, 6 Jun 2016 04:10:26 +0000 (21:10 -0700)]
Fix crash with MAIL env variable

8 years agolint cleanup
PatR [Sun, 5 Jun 2016 21:52:01 +0000 (14:52 -0700)]
lint cleanup

8 years agotiles fixup: zap beams
PatR [Sun, 5 Jun 2016 21:50:30 +0000 (14:50 -0700)]
tiles fixup: zap beams

Just noticed that a change of mine to src/drawing.c 2.5 weeks ago
("zap beam symbol descriptions -- they aren't walls") triggered a
set of four complaints when processing tiles.

8 years agodat/keyhelp for vms
PatR [Sun, 5 Jun 2016 13:33:42 +0000 (06:33 -0700)]
dat/keyhelp for vms

Update vms/install.com (rather than Makefile.top) to install the new
data file for the 'whatdoes' command.

Also, the 3.6.0 distribution puts version number 3.5.0 into vms
binaries (all the programs, not just nethack itself).  It's something
observable with native tools without running the program, nothing to
do with nethack's 'v' command which gets its version number from
patchlevel.h via makedefs.

8 years ago'whatdoes' command and new file: dat/keyhelp
PatR [Sun, 5 Jun 2016 08:09:52 +0000 (01:09 -0700)]
'whatdoes' command and new file: dat/keyhelp

Make the whatdoes ('&' or '?f') command support the 'altmeta' option
for meta-characters generated by two character seqeunce 'ESC char'.
Also, make it be more descriptive when reporting "no such command"
by including the numeric value it operated on when failing to match
any command.  That might provide a way for us to get some extra
information when players report problems with odd keystrokes:  we ask
them to type such at the "what command?" prompt and then tell us what
numbers come up.

It's been given a help file to deal with assorted idiosyncracies
which can come up when querying what keys do.  Unfortunately that
ended up being way more verbose than intended.

Installation of the extra data file has only been done for Unix.
Other platforms will get "can't open file" if they respond with
'&' or '?' to the "what command?" prompt.  The command will still
work though, just without the extra text.

8 years agomore /? of spaces
PatR [Sat, 4 Jun 2016 13:06:20 +0000 (06:06 -0700)]
more /? of spaces

Restore the ability to look up a single space by 'name'.

I thought mungspaces("<all spaces>") kept one space, but it doesn't.
It's a lucky accident that unnaming monsters and objects still works.
There may be other places which intend to give a special meaning to
a single space that don't still work....

8 years agoImprove the Guidebook config file section
Pasi Kallinen [Sat, 4 Jun 2016 09:43:09 +0000 (12:43 +0300)]
Improve the Guidebook config file section

8 years agoComment the limitation and reason
Pasi Kallinen [Sat, 4 Jun 2016 05:14:41 +0000 (08:14 +0300)]
Comment the limitation and reason

8 years agoFix #H4369: what-is reporting singular of null when given only spaces
Pasi Kallinen [Sat, 4 Jun 2016 05:01:55 +0000 (08:01 +0300)]
Fix #H4369: what-is reporting singular of null when given only spaces

8 years agoAllow pets to use ranged attacks
Pasi Kallinen [Fri, 3 Jun 2016 22:06:00 +0000 (01:06 +0300)]
Allow pets to use ranged attacks

This is the Pet ranged attack -patch by Darshan Shaligram,
with the spellcaster parts removed to keep it simpler.

Pets will now throw, spit and breathe at other monsters.

8 years agoSplit direction key showing into separate function
Pasi Kallinen [Fri, 3 Jun 2016 18:08:43 +0000 (21:08 +0300)]
Split direction key showing into separate function

8 years agoClear leashmon when leash is generated, even without obj init
Pasi Kallinen [Fri, 3 Jun 2016 16:33:51 +0000 (19:33 +0300)]
Clear leashmon when leash is generated, even without obj init

8 years agocomment formatting bit
PatR [Fri, 3 Jun 2016 01:01:28 +0000 (18:01 -0700)]
comment formatting bit

8 years agofarlook bullet-proofing
PatR [Fri, 3 Jun 2016 00:11:13 +0000 (17:11 -0700)]
farlook bullet-proofing

When examining a buried object (after detection has revealed it),
suppress setting of its dknown bit when hero is adjacent.  [That
couldn't actually happen, because the glyph on the map that we're
trying to examine would be replaced by one for whatever is on the
surface when sighted hero moved next to it, and an earlier clause
in the same test prevents blinded hero from getting to this point.]

8 years agoGive a hint that containers are looted instead of opened
Pasi Kallinen [Thu, 2 Jun 2016 15:11:35 +0000 (18:11 +0300)]
Give a hint that containers are looted instead of opened

8 years agoShow in inventory which monster a leash is attached to
Pasi Kallinen [Thu, 2 Jun 2016 13:35:21 +0000 (16:35 +0300)]
Show in inventory which monster a leash is attached to

8 years agodetection revamp
PatR [Thu, 2 Jun 2016 08:08:34 +0000 (01:08 -0700)]
detection revamp

Change most instances of detection to offer the player a chance to
move the cursor around on the map so that the getpos() autodescribe
feature can explain things that might go away as soon as the
current detection completes.  The few instances that don't offer
such a chance are the ones where everything which has been revealed
will still be there once the action finishes (such as regular magic
mapping and blessed/persistent monster detection).

There were quite a lot of inconsistencies in things like handling
for detection while swallowed or underwater.  I didn't keep track
of them to distinguish between 3.6.0, current dev code, or my patch
in progess.  They should be much more consistent now but without a
comprehensive fixes36.1 entry.

Blessed clairvoyance (divination spells at skilled or expert) now
shows monsters as well as terrain.  I first had it like that for
any clairvoyance, but having getpos/autodescribe kick in every 15
or 30 turns once you have the amulet--or pay the appropriate amount
to a temple preist--was nearly unplayable.  When it only follows an
explicit spell cast it is not intrusive.

8 years agoobscure polyself message
PatR [Thu, 2 Jun 2016 01:45:52 +0000 (18:45 -0700)]
obscure polyself message

Hero was poly'd into a hider monster and was swallowed by something.
Attempting to hide via '#monster' gave "You can't hide while you're
being held."  It correctly blocked hiding due to u.ustuck but the
feedback ignored the possibility of u.ustuck+u.uswallow.

8 years agoMake coyote names deterministic
Pasi Kallinen [Wed, 1 Jun 2016 15:38:21 +0000 (18:38 +0300)]
Make coyote names deterministic

8 years agoDisable object pile display when hallucinating
Pasi Kallinen [Wed, 1 Jun 2016 15:29:01 +0000 (18:29 +0300)]
Disable object pile display when hallucinating

Hallucination shows object piles under boulders

8 years agoiflags.save_uswallow
PatR [Wed, 1 Jun 2016 12:58:22 +0000 (05:58 -0700)]
iflags.save_uswallow

Some groundwork for detection enhancements.

you.h  - just formatting
flag.h - add iflags.save_uswallow so that u.uswallow manipulation ...
save.c - ... can be undone if a hangup save occurs

8 years agoFix travel occasionally walking you into pools
Pasi Kallinen [Tue, 31 May 2016 17:41:35 +0000 (20:41 +0300)]
Fix travel occasionally walking you into pools

This was a bug introduced post-3.6.0 in commit 9a2eb370e704

8 years agomore door/chest trap detection
PatR [Tue, 31 May 2016 13:37:14 +0000 (06:37 -0700)]
more door/chest trap detection

Make the '^' command catch up with far-look as far as identifying
trapped doors and trapped chests revealed by confused gold detect.
You need to be blinded when approaching the '^', otherwise as soon
as you can see a door or chest or whatever else is there the fake
bear trap will be removed from the map.

8 years agowishing fix
PatR [Tue, 31 May 2016 12:35:56 +0000 (05:35 -0700)]
wishing fix

rnd_otyp_by_namedesc() had an off by one error when choosing which
matching item to return, making it impossible to successfully wish
for the Amulet of Yendor, always yielding the plastic imitation.
  n == 2, maxprob == 2
  prob = rn2(maxprob); => 0 or 1
  i = 0; while (i < n - 1 && (prob -= ... + 1) > 0) i++;
always exited the loop on the first test of the condition because
subtracting 1 from 0 or 1 never yielded a result greater than 0.

It's still suboptimal:  "amulet of yendor" should find an exact match
and should never return "cheap plastic imitation of amulet of yendor"
from the partial match.

I think biasing the choice among multiple candidates based on their
generation probabilities only makes sense when all the candidates are
within the same class.  If scroll of light occurred in 5% of scrolls
and spellbook of light occurred in 10% of spellbooks (both percentages
pulled out of thin air), having "light" get a 2 out 3 chance to be a
spellbook doesn't seem right because scrolls are four times more
likely than spellbooks (in most of the dungeon; books aren't randomly
generated at all on the rogue level or in Gehennom).

8 years agofix #H4353 - monster gets angry after being killed
PatR [Tue, 31 May 2016 11:44:21 +0000 (04:44 -0700)]
fix #H4353 - monster gets angry after being killed

...by thrown potion.  The reported case was a shopkeeper killed by
system shock from thrown potion of polymorph, but any death (acid,
burning oil explosion, water against iron golem, holy water against
undead, demon, or werecritter) to any peaceful monster could cause
similar result.