Commit Graph

2704 Commits

Author SHA1 Message Date
cohrs
8215976fdb remove an unused variable
gcc w/warnings whined
2004-11-29 22:50:36 +00:00
cohrs
2abfb12144 U1182 - Can drink from sink while engulfed
The same occurred for fountains and drinking surrounding water while
underwater.
I also added a !Levitation check for sinks, like already exists for
fountains.  I cannot believe sinks are taller than an altar, and if you
can't pick up stuff from an alter while levitation, it stands to reason you
cannot drink from a sink then either.
2004-11-29 19:01:31 +00:00
nethack.rankin
384628da9a fix steed eating feedback
<Someone> reported that riding a steed into a magic portal can
give "steed is still eating" message, feedback normally used to explain why
you can't go down stairs.  Rather than preventing portals from activating
in that situation, just force the meal to be finished in order to suppress
the message.  Proper fix is probably to prevent all steed movement while
eating, but that would most likely result in no one ever riding again.
2004-11-27 03:06:21 +00:00
nethack.rankin
00dcc2ae4c fix #U1206 - Quest artifact in WIZKIT file aborts program
Fix the wizard mode crash From a bug report.  Move the WIZKIT
message suppression to a lower level instead of trying to guard against
present and future pline() calls in the wishing code.  The way that was
being handling wasn't suitable for dealing with quest feedback.

     This also includes a couple of additional wishing synonyms.
