Commit Graph

10861 Commits

Author SHA1 Message Date
PatR
0a575befcc identify tweaks
Give better feedback if reading a scroll of identify when it is the
only item in inventory (making that empty when scroll is used up).

Reading a cursed scroll of identify used to always ID 1 item besides
itself.  Change it to behave like confused identify--only identifying
itself--if read when the scroll hasn't been discovered yet.  Same as
before when scroll has already been discovered:  identify 1 item.
2020-07-28 13:10:11 -07:00
nhmall
c8ad99fcdf add fixes37.7 entry for f664e83 gone portal 2020-07-28 08:18:39 -04:00
PatR
3cc82cbbe7 venom bit
I looked for places where changing "{blinding,acid} venom" into
"splash of {blinding,acid} venom" might make messages become too
verbose.  Turns out to have been unnecessary work because the full
name won't be used unless you get a venom object in inventory and
formally identify it.  Wizard mode, or bones from wizard mode, is
necessary for that to happen so the possibility can be ignored.
[The name change is still useful for wizard mode wishing though.]

Many messages use hard-coded "venom" instead of xname() so won't
be affected even if such identification takes place.  However,
thitmon() was producing
 |The <mon> is hit by the splash of venom.
 |The splash of venom blinds the <mon>.
which seems rather redundant even without the longer full object
name.  So change the second message to be generated as
 |The venom blinds the <mon>.
It also shortens "cream pie" in first line to "pie" in second one.
2020-07-27 09:20:12 -07:00
PatR
fae75f5930 troll corpse revival
Prevent corpses left by cancelled trolls from reviving.  Their
revival is an innate ability but is clearly a magical one, so make
that be subject to cancellation magic.

Change existing corpses that are scheduled to revive to rot instead
if they get cancelled as objects.  Rider corpses are excluded.

Uncancel an ice troll whose corpse is put into an ice box.

Commit e9f53ab7f6 at the end of May
to fix corpses taken out of ice boxes by monsters changed removing
corpses from ice boxes by anybody to always give them rot-away
timers, even for trolls.  Make an exception for ice troll corpses:
give those revive timers instead.
2020-07-26 11:13:43 -07:00
PatR
0fe9905cf8 rocks vs unicorns
A reddit thread mentioned that throwing rocks at unicorns behaved
the same as throwing gems at them:  not treated as an attack and if
teleporting away is allowed, they will.  Change to treat shooting
gems and glass at unicorns with a sling as an attack rather than as
just giving the gem or piece of glass to them, and treat throwing
or shooting rocks and gray stones as an attack too.

