PatR [Mon, 16 Mar 2015 22:28:01 +0000 (15:28 -0700)]
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.)
PatR [Mon, 16 Mar 2015 09:29:10 +0000 (02:29 -0700)]
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.]
PatR [Mon, 16 Mar 2015 01:02:26 +0000 (18:02 -0700)]
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).
nhmall [Sun, 15 Mar 2015 16:36:45 +0000 (12:36 -0400)]
catch up on half-physical damage docs
This is catching up on some things that were changed
in development years ago that Dave C. suggested be
documented.
For the record:
-The things that were evaluated and ruled out
are now documented in include/youprop.h so they don't
come up again.
- The things that were evaluated and deemed to be susceptible
to the intrinsic and thus led to a modification in the code
are listed below in this commit message.
Modifications:
- A crystal ball exploding on being applied
- Artifacts' blasting
- Being a fish out of water
- Being hit by Mjollnir on the return
- Being thwacked by an iron ball chained to you
- Boiling/freezing potions
- Broken wands
- Bumping head on ceiling by cursed levitation
- Burning (un)holy water
- Chest/door/tin traps
- Dipping a lit lamp into a potion of oil
- Exploding rings and wands (under all circumstances)
- Exploding spellbooks
- Falling downstairs
- Falling into a (spiked) pit
- Falling off or failing to mount a steed
- Falling on a sink while levitating
- Getting squished in a pit under a boulder
- Hitting your foot with a bullwhip
- Hitting yourself with your pick-axe
- Hooking yourself with a grappling hook
- iron-ball-pulling yourself out of a bear trap
- Jumping/Newton's-Thirding into something solid
- Kicking something that makes you go "Ouch!"
- Land mine explosion
- Sitting in a spiked pit
- Stinking cloud damage
- Thrown potion (bottle)
- Zapping yourself with a wand, horn or spell
- Jumping yourself out of a bear trap
nhmall [Sat, 14 Mar 2015 02:27:09 +0000 (22:27 -0400)]
fix messaging in obstructed() in lock.c
From ais523's recent list of bugs:
If a long worm tail is blocking the door, and you're blind and not
telepathic, attempting to close the door marks the position of its head.
From an email received in late September 2014 before the git conversion:
> I was trying to close a door, not noticing that there was a garter
> snake there, and this message resulted:
> The garter snake stands in the way!
> I haven't tried it with any other monsters without feet, but
> "stands in the way" appears to be the wrong way to describe
> this situation...
Both of the above were found in the same function in lock.c
Pasi Kallinen [Wed, 11 Mar 2015 15:16:05 +0000 (17:16 +0200)]
getpos improvements: automatic description
Pressing '@' will move the cursor on top of the hero.
Pressing '#' will toggle automatic description mode, where
the feature under the cursor is automatically described
when the cursor is moved.
Pasi Kallinen [Mon, 9 Mar 2015 20:53:43 +0000 (22:53 +0200)]
Change command X to twoweapon toggle
Explore mode is now an extended command #exploremode.
There's no sense that a command used max. once per game, and
in normal games not at all, takes up a key. So, analogous to
the 'x' command (swap weapons), 'X' now toggles two-weapon
combat.
Pasi Kallinen [Mon, 9 Mar 2015 19:08:42 +0000 (21:08 +0200)]
Use a menu to loot multiple containers
When looting a location with multiple containers, show a menu for user
to pick the containers to loot instead of asking a yes/no question for
each container.
nhmall [Tue, 10 Mar 2015 01:08:26 +0000 (21:08 -0400)]
fix a segfault in mapglyph reported by Pasi earlier today
Changes to be committed:
modified: src/pager.c
Steps to reproduce the reported segfault:
Use / command, answer n, press space and enter
In do_look() variable glyph is only set to a proper
value if using the screen (from_screen) or the
mouse (clicklook).
On the code path that triggered the segfault,
glyph was being passed to mapglyph with a random
arbitrary value.
If glyph had been initialized at the start of
do_look(), it would have prevented the segfault,
but would have always displayed a giant ant or
something silly instead of the correct thing.
Don't use glyph except under
from_screen || clicklook.
Pasi Kallinen [Sun, 8 Mar 2015 13:11:01 +0000 (15:11 +0200)]
TTY: Prevent accidental escapes from string entries
On NAO, one of the major complaints was accidental escaping
from wishing prompt when using cursor keys. The users were
trying to go "back" on the entry to fix a typo, but lost
the wish instead.
This prevents escaping out of a text prompt if there is any
text entered into the prompt; pressing escape clears the prompt.
Pasi Kallinen [Sun, 8 Mar 2015 08:40:26 +0000 (10:40 +0200)]
TTY: Do not cut off statuslines at 80 characters
Show as much of the status line as possible, instead of chopping
it at COLNO - this prevents possible game-influencing status
effects (Ill, Burdened, etc) from being hidden.
Pasi Kallinen [Sat, 7 Mar 2015 13:11:41 +0000 (15:11 +0200)]
Implement fcntl(2) file locking
If you run a server, then you know of the somewhat annoying perm_lock
errors that creep up, requiring your attention before anyone else can
start a game.
This patch properly implements fcntl(2) locking on systems that can
handle it (*nix systems), that results in the lock being automatically
released on program termination, whether abnormal or not.
Original patch by Drew Streib, update by Edoardo Spadolini
Pasi Kallinen [Thu, 5 Mar 2015 12:03:56 +0000 (14:03 +0200)]
Fix data.base entries
-"bat" overrode later "combat" entry.
-"gelatinous cube" and "jack boot" have their own entries.
-"vampire bat" matched twice; use the bat entry.
-dagger attribution started with spaces instead of tabs.
nhmall [Wed, 4 Mar 2015 01:13:51 +0000 (20:13 -0500)]
Updated README
On 3/1/2015 10:37 AM, coppro wrote:
> >> Sun SPARC based machine running SunOS 4.x, Solaris 2.x, or
> Solaris 7
>
> By release time, I should have access to a BSD flavour installed on a SPARC
> machine. Would out be helpful for me to do cursory tests?
On 3/1/2015 10:41 AM, lorimer wrote:
> I have access to a Borland environment too, so I'll be
> borrowing that at some point. [Just not soon.]
I didn't include the above, just in case they don't happen.
The README can, of course, be updated again once they have
been tried.
Sean Hunt [Sun, 1 Mar 2015 17:02:38 +0000 (12:02 -0500)]
Print lava item destructions only if surviving.
This partially reverts commit 72c2ae233d35076adece2e8d02a7f8839e4a5aa8
in order to prevent players from using hangups during the destruction
messages to save themselves.
Sean Hunt [Sun, 1 Mar 2015 16:54:40 +0000 (11:54 -0500)]
Merge fire-based erosion to common codepaths.
This finally eliminates all direct increases of `oeroded` and `oeroded2`
and moves them all to go via `erode_obj()`. They are still manipulated
directly in a few places, but not to erode objects.
This now merges the `fire_damage()` function to a common codepath, used
for items on lava and burning oil, but fire needs more work. There is
still a duplication between `destroy_item()` and `fire_damage()`; the
two codepaths should eventually be merged in some manner so that there
is only one codepath to say "an object was affected by fire". This path
might require some parameters, such as whether the fire will just erode
objects or burn them outright, but that can happen another day.
Sean Hunt [Tue, 24 Feb 2015 20:26:09 +0000 (15:26 -0500)]
Fold `get_wet()` into `water_damage()`.
This now ensures that dipping into water works like other sources of
water damage. There is a potentially significant gameplay change here:
dipping a container into uncursed water will wet all its contents. If
this is a problem, then we should add another parameter to water_damage
which will suppress this behaviour for dipping.
Pasi Kallinen [Mon, 9 Feb 2015 18:56:44 +0000 (20:56 +0200)]
Apply paxed's DEBUG patch to remove DEBUG/D_DEBUG.
Move debugging output into couple preprocessor defines, which
are no-op without DEBUG. To show debugging output from a
certain source files, use sysconf:
DEBUGFILES=dungeon.c questpgr.c
Also fix couple debug lines which did not compile.
This also includes fixes due to Derek Ray to depugpline to work better
on other platforms.
Sean Hunt [Sat, 14 Feb 2015 04:46:47 +0000 (23:46 -0500)]
Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
Sean Hunt [Thu, 19 Feb 2015 04:24:41 +0000 (23:24 -0500)]
Clean up lava messages a little.
This change has two parts.
First, the Book of the Dead now has a special message in lava. This was
originally added by Steve Melenchuk (aka Grunt) as a precaution against the Book
burning up. While I'm pretty sure that the Book can't burn up in the current
codepath, the message is a nice touch and it doesn't help to add a safety check.
Second, always print the inventory destruction messages. The reason for this is
fairly subtle, but relates to the timing. By not printing the messages when
dying, the visible effect to the player is that if they have lifesaving, the
items burn up before they die, but if they do not, they burn up after they
die---the fact that they do burn up is visible in the dump or bonesfile.