Commit Graph

4034 Commits

Author SHA1 Message Date
keni
a66e017314 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-10-08 14:00:50 -04:00
PatR
5c77360023 still more Master Key of Thievery
Make #untrap while carrying the non-cursed (for rogues) or blessed
(for non-rogues) Key work the same as #invoke has been doing (without
regard to its bless/curse state):  when used on trapped door or chest,
that trap will always be found and disarming it will always succeed.

It should work when carried by monsters too:  if they try to open a
trapped door while carrying the Key (must be blessed since they're
not rogues) the trap will be automatically disarmed.  (Caveat:  that
hasn't been adequately tested.)

TODO (maybe...):  change the #invoke property to detect unseen/secret
door detection instead of #untrap.  The latter isn't completely
redundant; it works when the Key is cursed.  But quest artifacts
strongly resist becoming cursed so that isn't a particularly useful
distinction.

Also, trap hints when wielding the Key without gloves didn't notice
adjacent door and chest traps.  Now it does.  And the behavior is
slightly different:  known traps covered by objects or monsters are
treated like unknown traps as far as the hot/cold hints go.
2017-10-08 03:29:16 -07:00
Pasi Kallinen
e8ef27d985 Enable dumplogs for X11 and Qt4 2017-10-08 03:04:52 +03:00
Pasi Kallinen
583edab99f Qt4: Add menucolors
The Qt4 windowport already supported my 3.4.3 menucolors patch, so
adding that was simple.
2017-10-08 01:45:50 +03:00
Pasi Kallinen
ed335dd0a7 Add Qt4 windowport
Originally by Ray Chason for 3.4.3, based on the Qt windowport by
Warwick Allison. The look and feel is mostly the same.

Some improvements over the Qt 3 interface are:

* Panes are resizable
* Full support for IBMgraphics, and walls and corridors are drawn with
  graphical primitives for a continuous appearance no matter what the font
  says
* Lots of irritating glitches fixed
* Menus support proportional fonts correctly

Adding this because the old Qt windowport cannot be compiled on Qt4,
even with Qt3 compatibility stuff.

TODO:
 - background map glyphs
 - status hilites
 - menucolors
2017-10-08 01:15:02 +03:00
Pasi Kallinen
9b82b72c6e Unmap invisible glyphs when cleaving and no monster present 2017-10-07 16:30:17 +03:00
Pasi Kallinen
4b7aea0eac Fold invisible glyph unmapping into single function 2017-10-07 16:24:49 +03:00
PatR
468fc1a925 more Master Key of Thievery: lock/unlock vs traps
Always find traps when using the rogue's quest Key to lock or unlock a
trapped door or chest provided that the Key is not cursed (for rogues)
or is blessed (for non-rogues).  When a trap is found, the player is
given the opportunity to disarm it, and doing so will always succeed.
(It isn't disarmed automatically; the player may prefer to leave traps
in place, presumably hoping to set up a dangerous bones file.  Or he
or she may be unaware of the guaranteed success and be too timid to
risk trying to disarm the trap.)

TODO:  make #untrap of a door or chest while carrying that Key always
find traps (with same bless/curse requirements as above).  And maybe
change its #invoke property from untrap to detect unseen/secret door
detection since current invoke power would become redundant.

Also, move a bunch of new artifact abilities from the fixes section to
the new features section in fixes36.1.
2017-10-07 02:28:20 -07:00
Pasi Kallinen
22ad104318 Master Key of Thievery warns about undetected traps
If the key is wielded and touching skin (that is, you're not
wearing gloves), it will give heat-related messages like
minesweeper, counting the undetected traps around player.
2017-10-06 01:21:06 +03:00
PatR
605227c0d6 untrap() formatting bits 2017-10-05 02:38:25 -07:00
PatR
e8b9805124 STATUS_HILITES vs multiple interface binary
My tty+X11 binary was letting me see and modify status highlights under
X11 even though they don't do anything.  Options parsing has to accept
them since we don't know which interface will be chosen, but interactive
option handling does know and shouldn't show inappropriate options.

initoptions_finish() should probably we validating all the wc and wc2
options, but I only added a check for trying to enable statushilites
when they're unavailable.
2017-10-05 02:01:18 -07:00
PatR
5aa1f3aa08 set_uasmon
Noticed while looking at something else, merging status highlighting
changes introduced a redundant call to polysense() in set_uasmon().
2017-10-04 18:18:21 -07:00
PatR
d9a5190f4d options vs !BACKWARD_COMPAT
Give sensible feedback for obsolete options if options.c is modified
to #undef BACKWARD_COMPAT.  Affects boulder, DECgraphics, IBMgraphics,
and MACgraphics.
2017-10-04 17:51:48 -07:00
Pasi Kallinen
856034d585 Cleaver can hit three monsters with one swing
When hitting a monster with the Cleaver, you swing it in an
arc, possibly hitting the monsters to the left and right of
the targeted monster.

Based on code by Fredrik Ljungdahl
2017-10-04 22:01:28 +03:00
nhmall
429288cac9 first build in a long while, clear up a warning
..\src\options.c(4005) : warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(void)'
2017-10-04 12:21:05 -04:00
PatR
8a45da0e8d feature options (#version output)
I've sometimes seen
  , and basic NetHack features.
as the last line of the features section from '#version'.  I thought
it was due to the way feature phrases were split into individual words
by makedefs, but it turned out to be due to inserting pattern matching
method at run-time.  That dynamic options update had a second problem:
if the final phrase "and basic NetHack features" was split across two
lines, the run-time substitution didn't find it and the pattern matching
entry ended up being left out.  This fixes both problems, but if future
dynamic entries become more complex, the phrase-splitting/word-wrapping
being done by makedefs may need to be moved into nethack.

Also, add entries for XLOGFILE and PANICLOG to makedefs' options and
re-order a couple of existing ones alphabetically (a failry hopeless
endeavor).
2017-10-02 18:25:09 -07:00
PatR
67aaf4ef4c more !STATUS_HILITES - option parsing
When built without STATUS_HILITES, don't treat highlighting options as
if they were unknown.  This may need some tweaking; the feedback feels
a bit intrusive so perhaps 'statushilites' and 'hilite_status' should
just be ignored when not available.

'hitpointbar' now relies on wc2 handling instead of being conditionally
present.
2017-10-01 18:49:47 -07:00
PatR
63953bc062 !STATUS_HILITE warning fixes
Mostly declarations of static functions which don't exist (due to being
conditionally excluded).  One unused local variable.
2017-10-01 17:20:30 -07:00
PatR
835c4ae075 yet another comment typo 2017-10-01 16:51:07 -07:00
keni
f8b4f5672c Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-10-01 17:19:23 -04:00
PatR
f18524bef9 hmon() arg fix
The call to hmon() in flooreffects() was passing a boolean where int
is expected.  The 'thrown' argument may have once been a boolean, but
it is 'int' for as far back as the repository history goes.
2017-10-01 08:16:56 -07:00
Bart House
78756c9bd6 Addressing bug with the use of static dieroll in uhitm.c. 2017-10-01 14:39:35 +03:00
Pasi Kallinen
1027eacbca Give feedback when released from a bear trap 2017-09-28 22:38:08 +03:00
Pasi Kallinen
f6070be9e8 Use the existing othropt options array for the menu items 2017-09-26 10:58:26 +03:00
Pasi Kallinen
69f7a78dba Hilite Status: Improved
Allow defining multiple stops per field. Add hitpointbar.
2017-09-26 10:04:25 +03:00
PatR
cac4344754 doname() bookkeeping
doname() for a corpse was using two obufs instead of just one.
2017-09-25 17:17:06 -07:00
PatR
559cddad65 another comment typo 2017-09-25 13:27:12 -07:00
PatR
26dd891038 candelabrum weight and burn out
Adjust the Candelabrum of Invocation's weight when it has candles
attached.  This has been a known issue ever since the candelabrum and
candles were introduced.

When the candelabrum burns out, update persistent inventory window to
show that it no longer has candles.
2017-09-25 13:20:30 -07:00
PatR
a69e4d4ec4 vomit countdown comment typo
A word got left out.
2017-09-25 11:15:29 -07:00
PatR
719af503e7 fix #H6104 - no potion handling in thitu()
thitu() is mostly used for arrows and darts "thrown" by traps, but
scatter() uses it on items launched by a land mine explosion.  Traps
had no need for potion handling, but scattering does.  Changing thitu()
to call potionhit() required that more information be passed to the
latter in case killer reason was needed, and thitu()'s callers needed
to be updated since it now might use up its missile (only when that's
a potion, so scatter() is only caller which actually needed to care).

Quite a bit of work--especially the testing--for something which will
never be noticed in actual play.  In hindsight, it would have been
much simpler just to make scatter destroy all potions rather than
allow the 1% chance of remaining intact (via obj_resists()), or else
leave any intact ones at the explosion spot instead of launching them.
2017-09-25 10:42:43 -07:00
keni
eafdc9bf05 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-09-24 13:58:17 -04:00
Pasi Kallinen
596bc64341 Add option to make commands ask an inventory item via menu
Turning the boolean option force_invmenu makes all the commands
that ask for an inventory item pop up a menu instead of asking
a text query.  This should be much more friendlier to new
players, and is very useful for window ports on systems
with touch screens and no physical keyboard, such as cell phones.
2017-09-23 22:47:14 +03:00
PatR
11d5c43b9c more vomit countdown
The new "You vomit!" message shouldn't happen if you're polymorphed
into a rat.

The old "You gag unconrolably!" message misspelled "uncontrollably".
2017-09-22 15:42:29 -07:00
PatR
e589d87d18 vulnerable items thrown into lava
Reported directly to devteam, player threw a troll corpse into lava and
then later got messages about it reviving and burning to death.  Items
thrown, kicked, or dropped into lava were being subjected to fire damage
(so scrolls burned up, potions boiled, non-fireproofed flammable weapons
and armor eroded), but corpses and a lot of other stuff not subject to
erosion remained unaffected.  This makes things that are made out of
wood, cloth, flesh and other flammable stuff burn up (when in lava, not
when hit by fire).
2017-09-22 15:08:42 -07:00
Pasi Kallinen
db23363d3f Fix mention_walls reporting secret doors as solid stone 2017-09-22 16:33:20 +03:00
PatR
83056d45d7 fix #H4919 - vomit message sequencing
The countdown for delayed vomiting gave message "you suddenly vomit!"
at T-2, allowing you to move some more, then vomit at T-0 with no
message, finally at T+2 get "you can move again", making it seem as
if the program was letting you move during a time it thought that you
couldn't move.  Also, there was nothing "sudden" about it since it was
near the end of a 15 or so turn sequence where a few other messages
are given leading up to that.

Change it to
T-2: You are about to vomit.  // different wording
T-0: You vomit!               // new message
so that "you can move again" more clearly refers to the actual event.
2017-09-21 16:35:56 -07:00
PatR
c665d73216 'nulls[]' vs saving traps and fruit
It was once pointed out that
  static long nulls[ sizeof (struct trap) + sizeof (struct fruit) ];
should have been
  static long nulls[ max(sizeof (struct trap), sizeof (struct fruit)) ];
which is right, but using an array of longs to represent a null trap or
null fruit doesn't handle pointers properly so replace 'nulls' with
separate structs.  This doesn't recover the previously wasted memory
(fairly trivial since these structs are small) but does guarantee that
null pointers in the relevant structs always have a valid value instead
of just all bits zero.
2017-09-21 15:30:24 -07:00
PatR
f460047983 '#' command fix for 'extmenu'
While doing some cleanup I found an old personal bug list with four
entries.  Two have already been fixed, or at least I couldn't reproduce
them with current code, one is still pending (dungeon overview feedback
is inconsistent if you find an unlit temple and haven't seen its altar
yet), plus this one:  a buffer overflow (triggering a crash for me) in
wizard mode if you turn on the 'extmenu' option and start an extended
command.  The menu can't handle long line width for 'w' with all its
wizthis and wizthat entries; strcat() goes out of bounds writing into
a local array.

(This bug predates the keybinding patch that turned all commands into
extended commands.)
2017-09-20 18:52:53 -07:00
Pasi Kallinen
5aaec6a990 Lint for strncpy return value 2017-09-19 14:12:10 +03:00
Pasi Kallinen
b82b41cb5a Fix possible buffer overrun 2017-09-19 14:09:01 +03:00
Pasi Kallinen
5e05cdc570 Change some regex stuff to use config errors 2017-09-17 13:43:48 +03:00
Pasi Kallinen
45401a13bb Show regex error before asking for color
When entering a new menucolor via options, show regex error
immediately afterwards, instead of asking for color and attribute
before showing the error.

Also actually show config errors even if config error handler
hasn't been initialized.
2017-09-17 13:20:28 +03:00
Pasi Kallinen
11863dd5e9 Read symbols with config file handler
Also, make config file error handler able to cope with recursion.
2017-09-17 10:15:08 +03:00
Pasi Kallinen
2db7e20116 Fix invisible gold symbol in status lines 2017-09-16 23:49:28 +03:00
Pasi Kallinen
f36d1036de Show in wizmode level teleport menu your current location 2017-09-16 18:19:25 +03:00
PatR
21802dbb4f fix #H6042 - leash use while engulfed
Prevent using a leash while engulfed.  If someone wants to supply a
better message, go ahead.  I just tried to get the logic straight.
(The new swallowed part is easy; the previous lack of handling for
remembered unseen monsters wasn't quite so easy.)

Applying a leash was always using a move, even if player cancelled
at the prompt to pick an adjacent monster.  Now some of the early
exits don't use a move.
2017-09-16 00:43:03 -07:00
Pasi Kallinen
52ed881b2c Remove overview for wizmode regenerated map
The wizmakemap command throws away the current level, so don't keep
the overview data for it around.
2017-09-15 14:45:51 +03:00
PatR
782db48fb5 'fix' #H5531 - breath damage
For breath damage, the 'S' in NdS is ignored.  'N' for the number of
dice is used, but for number of sides of those dice, 6 is used for
most damage types.  Add a comment to that effect to monst.c and change
a few Nd8 to Nd6 so that viewing the monster definitions matches what
they actually do.
2017-09-15 04:34:05 -07:00
PatR
c38dc0edc0 zap.c formatting 2017-09-15 04:33:09 -07:00
Pasi Kallinen
f8bd77ae03 Use symbolic names for shop repair costs
...and add costs to two places where the door you touched
blew up (picking the lock and opening the door).
2017-09-14 21:07:18 +03:00