Commit Graph

2626 Commits

Author SHA1 Message Date
Pasi Kallinen
4cd14a7a2a It's Wonka Bar, not just Wonka 2015-03-28 20:39:40 +02:00
Pasi Kallinen
cf7143094f Feedback when boomerang hits sink 2015-03-28 19:38:15 +02:00
Pasi Kallinen
cbb155b0e6 YAFMs when trying to pick up terrain features 2015-03-28 19:31:01 +02:00
Pasi Kallinen
9a4fefb5ad Add missing prototype 2015-03-28 19:21:49 +02:00
nhmall
9b328f1ad6 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-28 11:23:47 -04:00
Pasi Kallinen
0e4317fa6b Balsa wands break easily 2015-03-28 17:20:57 +02:00
nhmall
c035402c14 flavor enhance zap downwards/upwards when hiding
Changes to be committed:
	modified:   doc/fixes35.0
	modified:   include/extern.h
	modified:   src/apply.c
	modified:   src/zap.c

    On 3/23/2015 6:41 PM, a bug reporter wrote:
    > When you're hiding under an item (e.g. via garter snake polyform), and
    > that item gets polyshuddered into nonexistence, you continue hiding
    > (under nothing).
    This was addressed previously.

    > (Incidentally, it's a bit weird that you use > to aim at items that are
    > flavorwise above you at the time.)

    This addresses the flavorwise concern.
2015-03-28 11:20:44 -04:00
Pasi Kallinen
b17ecb149b Use existing function to count containers 2015-03-28 16:24:25 +02:00
Pasi Kallinen
2fce0074b3 Show legal polearm hit positions
User can press $ to display valid positions when asked
for a position to pick, and the positions will be hilighted
2015-03-28 13:32:24 +02:00
Pasi Kallinen
c7d92a47e1 Remove migrating monster from polearm targeting 2015-03-28 10:55:41 +02:00
Pasi Kallinen
13645dcd2a Automatically find monster to target with polearm
If there's only one suitable monster within range, automatically
suggest it for targeting with the polearm
2015-03-28 00:32:54 +02:00
Pasi Kallinen
5bb4a02ffe Remember position of monster you hit with polearm
If you hit a monster with a polearm, following polearm applications
will try to automatically suggest the monster's position
2015-03-27 23:34:13 +02:00
Pasi Kallinen
870b124f14 Allow reading many more items
You can now also read alchemy smocks, credit cards, cans of grease,
magic markers, gold, the Orb of Fate, and candy bars.
2015-03-27 21:04:18 +02:00
Pasi Kallinen
2e2d020a59 Show t-shirt text at end of game inventory disclose
Restricting the text display only to the end of game disclose,
so it doesn't clutter the inventory during gameplay and so that
the readability of t-shirts is not given away.
2015-03-27 16:08:06 +02:00
Pasi Kallinen
08654c213c Fix passing non-static buffer out of scope 2015-03-27 15:12:34 +02:00
PatR
ed85d3f158 objnam formatting for bag of tricks
Bag of tricks that had been used at least once was being described
as "empty" regardless of charge count, because it always fails the
Has_contents() test.  After half this patch fixed that, it started
being flagged as "empty" as soon as the last charge was used rather
than after attempting to use it again after that, since 'cknown' was
being set whenever it was used.  Only set that flag when applying
the bag has been observed to fail.
2015-03-27 00:21:40 -07:00
PatR
b1df164a3b fix acid_damage() crash
My dog bit an acid blob and triggered a crash, caught by SYSCF panictrace
but yielding confusing information.  The backtrace included a call from
'rustm()+N' that turned out to be passivemm(), which was deferencing a
null pointer since no weapon was involved.
2015-03-25 18:04:50 -07:00
Pasi Kallinen
2be9f41885 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-25 22:15:16 +02:00
Pasi Kallinen
f41c51aef0 Show object symbols in menu headings
... in menus where those object symbols act as menu accelerators.
Toggleable via "menu_objsyms" boolean option, defaults to off.
2015-03-25 22:13:28 +02:00
Sean Hunt
907a2dfee0 Fix a memory leak on termination.
Found by Alex Smith.
2015-03-25 14:34:28 -04:00
nhmall
a355911c2c no hiding under nothing
On 3/23/2015 6:41 PM, a bug reporter wrote:
> When you're hiding under an item (e.g. via garter snake polyform), and
> that item gets polyshuddered into nonexistence, you continue hiding
> (under nothing).

