When polymorphed, only attacks involving hands/feet/weapons should result
in damage to object. Theoretically, hug and butt attacks should affect
objects too, but no forms with such attacks currently allow wearing armor.
This is my final src mod to ensure that a qbuf does not overflow due to
a lengthy named object. These recent patches, coupled with the core yn_function() patch earlier, should make it much rarer for a QBUFSZ
buffer overflow to occur in a window port routine (unless the window
port routine has its own bugs, but that isn't the core's fault).
By naming the candelabrum as long a name as the game will allow, and by naming a candle the longest name also, a qbuf overflow and crash is
triggered when you attach the candle to the candelabrum.
From the newsgroup: leash found inside a bones level shop was flagged
as "in use". 3.4.0 had a fix for that which works for most cases, but not
when the shopkeeper has taken the dead character's inventory just before
saving the bones file.
This also adds an entry to the branch copy of fixes34.2 to synchronize
it with the trunk copy.
<email deleted> wrote:
> The game crashed badly when I made some experiments with items
> with very long names:
>
> You have much trouble lifting a blessed greased thoroughly rusty >thoroughly corroded +3 plate mail named terribly long killer longer than my
>ong long-worm called long. Continue? [ynq] (q)
tty_yn_function(const char * 0x0012fa50,
const char * 0x00572ddc _ynqchars, char 113) line 379 + 6 bytes
lift_object(obj * 0x009e8970, obj * 0x00000000,
long * 0x0012fcd0, char 0) line 1131 + 20 bytes
pickup_object(obj * 0x009e8970, long 1, char 0) line 1258 + 19 bytes
pickup(int 0) line 474 + 28 bytes
dopickup() line 1853 + 11 bytes
rhack(char * 0x005c0d50 in_line) line 1908 + 3 bytes
moveloop() line 406 + 7 bytes
main(int 3, char * * 0x009e2ac0) line 102
Noticed when investigating one of the killer reason bugs recently
reported: a land mine explosion shouldn't create a concealed pit trap;
make a revealed pit instead. And while testing that, I noticed that the
"Kaboom" message given when pushing a boulder onto a land mine was given
while the map still showed the boulder at its original location even
though it had actually been moved already. It's a little odd that you
get hit by shrapnel at your original position--as if you're shoving the
boulder ahead of you and then pausing a moment before stepping into its
former location--but that's trickier to fix; sometimes you won't advance
due to there being multiple boulders present (in that case you evidently
do shove the boulder instead of performing a steady push, so maybe the
current behavior is fine as it is).
"List of game options" from `? f' misaligns the entries for runmode
and scroll_amount (at least for tty display). Shorten their descriptions
so that they fit without squeezing out spaces.
Make exploding bags of holding be less mysterious, and perhaps cut
done on the number of claims that they've vanished for no reason. There
wasn't any feedback other than the explosion message itself; in particular,
the message about putting something into the bag didn't occur since that's
handled by the didn't-explode case.
Recently discussed in the newsgroup, and it sounded familiar so may
have been reported directly earlier:
You fly through the trap door. You fly down along the stairs.
when polymorphed into a flying creature or riding a flying steed. It
only happens at the castle, and only happens because the go-down code is
explicitly setting the arrival point to be the Valley stairs. That's how
the castle trap doors used to work as traps too, but they were changed to
dump you randomly near the stairs quite some time ago. Fix it by making
intentional triggering work the same now; this also prevents the false
feedback (even if you happen to arrive on the stairs by coincidence).
<Someone> reported that encumbrance feedback when removing GoP
was delayed until the next turn. Several other places call encumber_msg()
to provide immediate feedback. Call it in Gloves_off() too.
Change the monster constants to match the current position of the switch
statement. Also test canseemon(), since the message isn't needed if you
see the change. I didn't make any other change to the message frequency.
If it's too frequent, then perhaps the changes themselves are too frequent.
Three related bug fixed, two reported in U409.
+ If you zapped a wand of cold downward while hiding underwater, the uundetected
flag was not reset (but the monster case was code correctly), resulting in
an impossible error on the next attack
+ If you finished eating something you were hiding under and were attacked,
another impossible would occur
+ While checking the eating gold case, I noticed that several cases would lose
gold on the floor if the attempt to eat it failed
The first case is fixed by resetting the flag just like the monster case.
The other cases are fixed by adding code to useupf to deal with this.
eatspecial and floorfood were modified to allow useupf to be called, and
fix the 3rd bug in the process.
<Someone> noticed that is_damageable used the address of is_rottable
instead of calling it. Unfortunately, there doesn't seem to be a good
compiler warning to detect uses of function addresses as booleans.
Another fix to address the complaints about two-handed weapons being
rendered useless by 3.4.1's change to require free hands in order to apply
containers. Some players now fear to wield two-handed weapons because a
curse would make accessing their bag impossible, which is doubly nasty if
that's where they have scrolls of remove curse or potions of holy water
intended to deal with cursed items. The same situation applies for cursed
one-handed weapon combined with cursed shield, so some are now claiming
that 3.4.1 has made two-weapon combat be even more attractive than before.
This implements #tip, a new command that causes a container at the
current location or carried in inventory to have its contents emptied
onto the floor. Hero's hands don't need to be free at the time but tipping
a floor container requires limbs; tipping an inventory container doesn't
need hands or even limbs. The contained items don't pass through inventory
during the process, so don't cause objects (loadstones, crysknives, scrolls
of scare monster?) to go through their special handling unless it's part of
normally dropping to the floor. Tipping a bag of tricks behaves the same
as applying it (one monster is released, and it only becomes empty if
that happened to be the last charge) and items tipped out of a cursed bag
of holding have their normal cursed bag chance (1/13) of being destroyed.
Tipping an inventory container while levitating or during unskilled riding
behaves similar to normal drop--from a height, so some fragile items break.
Players have wanted this feature to get gray stones out of chests or
heavy corpses out of ice boxes but I didn't care much about that; losing
access to your bag is more significant. I'm pretty sure that there was a
user patch to do something like this floating around at one time, but I
couldn't find it when I looked, so I implemented #tip totally from scratch.
Bug? Extended commands which lack meta-key shortcuts are not listed
in the help files displayed by the '?' command....
Fix the reported bug of artifacts created via wizard mode WIZKIT
being "forgotten" and possibly duplicated during play. Perform artifact
initialization before $WIZKIT processing; role info needed by the former
is already sufficiently set up by that point.
> "The magic-absorbing blade scares the erinys! The erinys resist!
> The erinys are stunned. You kill the erinys!"
vtense() already has code to handle "erinys", but it didn't work as
intended when the caller uses "the erinys" for the subject string.
<Someone> noted that if you dropped a box while levitating, nothing would
break. This is true for sacks too, which shouldn't be immune either.
Throwing didn't break contained objects either, not mentioned in his report.
Refactored out the code in kick_object that handled damage for objects
contained in normal containers and added calls in hitfloor and throwit.
kick_object still only calls it for boxes, but other callers will call it
for any object letting it decide if damage is required. BoH objects aren't
affected, since traditionally the inside of the BoH is "somewhere else".
Added a random factor to arrow, dart and rock traps so they'll eventually
stop producing new objects. Also fixed a bug in mklev that set the trap
"once" flag even for traps where it wasn't currently appropriate.
This started out as a change to address the strange sequence of messages if
you remove a blindfold while engulfed in a dust vortex. That is addressed
by a new function that can be called in such situations. Calls to this
function were added in all the cases where the can_blnd() engulfing
conditions end as a result of player action. There are some other cases
that end ucreamed or usleep, but they happen between turns and shouldn't
need extra handling.
While I was at it, I noticed that a unicorn horn or prayer would cure
blindness even while engulfed in a dust vortex. This is useless, because
you immediately get blind again the next turn. So, I added checks to avoid
doing this. Finally, it didn't make sense for eating a carrot to cure your
blindness in these situations either, only for it to return immediately.
> Receiving Excalibur from a fountain while blind doesn't update the
> display (i.e. the missing fountain) immediately.
Various other topology changes had the same problem. The display
was only being updated if the hero was invisible on the assumption that
it wouldn't matter otherwise, but a blind character who moved off the
affected location would still have the old map info (fountain, trap, &c)
shown--until he walked back onto that spot or searched next to it or
regained sight--even though the player is told about the map change as
it happens.
<Someone> reported that a tame dwarf wouldn't eat food tossed at it.
He also reported that it wouldn't eat off the ground, which I couldn't
reproduce nor see in a problem in the code. The code in thitmonst didn't
allow for sharing food with non-domestic, already tame monsters.
If you zapped a WoStriking while outside a shop and broke the door and 2
separate objects, the shopkeeper would come out to get paid but if you
tried, it would result in "dopay: not to shopkeeper?" due to stolen_value
not adding the cost of the 2nd object to the right accumulator.
> It appears that if showrace is set, and your race is not human, a
> potion of invisibility (or any other form of invisibility) doesn't cause
> your symbol to disappear on screen, even if you don't have see invisible.
As suggested in the newsgroup, re-factor the calculation of carrcap
so that any change in strength or constitution affects your capacity.
The integer division was rounding off the result.
When you drop a container in a shop, gold in that container is added to
your credit. However, if you put gold into a container after it was already
on the shop floor, no credit was given. Then when you picked up the bag or
tried to take out the gold, you'd be debited for it. This change causes
in_container to handle gold the same as container dropping does.
Implement Pat's suggestion of allowing even identified touchstones
to test gold, removing the getobj hack recently added. This actually
brings the touchstone a bit more in line with the data.base entry.
1) make two-weapon combat perform two attacks instead of always either
hitting twice or missing twice;
2) address <Someone>'s report of weapon skill to-hit adjustment being ignored
for bare-handed and martial arts attacks;
3) address newsgroup complaints about the intrusive "your armor is rather
cumbersome" message given every time a monk wearing a suit attacks;
this implements the suggestion that it only occur for those times where
you miss because of the penalty involved, suppressing it when you miss
due to other reasons and when you successfully hit;
4) bonus fix: a side-effect of #3 is that the order of the messages "your
armor is cumbersome" and Stormbringer's "bloodthirsty blade attacks" is
inverted, making a sensible sequence instead of implying precognition.
> "A cloud of sangria gas billows from the chest.
> You stagger and your vision blurs."
> When I see the gas billowing from the chest, I'm not yet
> hallucinating. Shouldn't the gas have a normal colour, then?
> Only after my vision blurs should the gas assume a fake colour, I
> think.
>
<Someone> wondered post-3.4.1 why paper golems are affected by cold.
Given what I know of paper, straw and wood, and fantasy golems of each
type, all three types of golem seem like they should resist cold. The
others were less clear to me, someone else can address them if necessary.
Below is the result of your feedback form. It was submitted by
<email deleted> on Tuesday, March 11, 2003 at 07:48:17
---------------------------------------------------------------------------
mailversion: 1.17
nhversion: 3.4.1
nhfrom: Our 3.4.1 source release, unmodified
hardware: i686 arch.
software: Debian woody, gcc 2.95.4
comments: When polymorphing to eg. horned devil, and wearing a helmet,
I get "Your pierce through your elven leather helm.". Likely
there is a broken variable there.
Incorporate a mod submitted by <Someone> to implement the TODO in the
class genocide code by walking thru the species to find a class to genocide
if the user input does not match the class description.
3.4.1 included a change which requires you to be able to use hands
in order to manipulate containers; that makes sense but has introduced
an unintended side-effect. It has become much harder to uncurse a
two-handed weapon or combination of a one-handed weapon and a shield
because you can't get scrolls or potions out of your bag. This adds a
new major trouble for prayer to address that, escalating it above the
normal minor cursed item trouble. It also removes a nonsensical check
for combination of two-handed weapon and shield that I added long ago.
Not related, but same file: add the missing artifact touch checks
for putting on accessories (quest amulets and lenses). I can't remember
if this was From a bug report.