Commit Graph

10882 Commits

Author SHA1 Message Date
nhmall
1d2a5aed37 adjust note wording in mkobj.c and makemon.c 2020-07-31 16:59:34 -04:00
PatR
97cc689553 tin identification
Tin handling code used tin->cknown to indicate that the variety
(soup, deep fried, pureed, &c) was known, but neither object
identification nor end of game disclosure was setting cknown for
that type of object.

^I behaves as if cknown is set, so the problem was hidden during
times when anyone was likely to be paying attention.
2020-07-31 13:14:09 -07:00
PatR
3388fd5887 Qt comment tidbit
A recenly added comment used "its" where "it's" was intended.
Instead of just adding an apostrophe, rewrite the clause.
2020-07-31 12:53:34 -07:00
nhmall
e524fc4fc8 clarify what was meant by "special" in a comment 2020-07-31 10:57:20 -04:00
nhmall
6357505948 makemon and mkobj follow-up initialization bit 2020-07-31 10:00:14 -04:00
nhmall
8b2750ab60 lower the code upkeep for mextra and oextra pointer additions 2020-07-31 09:42:17 -04:00
nhmall
f153c1f0d1 typo fix in include/obj.h comment 2020-07-31 08:42:40 -04:00
nhmall
33acf59ee7 merge and evolve PR #375
Closes #375
2020-07-31 08:37:51 -04:00
nhmall
e99a6076df Merge branch 'copperwater-mextra-note' into NetHack-3.7 2020-07-31 08:33:27 -04:00
nhmall
6b7979fa72 add note to zero out new mextra and oextra fields
Closes #375
2020-07-31 08:31:09 -04:00
nhmall
67bc0a78ce Merge branch 'mextra-note' of https://github.com/copperwater/NetHack into copperwater-mextra-note 2020-07-31 08:25:42 -04:00
copperwater
922321b251 Add instructions to zero mextra struct pointer in mextra documentation
It doesn't mention anywhere that newmextra() is responsible for
initializing struct mextra with null pointers to the various
sub-structs. So, when one follows the instructions and doesn't know or
remember to do this, they'll get segfaults when something tries to read
the uninitialized pointer to their new struct.
2020-07-30 23:07:30 -04:00
PatR
c64049306d candy bar wrappers
Adopt the suggestion that candy bar stacks which get split should
keep the same wrapper text for both halves of the stack.  The patch
stuck with using obj->o_id to manage the wrapper which prior to the
patch wasn't a factor in merging and splitting.  Switch to obj->spe
instead, comparable to tin varities, so mergability is already
taken care of.

End of game disclosure tacks on T-shirt text to formatted items.
Do the same for candy bar wrappers.
2020-07-30 19:25:57 -07:00
PatR
8ca0834eb2 Qt pick-none menu vs [cancel]
Qt menus have [ok][cancel][all][none][other stuff] buttons across
the top but it was disabling [cancel] for inventory viewing and
other pick-none menus.  Enable that so that [cancel] is a viable
alternative to typing ESC or clicking on [ok] for dismissing the
menu without picking anything.
2020-07-30 08:58:57 -07:00
PatR
c96a9ff389 Qt menus font
This greatly improves the '?' choice when using the '#' prefix
to select an extended command.  It isn't perfect, because the
<text><spaces><more text> layout (using spaces to pad the first
column so that the second one lines up) produces at least one
line where <more text> is so long that it wraps, and instead of
 | <text><spaces><start of more text>
 | <blank><spaces><rest of more text>
that selectable menu entries have, the continuation is
 | <text><spaces><start of more text>
 |<rest of more text>