This addresses the "hiding under nothing" bug, but does not
address this flavor comment also included in the report:
> (Incidentally, it's a bit weird that you use > to aim at items that are
> flavorwise above you at the time.)
2015-03-24 22:07:16 -04:00
nhmall
a1cc33d6ae fix invalid pointer dereference in morguemon
On 3/23/2015 6:41 PM, a bug reporter wrote:
> If the game generates a graveyard, the graveyard places a normal
> demon, but all normal demons are extinct at the time, then morguemon (at
> mkroom.c line 423) indexes mons with NON_PM (the return value of
> ndemon() if it can't find a reference), which is an invalid pointer
> dereference. According to the testbench, this mostly seems to happen on
> dlvl 12.

This fixes the code violation, but the logic will now drop down to the
ghost/wraith/zombie code when that happens.

Is that desireable, or should something else happen (for variety)?
2015-03-24 19:20:14 -04:00
Pasi Kallinen
d787f45dcb Add an option to give feedback when bumping walls
Boolean option "mention_walls", defaults to off.
Useful for blind players.
2015-03-24 22:01:29 +02:00
Pasi Kallinen
dfe967732d Add more hallu sounds monsters make when hit 2015-03-24 21:14:49 +02:00
Sean Hunt
e41b3f7143 Fix use-after-frees on dipped objects. 2015-03-23 11:42:36 -04:00
PatR
7b571b72f2 {DEC,IBM,MAC}graphics (1 of 2: core)
DECgraphics, IBMgraphics, and MACgraphics used to be recognized when
at least 3 letters were supplied back when they were true boolean
options.  When they got demoted to shortcuts for the symset option,
they started needing 10 (DEC and IBM) or all 11 (MAC), otherwise
triggering "bad syntax in NETHACKOPTIONS" (or config file).  Revert
to having the first three letters be sufficient.
2015-03-22 18:22:36 -07:00
nhmall
a948e6aafb remove stale feature alert
This old feature alert from 3.3.0 is pretty stale, so remove
if from the code because everybody has probably suppressed
it by now.

	/* Because 'Q' used to be quit... */
	if (flags.suppress_alert < FEATURE_NOTICE_VER(3,3,0))
		pline("Note: Please use #quit if you wish to exit the game.");
2015-03-22 18:11:49 -04:00
nhmall
74c5f489ae adjust PREFIXES_IN_USE for SYSCF 2015-03-22 11:11:41 -04:00
nhmall
c3c968f87c options and config file handling
With SYSCF, the SYSCF_FILE name was overwriting the
default config file name making it unavailable for
subsequent user config file options handling.

- Keep the name of the last config file successfully opened.
- Do it without orphaning the default config file name needed
  for the next pass.
2015-03-22 10:44:36 -04:00
PatR
86959fe242 fix "mysterious force" probabilities in do.c comment
Reported by Alex, the probabilites shown in the comment about the effect
of the mysterious force have been wrong ever since they were added 20 or
so years ago.  Lawfuls and neutrals are much more likely to go down just
one level rather than 2 or 3.
2015-03-21 19:24:08 -07:00
PatR
91b13d939a wishing fix for "eyes"
No, not a blindness cure. :-}  Post-3.4.3 revisions to makesingular()
inadvertently made it impossible to successfully wish for "the Eyes
of the Overworld" because the string got changed into "the Eye of the
Overworld" which doesn't match anything.  So don't singularize "eyes".

