]> granicus.if.org Git - nethack/log
nethack
8 years agoWielding Trollsbane prevents trolls from reviving
Pasi Kallinen [Sat, 15 Oct 2016 16:47:04 +0000 (19:47 +0300)]
Wielding Trollsbane prevents trolls from reviving

8 years agoPut throne room gold in the chest
Pasi Kallinen [Sat, 15 Oct 2016 07:26:20 +0000 (10:26 +0300)]
Put throne room gold in the chest

8 years agoX11: Handle define-lines in NetHack.ad
Pasi Kallinen [Fri, 14 Oct 2016 13:43:49 +0000 (16:43 +0300)]
X11: Handle define-lines in NetHack.ad

xrdb can load a X recource file with #define-lines, but NetHack
cannot. Substitute the defines in Makefile during compile.

Requires grep

8 years agomore lint and formatting
PatR [Thu, 13 Oct 2016 19:08:06 +0000 (12:08 -0700)]
more lint and formatting

Fix a C89/C90 complaint about a declaration following executable code.
The rest is formatting (of stuff I saw rather than systematic fixups).

8 years agoAllow toggling menu for any travel target list
Pasi Kallinen [Thu, 13 Oct 2016 17:16:21 +0000 (20:16 +0300)]
Allow toggling menu for any travel target list

8 years agoOccasionally remove maze dead ends, creating loops
Pasi Kallinen [Wed, 12 Oct 2016 15:39:24 +0000 (18:39 +0300)]
Occasionally remove maze dead ends, creating loops

8 years agolint fix
PatR [Tue, 11 Oct 2016 23:03:45 +0000 (16:03 -0700)]
lint fix

8 years agoShow correct keybind in ext cmd list
Pasi Kallinen [Tue, 11 Oct 2016 20:03:32 +0000 (23:03 +0300)]
Show correct keybind in ext cmd list

8 years agoFree allocated memory
Pasi Kallinen [Tue, 11 Oct 2016 15:34:41 +0000 (18:34 +0300)]
Free allocated memory

8 years agoFix valgrind complaint
Pasi Kallinen [Tue, 11 Oct 2016 14:59:35 +0000 (17:59 +0300)]
Fix valgrind complaint

8 years agoAdd wizmode command to recreate current level
Pasi Kallinen [Tue, 11 Oct 2016 14:26:32 +0000 (17:26 +0300)]
Add wizmode command to recreate current level

8 years agoSometimes create mazes with wide corridors
Pasi Kallinen [Tue, 11 Oct 2016 09:45:24 +0000 (12:45 +0300)]
Sometimes create mazes with wide corridors

...and/or thick walls.

8 years agoUse even more enums
Pasi Kallinen [Mon, 10 Oct 2016 18:55:23 +0000 (21:55 +0300)]
Use even more enums

8 years agoUse more enums
Pasi Kallinen [Mon, 10 Oct 2016 13:18:14 +0000 (16:18 +0300)]
Use more enums

We're already using enums, so convert some already existing defines.

8 years agoDon't clobber up and down ext cmd binds
Pasi Kallinen [Sun, 9 Oct 2016 15:10:28 +0000 (18:10 +0300)]
Don't clobber up and down ext cmd binds

8 years agoGive quest guardians some equipment
Pasi Kallinen [Sat, 8 Oct 2016 18:09:31 +0000 (21:09 +0300)]
Give quest guardians some equipment

8 years agoTypofix
Pasi Kallinen [Sat, 8 Oct 2016 11:11:20 +0000 (14:11 +0300)]
Typofix

8 years agoHero polyed into ghoul can eat only non-veggy corpses or eggs
Pasi Kallinen [Sat, 8 Oct 2016 10:57:39 +0000 (13:57 +0300)]
Hero polyed into ghoul can eat only non-veggy corpses or eggs

Change via dNetHack.  Restrict heroes polymorphed into ghouls
so they can only eat non-vegan corpses and eggs.  This matches
more closely what pet ghouls prefer.

8 years agoAdd couple hallu monsters
Pasi Kallinen [Sat, 8 Oct 2016 10:16:46 +0000 (13:16 +0300)]
Add couple hallu monsters