2004-11-24 02:50:32 +00:00
nethack.rankin
0600cf70ca tastes like chicken...
Someone in the newsgroup expressed surprise that he didn't get any
special message after surviving the eating of a cockatrice corpse.  Combine
the cliche that unconventional meat inevitably tastes like chicken with
the mythology that cockatrices are a bizarre hybrid of chicken and reptile
(or whatever).  This will give a message about tasting like chicken for
corpses or smelling like chicken for tins when the hero has petrification
resistance (poly'd into a xorn, for instance) or is hallucinating.
2004-11-20 02:39:18 +00:00
nethack.rankin
6336dbbb65 fix #U1202 - shop robbery oversights
A user reported that when breaking potions inside a box in a shop, he
wasn't charged for them.  The code was calling stolen_value() as intended,
but that routine only charged for types of items which the shop normally
carries.  That meant that breaking the contents of a box in a general
store would charge for them but doing so in a tool shop would, not even
though the tool shopkeeper would gladly sell such things when you picked
them up instead of causing them to go away.

     When fixing this, I noticed that stolen_value() was only charging
for single items.  Most of the time that was right, because throwing and
kicking things always split one off, but there are cases (such as zapping
a wand of teleportation at shop goods) where an entire stack gets stolen
as a group.  This makes stolen_value() handle all quantities.
2004-11-20 01:41:01 +00:00
nethack.rankin
05923e795f cockatrice eggs vs gravity
Eggs thrown straight up which don't splatter on the ceiling yield
"you've got it all over your face", so wearing a helmet shouldn't protect
against petrification from cockatrice eggs in that situation.  This was
part of my delayed helm vs hat stuff; I can't remember whether it was done
before or after this same issue came up in the newsgroup.
2004-11-13 04:14:14 +00:00
nethack.rankin
7672a2c60b hats vs helms
Something from <Someone>'s list:  some messages have hardcoded references
to "helmet" which sound strange when the character is wearing a hat or cap.
helm_simple_name() is comparable to the existing cloak_simple_name().  It
returns "helm" or "hat" depending upon whether the helmet provides the
same protection that yields the assorted repetitions of "fortunately,
you are wearing a hard helmet".  This choice ends up categorizing elven
leather helm as a hat (which I think is ok given that its undiscovered
description is "leather hat"), contrary to <Someone>'s suggestion that the
distinction be made based on whether the helmet was made of cloth.

     I started on this a year and a half ago but didn't commit it.
Unfortunately I don't remember why and haven't done any significant
additional work now--just recovered from some intervening bit rot and
confirmed that the patch as is seems to be working ok (in the trunk; the
branch side has not been tested).  I suspect that I meant to look for
additional helmet messages which could benefit from conditional headgear
description.  (Those "hard helmet" ones don't need it, although they
should perhaps be moved into a common routine instead of being replicated.)
2004-11-13 04:00:52 +00:00
nethack.rankin
88dad9386b #adjust enhancement - splitting stacks
Allow the #adjust command to be used to split an inventory stack
as well as for moving things to specific slot letters.  Splitting is
accomplished by specifying a count along with the letter of the stack to
operate on, similar to when dropping a stack with 'd'.  The comment above
doorganize() has more details.

     This change will make it possible for users to split stacks of cursed
loadstones which they couldn't easily do before, but I don't see anything
wrong with that.  It was always possible to have multiple stacks of load-
stones by starting with ones that had different curse/bless status, so this
hasn't introduced a totally new situation.  On the other hand, I haven't
tested this with the GOLDOBJ configuration and am not sure whether there is
any need to prevent gold from being split there.  The getobj() call doesn't
specify COIN_CLASS so perhaps it's irrelevant (unless it ought to be
changed the other direction by adding that to intentionally allow gold to
be split?).
2004-11-06 02:42:41 +00:00
nethack.rankin
0a9b85159e doorganize() tidying
I've cleaned up the #adjust routine somewhat while revising it to
support splitting stacks as well as moving them, then have separated the
cleanup from the more substantial changes.  The most significant change
here is that #adjust will give up early if used when inventory is empty;
the user used to be forced to choose a letter from an empty list in that
case, then it gave up when no object was selected.  There's also a minor
change for users who turn `fixinv' off; the prompt's list of likely
candidate letters for destination slot is reduced to one letter beyond
current usage instead of showing the rest of the alphabet.  (Picking any
letter--which users can still do--beyond current usage results in moving
the adjusted item to the end of the list, although it ultimately ends up
with a different letter than the user chose because adjusting from some
other slot frees up that slot; all items past it--including the new last
element--effectively move up one letter [or more if merges occur].)
2004-11-06 01:51:08 +00:00
nethack.rankin
c090c74eec pickup into quiver
Despite lack of feedback from the beta testers about it, add the code
which tries to stack an object being added to inventory with the quiver
before trying with other carried objects.  Only matters to user if quiver
is non-empty and one or more other slot(s) are compatible with it, but
that's not uncommon for someone who starts a rogue by splitting the initial
daggers into separate wield and throw slots.  Firing a dagger from quiver
and then having it merge with wielded weapon instead of back into quiver
when picked back up leads to tedious inventory manipulation.  Assigning
different names to the two stacks solves this, but can't help when picking
up an unnamed item which is otherwise compatible.  (A rogue with starting
daggers wouldn't encounter that since unnamed ones won't be sufficiently
identified to stack, but any character who just gathers unID'd daggers and
uses them for both melee and throwing has a chance of running into the
"picked up into less desireable slot" trap whenever new ones are found.)
2004-11-06 01:19:25 +00:00
nethack.rankin
aa58ee1ab7 Glib messages when dropping weapons
<Someone> reported that she got "your weapon slips from your hands" when
inflicted with slippery fingers while wielding multiple daggers.  That
should be "weapons" plural and they're only being dropped from one "hand"
singular.  Fix that and also give more specific feedback than "weapon"
for non-swords based on their weapon skill category names.  This works
pretty well for most common weapons but might need some more tweaking for
ones where different types have gotten lumped together in the skills.

old feedback:
  Your weapon slips from your hands.
  Your tool slips from your hands.
  Your food slips from your hands.
twoweapon:
  Your sword slips from your hands.
  Your other sword also slips from your hands.

new feedback:
  Your daggers slip from your hand.
  Your <one-hander> slips from your hand.
  Your <two-hander> slips from your hands.
  Your pick-axe slips from your hand.
  The corpse slips from your hand.
twoweapon:
  Your sword slips from your left hand.
  Your other sword also slips from your right hand.
2004-11-02 05:15:33 +00:00
nethack.rankin
a6182d9c2b #enhance docs again
Since "weapons and spell skills" is grammatically suspect and
"weapons and spells skills" sounds odd, change to "weapon and spell skills"
in both the Guidebook and the game's online descriptions.  The #enhance
command itself uses "current skills" and doesn't need any alteration.
2004-10-30 01:44:12 +00:00
nethack.rankin
e723710c82 petrified engulfer (display glitch & potential panic)
From the newsgroup:  if you were polymorped into a cockatrice and
a trapper attempted to swallow you, the 't' displayed at its location
would be left behind after it turned to stoned.  This fixes that and a
much more serious issue as well:  if you were punished at the time, the
game would panic on your next attempt to move because the ball&chain were
left in limbo.  There would also have been strangeness (monster sharing
your location, stale u.ustuck setting) if the swallower was life-saved,
but I didn't try to make that happen so am not sure how bad things would
have been.
2004-10-28 03:16:24 +00:00
nethack.rankin
1f21a5c6f2 doc bits
Per <Someone>'s request, make the game's description of the ``#enhance''
command be the same as in the Guidebook by mentioning spell skills.
Combining weapons plural with spell singular isn't right, but I'm not
sure which way to change that so am leaving it alone.  On the other hand,
the poor grammar used to describe the ``#conduct'' command is easy to fix.
2004-10-28 01:48:52 +00:00
nethack.rankin
98ab86c9ec gas spores attempting to attack
From a bug report, but pulls back" while successfully
praying.  Gas spores' only "attack" is to explode when dying, so the code
that checks whether the monster has any attack needs to handle AT_BOOM as
a special case.  Unfortunately this change means that you won't interrupt
an occupation when a gas spore approaches, and a subsequent kill by your
pet might end up causing you harm while still occupied.  The callers of
`noattacks()' are messy enough that I didn't want to try to address that.

     This also moves noattacks() from mhitm.c to somewhere more sensible.
