Commit Graph

2381 Commits

Author SHA1 Message Date
cohrs
8ee1ecd2ea 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.
2003-10-10 23:01:42 +00:00
cohrs
219e091d82 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.
2003-10-10 22:53:28 +00:00
nethack.allison
d590efacad 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.
2003-10-10 15:53:27 +00:00
nethack.allison
5cf49afd75 #U578: Various bug reports
> <email deleted>
> on Tuesday, August 5, 2003:
> Warriors on the Valkyrie quest may be male.
[...]
2003-10-10 13:36:53 +00:00
nethack.allison
acadeb1c32 win32tty bit 2003-10-10 04:53:17 +00:00
nethack.allison
9726ece28c 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.
2003-10-08 03:48:59 +00:00
nethack.allison
27749e572e more context (trunk only)
- reading spellbooks
- taking off
2003-10-08 03:31:06 +00:00
cohrs
9c24966fe2 message history followup
Add a couple missing prototypes
removed an unused variable
2003-10-06 02:55:55 +00:00
nethack.allison
bc70857749 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.

Credit to <Someone> for #2.
2003-10-05 23:00:05 +00:00
nethack.allison
4775dd3cbf 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.
2003-10-05 19:56:22 +00:00
nethack.allison
f6f6c1f0d5 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.
2003-10-05 13:43:16 +00:00
cohrs
a5c8b517d2 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.
2003-10-03 02:09:27 +00:00
cohrs
ed8ce13d8f 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.
2003-10-02 04:23:59 +00:00
cohrs
6c734c22eb 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.
2003-10-02 03:39:57 +00:00
cohrs
d91171b491 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.
2003-10-01 03:37:55 +00:00
cohrs
1e2d502ac6 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.
2003-09-30 18:55:02 +00:00
cohrs
2d8bc8875e 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".
2003-09-30 18:49:48 +00:00
cohrs
8a4816f775 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.
2003-09-30 18:46:49 +00:00
nethack.allison
0594b9b621 win32gui: missing but for UI tweaks (from <Someone>)
"Count: XXXX" was getting cut-off in the menu
2003-09-30 03:44:34 +00:00
nethack.allison
1bdf37ec00 SAFERHANGUP win32gui (from <Someone>) 2003-09-30 03:42:01 +00:00
nethack.allison
4349f52899 SAFERHANGUP win ce (from <Someone>) 2003-09-30 03:41:02 +00:00
cohrs
3671f12b0a conflicting delayed killers
fixes entry for the delayed killers change
2003-09-29 21:33:51 +00:00
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