8 years agoMake kicking activate statue trap
Pasi Kallinen [Sat, 8 Oct 2016 09:47:27 +0000 (12:47 +0300)]
Make kicking activate statue trap

Change via dNetHack

8 years agoPet starting apport equals your current charisma
Pasi Kallinen [Sat, 8 Oct 2016 08:55:22 +0000 (11:55 +0300)]
Pet starting apport equals your current charisma

8 years agokeybinding lint and formatting
PatR [Fri, 7 Oct 2016 20:14:54 +0000 (13:14 -0700)]
keybinding lint and formatting

8 years agoUse symbolic name STONE for levl typ 0
Pasi Kallinen [Fri, 7 Oct 2016 12:43:27 +0000 (15:43 +0300)]
Use symbolic name STONE for levl typ 0

8 years agowin32: Save and load map colors from registry
Pasi Kallinen [Thu, 6 Oct 2016 17:55:30 +0000 (20:55 +0300)]
win32: Save and load map colors from registry

8 years agoFixes entry for cursor positioning via menu
Pasi Kallinen [Thu, 6 Oct 2016 10:38:09 +0000 (13:38 +0300)]
Fixes entry for cursor positioning via menu

8 years agoIron bars, water and lava are not interesting for travel
Pasi Kallinen [Thu, 6 Oct 2016 10:33:54 +0000 (13:33 +0300)]
Iron bars, water and lava are not interesting for travel

8 years agoAccessibility: Pick travel/cursor targets from a menu
Pasi Kallinen [Thu, 6 Oct 2016 10:03:56 +0000 (13:03 +0300)]
Accessibility: Pick travel/cursor targets from a menu

Adds two new configurable keys to the cursor targeting: 'A' (getpos.menu)
and 'a' (getpos.menu.cansee). First one shows a menu of all interesting
glyphs on the map, second one shows only those in sight.

Travel command also now obeys the "request menu" -prefix, showing
the menu with interesting targets in sight, and then traveling there.

Idea via the NetHack accessibility research by Alexei Pepers.

8 years agoShow menu control keys in help menu
Pasi Kallinen [Thu, 6 Oct 2016 05:53:38 +0000 (08:53 +0300)]
Show menu control keys in help menu

8 years agoAdd key rebinding
Pasi Kallinen [Wed, 5 Oct 2016 14:19:06 +0000 (17:19 +0300)]
Add key rebinding

This is a modified version of Jason Dorje Short's key rebinding
patch, and allows also binding special keys, such as the ones
used in getloc and getpos.

One of the ways to play NetHack on nethack.alt.org is via a HTML
terminal in browser. Unfortunately this means several ctrl-key
combinations cannot be entered, because the browser intercepts
those. Similar thing applies to some international keyboard layouts
on Windows. With this patch, the user can just rebind the command
to a key that works best for them.

I've tested this on Linux TTY, X11, and Windows TTY and GUI.

8 years agotribute: The Shepherd's Crown
PatR [Wed, 5 Oct 2016 00:08:16 +0000 (17:08 -0700)]
tribute: The Shepherd's Crown

8 years agoAdd configurable symbol entry for strange object
Pasi Kallinen [Mon, 3 Oct 2016 06:36:28 +0000 (09:36 +0300)]
Add configurable symbol entry for strange object

8 years agoFix Blank symset
Pasi Kallinen [Sat, 1 Oct 2016 21:03:33 +0000 (00:03 +0300)]
Fix Blank symset

8 years agoShow some timed properties in #timeout
Pasi Kallinen [Thu, 29 Sep 2016 15:48:52 +0000 (18:48 +0300)]
Show some timed properties in #timeout

Also simplify the levitation_dialogue a bit

8 years agoFix a bug binding menu command to a default object class character
Pasi Kallinen [Sun, 25 Sep 2016 15:37:24 +0000 (18:37 +0300)]
Fix a bug binding menu command to a default object class character

Due to a wrong looping variable, it was possible to bind a menu accelerator key
to a default object class.

8 years agoGive feedback just before timed levitation runs out
Pasi Kallinen [Sat, 24 Sep 2016 17:59:19 +0000 (20:59 +0300)]
Give feedback just before timed levitation runs out

