Commit Graph

2359 Commits

Author SHA1 Message Date
cohrs
559be58c21 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
2003-09-29 19:24:20 +00:00
cohrs
a89fa75f4c U678 - message ordering 2003-09-29 16:22:11 +00:00
nethack.allison
b6d32e499d U675 fix
if the monster that a statue represents is not made of flesh then don't
allow stone_to_flesh to animate it, make a meatball instead
2003-09-29 02:20:18 +00:00
kmhugo
e1f5ddd820 sound cleanup
+ 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.
2003-09-28 03:42:50 +00:00
kmhugo
3cd543ce74 lint tidbit 2003-09-28 00:10:23 +00:00
nethack.allison
d024c09602 ^X tabbed field support 2003-09-27 22:37:52 +00:00
cohrs
9f0949394f guidebook grammar bit 2003-09-27 15:55:35 +00:00
nethack.allison
64e75e05e4 win32gui (from <Someone>)
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)
2003-09-27 12:30:28 +00:00
nethack.rankin
0288c5321a animation of wielded statue
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.
2003-09-26 10:27:36 +00:00
nethack.rankin
0ee0cc96da vms catchup (context) 2003-09-26 09:56:38 +00:00
cohrs
c2f12b8d30 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.
2003-09-26 03:31:09 +00:00
cohrs
c72aafcd40 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.
2003-09-26 01:03:46 +00:00
cohrs
929f9ce2c7 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.
2003-09-26 00:37:24 +00:00
cohrs
96b56a7bd7 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().
2003-09-25 22:44:27 +00:00
cohrs
4375fc7846 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.
2003-09-25 16:56:56 +00:00
cohrs
db011864c0 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.
2003-09-24 02:12:22 +00:00
cohrs
afea61ef57 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.
2003-09-24 01:29:54 +00:00
cohrs
d706e044b4 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.
2003-09-23 22:01:14 +00:00
cohrs
2d59f9d8db 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
2003-09-22 05:21:53 +00:00
nethack.allison
92d59e2fe6 fix cvs macro 2003-09-21 13:34:52 +00:00
nethack.allison
dc9dee3e0d commit new file context.h 2003-09-21 13:32:36 +00:00
nethack.allison
22ad303fee victual follow-up
Since context is saved prior to inventory
ensure that the o_id is valid immediately.
2003-09-21 13:25:56 +00:00
nethack.allison
c12d797531 trunk only: preserving context (remaining files)
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
2003-09-21 11:57:26 +00:00
nethack.allison
18e971e442 trunk only: preserving context (sys files)
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
2003-09-21 11:56:11 +00:00
nethack.allison
22ce5ed6f2 trunk only: preserving context (src files)
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
2003-09-21 11:52:54 +00:00
nethack.allison
74b834c774 trunk only: preserving context (include files)
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
2003-09-21 11:46:53 +00:00
jwalz
c3960b1d49 SAFERHANGUP followup
We've previously been supporting R4+ for X11, but signals weren't added
until R6.  This at least lets it compile under R5.
2003-09-19 16:32:41 +00:00
nethack.allison
018123c007 SAFERHANGUP support for win32tty
win32gui support still needs to be developed.
2003-09-19 11:22:00 +00:00
cohrs
22fe9838f3 SAFERHANGUP support for win/Qt.
Now all the current Unix window-ports support it.
2003-09-19 04:08:37 +00:00
cohrs
d66bd647e6 more SAFERHANGUP
make "done_hup" volatile on platforms where this matters, since hangup()
now returns when it didn't used to.
2003-09-19 03:55:33 +00:00
cohrs
40b5b12673 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.
2003-09-19 03:15:49 +00:00
cohrs
1382c6c028 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.
2003-09-18 03:03:12 +00:00
cohrs
5e443536d8 "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.
2003-09-18 02:52:40 +00:00
warwick
9402d6dc54 Don't use regex by default - that way player can share/transport
their nethack.cnf between platforms bettery. Wildcards suffice anyway.
2003-09-16 03:45:58 +00:00
warwick
b6ff9d7d73 Use __BIG_ENDIAN__ rather than __ppc__ (more portable, more meaningful). 2003-09-16 00:20:18 +00:00
cohrs
3eb58528dd redundant comparison bit 2003-09-15 16:20:38 +00:00
nethack.allison
e62bd5eb14 wish bit
<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 :-)
2003-09-15 10:47:30 +00:00
nethack.allison
b4b37dde28 buglist: autodig
> 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>]
2003-09-15 03:49:28 +00:00
nethack.allison
e919b2e01c buglist: desacrated temples and blindness.
> 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>]
2003-09-15 03:08:56 +00:00
nethack.allison
5eff6601e9 avoid the_your[] duplication
get rid of a duplication of the_your[] strings (do.c, trap.c) by
moving it to c_common_strings.
2003-09-15 02:04:00 +00:00
cohrs
e2d75840b0 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.
2003-09-14 00:01:35 +00:00
cohrs
10847b0e3d gcc compilation warnings 2003-09-13 22:55:45 +00:00
nethack.allison
bd170f5869 show errno not result
open_levelfile_exclusively() was showing the return value -1 in a panic message, even though that was the only possible value; show errno instead
2003-09-13 17:11:20 +00:00
nethack.allison
cc830fb311 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.

[confirmed: moveloop -> deferred_goto -> goto_level ->
 losedogs -> mon_arrive -> rloc -> impossible]

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.
2003-09-13 05:30:43 +00:00
cohrs
32b2af4abf 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."
2003-09-12 20:08:44 +00:00
cohrs
8396866296 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.
2003-09-12 17:23:04 +00:00
cohrs
57a21dafde Missing FOUNTAIN in minend-3
<Someone> reported a missing FOUNTAIN tag the minend-3 to correspond to one
of the fountains in the map.
2003-09-12 16:50:09 +00:00
cohrs
ad41e2dc32 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.
2003-09-12 16:20:50 +00:00
warwick
9d83d474f4 Solve a number of MacOSX problems. 2003-09-11 04:25:52 +00:00
warwick
0460cc9824 MacOSX can handle >14 character names.
I think the #if is inverted really - what DOES have that limit?
2003-09-11 04:23:52 +00:00