Commit Graph

160 Commits

Author SHA1 Message Date
nethack.rankin
eca287ab89 feedback from exploding potions of acid (trunk only)
water_damage() gave "A potion explodes!" when destroying potions of
acid even when it was a stack of multiple potions exploding.  The vague
fixes entry "grammar, spelling and other typos" covers this one....
2007-08-25 00:32:10 +00:00
nethack.rankin
bd6e98e092 comment bit
Full moon and Friday the 13th affect Luck's equilibrium point, but
not its range (which is always -10 to +10 for natural luck, -13 to +13
when extended by luck-conferring objects).  The water_damage() comment
implying that max Luck could be 14 during a full moon was incorrect.
2007-08-23 22:56:05 +00:00
nethack.rankin
ed1e29f9ca drowned in a moat on the Plane of Water (trunk only)
From the newsgroup:  drowning on the Plane of Water gave cause of
death as "drowned in a moat".  There was already some post-3.4.3 code to
handle naming of moat on Juiblex level as "swamp", but it wasn't used for
drowning's cause of death and we were still getting "drowned in a moat"
there too.  Now the Plane of Water yields "drowned in deep water" and
Juiblex's level yields "drowned in a swamp".
2007-06-19 03:58:36 +00:00
nethack.rankin
2ad3afee05 GOLDOBJ pickup handling (trunk only)
For GOLDOBJ configuration, relax the 52 object limit for inventory
when gold uses the special $ slot instead of a letter.  Takes care of an
old buglist entry from the beta testers.  [It will need to be revisited
if we ever implement multiple coin types that can't all fit in one slot.]

     Also for GOLDOBJ, prevents nymphs and monkeys from stealing coins,
since allowing that made their steal-item attack be a complete superset
of leprechaun's steal-gold attack.
2007-06-16 02:22:01 +00:00
nethack.rankin
e8012786d0 fix C343-22 - #untrap while levitating (trunk only)
Revise untrap() to handle being unable to reach the floor.  That
whole routine is a mess and should probably be rewritten.

     Included at no extra charge:  #untrap didn't check whether player
picked a spot off the edge of the map so could go out of array bounds.
2007-05-27 03:07:24 +00:00
nethack.rankin
0b05ca9ee7 fix #Q431 - water elemental caught in beartrap (trunk only)
Reported two months ago by <email deleted>,
having a water elemental become trapped in a bear trap seems pretty
strange.  Fixed by marking water elementals as M1_UNSOLID (like air and
fire elementals), which has a side-effect of making them immune to webs
as well.  Tweaked some unused digging code which checks unsolid(), added
unsolid() to the types allowed to bar through iron bars, and brought the
check for whether a monster is willing to enter a bear trap location up
to date.  That code also needed an update to reflect the change made to
anti-magic traps last year.  Lastly, there was another report which
suggested that being hit by a bear trap should dish out some damage
(along with a suggestion that wand of opening should work to escape such
traps, which has already been done).  This makes bear trap do 2d4 damage
(on entry, not when trying to pull out after becoming stuck).
2007-04-03 05:11:44 +00:00
nethack.rankin
d8a0f73481 stone-to-flesh vs golem statues and figurines (trunk only)
Back in <email deleted> in #U1216
suggested that statues of stone golems which are hit by stone-to-flesh
spell should leave flesh golem corpses instead of meatballs.  But they
should actually have revived as flesh golems.  Stone-to-flesh revival of
golem statues and golem figurines didn't work as intended because golems
other than flesh or leather were considered to be vegan/vegatarian, which
caused them to produce meat rather than living monsters.  Also, S-to-F of
a leather golem statue worked as intended and created a flesh golem, but
S-to-F of a leather golem firugine created a leather golem out of stone
object.  This fixes it so that any type of golem statue or golem figurine
revives as a flesh golem.

     Two other bugs noticed and fixed:  (1) S-to-F cast on self while a
figurine of a non-veggy monster was "worn" in one of the three weapon
slots triggered an "extract_nobj: object lost" panic similar to several
similar cases which were recently fixed (that was 3.4.3; for development
code, it gave "obfree: deleting worn obj" warning instead).  (2) S-to-F
activating a shop-owned figurine didn't charge for it.
2007-04-01 03:32:53 +00:00
cohrs
a5640e4bc8 H206 - passive fire damage affecting weapons (trunk only)
<email deleted> reported back on 8/31/06 that elven weapons were not
affected when he poked a fire elemental with them.  This is true, but
moreover, there was no code to have passive fire to affect attackers.
Now erode_obj() supports all the same damage types as rust_dmg(), and added
the connecting code to allow passive fire attacks do something.
There probably should be macros for the damage types used by rust_dmg
and erode_obj, and possibly these functions should be combined, but they
are slightly different and dealing with that requires more thought.
2007-03-20 20:08:09 +00:00
nethack.rankin
00fc519903 sleeping gas trap vs steed
Noticed while checking out the report that you can #jump when riding
a sleeping steed:  hero's sleep resistance or magical breathing prevented
sleeping gas traps from hitting steed.  "You are enveloped in a cloud of
gas" but your steed is untouched?  That didn't make sense.
2007-02-11 01:23:28 +00:00
nethack.rankin
4b3b8b4047 statue trap tweaks
Implement <Someone>'s suggestion/request that co-aligned unicorn not be
used for statue traps, so that the hero won't get hit with a big luck
penalty for killing such a unicorn when the trap releases one which is
hostile.  I think that set_malign() probably ought to override that, but
this just changes the monster type selection for the trap's statue.

     Also, noticed in adjoining code:  avoid counting the template monster
used to generate inventory for the statue towards extinction.  It gets
immediately discarded, and later statue activation counts the resulting
monster then.
2006-12-28 02:09:54 +00:00
nethack.rankin
f93b3837d8 statue trap activation
Make monsters created by statue trap activation start out awake and
hostile in addition to being unhidden.
2006-12-24 04:09:32 +00:00
nethack.rankin
e26d9ffee0 endgame trap fix
Someone in the newsgroup claims to have reported this in mid-October,
but he uses a fake address in news and maybe he did so with his mail too,
resulting it not being delivered.  Anyway, arming a land mine on the Plane
of Air, then setting it off, produced a pit in the air.  This fixes that
directly, in case someone manages to do it again, and it also prevents
land mines and bear traps from being armed in midair in the first place.
Ditto for Plane of Water; water/pool locations were already covered (can't
arm there), and the bubbles ought to be treated similarly to Plane of Air.

     When testing this, I managed to get a crash while restoring a saved
game.  I had worn a blindfold and armed a land mine on the water level
(with just the no-pit part of the patch in place), then saved.  When
restoring, I got a crash in restore_waterlevel() at one or the other of
these lines (traceback pointed at the first, but it has to have actually
been the second; an access violation from an address derived by applying
a small offset to a null pointer):
	ebubbles = b;
	b->next = (struct bubble *)0;
After that, I couldn't reproduce it with a wished-for trap and couldn't
stay in one place long enough again to successfully arm a trap object.
So there may be a nasty bug still present, perhaps now hidden by no longer
being able to create a new trap on that level.
2006-12-22 04:05:13 +00:00
nethack.rankin
cc19fff23d boiling oil (trunk only)
A suggestion from the newsgroup:  when potions are hit by fire and
get the "boil and explode" result, potions of oil should burn instead of
boil.  Even though oil can be heated to boiling, nethack's potions of oil
are noticeably flammable [just (a)pply one...] so having them burn makes
sense.  It's just a message change; no actual explosion has been added.

     destroy_strings[] was implemented as an {N} x {3} array that used
manually computed indices into one-dimension.  This changes it into a two-
dimensional array instead.  However, it's still being indexed by a bunch
of magic numbers.
2006-12-17 04:43:55 +00:00
nethack.rankin
5a9b766e74 lava, slime, bones
From a bug report:  entering lava cures sliming,
but if you got [re-]afflicted by green slime after becoming stuck in lava,
#sit failed to cure it.  Fix that, and have sinking farther into lava cure
it too (although not necessarily right away).

     Also, suppress leaving the corpse in a bones file for death caused by
being dissolved in lava.  Lastly, suppress the "you rise from the dead as
a <monster>" message during bones creation when the game ends due to being
turned into green slime since you transformed rather than died (and sliming
timeout gives "you have become green slime" just prior to that).
2006-12-01 07:38:18 +00:00
nethack.rankin
58a9bcf893 moveloop() vs lava
Something's wrong with the way lava was being handled in moveloop().
If you were trapped in lava (ie, moved into some but didn't die on the
spot thanks to fire resistance), you could sink and ultimately die without
ever taking another actual turn (typing ``i<space>'' repeatedly is an easy
way to reproduce).  [`didmove' was only being checked for the sinking
deeper case and not for the decrement which ultimately leads to the fully
sunk case.]  On the other hand, if you could manage to start an occupation
and avoid being interrupted, you would never sink while it was in progress.
[Lava handling followed ``if (multi && occupation) { ...; continue; }''.]

     While testing some other code (lava vs slime, coming shortly) I ended
up with the cursor sitting on the status line while the game was waiting
for me to enter my next move.  I don't really understand what's going on
there, and moving the lava handling before bot() might have hidden that
particular problem now by changing the point at which Slime will get taken
off the status line, but this attempts to fix it anyway.
2006-12-01 06:42:25 +00:00
nethack.rankin
23e1970db3 anti-magic trap (trunk only)
Make anti-magic fields do something against targets which have magic
resistance, expanding the functionality of that trap type and giving a
minor drawback to the most valuable intrinsic in the game.  Make them work
against monsters too.

     Heroes who lack magic resistance lose spell energy as before, except
that if they drop below 0 they don't take as hard a hit against max spell
energy as they used to.  Monsters with spell or breath attack and lacking
magic resistance get their ability-last-used field bumped up a little bit,
so they can't cast or breathe for a few turns.  Heroes and monsters who
have magic resistance take HP damage instead.  I retained the concept of
feeling lethargic when being hit by something which normally drains enery,
and also tried to make it be the inverse of a "magical explosion":  the
message refers to torpor/lethargy/sluggishness and cause of death if the
damage happens to be fatal is "anti-magic implosion".  The latter suggests
some sort of compression, so creatures who can pass through walls (xorns
and ghosts) have been given partial resistance and take reduced damage.
2006-11-25 02:29:39 +00:00
nethack.rankin
9315307df2 safe_qbuf, short_oname (trunk only)
Change safe_qbuf() so that instead of picking one of three strings
for sprintf() to plug into a prompt string, it actually constructs the
full prompt string itself.  Also pass in the unformatted object and a pair
of formatting functions instead of performing dual formatting in advance.
The actual formatting is done via new routine short_oname() which also
takes an object and a pair of formatting routines plus a target length.
It uses the first routine, typically xname() or doname(), and formats the
object, then if the result is too long it makes some transformations, and
tries again.  If truncating "called foo" and "named bar" down to 12 chars
and omitting "uncursed, rustproof, thoroughly corroded" attributes still
result in a string that's too long, it uses the other formatting routine.
The latter calls one of several jacket routines around simple_typename()
to produce a short result.

     This has been through about four incarnations now and has gotten a
bit less testing each time, but I need to get it in place before I end up
running out of gas and abandoning it.  I've got some changes to shk.c
(where safe_qbuf is needed but not currently used) that now need to be
redone and will come eventually.
2006-10-24 05:18:00 +00:00
nethack.rankin
624a1b31d9 surviving petrification (trunk only)
From the newsgroup:  if you were wielding a cockatrice corpse without
gloves while polymorphed into something capable of doing that, then were
turned to stone when rehumanizing, you'd be left wielding the untouchable
corpse if life-saving kept the game going.  This causes it to stop being
wielded if you get that far.  Likewise for monsters.
2006-10-13 05:39:16 +00:00
nethack.allison
ab947c6b65 squeaky boards (trunk only)
There is a quote in data.base for squeaky board traps:
	A floorboard creaked.  Galder had spent many hours tuning them,
	always a wise precaution with an ambitious assistant who walked
	like a cat.
	D flat.  That meant he was just to the right of the door.
	"Ah, Trymon," he said, without turning, and noted with some
	satisfaction the faint indrawing of breath behind him.  "Good
	of you to come.  Shut the door, will you?"
		[ The Light Fantastic, by Terry Pratchett ]

This patch makes each squeaky board trap on a level produce
a unique sound. If you had visited the trap yourself prior
to hearing a monster on it, you could actually know where
a monster was by the unique pitch of the squeak.

If someone wants further refinement of the roles, this could
be adjusted to only work for musically adept roles/species,
with the others only hearing a generic squeak. As it stands
right now, everyone benefits.  Does anyone thing the
separation by role or species would be good? If so, which
roles/species are musically proficient, and which are not?

Since this patch increments editlevel anyway, it also sneaks in a
context structure change for an upcoming patch.
2006-10-08 21:37:58 +00:00
nethack.allison
a0986b1e30 statue patch (trunk only)
Pat wrote:
> <Someone> has a patch (we've added a couple of
> his earlier ones) which changes the statue display from a single
> one size fits all "`" to a gray monster symbol instead.
> But I think the idea is a good one, and along with the
> bouldersym option could make the fairly hard to
> distinguish back-tick character go away.

Sources tagged before applying NETHACK_PRE_STATUE,
and afterwards with NETHACK_POST_STATUE for easy
rollback.
2006-10-01 21:17:38 +00:00
nethack.rankin
fb8261769a locking/unlocking vs traps (trunk only)
About six weeks back, <email deleted> suggested that
bear traps should deal out damage and be escapable via opening magic.
This doesn't do anything about the first part, but it does allow opening
magic (wand of opening, spell of knock, blessed Bell of Opening) to get
the hero out of bear traps and webs if zapped either at self or downwards.
Zaps across the floor which hit monsters will free them from such traps,
with a chance that releasing a hostile monster will pacify it (using
existing #untrap code).  Conversely, if you are at a web or bear trap
location but not currently trapped, closing magic (wand of locking, spell
of wizard lock) will cause the trap to activate; you may or may not become
trapped.  Likewise for zaps at monsters who are at such locations, which
is treated as an attack.

     Opening magic which hits the hero or a monster located at a trap door
or falling rock trap spot will cause the trap to activate; as above, it's
an attack for the monster case.  At the moment, zapping opening magic
downwards at the hero's location (but not zapping at self or at monsters)
will also cause holes, pits, and spiked pits to activate.  (Zapping down
triggers falling rock traps and zapping up doesn't; that'll need to be
changed.)  Zapping opening down while mounted will untrap, if stuck in a
web or bear trap, and will trap, for the falling cases, in precedence over
releasing the saddle and forcibly dismounting.  The latter still occurs
when there is no applicable trap present though.

     Zapping locking magic downwards at a hole location will convert the
hole into a trap door.  Zapping breaking magic (wand of striking, spell of
force bolt) down at a trap door location will convert the trap door into a
hole.  (Neither conversion currently alters the made-by-you flag for the
trap.  However, the rationalization that distinctive style is what makes
made-by-you recognizable suggests that conversion should clear the flag.)
Lastly, the old behavior (which pre-dated bare holes) of destroying trap
doors when zapping down at them with locking magic has been removed--it
didn't seem to fit very well with the new cases.  I'm starting to have
second thoughts about that but am going to commit this before discovery of
some more niggling details drags it out for another six weeks.
2006-10-01 05:24:28 +00:00
nethack.rankin
d526b4f32f fix burned by burning/drowned in a drowning
From a bug report:  you could end up with
gravestone/logfile result of "burned by burning" or "drowned in a drowning".
If you get life-saved when drowning in water or burning in lava, the game
tries to teleport you to safety.  If the teleport fails for some reason--
such as lack of unoccupied non-water or non-lava locations--you drown or
burn again.  But life-saving was resetting the killer reason and the repeat
drowning/burning wasn't setting it up again, so the default got used and
produced a silly result.
2006-09-29 02:54:17 +00:00
cohrs
01ce182b02 fireproof containers catching fire in lava
Recently reported to the list, a fireproof container dropped in lava would
catch fire and burn.  Add the missing check; this looks an oversight when
the idea of fireproof was added, since other fireproof objects get handled
later in the cascading if().
2006-09-24 23:58:39 +00:00
nethack.rankin
06e9fa91de Unaware; fix #H202 and extend the fix for #H179 (trunk only)
Turn being unconscious (via several reasons, including fainted from
hunger) into a pseudo-property named `Unaware' and use it in several
places where only being asleep was checked.  #H202 was about a stunned
character who got the recovery message when it timed out while fainted.
This suppresses messages for several difficulties when they begin or end
while hero is Unaware.  Messages about fatal illness, sliming, or
petrification aren't suppressed; they're too important to hide from the
player.  "You feel ..." messages come out as "You dream that you feel ..."
when Unaware; fairly lame but hopefully adequate.
2006-09-02 03:32:18 +00:00
nethack.rankin
47327a3b99 fix #H166 - trapdoors on quest levels
From a bug report, it was possible
to fall from above the quest locate level to below it even though it has
nondiggable floors (hence no trapdoors or holes to pass through).  Since
the game can't verify that it is nondiggable (which could vary on a role
by role basis depending upon their quest descriptions) when it is not the
current level, restrict falling past it only when it hasn't been visited
yet.  Impose the same restriction for random level teleport.  This enforces
proper sequencing of the quest feedback, which was the more significant
thing that went wrong in the reported case (player finally got the full
locate level message on a return visit, when descending from above, after
having already cleared out that level on his way back up from falling).

     Once the locate level has been reached or passed, it is no longer a
barrier to falling or random teleport.  (When it is eventually visited,
there's no attempt to remember whether it allows holes, since that
information and the corresponding fall check would need to be extended to
every level in the dungeon.  Also, controlled teleport is still allowed to
bypass it even when it hasn't yet been visited, so the "enforces proper
sequencing" claim above is an exaggeration.)
2006-08-06 05:13:22 +00:00
nethack.rankin
e79a41ccb6 wielded candles vs rust (trunk only)
From a bug report: [ slashem-Bugs-1206099 ] Torches are not extinguished with rust traps).
A rust trap that hits the torso candles causes all lit objects being carried
to be extinguished, but one which hit the weapon arm didn't have same affect
on a wielded light.  This fix causes wielded candles or lamps (not Sunsword)
to go out if affected by any rust, such as hitting a rust monster with one,
rather than use his patch that just handled the trap case.  It also excludes
wielded lights from the existing torso splash since having them be hit by
both instances is too obviously buggy.

     I think brass lanterns ought to be exempt from being extinguished by
water (at least splashing which is less drastic than total submersion) since
there are references to them operating by batteries rather than fire, but I
didn't want to track all the places which would be affected.
2006-06-17 04:43:44 +00:00
nethack.allison
1fcbfd85c9 additonal oextra care
Be deliberately careful with copies taken of
oextra pointers and clear the pointer if it
truly is a redundant copy that will become
invalid if/when the original holder is deallocated.
2006-05-13 20:19:06 +00:00
nethack.rankin
a73d997034 water vs acid
Fix the bug From a bug report.alt.org server, where killing a monster by closing the
castle drawbridge resulted in a panic after the dead monster's possessions
were dropped into the moat and a potion of acid exploded in the process.
water_damage() deleted the object but had no way to tell flooreffects()
that it was gone, so flooreffects() couldn't tell its own caller not to
place and stack the object.  After that, a chunk of freed memory became
part of the floor objects chain and eventually triggered a panic which
tried to make a save file but whose reason didn't get logged properly.
2006-05-11 03:26:55 +00:00
nethack.allison
f55210be79 code change - oextra
move oattached and oname and other things that vary
the size of the obj structure into a separate
non-adjacent oextra structure, similar to what has
already been done for mextra. The obj structure
itself becomes a fixed size.

New macros:

#define ONAME(o)	((o)->oextra->oname)
#define OMID(o)		((o)->oextra->omid)
#define OMONST(o)	((o)->oextra->omonst)
#define OLONG(o)	((o)->oextra->olong)
#define OMAILCMD(o)	((o)->oextra->omailcmd)

#define has_oname(o)	((o)->oextra && ONAME(o))
#define has_omid(o)	((o)->oextra && OMID(o))
#define has_omonst(o)	((o)->oextra && OMONST(o))
#define has_olong(o)	((o)->oextra && OLONG(o))
#define has_omailcmd(o)	((o)->oextra && OMAILCMD(o))

changed macros:
has_name(mon) becomes has_mname(mon)  to correspond.

The CVS repository was tagged with
	NETHACK_PRE_OEXTRA
before commiting these, and
tagged with
	NETHACK_POST_OEXTRA
immediately after. The diff
between those two tags is this oextra patch.

The associated mail daemon changes to use an oextra
structure instead of a hidden command located in the
name after the terminating NUL, have not been tried
or tested.
2006-04-14 16:23:56 +00:00
nethack.rankin
51d60d9721 digging land mines & bear traps (trunk only)
<Someone> suggested that digging down on a land mine with a pick-axe ought
to set if off.  I agree; this implements that and also for bear traps.  In
the bear trap case, if you dig down once trapped, you will destroy that
trap explicitly rather than replace it with a pit, so it's now possible to
escape from one without leaving another trap in your wake.  Once the bear
trap is gone, further digging there will make a pit as usual.  While stuck
in one, digging down poses a modest risk of harming yourself.

|You now wield a pick-axe.
|You start digging downward.  A bear trap closes on your foot!
|You start digging downward.  You destroy the bear trap with your pick-axe.
|You continue digging downward.  You dig a pit in the floor.
|You start digging downward.  You dig a hole through the floor.
|You fall through...

[It seems a bit strange that finishing a pit discards all digging context,
so that resuming within the pit in order to make a hole "starts" digging
rather than "continues" it.]

     Digging down with a wand or spell will disarm these two types of traps
and then leave the corresponding object (which may or may not fall through
the resulting hole, like any other object there).  Digging to the side via
magic while trapped in a pit will also disarm such traps when it encounters
them.  (When not in a pit, a digging beam which simply passes over an armed
bear trap or land mine won't have any effect on the trap.)  Digging to the
side via tool behaves somewhat oddly ("no room for the rubble"?) and will
probably need some tweaking before eventual release; at present it doesn't
reach adjacent traps so didn't need any land mine or bear trap handling.

     I put the fixes entry in the new features section.
2006-04-08 06:55:15 +00:00
nethack.rankin
820f3f70d9 autopickup during failed #untrap attempt (trunk only)
From a bug report, moving into a trap
during a failed untrap attempt didn't autopickup any objects there or
report about objects which aren't picked up.  Although that appears to have
been intentional, change move_into_trap() to behave more like a regular
move.  (I wrote this bit of code and don't remember whether the no pickup
aspect was deliberate; I suspect it might have been to avoid the redundant
"there is a trap here" message which you get when pickup checking is done
but not everything on the spot gets picked up.  This patch suppresses that
message.)
2006-04-06 04:55:07 +00:00
nethack.allison
e063031f00 digging conjoined pits follow-up (trunk only)
Pat Rankin wrote:
>      Isn't an array of booleans overkill?  A single byte bitmap
> could achieve the same result.
2006-03-25 18:59:53 +00:00
nethack.allison
6ef8efcefb digging conjoined pits (trunk only)
This one turned out to be more effort than I had
originally anticipated.

We had a bug report requesting that zapping a wand of digging
laterally while in a pit should dig beside you. That seemed
like a reasonable enough request, but this ended up with
the following results:
- needed to check where this should not be permitted, or at
  least where there should be special-case code because there is
  something such as furniture on the surface above the dig
  point.
- now tracks conjoined pits through new fields in the trap
  structure, hence the pathlevel increment. The array of
  8 boolean values represents each of the 8 directions
  around a pit.
- Previously, pits could be adjacent to each other as two
  individual pits, in which case moving between them
  results in a fall as you went into the next pit. That
  behavior is preserved.
- Pits created either by zapping a wand of digging
  laterally while in a pit, or by "clearing debris"
  between two adjacent pits via a pick-axe, sets the
  conjoined fields for those two pits. You cannot
  create a brand new adjacent pit via pick-axe, only
  with the wand.
- The hero can pass between conjoined pits without
  falling.
- dighole() was hijacked for adjacent pit digging,
  so the ability to pass coordinates to it and
  its downstream functions was added (dig_up_grave()
  for example). dighole() does pretty much everything
  appropriately for this adjacent digging, more so
  than calling digactualhole() directly.
- moving into a conjoined pit that has spikes still
  does damage, but less so that "falling" into the
  spiked pit, and you "step on" the spikes rather
  than falling into them.
- Not done: should pits with the conjoined fields
  set be referred to as 'trenches' rather than pits
  in messages and identifications?
2006-03-19 23:59:03 +00:00
nethack.allison
0b88609133 chameleon behaviour
- restore intended behaviour of kill_genocided_monsters().
  It has been incorrect since  the chameleon overhaul in June 2004.
- eliminate CHAM_ORDINARY and use NON_PM instead.
2006-03-12 04:43:28 +00:00
nethack.allison
abb47e6fc6 frying water elementals
Subject: Some problems to report!
Date: Tue, 17 May 2005 07:01:40 -0700 (<email deleted>
<email deleted>

[...]
- When polymorphed into a water elemental, falling
into lava still says "you burn to a crisp."
[...]
2006-02-19 22:35:23 +00:00
cohrs
f11d009b4c gender and size of leaders and nemeses
Combo fix based on several reports and additional research.
In quest.txt and/or data.base, the Grand Master, Arch Priest, Ixoth, Master
Kaen, Nalzok, Scorpius, and the Master Assassin are all referred to as male
via reference: his or him.  Ideally, there would be a way to parameterize
this in the quest.txt, but I don't see a clear way to do that at this time.
For the time being at least, set the M2_MALE flag for these monsters.

The Dark One was referred to via "his" once in the quest.txt.  This case
I was able to modify the offending text rather than forcing a gender.

Orion and Norn are referred to as a giant in data.base but their size did
not correspond.  I left the symbol as S_HUMAN although perhaps it should
be S_GIANT.  Finally, Orion, the Norn, Cyclops and Lord Surtur, as
giant-types, should be able to tear webs.
2006-02-04 20:34:26 +00:00
nethack.allison
0dc071bee8 mextra changes
Note: The CVS repository was tagged with NETHACK_PRE_MEXTRA
prior to application of this patch to allow easy withdrawal if necessary.

Adds a new mextra structure type that has a set
of pointers to various types of monster structures
including:
   mname, egd, epri, eshk, emin, edog

Replaces the mextra bits in the monst structure
with a single pointer called mtmp->mextra of type
(struct mextra *).
The pointer can be null if there are no additional
structures attached. The mextra structure is not
adjacent to the monst structure.

Reduces the in-memory footprint of the monst that
has no other structures attached, at the cost
of adding 6 extra long ints per monster to
the save file

The new mextra structure has the mextra fields
independent of each other, not overlapping as was
the case with previous NetHack versions.
This patch doesn't do anything to capitalize on
that difference however.

Consolidates vault.h, epri.h, eshk.h, emin.h and edog.h
into mextra.h

Adds a macro for checking for whether a monster has
a name:
	has_name(monst)

This fixes the magic trap panic
   expels() -> spoteffects() -> dotrap() ->
	domagictrap() -> tamedog()
because the monst no longer varies in size so no
replacement is required.
2006-01-06 05:46:03 +00:00
nethack.rankin
4327fc88af "can't reach from steed" message bits
These should have been included with a "#dipping from steed" patch
three years ago.  I don't know whether I missed them outright, neglected
to cut diffs at the time, or just forgot to apply the diffs to my cvs
directory prior to committing the rest of that patch.
2005-12-17 05:01:27 +00:00
nethack.rankin
1b34a48d0c levitation timeout
Forwarded from the newsgroup by Michael:  giving a count before '.' to
rest many turns wouldn't be interrupted by having levitation end (despite
autopickup taking place at the time, which is what the thread is about but
not all that relevant to this particular issue).  Stopping counted activity
is easy, so that's all I've done.  Stopping a timed occupation would be a
lot harder due to message sequencing; I'm not going to attempt it.
2005-12-15 04:20:23 +00:00
nethack.rankin
aa98091bfa in_lava_effects (trunk only)
The in_lava_effects flag should never be saved and restored; putting
it into the context struct was a mistake.  Move it to the iflags struct
(where the branch code already has it).  I haven't bumped the EDITLEVEL
setting.  Save and bones files from more that a few days ago were breifly
invalid but should be viable again.  Save and bones files from the past
couple of days are now no good; sorry about that.
2005-12-11 03:09:05 +00:00
nethack.rankin
baff3bc88b fix object lost panic (trunc only)
While testing some killer_xname() changes, I noticed that it was
feasible to avoid having some gear destroyed by causing a hangup after
getting the destruction message.  And while testing the fix for that, I
stumbled across a panic situation (not caused by my changes).  If you
survive entering lava while wearing water walking boots (and aren't fire
resistant yourself, and don't have enough hit points to survive 6d6
damage, and your boots aren't fireproofed...), having those boots be
destroyed will dump you back into the same lava recursively (lava_effects
-> Boots_off -> spoteffects -> lava_effects).  And if you survive that
(wizard/explore mode or life-saving), there will be a panic when finishing
deletion of the boots (useupall) because the recursive call will have
already done it (since they aren't worn anymore when inner call handles
them, no additional recursion gets triggered and object deletion happens).

     Some of the other stuff I was working on is mixed in here because
this is the configuration I ended up using to test the panic fix.

     Several Makefiles are missing the dependency for context.h (post-3.4.3
revision).  If yours is, then you'll need to force a full rebuild after
applying this or you'll end up with havoc.  (Mine was, but I noticed that
the expected full build wasn't happening and interrupted it to fix that.)
2005-12-08 05:45:43 +00:00
nethack.rankin
6a40b203ed terminate eating if pet falls asleep or becomes paralyzed (trunk only)
From a bug report:  sleeping pet could
be shown as "eating" by stethoscope.  Fixing that is a one-liner since all
(or should be all; sleeping gas trap wasn't utilizing it) cases of monster
being forced into sleep go through one routine.  That wasn't the situation
for paralysis, but now it is.  Paralyzed pets won't continue eating either.
2005-12-06 04:48:27 +00:00
nethack.rankin
fa708fe73b chest trap bit
From a bug report, the "you stagger"
message when a trapped chest releases a cloud of gas shouldn't include the
inaccurate phrase "and your vision blurs" if hallucination is blocked by
Grayswandir.  Suppress it in that case.
2005-11-02 02:35:31 +00:00
nethack.rankin
ebc20fa560 fix #M108 - seeing while asleep
I think being asleep or unconscious ought to override vision the way
that being blinded does, but that's a more ambitious change than I care to
tackle.  This replaces You("see ...") with You_see("..."), comparable to
You_hear().  It catches the reported door case and several variations of
light sources burning out while on the floor rather than in inventory, but
it probably misses some other cases.  zap_over_floor() in particular is
highly suspect.
2005-06-23 03:48:14 +00:00
nethack.rankin
ff16502d67 floor access
A post-3.4.3 change dealing with reaching into pits resulted in "you
sit on the air" if you used the #sit command after escaping a pit trap.
Change can_reach_floor() so that caller explicitly controls whether being
on the brink of a pit is a condition that prevents reaching the floor.
This also splits a fairly common message about not being able to reach the
floor into a separate routine.

     There is still oddness here:  if you're polymorphed into a flyer,
#sit yields "you sit down" followed by "you fly over a pit" (latter occurs
when escaping trap activation).  A ceiling hider behaves similarly, but
the second message is "you escape a pit" and doesn't sound quite as silly.
Perhaps #sit should pass TOOKPLUNGE to dotrap(), or maybe there's some
better way to handle this?
2005-06-04 05:25:28 +00:00
nethack.rankin
046714c1b6 more statue animation and corpse revival (trunk only)
Reviving a corpse or statue restores the monster to life before
deciding whether the object which was used up in the process belongs to a
shop.  This resulted in a rather strange situation when the revived monster
was the shopkeeper involved.  The object can't have been stolen; there was
no shk to own it at the time it got used up.

  Manlobbi's statue of a shopkeeper comes to life.
  You owe Manlobbi N zorkmids for it.

Suppress "of a shopkeeper" in such a case, and do not charge the hero for
using up the statue.  The corpse case only needed the second part.

     This revises post-3.4.3 code so doesn't warrant a fixes entry.
2005-04-21 05:51:41 +00:00
nethack.rankin
0f13d56446 fix "display_minventory: static object freed" panic (duplicate monster gold)
From a bug report, using stone to flesh to
reanimate a petrified monster who was carrying gold (in his case, it was
a shopkeeper) resulted in gold in the monster's inventory.  Somehow it was
also being duplicated in the mgold field--I didn't try to figure that part
out--so killing the monster produced double gold.  More significantly,
probing such a monster prior to killing it caused a panic when the monster
inventory was being massaged for formatting.

     Fix is trivial:  use a routine which knows about special handling for
gold when transferring statue contents to resurrected monster.  Both aspects
of the problem only occurred for the !GOLDOBJ configuration (which is our
default).  However, any objects which confer something special when simply
being carried would have also been misbehaving--automagic animation of
cursed figurines is the only applicable situation; too rare for anyone to
have noticed.
2005-04-21 05:15:04 +00:00
nethack.rankin
61dda66355 finding traps while blind
<Someone> reported that when levitating and blind, he was getting
"You float over the hole" without it showing up on the map.  Easiest way
to reproduce:  zap a wand of digging downwards while levitating blind,
move off the spot and back over it.

     Make sure that all traps created by the player are mapped.  For other
traps, it was about 50:50 whether the trap triggering message yields enough
information to warrant forcibly mapping the trap when blind.
2005-04-14 03:26:56 +00:00
cohrs
2f497c620e M29 - unconscious effects when not unconscious
While auditing nomul() I noticed unconscious() treats (multi < 0 && !nomovemsg)
as unconscious.  This explains the behavior in M29 (unconscious message
while performing #turn).  I checked all the places with this combination,
and found a few that did not appear to fall under the "unconscious" category.
Most I changed to use You_can_move_again to ensure the same display w/o the
unconscious behavior. Also:
- found another string that unconscious() should have considered
- vomit() now sets nomovemsg, one caller was also doing this redundantly
- vomiting_dialogue() was calling stop_occupation() after vomit(), which can
  reset multi.  I reversed the order and removed a doubly-redundant nomul call.

tele() still has a problem: some cases where multi < 0 should probably take
a branch like the unconscious() branch but with a different message.
doturn()'s behavior - turn then wait - is also less than perfect, but I
think this is a known problem.
2005-03-25 20:30:24 +00:00
cohrs
7cb4b9d662 dipping in acid
Add checks to allow erosion of objects #dip'd in acid.
From a bug report.
2005-03-18 20:59:29 +00:00