8 years agoAdd missing dark room symbol to the Guidebook
Pasi Kallinen [Sat, 24 Sep 2016 16:51:43 +0000 (19:51 +0300)]
Add missing dark room symbol to the Guidebook

8 years agoAdd missing glyphs to Blank symset
Pasi Kallinen [Sat, 24 Sep 2016 16:04:38 +0000 (19:04 +0300)]
Add missing glyphs to Blank symset

8 years agoSeparate function to check for prefix command keys
Pasi Kallinen [Sat, 24 Sep 2016 14:18:07 +0000 (17:18 +0300)]
Separate function to check for prefix command keys

8 years agoMove getpos return values to header
Pasi Kallinen [Sat, 24 Sep 2016 14:07:42 +0000 (17:07 +0300)]
Move getpos return values to header

8 years agoShow keys in travel help wrapped in single quotes
Pasi Kallinen [Wed, 21 Sep 2016 16:25:25 +0000 (19:25 +0300)]
Show keys in travel help wrapped in single quotes

8 years agoMake it easier to add entries to the help-menu
Pasi Kallinen [Wed, 21 Sep 2016 15:43:01 +0000 (18:43 +0300)]
Make it easier to add entries to the help-menu

8 years agoAdd completely blank symbol set
Pasi Kallinen [Tue, 20 Sep 2016 18:03:47 +0000 (21:03 +0300)]
Add completely blank symbol set

The blank symbol set can be used with screen reader software
to prevent it from reading the map symbols.

Prevent a segfault when looking at the map and many symbols
share the same character. Don't list too many symbols when
looking at those, if many share the same character.

8 years agoAdd full compass coordinate mode for screen readers
Pasi Kallinen [Tue, 20 Sep 2016 15:36:03 +0000 (18:36 +0300)]
Add full compass coordinate mode for screen readers

8 years agofixes entry
Pasi Kallinen [Mon, 19 Sep 2016 12:47:12 +0000 (15:47 +0300)]
fixes entry

8 years agoHorses have a tiny chance of being generated with a saddle
Pasi Kallinen [Mon, 19 Sep 2016 12:44:04 +0000 (15:44 +0300)]
Horses have a tiny chance of being generated with a saddle

Saddles are rare. Make them less so by giving domestic saddleable
creatures 1% chance of being generated with a saddle.

8 years agoFixes entries
Pasi Kallinen [Fri, 16 Sep 2016 19:05:32 +0000 (22:05 +0300)]
Fixes entries

8 years agoShow mon vs mon attack messages only when target is visible
Pasi Kallinen [Fri, 16 Sep 2016 18:28:19 +0000 (21:28 +0300)]
Show mon vs mon attack messages only when target is visible

The visibility check in mattackm doesn't guarantee both the
attacker and defender can be seen by hero. Before giving
messages, check more strictly whether we could see the
message happening - either really seeing the monster or
sensing the monster by some other means, depending on
the message.  This should remove most of the "It" messages.

Also unhide mimics who get gazed by umber hulks.  We could
keep the mimic hidden and make the messages reflect the
hulk gazing at the thing the mimic is mimicing, but this
is much easier.  This fixes bz631 / H4500

8 years agoDifferentiate the symset and roguesymset menu prompts
Pasi Kallinen [Fri, 16 Sep 2016 12:50:42 +0000 (15:50 +0300)]
Differentiate the symset and roguesymset menu prompts

8 years agoUpdate X11 style, define button rounding
Pasi Kallinen [Thu, 15 Sep 2016 15:45:18 +0000 (18:45 +0300)]
Update X11 style, define button rounding

8 years agoBetter default style for X11
Pasi Kallinen [Thu, 15 Sep 2016 15:23:15 +0000 (18:23 +0300)]
Better default style for X11

This tries to mimic the terminal, and adds some defines making it easier
to configure.

8 years agofix #H4521 - distant squeak
PatR [Mon, 12 Sep 2016 07:24:14 +0000 (00:24 -0700)]
fix #H4521 - distant squeak

Vary the message about hearing a squeak when it is close.

8 years agoFix wrong parameter order
Pasi Kallinen [Tue, 6 Sep 2016 14:35:59 +0000 (17:35 +0300)]
Fix wrong parameter order

