Commit Graph

5859 Commits

Author SHA1 Message Date
PatR
ef9cd17942 X11 extcmd_height_delta resourse
Umpteenth revision of the X11 extended command menu.  Add a new
resource to NetHack.ad to control its initial size.

I still hope there's a better way to do this, but this is my last
shot at it.
2016-03-04 00:13:23 -08:00
PatR
db9dddc535 fix #H4262 - mon weapon attacks for non-weapon dmg
Let monsters who have a weapon attack for non-physical damage dish
out physical damage instead of doing the drain life or drain
strength they usually do if they happen to be wielding cockatrice
corpses or a couple of particular aritfacts that do more harm
than just level drain.  (Other artifacts are candidates, but I
don't think it's worth checking for them since the monsters
involved have such a small chance of acquiring and wielding them.)
Also switch to physical if monster's ability has been cancelled.

Only barrow wight, Nazgul, and erinys are affected.  Yeenoghu and
the Master Assassin have a weapon attack for physical damage and
another one for non-physical damage (not necessarily delivered in
that order).  They haven't been changed--only the physical damage
attack has a chance to apply their weapon's special damage.
2016-03-03 00:07:57 -08:00
PatR
c0f29e71cd monmove.c tweaks
While looking at #H4265 ("Bug - Monsters opening doors" about
feedback naming the unseen monster who opened a door), I didn't
find the the problem.  But I did notice a couple of suspicious
constructs.  Fix an assignment that gave a boolean variable a
value of 16, and add parentheses around 'a & b' in (a & b && c).
The latter isn't incorrect, it just looks strange.
2016-03-02 15:01:21 -08:00
PatR
7a5fb72787 address #H4266 - build problem with clang Modules
Report states that using OSX Xcode IDE results in use of 'clang
Modules', whatever those are, and role.c's 'filter' struct ends up
conflicting with a function declared by <curses.h> (or possibly
<ncurses.h> since one includes the other).  src/role.c does not
include <curses.h>, so this smacks of the problems caused by using
precompiled headers on pre-OSX Mac.

Instead of trying to import nethack into Xcode, I temporarily
inserted '#include <curses.h>' at the end of unixconf.h.  gcc did
complain about 'filter' in role.c (but not in invent.c, despite
-Wshadow), and then complained about termcap.c using TRUE when it
wasn't defined (after in had been #undef'd, where there's a comment
stating that it won't be used in the rest of that file), and also
complained about static function winch() in wintty.c conflicting
with external winch() in curses.

This renames 'filter' and 'winch()' to things that won't conflict.
Also, our winch() is a signal handler but had the wrong signature
for one.  And the troublesome use of TRUE was in code that was
supposed to be dealing with int rather than boolean.
2016-03-02 00:37:56 -08:00
PatR
3c5c4708e0 tribute typo 2016-02-29 17:18:37 -08:00
PatR
ca02008d03 fix #H4219 - renegade Angel banter
Lawful angels deliver taunt messages from a pool of messages which
might mention the lawful god; demons and non-lawful angels draw from
another pool which doesn't mention any gods.  Since it is odd for a
'renegade' angel to claim to be operating for its god, choose taunts
from the other pool of messages for renegade lawful angels.

