cohrs [Mon, 13 Oct 2003 21:17:12 +0000 (21:17 +0000)]
qt gcc warnings
cosmetic changes to allow qt_win.cpp to compile cleanly using gcc -Wall.
This corresponds to a debian report that doesn't mention a debian bug ID.
The changes are not identical to the suggested debian patch.
cohrs [Mon, 13 Oct 2003 20:24:17 +0000 (20:24 +0000)]
debian bug 71234 - closing player selection window causes core dump
Too much code was being shared between the extended command window
and the popup dialogs for player selection, causing an uninitialized
variable to be referenced, often resulting in a core dump.
nethack.allison [Sun, 12 Oct 2003 22:56:36 +0000 (22:56 +0000)]
Vlad won't use digging in his tower
<email deleted> wrote:
> [...] Vlad happened to be generated with a /WoDig and tried to
> make an escape hole during his last few moves. Shouldn't he
> know, that the floor in his own tower is undigable? So he lost
> valuable time with a pretty senseless action...
nethack.allison [Sun, 12 Oct 2003 15:45:20 +0000 (15:45 +0000)]
another melting ice follow up (trunk only)
Zapping existing ice with cold wand/spell guaranties safe ice for
a minimum of MIN_ICE_TIME time.
Note that it could actually cause the ice to melt sooner than
it previously would have due to the randomization, but that's
an internal that the non-wizard-mode player would never
know anyway. The important thing from the hero's perspective
is that the ice should be safe for a while at least.
Also noticed and corrected a bug where the ice object effects
seem to have been getting initiated when solidifying lava in
zap.c
nethack.allison [Sun, 12 Oct 2003 04:21:27 +0000 (04:21 +0000)]
melting ice (trunk only)
add a new melt_ice_away timer for ice created via zapping
a wand/spell of cold.
Some follow-up adjustments to the length of time before
the ice melts may be necessary. Ideally, I'd like to
have it so that the shorter the length of time since
the ice was created, the lesser the chance that it will
melt out from under you. Likewise, the longer it has
been, the more risky it will be to venture onto it.
At the moment, however, each spot of ice is just
getting a somewhat random time always greater
than 50, which is less than ideal.
cohrs [Sun, 12 Oct 2003 03:55:17 +0000 (03:55 +0000)]
X11 hilite_pet
Add support for hilite_pet to X11 text map mode (hilite_pet was already
supported when tiles were enabled). While testing this, I found a missing
newsym() in the code implementing the creation of a "tame" monster.
cohrs [Sat, 11 Oct 2003 18:54:48 +0000 (18:54 +0000)]
eating an amulet of unchanging
Prompted by a suggestion on the newsgroup and from <Someone>, allow eating an
amulet of unchanging to remove intrinsic polymorph.
cohrs [Sat, 11 Oct 2003 18:38:24 +0000 (18:38 +0000)]
throwing while polymorphed
<Someone> suggested that a dragon, lacking hands, shouldn't be able to
throw things. Dragons can pick things up, and it seems they can throw
things the same way. However, it does seem that a notake() monster, which
cannot pick things up, shouldn't be able to throw things either.
cohrs [Fri, 10 Oct 2003 23:01:42 +0000 (23:01 +0000)]
hiding under a cockatrice corpse
Reported a while back, a (stonable) hiding monster will hide at a location
containing only a cockatrice corpse. While it would be interesting to
allow monsters to try, and stone themselves as a result, I chose the
simpler fix which is to not have monsters hide in such situations. I found
the hiding code was duplicated in several places, so I moved it into a new
hideunder() function that works for both the hero and monsters.
cohrs [Fri, 10 Oct 2003 22:53:28 +0000 (22:53 +0000)]
U685 - billing for tin usage
When moving the code to bill for tins before eating them (to charge for
them at the pre-eating hunger status), several cases were able to bypass
billing. Moved the bill checking code to a new costly_tin() subroutine so
it could be called in all the necessary places.
nethack.allison [Fri, 10 Oct 2003 15:53:27 +0000 (15:53 +0000)]
buglist: splashing
> Not all objects say "Splash!" when they fall in the
> water. When levitating/flying and dropping things they
> don't, but when polymorphing and forced to drop items
> they do. [<email deleted>]
when floating over the water, things dropped always
make some sort of sound. Also fix up some messages
when Underwater that previously said things like
"feel what is lying on the water" by adjusting
surface() in that situation to return "bottom."
While looking into this, I noticed that if you
are polymorphed into a Flyer and you then polymorph
back into your normal form, you don't end up in
the water until you move, so this attempts to
correct that too.
nethack.allison [Wed, 8 Oct 2003 03:48:59 +0000 (03:48 +0000)]
Remove very old buglist entry
> You cannot stop eating, transcribing, or removing armor, save
> the game, restore it, then expect to continue. These use
> static data structures which aren't saved.
nethack.allison [Sun, 5 Oct 2003 23:00:05 +0000 (23:00 +0000)]
win32tty changes
1. Switch to low-level console routines for performance improvements.
2. Instead of moving the cursor around like a real tty, just track the
destination coordinates of where the cursor should be, and
defer the movement until user input is expected.
nethack.allison [Sun, 5 Oct 2003 19:56:22 +0000 (19:56 +0000)]
headings in option menus
There was a great deal of inconsistency in
different menus on how headings were displayed.
This allows the user to select what they like best.
I was motivated to do this, because I wasn't satisfied
with the appearance of ATR_INVERSE in the menus
on win32tty, and several of them specified it.
nethack.allison [Sun, 5 Oct 2003 13:43:16 +0000 (13:43 +0000)]
saving message history (trunk only)
On September 11, 2003 "<Someone>" wrote:
> When we're going to have a different save file format, could
> the last messages in the message history be saved as well, so
> ^P would work the same before and after saving (possibly
> including a few less messages to make room for the startup
> messages?).
This seemed like a reasonable request. This patch:
- adds the core support required.
- adds the tty supporting routines.
cohrs [Fri, 3 Oct 2003 02:09:27 +0000 (02:09 +0000)]
X11 dynamic map mode selection
Prompted by a question from Pat a long time back, this change finally allows
tiles or text map mode to be chosen dynamically at runtime (using the
"tiled_map" option) rather than having to pick it via an X resource and
keep your selection until you exit. This brings map mode selection up to a
level similar to most other graphical window ports.
In addition, the map mode automatically switches to text on the Rogue
level, also like other graphical window ports.
The default mode for the X11 binary is now tiles, once again, like most (all?)
other graphical window ports.
The patch also removes some dead X11 code that is unlikely to be useful again.
cohrs [Thu, 2 Oct 2003 04:23:59 +0000 (04:23 +0000)]
eels in lava
<Someone> reported that randomly placed aquatic monsters can end up in
lava. The placement code allowed lava whenever the WET flag was passed to
it. This was so passing (WET|DRY) would match all locations, but it's not
appropriate for when only the flag WET is used. Since we have no levels
currently affected by this bug, I fixed it only in the trunk.
cohrs [Thu, 2 Oct 2003 03:39:57 +0000 (03:39 +0000)]
nagas eating
<Someone> suggested that nagas should eat. This seems reasonable.
I made all but the black omnivores. The black are similar to the AD&D
spirit naga, which are listed as carnivores, while AD&D's other nagas are
omnivores, so I took the same approach.
cohrs [Wed, 1 Oct 2003 03:37:55 +0000 (03:37 +0000)]
U666 - inserting gold into a container
The special-case code for the full menu style lacked an #ifndef GOLDOBJ
to handle the case where gold is the only thing in the hero was carrying.
potion-from-sink and the corpsenm field
Change the code involved to use a new #define for the field, like other
overloaded uses of corpsenm. Also remove one check for this field from
potion.c: there are no blessed potions from sinks.
kicking a drawbridge
There was some unreachable code in dokick related to drawbridges. Since I
liked the current "Ouch!" behavior, I moved the drawbridge test inside the
IS_STWALL code but made sure to update the maploc so kickstr would return
the right thing. Since there may be more than one drawbridge (perhaps it
should test for Valkyrie?) changed the kickstr prefix for drawbridge to "a".
putting a saddle on a cockatrice
If you try to put a saddle on a cockatrice, you turn to stone,
even if wearing gloves. This seemed inconsistent with other cases,
and I couldn't think of a reason why you'd touch the cockatrice with
another body part, so I added the uarmg test.
conflicting delayed killers
Introduce a new set of functions to manage delayed killers in the trunk, used
in addressing the various reports of delayed killer confusion. Since existing
delayed killers are related to player properties, the delayed killers are
keyed by uprop indexes. I did this to avoid adding yet another set of
similar identifiers.
- the new delayed_killer() is used for stoning, sliming, sickness, and
delayed self-genocide while polymorphed. Some other timed events don't
use it (and didn't use the old delayed_killer variable) because they
use a fixed message when the timeout occurs.
- A new data structure, struct kinfo, is used to track both delayed and
immediate killers. This encapsulates all the info involved with
identifying a killer. The structure contains a buffer, which subsumes the
old killer_buf and several other buffers that didn't/couldn't use killer_buf.
- the killer list is saved and restored as part of the game state.
- the special case of usick_cause was removed and a delayed killer list
entry is now used in its place
- common code dealing with (un)sliming is moved to a new make_slimed function
- attempted to update all make dependencies for new end.c -> lev.h
dependency, sorry if I messed any up
+ Separate the two uses of flags.soundok.
+ Player-settable option is now called "acoustics".
+ Deafness is now handled as a full-fledged attribute.
+ Check for deafness in You_hear(), rather than caller.
+ Check for deafness in caller, rather than verbalize(),
because gods can speak to characters in spite of deafness.
+ Since changes are being made to prop.h, reorder it to the
same order as youprop.h and enlightenment.
There are still some extraneous checks and missing checks
for deafness, which will be followed up in a future patch.
Because of the size of this patch and its savefile incompatibilities,
it is only being applied to the trunk code. Portions of this patch
were written by Michael Allison.
trunk and branch:
Do not limit role selection list by race/gender/alignment. The default.nh
selection will still be honored but the list itself will include every
possible role.
Some interface tweaks for main trunk:
- improved calculation of the size of the menu window
- made auto-arrange windows on/off option (it was reset automatically
which was unintuitive and in some cases annoying, IMO)
Fix the reported bug of problems after casting stone-to-flesh spell
on self while wielding a statue. Pointers for worn items weren't kept in
sync and various potential symptoms could occur (most easily visible one
being that ')' falsely reported the no longer existing statue as still
wielded; report stated that one crash was observed). This bug predates
3.4.2 and was probably present ever since stone-to-flesh got introduced.
dismounting next to a boulder
It makes sense that if you cannot normally move to a location containing a
boulder, dismounting there should be avoided if possible. It seems
that it should be possible to land there if there's no other choice.
Perhaps doing so should result in damage, but that's not in this patch.
fog cloud and aquatic monsters
<Someone> pointed out the inappropriate appearance of the 3.4.2 message when
fog clouds have you engulfed if you happen to be polymorphed into an aquatic
creature. It does seem that a fog cloud should not cause added damage to
amphibious creatures, which includes breathless (but non-flaming) monsters.
I also thought another message was more appropriate for flaming creatures
(see on_fire()), and added a special case for that.
gulpum was missing symmetric code and I added it there too.
various tests of flaming monsters
This change adds a new flaming() macro and uses it in several places
where the list of flaming monsters was tested. on_fire() didn't list
salamanders as already being on fire, but should have. A couple other
cases were not updated to include flaming sphere.
U673 - hooks and grappling hook working thru walls
While wearing the Eyes of the Overworld, one could use a hook or pole thru
walls. The bug report thought they should work past a boulder, but I
disagree, given a pole or hook's rigid nature, and did not special case that.
couldsee() is not affected by the Eyes, so use that after checking cansee().
killer messages
Incorporate various killer message grammar fixes suggested by <Someone>.
Mostly these deal with using the proper killer_format and prefix ("the" or
no "the") for unique and type_is_pname monsters, or death to to eating
their corpses.
One case is handled by a general fix to name_to_mon to allow it to deal
with "Croesus' corpse".
The pre-3.4.1 topten behavior for "starved to death" messages is also restored.
U651 - avoid declaring errno unnecessarily
Some changes for standard C platforms, to avoid declaring errno explictly.
Such platforms should declare errno in errno.h, which is already included
in the files in question.
U659 - "destroy" manes
Nethack's manes are based on AD&D manes which are in turn based on the
manes of Roman legend. They are supposed to be spirits of the dead.
To that end, added them to the nonliving() macro. The biggest behavioral
change is that death spells no longer effect them, which does technically
make them a bit tougher but also makes sense. Also, they're so wimpy, it's
hard to believe anyone would use a death/disintegration on them anyway.
U665: gold and unpaid containers
The choice was to avoid one of the two sellobj() calls in in_container.
Since I liked the message ordering "put gold into... credit" better than
"credit... put gold into", the code now avoids the 1st sellobj call for coins.
context build changes for Unix
- removed an extraneous space from Makefile.src that confused GNU make
- unixmain.c still had a couple uses of flags.move
Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.
This patch:
- collects all context/tracking related fields from flags
into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.
This patch:
- collects all context/tracking related fields from flags
into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.
This patch:
- collects all context/tracking related fields from flags
into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.
This patch:
- collects all context/tracking related fields from flags
into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
SAFERHANGUP
This is an initial round of SAFERHANGUP hangup changes. It introduces
SAFERHANGUP, provides the core framework, and enables it for UNIX.
Window-port changes are provided for win/tty, win/X11 and win/gnome. Qt
changes should be forthcoming after having Warwick look at them.
window.doc is updated so windowport maintainers have an clue what needs to
be done to support SAFERHANGUP.
oracles/rumors for offerings
As suggested in a message from <Someone>, add a rumor and an oracle
regarding priestly donations. Keni's suggested wording was incorporated.
A spelling error in another oracle is also fixed.
"your" artifacts
This patch introduces a change to yname() and Yname2() that avoids the
possessive "your" for the hero's normal, fully identified artifacts.
Quest artifacts still get the possessive, as do all other objects and all
objects not in the hero's possession. shk_your()/Shk_Your() are used in
many places with a specific, generalized name for the object, so I didn't
introduce the artifact behavior there, although I did change them to append
a space, which simplified some other code. Through added use of yname(),
there may be some places that used to just say "corpse" that will now be more
descriptive via yname()'s use of cxname(). I'm sure <Someone> will point
out any such places that are too onerous, although nothing obviously is.
I took the opportunity to inspect many uses of "your" and even Your(). Two
new functions are also introduced, yobjnam() and Yobjnam2(), which work
like aobjnam() and yname() combined, because I found that many uses of
aobjnam() were preceeded by "your" and I couldn't generally provide the
desired behavior for artifacts (or future artifacts) without a combined
function. In some cases, this change allowed better sharing of code.
rust_dmg() still takes a string as input which is sometimes initialized
from xname() and often prepends "your" to it. Currently, this isn't a
problem since there currently are no normal, armor artifacts. If/when any
are introduced, rust_dmg() will need to be addressed.
The patch is for the trunk only. A lot of research was required and I
didn't feel the upside was there for repeating it in the 3.4.3 branch.
<Someone> wrote:
>> You're equally unlikely to be wishing for spellbooks by colour,
>> but I note that 'grey' for 'gray' only works for dragonscale and
>> stones, not the spellbook description.
>>
> I've just noticed that the fix for this only works for 'grey
> spellbook', not 'grey spell book'; 'spell book' works for wishing
> in other contexts, so it probably ought to here :-)
> Would it be possible to make autodig also dig downward
> when I press '>' while wielding an pick-axe? When digging for gold,
> after casting detect objects, this would be convenient for getting
> to buried gold and gems.
> [<Someone>]
> When I enter a desacrated temple, sometimes an enormous ghost
> appears next to me:
> You have an eerie feeling... An enormous ghost appears next to
> you!
> You are frightened to death, and unable to move.
> You regain your composure. When I don't have telepathy, and don a
> blindfold first, I get the same messages:
> You are now wearing a blindfold. You can't see any more.
> You have an eerie feeling... An enormous ghost appears next to
> you!
> You are frightened to death, and unable to move.
> You regain your composure. Why does the ghost scare me if I
> cannot even see it? How do I notice it appear?
> [<Someone>]
quivering coins
A while back, I delayed applying this patch after a discussion about
quivering coins, because I didn't want to change the behavior of GOLDOBJ
vs non-GOLDOBJ games. I'm tired of seeing this diff in my tree, and I
recall there was some sentiment that I should have checked it in, so I'm
adding the feature in the trunk.
buglist - full level triggers impossible() from migrating mons
<email deleted> wrote:
> If more monsters fall through a trap door than can fit on the
> level below, when you go down the stairs, you get the following
> message:
> "Program in disorder - perhaps you'd better #quit.
> rloc(): couldn't relocate monster"
> This message seems to appear once for every monster-too-many that
> fell through the hole. I originally found this while
> intentionally completely filling a level with black puddings
> (there was a trap door I didn't know about). I also confirmed it
> in a wiz-mode test using gremlins and water.
This patch:
- causes rloc() to return TRUE if successful,
or FALSE if it wasn't.
- adds code to mon_arrive() in dog.c to deal with
the failed rloc()
- allows the x,y parameters to mkcorpstat() to
be 0,0 in order to trigger random placement of the
corpse on the level
- if you define DEBUG_MIGRATING_MONS when you build cmd.c
then you'll have a debug-mode command #migratemons to
store the number of random monsters that you specify
on the migrating monsters chain.
buglist followup to pacifying a shopkeeper
Quoting the buglist: "If shk.c does get modified, I'd
like to see a call to rouse_shk() added at the start of rob_shop().
If the shk wakes up for buying and selling, he ought to wake up for
robbery--even when it's covered by the customer's credit--too."
inappropriate pacification of shopkeepers
A recent report noted that if you are invisible, teleport into a shop,
steal something, teleport out, and then return, the shopkeeper will become
pacified. This is because the pacification code occurred even if the
shopkeeper already knew your name, as long as the "Welcome" message had not
yet occurred. Implement <Someone>'s proposed fix: Before pacifying, either
the visitct must be zero (as per old code) or the customer name must
already be known. And, of course, the customer name must differ from the
current setting. This skips the pacification code in those situations
where the shopkeeper learned your name but was not happy about it (which is
what visitct > 0 implies, at least initially).
This also deals with an older bug report where you attack a shopkeeper
while outside the shop and then later enter the shop while the shopkeeper
is in it. hot_pursuit() sets the customer name, and the new check avoids
pacifying the shopkeeper for the same reason as noted above.
U614 - Master Kaen death message
rewrote the message so it doesn't talk about his body dissolving into gas,
since there's a possibility that he'll leave a corpse. It now doesn't
mention a body at all, so it's not so bad when he doesn't leave a corpse
either. The contents are completely changed, and I think it's more in line
with the sort of thing you'd expect from Master Kaen.
Avoid unixisms. On MacOSX, we cannot assume that the user will use
a command-line option to set their name. Normally they will type
a name if asked - but they won't be asked if we pull their username
as a name.
Described in the newsgroup a while back and recently reported: if
you had reflection and were invisible and had esp and were blind, Medusa
would turn herself to stone by looking at you. When you're invisible,
she shouldn't be able to see your source of reflection so shouldn't be
affected by the gaze; that's how things work when you aren't blind but
the relevant code was being skipped when you are.
Now esp is irrelevant for this and she'll see her reflected gaze
only when she can see you, regardless of whether you see it happen.
shopkeeper messages outside the shop
remove_rooms() was trying to be clever and truncate the maximum room bounds
in partially overlapping rooms. In the process, it would truncate the
bounds of L shaped rooms incorrectly, leaving some locations outside the
bounds with the roomno field set. Since the maximum bounds really do not
have to actually match the largest extent of the room in the case of
irregular rooms, it was easiest to just remove the code that was performing
the incorrect truncation. Due to the way remove_room() is coded, this
could result in shopkeeper messages (or, less likely, priest messages,
although that has not been reported yet) occuring for locations to the
right (or the upper/lower right corner) of the MAP on the Bustling Town level.
U638 Juiblex's "moat"
> NetHack feedback form submitted by
> <email deleted>
> on Tuesday, September 9, 2003 at 06:41:34
> Hi, Just thought I'd point out a sort of inappropriate word
> choice or typo that I came across in Juiblex's Swamp. I got this
> message, after pushing a boulder into the swamp: There is a large
> splash as the boulder falls into the moat. Obviously it's a swamp
> and not a moat so that sounds a bit wrong. It says the same sort
> of thing when I #dip a scroll in the swamp as well.