8 years agofix bz623 - 'D' when not carrying anything
PatR [Fri, 2 Sep 2016 09:38:10 +0000 (02:38 -0700)]
fix bz623 - 'D' when not carrying anything

With menustyle set to "full" or "partial", using 'D' when not
carrying anything gave no feedback.  (Modes "traditional" and
"combination" give "you have nothing to drop" via ggetobj().)

Also, there's no need to reset in-progress armor removal, lock
picking, or trap setting if you don't actually drop anything.
The inventory they're set to operate on or with stays intact.

8 years agoExpand blind/accessibility section in the Guidebook
Pasi Kallinen [Fri, 2 Sep 2016 06:24:22 +0000 (09:24 +0300)]
Expand blind/accessibility section in the Guidebook

8 years agocorpse eating feedback
PatR [Fri, 2 Sep 2016 01:26:09 +0000 (18:26 -0700)]
corpse eating feedback

Eating a corpse and being told that it "tastes okay" (relatively
recent change so that omnivores don't find the taste of everything
to be "terrible") doesn't warrant an exclamation point.

8 years agoFor travel target location, report if no known travel path
Pasi Kallinen [Wed, 31 Aug 2016 19:00:45 +0000 (22:00 +0300)]
For travel target location, report if no known travel path

Yet another accessibility feature.  When asked for a location
to travel, and autodescribe is on, the location description
has "(no travel path)" appended, if there is no known path
to that location.

8 years agoAccessibility messages when run or travel is interrupted
Pasi Kallinen [Mon, 29 Aug 2016 17:47:36 +0000 (20:47 +0300)]
Accessibility messages when run or travel is interrupted

These were inspired by the blind accessibility changes by
Alexei Pepers.

8 years agoAlso pass raw printed texts to the msghandler
Pasi Kallinen [Sat, 27 Aug 2016 18:07:33 +0000 (21:07 +0300)]
Also pass raw printed texts to the msghandler

8 years agoWait for the message handler process to finish
Pasi Kallinen [Sat, 27 Aug 2016 17:13:17 +0000 (20:13 +0300)]
Wait for the message handler process to finish

8 years agofix #H4492 - ing_suffix("throw") gave "throwwing"
PatR [Wed, 24 Aug 2016 02:37:42 +0000 (19:37 -0700)]
fix #H4492 - ing_suffix("throw") gave "throwwing"

The bug report assumed "you mime throwwing something" feedback
from 't-' was a typo, but 'throwwing' gets generated from 'throw'.
Change ing_suffix() not to double final 'w'.  Presumeably 'w' and 'y'
are exceptions because they're sometimes used as vowels.

Change 'strrchr()' to 'rindex()' like the rest of nethack.  Someday
those will need to be switched the other way around.

Add some missing bounds checking, although since ing_suffix() isn't
used for user-supplied strings, that's probably superfluous.

8 years agoFix Guidebook typos
Pasi Kallinen [Sun, 21 Aug 2016 07:05:45 +0000 (10:05 +0300)]
Fix Guidebook typos

8 years agoFix tribute typos
Pasi Kallinen [Sun, 21 Aug 2016 06:16:22 +0000 (09:16 +0300)]
Fix tribute typos

Ran the tribute file through a spellchecker, and double-checked with Pat as he
added most of the tributes.

8 years agofix #H4482 - "a some <foo> corpses"
PatR [Sat, 13 Aug 2016 18:17:32 +0000 (11:17 -0700)]
fix #H4482 - "a some <foo> corpses"

farlook was changed (end of December) to use doname instead of xname
to yield more info for items which had already been seen up close,
but it gave away info about ones which hadn't.  So doname was changed
(end of April) to use "some" instead of precise quantity (when the
quantity is greater than 1) for the latter, but that doesn't work
well with corpse_xname() when the hero is blind, yielding "a some
<foo> corpses".  While testing the first fix attempt, I noticed that
pickup gave "you can only lift some of the some <foo> corpses".

This fix is far from perfect.  farlook can still say "some <item>s"
but lookhere and pickup always say "N <item>s".  Picking up a stack
while blind will show "N <item>s" in inventory display, but dropping
it while still blind will revert to "some <item>s" for farlook.

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