(After this fix, wishing for "the Eyes of the Aethiopica" no longer
yields the Eye of same, but I think that's the correct behavior.)
2015-03-21 15:36:47 -07:00
nhmall
af9af8b701 put mystery line back but !WIN32
Since that line of code is used by a lot of different ports, I decided to
recant its removal and just add #ifdef to ensure it isn't compiled on WIN32.

I think other ports might encounter the same issue where the first pass with
filename set to 'sysconf', is then going to overwrite the hard-coded user
config file name, but I can't fix or test those so for those ports, it
will be now be back the way it was.
2015-03-21 16:17:17 -04:00
nhmall
349e264ac3 remove a troublesome line of code
Whenever SYSCF was enabled on Windows, the option
processing would go bonkers with illegal options
at startup. I noticed it months ago, and Derek
had it happen the other evening.

It turns out, the hard-coded 'defaults.nh' setting
was being overwritten with the name sysconf on
the first SET_IN_SYS pass, so all subsequent passes
were re-opening the SYSC_FILE instead of the
user config file.

I opted to take it out as I couldn't ascertain
why it was there in the first place.
2015-03-21 16:01:03 -04:00
nhmall
41ac4aef92 fix SYSCF so that things build when first defined
Things won't build for ports that first
define SYSCF.

This moves assure_syscf_file() from unixmain.c
to files.c and adjusts extern.h to get it
out from under #ifdef UNIX.

The call to assure_syscf_file() in options.c was
only #ifdef SYSCF, SYSCF_FILE and not UNIX,
so new ports #defining SYSCF would get an erro.

assure_syscf_file() will be utilized by mswin
when SYSCF is defined.
2015-03-21 15:38:31 -04:00
Pasi Kallinen
c9df82fb42 Update hacklib func comment doc 2015-03-21 16:49:31 +02:00
Pasi Kallinen
6fcc030f37 Make HoOA alignment change depend on object ID
The same Helm of opposite alignment will always make
the same alignment change for neutrals.
2015-03-21 13:40:19 +02:00
Pasi Kallinen
3434a157f8 More C343-108: Handle "rub on the stone" 2015-03-21 11:03:54 +02:00
Pasi Kallinen
2ec4ff0b8c Fix C343-108 (e- leaves prompt on screen)
You'll get "You mime eating something."
2015-03-20 19:25:24 +02:00
PatR
f2dc48086f acid explosion messages from water_damage()
Restore the variant phrasing used when more than one stack of potions of
acid explode while being inflicted with water damage.  First message:
"a potion explodes" or "some potions explode"; second and subsequent
messages: "another potion explodes" or "more potions explode".  This
trivial feature stopped working when erosion handling was overhauled and
old water_damage was split into current water_damage_chain+water_damage.

Augment the message so that vague "potion" is only used when the object's
dknown flag isn't set (ie, object hasn't been seen yet).  Use "<color>
potion" or "potion of acid" otherwise, depending upon whether such potions
have been fully discovered.
2015-03-19 15:54:17 -07:00
Pasi Kallinen
3cc3709d95 Save xlogfile time_t fields correctly 2015-03-19 17:41:14 +02:00
PatR
4b0a1af482 xlogfile tweak to avoid forcing ANSI C
Avoid the C89/C90 feature of implicit concatentation of string literals.
XLOG_SEP handling becomes clumsier but will work with pre-ANSI compilers.
2015-03-18 19:21:29 -07:00
Pasi Kallinen
debdf7ca48 Move some hard-coded string arrays into data files.
Random epitaphs, engravings and hallucinatory monsters now
live in text data files.
2015-03-18 22:05:10 +02:00
Pasi Kallinen
e93add8cb8 Prevent segfault, water_damage may get a NULL obj 2015-03-18 21:40:54 +02:00
Pasi Kallinen
27add21e7e Merge branch 'paxed-xlogfile' 2015-03-18 18:57:52 +02:00
Pasi Kallinen
379c23096a More getpos improvements
Look up remembered dungeon features, not user-visible glyphs,
and ignore uninteresting features (room, corridor and wall tiles).

Original patch by Patric Mueller, from UnNetHack
2015-03-17 21:29:54 +02:00
PatR
ad03a7fb7a some lint cleanup 2015-03-16 19:22:49 -07:00
PatR
562fa952ce allow DEBUGFILES to be overridden via getenv()
If getenv("DEBUGFILES") yields a value then it takes precedence over
sysconf.DEBUGFILES or sys.c's #define DEBUGFILES.  (It probably should
only be controlled via environment since it is not a system-wide
attribute, but I haven't taken out the SYSCF handling for it.)
2015-03-16 15:54:10 -07:00
PatR
0d0711fe17 fix #H3724 - gold pile stacking bug
Bug report included a pointer to a fix; this patch is a superset.
Gold pieces dropped on an altar by the player got their bknown flag set,
which is incorrect since bless/curse doesn't apply to coins.  If a
monster (in reported case, a slain temple priest) dropped gold there too
then the two stacks wouldn't merge.  For the normal !GOLDOBJ config, the
problem goes away as soon as the gold gets picked up.  I didn't test for
GOLDOBJ but think two inventory slots containing gold can result.

     The superset part is to not break agnostic conduct by dropping gold
on an altar since no information is revealed when doing that.

[This was one of the very last patches checked into the old cvs repository,
where the somewhat out of date message above was accidentally omitted.]
2015-03-16 02:29:10 -07:00
PatR
a983a58b6a free 'sysopt' strings upon termination 2015-03-16 02:03:40 -07:00
PatR
14525ed0c6 DEBUG/debugpline() fixup
* Replace variadic debugpline() with fixed argument debugpline0(str),
   debugpline1(fmt,arg), and so on so that C99 support isn't required;
 * showdebug() becomes a function rather than a macro and handles a
   bit more;
 * two debugpline() calls in light.c have been changed to impossible();
 * DEBUGFILES macro (in sys.c) can substitute for SYSCF's DEBUGFILES
   setting in !SYSCF configuration (I hope that's temporary).
2015-03-15 18:02:26 -07:00