2004-10-22 02:15:33 +00:00
nethack.rankin
b2af3459ee fixes fix [trunk] 2004-10-22 02:02:49 +00:00
nethack.rankin
eaae10c837 fix #U782 - undead turning in a shop [trunk only]
Reported last December by <email deleted>.  Using
a wand or spell of undead turning inside a shop used up corpses without
checking whether they were owned by the shop.  Although the report didn't
mention it, using stone-to-flesh on statues had the same problem.

     I'm not completely satisfied by some aspects of this code, but if I
don't commit what I've got now I probably never would.  My original notes
are lost; I thought that there were some additional fixes present, but
looking at these diffs I don't see anything else significant enough to
warrant mention in the fixes file.
2004-10-22 01:04:34 +00:00
nethack.rankin
467d35d9e4 two grammar bits
Fix the two minor grammar problems for messages given when eating
that were From a bug report:  inappropriate or inconsistent
capitalization in mid sentence for
        Ulch - That <object> was rustproofed!
and missing punctuation for the appended clause for cannibalism in
        Ulch - that meat was tainted cannibal!
2004-10-16 01:07:46 +00:00
cohrs
e51713bccf prevent a panic splitbill: no resident shopkeeper
Patch was sent in by <Someone> on Sep 8:
This bug causes a number of impossible messages (starting with splitbill:
no resident shopkeeper??)

Repeat by:

Enter a large shop.
Wish for a large stack of projectiles.
Sell your projectiles and then pick them up again.
Trap shopkeeper against the door with a scroll of earth.
Throw the projectiles at the shopkeeper to anger him.
Move away from the boulder trap and wait for the shopkeeper to leave the
shop.
Throw one of the projectiles at the free space.
2004-10-03 22:14:36 +00:00
cohrs
a6bff50803 X11 map scrolling behavior [from Steve VanDevender]
This isn't really a bug, but I find it does make the map scrolling in
the generic X11 version a lot less distracting.  The original behavior
produces certain boundaries where, when the cursor moves back and forth
across that boundary, the map scrolls with each crossing.  This is
particularly annoying in places like Sokoban where the player makes that
kind of movement frequently causing large jumps of the map each time.
Changing the border and delta constants in winmap.c as below eliminates
that behavior, as well as making the cursor easier to track by tending
to recenter it whenever the map shifts.
2004-10-03 22:04:20 +00:00
cohrs
4c9d161953 missing scrollbar in X11_display_file [from Steve VanDevender]
It appears that the Athena text widget in recent XFree86 distributions
does not properly honor the XawtextScrollWhenNeeded flag, so the text
widget created by X11_display_file() does not have a vertical scroll bar
when the text does not entirely fit in the window.  I have seen this bug
in XFree86 versions from 4.0.2 through 4.3.0.  Using XawtextScrollAlways
for the vertical scrollbar ensures it will always appear.
2004-10-03 21:59:18 +00:00
nethack.rankin
c2d510a3f2 fix #U1150 - burning armor with oil
Objects which were destroyed by dipping them into lit potions of oil
didn't get unworn or unwielded in cases where that was needed.  This left a
stale pointer which could result in various strange things (user saw it be
formatted as "glorkum" but that isn't guaranteed) and there was no update of
any attributes or intrinsics conferred by the item, so persistent levitation
or water walking or dexterity boost could occur.
2004-09-23 02:39:35 +00:00
arromdee
d56fbeb761 very trivial typo 2004-09-06 21:43:02 +00:00
nethack.rankin
24bb857d95 bad luck quote
Nothing to do with <Someone>'s recent list of missing entries, just
an amusing quote I like.  The book itself isn't remotely nethackish; it's
about a teenage boy and a teddy bear who are operating as hardboiled-style
detectives in a land of sentient toys where nursery rhyme characters start
getting murdered.
2004-09-03 02:11:39 +00:00
nethack.rankin
f1cfafb89b rnl() tweaks
Eliminate two minor anomalies in the behavior of the rnl() function
which returns a random number that is modified by the hero's Luck attribute.
Integer division by 3 on requests for small ranges and the fact that the
chance of making a modification was lower for good luck than for bad luck
meant that highest luck did not produce best chance to avoid worst result.

     The actual effect on game play is sure to have been negligible.  More
troubling is that the program has several rnl(3) and rnl(4) calls.  These
practically guarantee a result of 0 when the hero has maximum luck.  The
rnl() function really shouldn't be used for such tiny ranges (unless the
actual intent is that high level characters are expected to almost always
have the 0 outcome...).
2004-08-28 01:54:20 +00:00
nethack.allison
50ab8bf9c5 follow-up bit 2004-08-24 00:00:09 +00:00
nethack.allison
31bf37ee7c ensure that a sleeping steed doesn't answer you 2004-08-23 22:54:02 +00:00
nethack.allison
d84ad3ec3c rolling boulder not in bones files
<Someone> Cced from rgrn:
  <email deleted> (<Someone>) writes:
  [killed by a boulder trap, left bones]

  > Then I realized... there's no boulder.  Did the boulder disappear
  > because I died from the attack, thus bypassing the code that moves the
  > boulder to its intended destination?  Did the creation of the bones
  > file destroy the boulder?  Do boulder traps sometimes get
  > "deactivated" when bones files are loaded?

  The first of these. If you look at launch_obj(), there's an
  obj_extract_self() early on, then all the tracking its trajectory,
  then a place_object() when it comes to rest; since the thitu() call
  kills you during the trajectory part, the boulder never gets re-placed
  onto the map. This is, I think, a bug (and one that will apply to any
  monster-thrown object that kills you, as well); reported to the
  DevTeam.