Not related:  some formatting fixups in include/mextra.h.
2016-02-28 18:47:01 -08:00
PatR
be084392d5 monk vs shuriken
One entry among many in #H4216:  make shuriken be a pre-discovered
item for monk role.  The word "shuriken" comes from Japanese and
martial-arts monk is primarily Chinese, but shuriken/throwing-star
is a martial-arts type of weapon and monks get a multi-shot bonus
for it (even though they can't advance its skill beyond basic...).
2016-02-28 17:42:12 -08:00
PatR
850ed0cba6 address #H4247 & #4248 - theft of quest artifact
Two different reports complaining that having the Wizard steal the
hero's quest artifact is a bad thing.  This doesn't change that,
but it does make all quest artifacts become equal targets so that
wishing for other roles' artifacts doesn't offer such a safe way to
have whichever special attributes they provide.

Quest artifacts are actually higher priority targets for theft than
the Amulet.  I suspect that probably wasn't originally intended,
but I left things that way.  Taking quest artifacts leaves the hero
more vulnerable to future thefts, and once they're gone the Amulet
has priority over the invocation tools.
2016-02-27 16:23:24 -08:00
nhmall
f92f43a526 cloak rumor
H4243 bz 353
This just makes the rumor wording sound a bit less absolute than it did.
2016-02-27 08:08:56 -05:00
PatR
a00c8068f0 segment feedback when probing long worms
When using a stethoscope or wand of probing on a long worm, report
the number of segments it has in the feedback given.

Some of the extra bhitpos and/or notonhead assigments may not be
necessary.  They were added when I was trying to figure out the
question of why probing of a tail segment revealed a long worm's
inventory even though the code explicitly prevents that.  (Answer:
it didn't; I had misinterpreted bz 12 to think that that was what
was being reported.  You need to use wand of probing--or "insigtful"
Magicbane hit--on the head in order to see its inventory or be told
"not carrying anything".)
2016-02-26 15:16:49 -08:00
PatR
0d7e51e88a fix bz 12 - long worm inventory feedback
I initially misunderstood this bug report about a nymph who was
polymorphed into a long worm while carrying a cursed figurine.
It wasn't about a long worm having inventory or about probing of
the worm's tail revealing that it had inventory, it was about the
message given when the cursed figurine activated itself.  If that
happened while the head was out of view but at least one tail
segment was visible, the message about the new monster emerging
from the long worm's backpack implied that that pack was carried
by the tail segment.

Only give the emerge-from-backpack message when the worm's head
is visible.  Likewise if a carried egg hatches.
2016-02-26 14:37:07 -08:00
PatR
45d1a45458 inventory menu tweaks
Add or revise a couple of comments and make a couple of code tweaks
to display_pickinv().
2016-02-24 14:57:00 -08:00
PatR
1a00fe221b new featurette: '-' in inventory menu
Requested during beta testing last year, include a menu entry of
"- - your bare hands" (or "your gloved hands") for wielding,
"- - empty quiver" for readying quiver,
"- - your fingertip" for engraving, or
"- - your fingers" for applying grease
if the user responds with '?' or '*' at the
"What do you want to {wield|ready|write with|grease}? [- abc or ?*]"
getobj prompt.  (First dash is inventory selector 'letter', second
dash is menu separator between the letter and its choice description.)
2016-02-24 01:02:59 -08:00
PatR
562ccc2518 updated Guidebook.txt 2016-02-22 17:57:00 -08:00
PatR
6f7203bd61 minor Guidebook update
Miscellaneous changes suggested during beta testing.  There were more,
but I've run out of gas.

Guidebook.mn has been tested, Guidebook.tex has not.
2016-02-22 17:52:55 -08:00
PatR
3a7e432aea remove trailing spaces from Guidebook.mn
I'm not sure whether I'll do the same for Guidebook.tex.

Guidebook.txt wasn't up to date.  I've got some substantive (but minor)
changes coming so am not checking in an updated one yet.
2016-02-22 16:34:30 -08:00
PatR
12e4e732ca nasty() again
Even out the summoning distribution by adding more lawful candidates.
There used to be only 4; now there are 10.  Chaotics have 14, so are
still more likely to get "neutral or own alignment" and stop, but the
difference is now pretty small once you factor in the 18 neutral ones.
2016-02-22 15:50:34 -08:00
PatR
d77b6bb8aa tribute: Witches Abroad 2016-02-22 15:15:31 -08:00
PatR
07f8488bbf fix #H4246 - nasty() bugs
In theory nasty() could summon 200 critters at a time, although the
chance seems fairly remote.  But it was biased towards having lawfuls
summon more critters than others since there are fewer lawfuls in the
nasties[] list.  This puts a cap of 8 successful makemon() calls,
enough to completely surround the hero.  More than 8 monsters can be
generated, if any of the makemon() calls produces a group.  (I think
fire giants are the only thing in nasties[] that ever come in groups.)
It's still biased toward lawful summoners trying more times hoping to
produce a lawful creature and generating chaotic ones in the process.

The bug report also thought there was some problem between chaotic
and unaligned or with the Wizard, but unaligned is treated as if it
were chaotic (due to use of sgn() in the two or three places where
alignment type is manipulated) so that isn't an actual problem.
2016-02-19 18:15:45 -08:00
PatR
552b73b3f0 sys/unix/hints/macosx.sh permissions 2016-02-19 17:07:13 -08:00
PatR
27191bf517 repair tribute save-breaking change
I was thinking about iflags rather than context and didn't realize
that the change to maxinum number of passages would breal save files.
Put the tribute context back to 3.6.0 size.

Anyone who grabbed from public git yesterday is potentially in for
some temporary trouble.  That's the risk they take for trying to stay
on the bleeding edge.
2016-02-19 10:41:35 -08:00
PatR
ba5449e17e tribute passage limit
Death Quotes have reached the current limit of 30 passages per 'book'.
Instead of increasing that, change the selection code to be able to
operate on a subset (dropped from 30 down to 20) at a time while
keeping the excess available for later selection.

Chatting with Death (more than 20 times since he also delivers non-
tribute messages) should cycle through 20 of his 30 passages without
repeating.  After that, another subset of 20 out of the 30 will be
chosen, independent of the first set so might contain all, some, or
none of the 10 that left out before.
2016-02-18 14:46:25 -08:00
nhmall
63ef462185 quest text grammar bit 2016-02-18 07:50:35 -05:00
PatR
9cc20d66ac OSX sysconf bit
Prefer macports gdb over Xcode gdb.  No effect if macports gdb isn't
installed or if user's sysconf doesn't set PANICTRACE_GDB to 1 or 2.
2016-02-17 14:20:56 -08:00
PatR
cd932656ff sys/share/lev_yacc.c 2016-02-17 14:10:36 -08:00
PatR
ba7fbb6e8b lev_comp lint redux
The rest of this accidentally got pushed with the Reaper Man passages.
2016-02-17 14:08:19 -08:00
PatR
f7c9a1fa31 tribute: Reaper Man 2016-02-17 14:02:51 -08:00
PatR
25d18ddeb8 lev_comp lint 2016-02-17 13:45:05 -08:00
PatR
bf14b81ede looking at hidden monsters followup
The new code wasn't handling the Wizard mimicking another monster
correctly for probing.
2016-02-16 17:58:15 -08:00
PatR
f132a12a07 looking at hidden monsters
Sometimes you can see a hidden monster without bringing it out of
hiding (wand of probing, blessed potion of monster detection) but
look_at wasn't mentioning the fact that the monster was hidden and
probing described mimics accurately but lumped all hiders together
as "concealed".  Describe all hidden monsters more consistently.
2016-02-16 17:36:51 -08:00
PatR
f5b2a8c373 better late than never? update fixes36.0 2016-02-16 16:52:38 -08:00
PatR
f5a39c0596 fix for 'R' on armor ignoring 'T's restrictions
Reported directly to devteam, the 'R' command would let you take off
a suit from under a cloak or a shirt from under a suit and/or a cloak,
and it didn't require any extra turns.  'T' doesn't allow either of
those.  ('A' lets you take off a suit from under a cloak, adding in
extra turns to implicitly take the cloak off and put it back on,
but doesn't allow the same for shirt.)

'R' also let you attempt to take off embedded dragon scales if you
were wearing 2 or more accessories (or just 1 with paranoid_confirm
set for takeoff/remove), which triggered impossible "select_off:
<scales object> (embedded in skin)???".
2016-02-16 16:06:02 -08:00
PatR
8d2a74b5b0 X11 extended command menu scrolling
When the extended command menu auto-scrolls as the player types in
characters, scroll so that all matching entries come into view rather
than just the first one.  For example, it someone types 'w', instead
of just highlighting and showing "wipe", it will highlight "wipe"
(because that has become the default response when <return> is used)
but also show "wiz-this", "wiz-that", and "wmode".  It actually shows
one extra entry beyond the last matching one--so you can see that
there aren't any more ambiguous choices--except for 'w' where "wmode"
is the very last extended command.

Previously, on subsequent popups of the extended command menu, the
scrollbar's slider was left drawn in the position it was in during
the previous time even though menu content wasn't scrolled.  Now it's
forced back to the top (non-scrolled) position when that menu is
popped up.
2016-02-15 00:59:33 -08:00
nhmall
640267f53a fix for / command to find names like "Hachi" via screen
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   src/pager.c

fix bug bz54; this bug had no web ID

Report:
    For /, asking via cursor can't find special named entries like "Hachi"
    because the entry for the monster type like "dog" gets used instead.

Change:
    Instead of "More info?", when applicable it will now do:
    More info about "hachi"? [yn] (n) n
    More info about "little dog"? [yn] (n)
2016-02-14 22:23:59 -05:00
nhmall
592ae69726 another Deaf bit
Changes to be committed:
	modified:   src/engrave.c
2016-02-14 18:13:08 -05:00
nhmall
85582590ab Warning and adjacent hiders
Changes to be committed:
	modified:   include/extern.h
	modified:   src/allmain.c
	modified:   src/detect.c
	modified:   src/display.c

Bug bz22 (no corresponding web id) reported quite some time ago.

Reported:
    Warning stays on when a "lurker above" is co-located with a
    boulder, even when you are adjacent to the spot.  Even though
    you see the warning symbol and not the boulder, an attempt
    to move in that  direction tries to move the boulder, rather
    than attack the creature you know to be there.  What's more,
    you can get the
    "You hear a  monster on the other side of the boulder..."
    preventing anything from happening if there is a monster on
    the other side of the spot.  The player doesn't necessarily
    even know there is a boulder there at the time (because
    warning trumps the boulder display) so it can all be somewhat
    confusing.

Change:
    - Split off a section of the search0() code for monsters into
      a separately callable function, arbitrarily named mfind0(),
      which takes a special arg for this particular scenario.
    - If you have Warning and you get adjacent to an unseen hider
      such as a lurker above with the Warning glyph still displayed,
      a specific search is carried out for the obviously present monster.
    - The boulder concerns in the original report should become moot
      after this.
2016-02-14 17:45:20 -05:00
PatR
d91b2e5fd7 extended command menu for X11
When the extended command menu is big enough to need a scrollbar,
leave more elbow room when forcing its height to fit on screen.
The last entry was frequently obscured by OSX's "docking tray"
desktop decoration and the resize hotspot (bottom right corner of
the menu popup) could be hard to access.

I'm not particularly happy with this code.  There really has to be
a better way to accomplish what's needed.
2016-02-13 18:06:50 -08:00
PatR
87edc53f31 sys/share/ dgn_comp and lev_comp code 2016-02-13 18:00:44 -08:00
PatR
ae5d556980 dgn_comp,lev_comp lint
Newer compiler found new things to complain about.
NHinternal/shared/sys/share/flexhack.h has been updated.

Generated sys/share/ sources have to be committed separately so
they happen after this update fills in new banner comment for
their source.
2016-02-13 17:56:57 -08:00
PatR
bcb9780fe7 fix #H4245 - dipping prompt
Bad punctuation for the "dip <obj> into fountain" and "dip <obj> into
pool" prompts.
2016-02-13 15:54:21 -08:00
nhmall
57a71bc13d grammar bit 2016-02-13 17:48:34 -05:00
nhmall
5bb3e01424 improve Deaf messaging for minetown watch and shops
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   src/fountain.c
	modified:   src/monmove.c
	modified:   src/shk.c

Fix for H4242, bz352
2016-02-13 17:29:15 -05:00
PatR
860e7ee9c6 unix/hints/macosx10.8
10.8 is different from 10.7 (major change for X11) and from 10.10
(install issues due to root directory tree), so needs its own hints.
2016-02-13 12:58:54 -08:00
PatR
962b3e43f4 win/X11 lint 2016-02-13 10:58:44 -08:00
PatR
3b4f2fbfa7 makedefs.c lint
Add some missing prototypes and change some 'char *' function paramters
to 'const char *'.
2016-02-13 02:05:43 -08:00
PatR
5fb2e25f3d src lint
Another OS upgrade (OSX 10.6.8 -> 10.8.5) with different toolset,
another change in compiler behavior.  Earlier 'gcc -Wwrite-strings'
didn't complain about passing string literals as 'char *' paremeters
if there was no prototype in scope.  This one found one or two of
those in options.c and several in makedefs.c (fix coming soon in a
separate commit...).  This adds some missing prototypes and reorders
the existing ones to match their order within the file.  There were
also several functions which were declared static in their advance
declarations but not in the definitions, which can be confusing when
reading the source.
2016-02-13 01:59:51 -08:00
keni
51b70cc232 update FIXME to the real locations of the public git repos 2016-02-11 18:12:15 -05:00
PatR
8c7f89852a formatting for win/X11/dialogs.c 2016-02-10 18:25:20 -08:00
PatR
cbe7983c4c tribute: Moving Pictures 2016-02-10 18:22:38 -08:00
PatR
0748b0c90c tribute: Eric 2016-02-10 16:14:11 -08:00