If picked up by blind hero while not yet seen, gems and glass
format as "gem" and rocks and gray stones format as "stone" so the
player can always tell the difference.  Forgetting to unwield a
sling before interacting with a unicorn is on the player's head.
2020-07-26 07:46:07 -07:00
nhw_cron
d3ee8a7717 This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-07-26 09:43:33 -04:00
PatR
d7307f9ca5 Guidebook tweaks
Fix at least one typo.  Change a few quoted and/or italicized words
to fixed width (tty) font.  In the "Curses and Blessings" subsection,
mention dropping objects onto altars and the terms "BUC" and "BUCX".
2020-07-25 19:45:50 -07:00
nhmall
d710377689 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-07-25 11:44:35 -04:00
nhmall
694fe2f161 allow checking tile2x11 utility build and execution on Windows
- this doesn't depend on building with X11 or linking with X11.
2020-07-25 11:42:59 -04:00
nhmall
c37882d16b x11 utility tile name comparisons were checking against unitialized data 2020-07-25 11:41:58 -04:00
PatR
6973e63776 venom vs tiles
tiles2x11 didn't complain about the tile definitions of the renamed
objects.  It seems to me that all processors of win/share/*.txt
ought to be sharing the same code instead of apparently rolling
their own.  (Maybe the issue was issuing diagnostic messages rather
than noticing the name mismatches?  I haven't looked.)
2020-07-25 02:21:32 -07:00
PatR
84ccc14451 wizhelp update
Update the help menu entry for wizard mode commands to reflect the
recent change to #wizrumorcheck.  This messes up the formatting a
bit (by introducing a continuation line) but the no longer precise
command name warrants it.
2020-07-24 18:25:54 -07:00
PatR
f66b645878 couple of comment typos 2020-07-24 17:39:48 -07:00
PatR
42245f8e67 wizard mode vs venom object names
I tried wishing for "splashes of venom" but was told that no such
thing exists even though "splashs of venom" and "2 splash of venom"
both work to produce "2 splashes of venom".  After the spurious
failure, retrying with EDIT_GETLIN enabled showed that "splashes"
had been singularized to "splashe" so fix that.

"2 splashes of venom" IDed to "2 uncursed blinding venoms" because
the base name omits "splash of" prefix.  And due to that, explicitly
wishing for "splash of {acid,blinding} venom" didn't work either.
Change the names to include the prefix, and add a hack to makedefs
to keep generating the old macro names without the prefix.  (Wishing
for "{acid,blinding} venom" still works due to post-3.6.6 changes
to " of " matching.)
2020-07-24 14:45:59 -07:00
PatR
c1c515af9f weapon skill usage
A recent newsgroup or reddit complaint stated that only 75% of a
monks attacks used martial arts.  It turned out to be true; the
'valid_weapon_attack' intended to control whether skill gets
exercised was being overloaded for skill use.  So the monk's 1..4
base damage used skill for 2..4 but not for 1.  That was never
intended (nor for other roles and other skills; a damage value of
1 is meant to miss out on a chance to train the skill for future
enhancement but should still get a skill bonus or penalty for the
current attack).
2020-07-24 13:12:13 -07:00
PatR
97cbbaa0ac more feedback for monk suit penalty
Refine the enlightenment feedback when a monk has both a suit penalty
and an increase accuracy bonus.
2020-07-20 15:04:25 -07:00
PatR
afbcf3f9a9 monk's to-hit penalty for wearing a suit
If hero is a monk who is wearing a suit, have ^X mention the to-hit
penalty for that in the status section even though it isn't a normal
status line item.  Combat feedback makes it annoyingly obvious, but
player might forget if MSGTYPE=hide is used to suppress the "Your
armor is rather cumbersome..." message.
2020-07-20 03:00:28 -07:00
PatR
22cbabde8d Qt tiles loading failure
For Qt, if unable to load either nhfiles.bmp or x11tiles, quit after
giving the can't-load-tiles feedback instead of continuing on and
eventually triggering a segfault.
2020-07-18 12:59:24 -07:00
PatR
d8e383c63f unix/hints/macosx10.10-qt
macosx10.10-qt was derived from an out of date version of
macosx10.10.  This tries to make combined X11+Qt behave sanely but
I have no way of testing it.

It appears to require homebrew, at least that's what the construct
$(shell brew ...) to set up QTDIR suggests.  That seems iffy and
should at least be documented.

It includes tty along with Qt but lacks support for including the
curses interface so definitely needs more updating.
2020-07-18 08:18:25 -07:00
nhmall
a3bfb599ca more Makefile maintenance for Windows, msdos 2020-07-18 10:31:34 -04:00
nhmall
aa69f6be04 mirror the recent make depends update in some other Makefiles 2020-07-18 09:53:30 -04:00
nhmall
e09c196af6 cron-daily update - Files 2020-07-18 09:27:52 -04:00
nhmall
d6b5241929 Files bit 2020-07-18 09:25:12 -04:00
nhmall
9b58010880 turn off clang -Wshadow when processing some qt headers
removes recently added win/Qt/qt_undef.h and win/Qt/qt_redef.h
adds win/Qt/qt_pre.h win/Qt/qt_post.h
2020-07-18 08:31:51 -04:00
PatR
c9ea607e46 bring Unix 'make depend' up to date
and run it.

We need to do some about preserving the Makefiles as they were before
the obsolete code went away, because many of the bits that that
obsolete code depended on are now going away too.
2020-07-18 01:36:21 -07:00
nhmall
3ea4261373 Merge branch 'macosx-qtfixes' into NetHack-3.7 2020-07-17 23:31:30 -04:00
nhmall
4fbc706fe5 update OSX hints/macosx10.10-qt VARDATND to include nhtiles.bmp
Match it to the linux Qt VARDATND

void NetHackQtWindow::CursorTo(int x,int y UNUSED) { puts("unexpected CursorTo"); }
2020-07-17 20:27:32 -04:00
nhmall
f6b4306ce6 quiet down some build warnings with Qt under OSX clang++ 2020-07-17 18:37:07 -04:00
PatR
74e0be478a remove old bonesid workaround
Noticed when the comment about "this can go away when compatibility
with 3.6.x is no longer needed" was modified recently.  Make it and
the code it applied to go away.
2020-07-17 10:14:24 -07:00
nhmall
84b598e489 get rid of some shadowed variable warnings with Qt under OSX
In file included from ../win/Qt/qt_bind.cpp:20:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/QtGui:3:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/QtGuiDepends:3:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtCore.framework/Headers/QtCore:4:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtCore.framework/Headers/qglobal.h:1302:
/usr/local/Cellar/qt/5.15.0/lib/QtCore.framework/Headers/qflags.h:121:41: warning: declaration shadows a
      variable in the global namespace [-Wshadow]
    Q_DECL_CONSTEXPR inline QFlags(Enum flags) noexcept : i(Int(flags)) {}
                                        ^
[…]

../include/flag.h:390:29: note: previous declaration is here
extern NEARDATA struct flag flags;
                            ^
In file included from ../win/Qt/qt_click.cpp:18:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/QtGui:3:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/QtGuiDepends:3:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtCore.framework/Headers/QtCore:36:
/usr/local/Cellar/qt/5.15.0/lib/QtCore.framework/Headers/qcache.h:191:15: warning: declaration shadows a
      variable in the global namespace [-Wshadow]
        Node *u = n;
              ^
../include/decl.h:219:23: note: previous declaration is here
E NEARDATA struct you u;
                      ^
[…]

In file included from ../win/Qt/qt_click.cpp:18:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/QtGui:5:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qabstracttextdocumentlayout.h:45:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qtextlayout.h:47:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qcolor.h:44:
/usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qrgb.h:66:46: warning: declaration shadows a
      variable in the global namespace [-Wshadow]
inline Q_DECL_CONSTEXPR QRgb qRgb(int r, int g, int b)// set RGB value
                                             ^
../include/decl.h:1208:27: note: previous declaration is here
E struct instance_globals g;
                          ^
[…]

In file included from ../win/Qt/qt_glyph.cpp:21:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/QtGui:5:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qabstracttextdocumentlayout.h:48:
/usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qpalette.h:107:49: warning: declaration shadows a
      variable in the global namespace [-Wshadow]
    inline void setCurrentColorGroup(ColorGroup cg) { data.current_group = cg; }
                                                ^
../include/decl.h:1216:30: note: previous declaration is here
E const struct const_globals cg;
                             ^
2020-07-16 22:20:23 -04:00
nhmall
eab7a12b77 macosx10.10-qt follow-up bit to 3073a588 2020-07-16 19:57:20 -04:00
nhmall
d1d956aa56 from cron-daily - doc/Guidebook.txt 2020-07-15 20:46:18 -04:00
PatR
abe4db6e60 fix pull request #365 - monster max HP
The recently added sanity check for monster maximum HP was giving
false complaints when Nd8 monster had N mhpmax.  Most noticeable
for level 1 monsters (level 0 monsters use 1d4 instead of 0d8 and
weren't affected) but possible for higher level ones if they were
unlucky--from their own perspective--with all their d8 rolls.

Give level N monsters a minimum of N+1 HP, so minimum of 2 for
level 1 monsters, making 1/8 of those stronger.  Same minimum for
level 0 monsters, 25% of which will become stronger now.  (The pull
request's patch gave every Nd8 monster 1 extra HP; this only does
so for Nd8 and 1d4 ones which have rolled lowest possible amount.)

Also relax the sanity check so that existing to-be-3.7 save files
don't continue to trigger sanity complaints for existing monsters
that have the old minimum.

Fixes 365
2020-07-14 17:03:51 -07:00
PatR
ee7fbc4a61 mind flayer vs headless target
When a mind flayer scores a hit against a headless target (or worm's
tail), there's a message that says that the attack hits and that the
target is unharmed.  Since an ordinary mind flayer has 3 such attacks
per turn and a master mind flayer has 5, it can become excessively
verbose.

This doesn't eliminate the attacks until a hit fails to do harm, so
ordinary misses still get repeated if they happen first.  Once a
successful hit doesn't do anything, any remaining AT_TENT+AD_DRIN
attacks are silently skipped.  That way feedback isn't as verbose
and mind flayers don't seem to be quite so stupid about using their
tentacles when those won't work.  Unfortunately they need to relearn
the lesson every turn they attack.
2020-07-14 05:43:51 -07:00
PatR
a37975b625 fix pull request #367 - mind flayer psychic blast
hitting a hidden monster didn't reveal that monster.  It stayed
hidden despite the feedback describing it as if it could be seen.

The pull request's two line fix handled a monster's blast hitting
another monster but left two related issues as-is:  monster's blast
hitting hidden poly'd hero left hero unrevealed and poly'd hero's
blast left hidden monster unrevealed.  Same code, different bug:
poly'd hero's blast affected mindless monsters.

This unhides an affected target before the message about it being
hit rather than after.  That would look better if preceded by a
message describing the object (mimic or hides-under) or furniture
(mimic) or empty spot (ceiling hider) as being or concealing a
monster but I didn't put in sufficient effort to accomplish that.

Fixes #367
Fixes #362
2020-07-14 04:55:53 -07:00
PatR
12498ffa44 fix github issue #372 - Wizard escaping dungeon
If the Wizard fled up the stairs on level 1 and escaped the dungeon
(which can only happen if he isn't carrying the Amulet or any of
the invocation items), the number_of_wizards counter wasn't being
decremented.  If that was the only Wizard, he couldn't be brought
back into play because he wasn't on the migrating monsters list, and
he wouldn't appear on the Plane of Earth when the hero eventually
went there.  If that was one of two, the remaining one couldn't use
Double Trouble anymore.  (I'm not sure about Earth handling in that
situation; should be moot now.)

Wizard mode blessed genocide of "*" when the Wizard is on current
level caused the same problem.

Fix by keeping the number_of_wizards counter up to date if mongone()
is called for the Wizard, handling both cases.  Also, don't let the
Wizard escape the dungeon unless he's one of two at the time, making
the first case no longer possible.

If wizard mode blessed genocide of "*" is used on the level where
the quest nemesis is present, the killed-the-nemesis feedback will
now be given.  I'm not completely convinced that this was the right
thing to do, but it only applies to wizard mode so may not matter.

Fixes #372
2020-07-13 01:58:44 -07:00
PatR
2980aaa4cb history/Credits: aeb's Hack
Give an implied explanation for the seemingly odd copyright info in
the source files and the run-time startup banner.

The extra Hack version number, the release dates, and the newsgroup
creation are from
 https://homepages.cwi.nl/~aeb/games/hack/hack.html
which is the "Brouwer's /Hack/ page at CWI" external link near the
end of Andries Brouwer's Wikipedia page.
2020-07-12 17:17:14 -07:00
PatR
8820306071 book of the dead fixes entry
A recent fixes entry reported things incorrectly.  The invocation
failure message inappropriately referring to the Bell and Candelabrum
as artifacts was given when reading the Book after both of those have
been used to set things up and either or both of them are cursed, not
when they weren't used before the Book.
2020-07-10 08:43:28 -07:00
nhmall
8d9820c04f from cron-daily - Guidebook.txt 2020-07-10 10:05:37 -04:00
PatR
adb8fb57a2 Guidebook: traps
The documentation on traps was pretty skimpy so expand it.
2020-07-10 03:37:44 -07:00
PatR
581a27bf98 others_check() comment
Starting out replacing ambiguous pronoun "it" since it might seem
to be referring to "--More--" rather than to "...", then ended up
rewriting whole paragraph.
2020-07-10 01:37:46 -07:00
PatR
0bd2c3154d fix default engraving/epitaph/bogusmon corruption
Fixes #369.
Fixes #370.

The default entries inserted by makedefs -s (starting in 3.6.6,
to guard against having an empty data file which led to divide by
zero crash when nethack picked a random entry) lacked a terminating
newline so the first entry from the file (for the usual case when
that data file wasn't empty) got implicitly concatenated to it.
If the first entry got chosen during play, the initial portion
corresponding to the default entry was decrypted properly but the
concatenated portion corresponding to file's first line didn't.
So gibberish was appended to default engraving or epitaph or bogus
monster; also, the input file's first line would never appear.

The newline fix in makedefs is different from pull request #370
but accomplishes the same thing.

The bulk of the patch is an enhancement to #wizrumorcheck to show
first (default inserted by makedefs), second (first in input file)
and last engravings, epitaphs, and bogusmons in addition to rumors.
The command name has become a little misleading but the limited
functionality doesn't call for separate commands.
2020-07-09 19:23:19 -07:00
nhmall
63842b64ef typo - missing closing bracket 2020-07-07 22:16:00 -04:00
PatR
6be18a2086 Guidebook.tex comment typo 2020-07-07 18:57:14 -07:00
nhmall
484182319f from cron-daily doc/Guidebook.txt 2020-07-07 21:54:47 -04:00
nhmall
77815e87ee follow-up to patchlevel and build status consolidation
Also remove redundant prototype of has_color in wintty.h now that
it is in extern.h.

has_color() became an actual function when an array of color capabilities
got added to the windowport interface a while back (it checks that array).
2020-07-07 21:00:11 -04:00
nhmall
8e945073aa clear up a couple of warnings
src\mapglyph.c(330): warning C4013: 'has_color' undefined; assuming extern returning int
src\options.c(4820): warning C4101: 'tmpwin': unreferenced local variable
src\options.c(4821): warning C4101: 'any': unreferenced local variable
2020-07-07 20:37:06 -04:00
nhmall
c95fe8c32b Merge branch 'NetHack-3.7' into header-order3.7 2020-07-07 20:10:25 -04:00
nhmall
a309518834 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-07-07 20:05:23 -04:00
nhmall
b967f73b96 build with the current Lua version 5.4.0 by default if not overridden 2020-07-07 17:36:23 -04:00