2004-08-23 16:57:59 +00:00
nethack.rankin
10eea7710d killing pets by displacing them into traps
A user pointed out that you lose pacifism conduct if you kill your
pet by displacing it into a trap but you don't gain any experience in
the process.  Make this consistent with killing monsters in other ways:
if you get blamed for it then you should also get credit for it.

     Probably minliquid() and mintrap() should take another argument so
they can call killed() instead of mondead() when necessary, but I didn't
go to that much effort....
2004-08-17 01:29:47 +00:00
nethack.rankin
e16edb7fb7 monsters throwing greased objects
Make the chance for thrown object to slip or shot object to misfire
be the same for monsters as it is for the hero.
2004-08-17 00:40:35 +00:00
kmhugo
e0c659435f Mac Carbon addition 2004-08-10 05:54:25 +00:00
kmhugo
f4322a56fb Mac Carbon updates 2004-08-10 05:37:41 +00:00
kmhugo
3b2efac99c Mac Carbon addition 2004-08-10 05:20:33 +00:00
cohrs
7b42eff8d1 C340-18 redux
Fix the test of otrapped in ohitmon pointed out by <Someone> that was causing
my previous fix to do the exact opposite of the intended behavior.
2004-08-07 16:06:58 +00:00
nethack.rankin
2ad0b6ea0c fractured rock descriptions
From a bug report:  fracture_rock() was unintentionally propagating
the boulder or statue's dknown flag to the resulting rocks, producing a
trivial but noticeable difference in description of "rock" vs "stone" if
the source object had been seen up close prior to being broken and the
rocks are then examined remotely or while blind.

     The curse/bless state is propagating too, but this seems reasonable
so I've left it alone.
2004-08-03 03:40:08 +00:00
nethack.rankin
fa345979d4 fix "dropping Medusa's corpse down the stairs"
User reported the following incorrect feedback:
	You drop Medusa's corpse.  corpse falls down the stairs.
and apparently thought that the problem was a glitch in the middle of the
sentence; the actual problem is that the second sentence lacks its start.

     This fix isn't perfect.  You'll now get
	Medusa's corpse falls down the stairs.
for the second sentence, but
	The Oracle corpse falls down the stairs.