(made slightly worse by the fact that <text> is indented a little
and <rest...> isn't.

This affects the aesthetics of all NHW_MENU windows, not just the
one that desparately needed help.  Maybe the core should send some
hint on a menu or text window by menu or text window basis about
whether or not fixed-width font is preferable to variable one.
2020-07-30 08:19:06 -07:00
PatR
7f1420558a lua on Unix tinkering
The base Makefile hasn't been using the '+=' construct, so take
out the one used for lua (post 3.6.6).

Only the 'Sysunix' target has been tested.
2020-07-30 06:25:43 -07:00
PatR
5a072c4202 hints tinkering
For macosx10.10-qt, move the linker specification to one spot.
Should be no change in behavior.
2020-07-30 06:20:11 -07:00
PatR
827e40705d X11+Qt vs config.h
This lets combined X11 and Qt compile cleanly (when set up with
hints/macosx10.10-qt and built with 'make WANT_WIN_X11=1 USE_XPM=1')
but linking fails at present.  (It can't find X11 library routines
despite specifying the same -L/opt/X11/lib that X11 without Qt uses.
The C++ linker is being used but the code that calls those routines
is compiled as C, not C++ so name mangling shouldn't be an issue.)
2020-07-29 18:23:54 -07:00
PatR
00d1e729da more mind flayer vs headless target
Recently combat between monster mind flayer and headless monster was
changed to skip extra tentable-for-drain_intelligence attacks after
hitting with one for no effect.  Do the same for monster mind flayer
against headless poly'd hero and for hero poly'd into mind flayer
versus headless monster.  As before, it only applies to additional
actions during the current attack.  As soon as the attack is over,
the ineffectiveness of intelligence drain upon target is forgotten.
2020-07-29 11:10:01 -07:00
PatR
5ce74c7bd5 Qt extended command selection
Qt's implementation of '#' puts up a rectangular grid of buttons
containing command names from the alphabetized extcmdlist[]:
|     #          ?         adjust      annotate
|   apply    attributes  autopickup      call
|   cast        ...
When 3.6 put all commands into that list, the hardcoded 4 columns
resulted in so many rows that the grid wouldn't fit on the screen
(at least not on my smallish laptop screen).  There's no scrollbar
so the commands beyond "takeoff" were inaccessible off the bottom.
Warning messages from within Qt were issued to stderr complaining
about trying to render something off the screen (once each time the
'#' command grid was generated).

It was also including wizard mode commands when not in wizard mode.
Suppress those when they're not applicable, and change the grid to
use 6 columns then and 8 for wizard mode.  The appropriate amount
ought to be calculated on the fly but these values work ok with the
current command list.  (On my screen; if something smaller is used,
the original problem could come back, just not as severe as before.)

Having an alphabetized list go across rows instead of down columns
feels counter-intuitive so transpose the grid.
|     #         autopickup    ...
|     ?         call
|   adjust      cast
|   annotate     ...
|   apply
[Having another button next to <cancel> that lets the user switch
back and forth between the two orientations could be worthwhile.
A full-fledged wc/wc2 option for that doesn't seem warranted.]

The commands can be selected by typing their names as an alternative
to mouse click.  The input widget supports <backspace> but lacked
handling for <delete> so add that.

When typing a command by its name, a new grid showing only matching
candidates gets displayed so that you can switch back to mouse input.
It looks pretty bad but does work as intended.  I didn't touch that;
however, it looks different now due to the columns-vs-rows change.

The menu after picking "?" looks worse.  It assumes a fixed width
font and tries to align things in two columns with spaces, but the
result when using a variable width font is ugly.  This makes no
attempt to address that.
2020-07-29 09:17:45 -07:00
PatR
79275629fc Qt tinkering
After installing qt511-qtbase and qt511-qtmultimedia from macports
on my OSX 10.11 system (there is a qt513 but it requires OSX 10.12),
I can build the Qt interface with hints/macosx10.10-qt by overriding
QTDIR.  It doesn't actually need the extra CFLAGS, and without those
I wonder whether the multimedia package is needed either, but I've
left them in.  I have changed them to not be passed to the C sources
though, just the C++ ones.

I haven't tried combining with X11 or adding curses.
2020-07-28 19:31:14 -07:00
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