Commit Graph

785 Commits

Author SHA1 Message Date
cohrs
36faeeea3c debian bug #23229 - save file permissions
Use fqname buffer 1 for restoring the save file (just like save does when
creating it) so the value won't change out from under the code in unixmain.
- Also moved a tty-specific hack in docompress_file that was causing
the 'y' response to the "keep the save file" prompt to be echoed twice.
2003-10-16 16:18:26 +00:00
nethack.allison
716b2e81f4 from <Someone>'s list: destroy wand of digging
20000922    Water should flow into pits from broken WoD, or DoE.

This addresses the Wand of Digging part, but does not
do anything about Drum of Earthquake.
2003-10-16 02:36:26 +00:00
cohrs
f86341a390 eating amulet of unchanging redux
To keep this from growing beyond this targeted change, make eating an
amulet of unchanging "un"change you, unless you're also wearing one.
2003-10-15 20:07:14 +00:00
nethack.allison
46296dfb5c dipping non-weapon iron in fountain
<email deleted> wrote:
> Non-weapon iron items don't appear to rust if #dipped in a fountain.

Fixed. If something does get rusted, its a 50/50 chance whether other
fountain effects take place on the item afterwards.
2003-10-15 12:32:35 +00:00
nethack.allison
9f6e99c9c1 win32tty color fix
fix by <Someone>, updated by <Someone> on r.g.r.n.

changes the colours of the windows tty port so that blue and
bright blue, and cyan and bright cyan are distinguishable. The chief
benefit of this is that floating eyes no longer look like shocking
spheres.
2003-10-15 11:37:16 +00:00
cohrs
dadeed21d2 debian bug #154629 - extended commands in gnome front end
Not all of the extended commands worked in the gnome interface because
'#' just caused the next character to be treated as a meta character (this
was a hack I added a while back when none of the extended commands worked).
Resolved by finally adding an extended command menu to the gnome interface.
- updated some formatting so I could read the code
- fixed startup player selection menus so accelerators work
- added necessary calls to make sure selected menu item is visible
- also removed some dead code
2003-10-15 06:02:27 +00:00
cohrs
cc2105b7b4 debian #184911 - quitting while tty mode inventory is displayed
The tty menu code wasn't totally reentrant, causing it to free memory
that wasn't on the heap if you had your inventory displayed, ^C then
ask to see the inventory again.  Solved this by converting the buffer used
by process_menu_window to be heap-allocated.  If the Quit code could return at
this point, this would still be very bad, but since it doesn't, this is OK.
2003-10-14 07:35:01 +00:00
cohrs
0d533b7b39 debian #170531 - sign extension in gnome input
Internals of gnome_yn_function should treat key inputs as 'int' until
returning them, to avoid truncating and not sign extending as needed on
platforms where char is unsigned.
2003-10-14 07:07:40 +00:00
cohrs
120d0b0295 debian #154627 - quiver menu item in gnome interface
Add a menu item for Quiver.  While testing this, found the Quit menu
item still said that you quit using shift-q, so I updated that too.
Trunk change includes some other exit related fixes that don't apply to
the 3.4.3 branch.
2003-10-14 07:00:13 +00:00
nethack.allison
84f667c5a4 ice Warning (trunk only) 2003-10-13 23:54:41 +00:00
cohrs
3480525053 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.
2003-10-13 20:24:17 +00:00
nethack.allison
10160cc4d9 win32 synch 2003-10-13 15:40:16 +00:00
nethack.allison
711e3ccc32 win32gui message history; also clipboard support (from <Someone>)
main trunk only

- added 2 menu options: Copy ASCII Screenshot To Clipboard, Save
  ASCII Screenshot To File
- implemented saving message history
2003-10-13 14:52:15 +00:00
nethack.allison
2d99bb91be change the "Stop eating?" question (trunk only)
Opinions expressed:
> I actually like having "yes" consistently mean take a
> dangerous action, and "no" mean the safe route.

Also:
> I would classify the current behavior--where the "safe" answer
> is the opposite of the one for other prompts--as simply a bug.
[...]

change the dreaded "Stop eating?" prompt to "Continue eating?" with default "no"
2003-10-13 02:48:46 +00:00
nethack.allison
8bb51a2d62 typo 2003-10-12 22:57:51 +00:00
nethack.allison
bcdb8cf7f9 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...
2003-10-12 22:56:36 +00:00
nethack.allison
6712fc1b04 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.
2003-10-12 04:21:27 +00:00
cohrs
f6425ee3c5 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.
2003-10-12 03:55:17 +00:00
kmhugo
9cca788ef0 fixes catchup 2003-10-12 02:50:43 +00:00
cohrs
701054d012 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.
2003-10-11 18:54:48 +00:00
cohrs
79961e0d85 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.
2003-10-11 18:38:24 +00:00
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
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
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
cohrs
3671f12b0a conflicting delayed killers
fixes entry for the delayed killers change
2003-09-29 21:33:51 +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
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
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
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
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
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