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.
nethack.rankin [Thu, 7 Nov 2013 01:03:16 +0000 (01:03 +0000)]
retouch_equipment() bypass handling
Simplify retouch_equipment (post-3.4.3.code, called when hero
changes alignment or turns into a silver-hating critter; inventory
traversal must cope with the possibility of losing object->nobj when
processing object) by switching to recently added object->bypass code.
nethack.rankin [Tue, 5 Nov 2013 00:57:56 +0000 (00:57 +0000)]
fix #H3039 - panic() when trying to drop destroyed items
From a bug report, dropping a lit
(burning) potion of oil while levitating can produce an explosion which can
destroy inventory. If in the process of dropping multiple items, the ones
after the oil might be gone, resulting in use of stale pointers and possibly
triggering an "extract_nobj: object lost" panic or even a crash. While
testing my fix, I discovered that being killed by an exploding potion of oil
could produce an "object_is_local" panic if bones are saved (and reproduced
with unmodified 3.4.3).
nethack.rankin [Sat, 26 Oct 2013 21:33:47 +0000 (21:33 +0000)]
fix #H3033 - Crash upon teleport onto a sink while equipping levitation boots
From a bug report, being teleported onto
a sink while busy putting on levitation boots triggered a crash when
Boots_on() was called (as '(*aftermv)()' on the next turn) because
'uarmf' would be null by then. Not mentioned, but the same problem was
encountered by Boots_off() if the teleport happened while you were busy
taking boots off. It could be fixed by having having dosinkfall() call
cancel_don() if donning(uarmf) yields true, but this patch does a little
more than that: cancel donning/doffing of any multi-turn armor if you
fall onto a sink. It also prevents you from falling if you end up
flying (which will have been blocked while levitating).
The situation when putting on levitation boots has a sequencing
issue: setworn() causes you to be flagged as levitating immediately,
but the float_up() feedback doesn't occur until Boots_on() gets called
a turn later. Teleporting to the sink will tell you that you crash
onto the sink and and that you stop putting on boots, without having
been told that you've floated up into the air. It's suboptimal but it
doesn't seem to actually be incorrect.
nethack.rankin [Sun, 17 Mar 2013 00:17:18 +0000 (00:17 +0000)]
Magicbane grammar
After newsgroup discussion of C343-162, I noticed that it had fixed
the verb usage in the message for confused and/or stunned, but not in the
one for resisting. (If a monster name ends in 's', or it has been named
"you", 3.4.3 used the wrong verb because vtense() was fooled about plural
or second person.) No new fixes entry needed....
nethack.rankin [Thu, 14 Mar 2013 01:58:21 +0000 (01:58 +0000)]
flying into pits
In the newsgroup recently, someone mentioned that when polymorphed into
a flying monster, he couldn't retrieve items out of pits, even with the '>'
command. I thought that we had fixed that, but the fix apparently only
covered walk-through-wall creatures (xorns and earth elementals), not flyers
and ceiling clingers. Now those can also deliberately enter pits via '>'.
The fixes entry is in the new features section in order to be next to
the xorn one. '>' at pit locations is new, but it handles something which
was missing so feels more like a bug fix than a new feature to me....
[Keni, the bug page entry C343-12 about '>' (for xorns?) is general enough
to cover this fix, so we don't need to add a new one for flyers.]
I noticed an unrelated fixes35.0 entry mentioning '>' which was duplicated;
this removes one of the copies.
nethack.rankin [Sat, 9 Feb 2013 01:33:37 +0000 (01:33 +0000)]
impossible fix - potentially invalid feedback
From a bug report, the message displayed to the screen by
impossible() might be different from the one written into paniclog, if it
had argument subsitution/formatting. I couldn't reproduce that myself,
but stdarg.h/varargs.h is tricky stuff and I think that passing the va_list
to a routine which steps through it requires that va_start be called again
if you're going to use the va_list a second time. This changes impossible()
to handle its arguments only once, like panic().
nethack.rankin [Wed, 19 Dec 2012 01:26:54 +0000 (01:26 +0000)]
fix #H2785 - engraving punctuation
Message tidbit when engraving with a weapon which becomes too dull to
finish the whole text: add missing final period to
You are only able to write "<partial text>".
I think that proper usage puts the period in front of the quote rather than
after, but that could make it look as if the period ended up inside the
partial engraving.
fix #H2671 - feedback when entering untended shop while blind
From a bug report, you get the message "this shop
appears to be deserted" when entering a shop whose shopkeeper is not there,
even if you can't see at the time. Change it to be
'this shop is deserted'
when you can see that the shop is empty,
'this shop is untended'
when there's no shopkeeper but you can see some other monster(s) inside,
'this shop seems to be deserted'
when you can see but there is a monster that you can't see (probably a
hidden mimic, but possibly an invisible monster or one standing behind
a boulder that's ended up in the shop), or
'this shop seems to be untended'
when you can't see (and don't have active telepathy or persistent
monster detection).