when dealing with a unique monster who doesn't have a personal name.
Either form seems acceptable to me, but mixing them appears inconsistent.

     Probably all the uses of corpse_xname() (and its callers back up the
chain cxname(), aobjnam(), yobjnam()) need to be reviewed for usage.  I
don't have the energy for that.
2004-08-03 02:37:44 +00:00
warwick
5d72e0be52 Make "black" characters visible.
Stop RIP window maximizing (C syntax!).
Make Cancel button more sensible.
2004-07-01 18:21:51 +00:00
nethack.rankin
c91ac3274c fix U1079 - loss of water walking over lava
Fix the reported problem of being able to safely stand on lava after
taking off fireproofed water walking boots.  The situation was more wide-
spread than that; the same thing happened when non-fireproofed boots were
burned off while walking over the lava in the first place.  Now you'll
fall in and end up getting stuck (you have to have fire resistance for any
of this to happen and that resistance makes falling in be survivable).
2004-07-01 01:28:18 +00:00
nethack.rankin
74c5d3f004 hostile djinni from potion
Fix the situation <Someone> reported where the "You disturbed me, fool!"
result when releasing a djinni from a cloudy potion sometimes produced a
peaceful djinni for neutrals due to the usual randomness in how monsters
react to characters of the same alignment.  Explicitly force it to be
hostile for that outcome.

     Also, for the "it's about time" result, suppress the "It vanishes"
message when the character doesn't see the djinni depart.
2004-06-29 02:06:36 +00:00
nethack.rankin
a0fa995471 shop repair messages
Fix the situation <Someone> reported where a shopkeeper removing a trap
from the shop doorway yielded "you see the shop door reappear" instead of
reporting about the trap.  It made sense if the door had been destroyed
but not when intact.

     For trunk only, try to fix up the shop repair message situation when
multiple repairs occur at the same time.  Some things were being treated
as mutually exclusive when they aren't.  This part needs more testing,
probably using a debugger to force multiple pending repairs to all occur
on the same turn.  At any rate, using wizard mode and hoping for some
simultaneous activity was ineffective.
2004-06-24 03:13:26 +00:00
nethack.allison
9b3521e503 vampires now shapeshift [trunk only]
- can shift into fog clouds, vampire bats, and vampire lords into wolves
- after being "killed" in shifted form, they transform back rather than get
  destroyed, and you must take them on in vampire form to defeat them
- can deliberately shift into fog clouds to pass under closed doors
2004-06-15 11:52:04 +00:00
nethack.allison
c8ef9338f0 cham changes (trunk only)
This is a foundation patch for patches to follow.
- use a full short index for mon->cham field.
- The current system of providing CHAM_XXX values
  was limited to the 3 bits allocated in the bitfield and invalidated
  save/bones if the field was expanded.
- The current system didn't provide an easy backwards  change
  if multiple monster types wanted to use the bit, there was a one
  to one mapping:  For instance, if you wanted a CHAM_VAMPIRE,
  and you wanted vampires, vampire lords, and Vlad to use it, you
  would have to have CHAM_VAMPIRE, CHAM_VAMPIRE_LORD,
  and CHAM_VLAD defined to achieve that with the one-to-one backward
  mapping.
- This new way just uses the mon[] index in the mon->cham field and
  eliminates the need for CHAM_XXX  (CHAM_ORDINARY is still used).
- no longer requires the cham_to_pm mappings
2004-06-15 11:38:32 +00:00
nethack.allison
87507aed42 water flow into pits (trunk only)
water should flow into chasms from Drum of Earthquake.
Exploding wands of digging had been handled in the trunk earlier.
2004-06-08 11:06:44 +00:00
cohrs
baf8d3f416 invisible troll revives and can appear visible
Play a character without see invisible. Wear speed boots. Generate a troll.
Zap it with a wand of make invisible. Kill it. Stand on the same square and
wait for it to rise from the dead. It will appear as a 'T'. Hitting it then
produces the normal "Wait, there's something here you can't see!"
[ incorporate slashem-Bugs-951439 fix ]
2004-06-07 19:07:55 +00:00
nethack.allison
733b936f38 name followup (trunk only) 2004-06-07 00:16:32 +00:00
nethack.allison
fd9db92705 skipping stones (trunk only)
Allow a chance of rocks thrown over water to skip
in such a way that they could bounce right over a water
creature.
2004-06-06 18:37:46 +00:00
nethack.allison
003dd4452f followup bit 2004-06-06 03:29:55 +00:00
nethack.allison
93cdf2b7f7 potion of poison
<Someone> wrote:
> It is a little odd that, if you are poison resistant,
> potions of sickness can kill you if and only if they
> are blessed.
2004-06-05 22:16:00 +00:00
nethack.allison
abe3d28a37 djinn/ghosts from potions
<Someone> wrote:
>It seems silly to have two flags being used for counting djinn and
>ghosts, now that there's mvitals.born...

This does not break save and bones compatibility in the 3.4.x branch,
it changes the code, but leaves the obsolete fields in flags.
2004-06-05 18:19:27 +00:00