Another bit prompted by vibrating square testing:
|You see a strange vibration beneath the little dog's rear claws.
Fix up some body parts: dog, cat, and yeti-class (includes sasquatch,
monkey and ape, owlbear) already have "paws" instead of "fore claws".
Take away all 'Y' except owlbear from that list and add rodents to it.
Give them "rear paws" instead of "rear claws" for their feet; for legs,
use "foreleg" instead of "forelimb" and "read leg" instead of "rear limb".
For yeti/sasquatch/monkey/ape/carnivorous-ape, switch from paws to hands
since they have opposable thumbs, and switch to arm, leg, foot instead
of forelimb, rear limb, and rear claw. I've left "fore claw" for finger.
Fix the reported bug that attempting to cast an expired spell, which
causes confusion and/or stun, was replacing the duration of any existing
confusion or stun with the new amount rather than increasing it by that
amount.
Attempting to cast any spell while stunned will now fail immediately,
and casting an expired spell while confused will increase confusion
duration (and/or set stun duration) rather than override it.
When doing some more reformatting I came across something I've been
meaning to tweak for a long time, and since the change is only a couple
of lines I'm putting it in now instead of waiting. Make potions of
gain energy more useful for actually regaining energy so they might not
be relegated to alchemy all the time. The adjustment is probably too
low to really achieve that, but I didn't want to risk going too high.
Increase to max energy is only a little higher (average 10.5 vs 9 for
blessed, 7 vs 4 for uncursed) but to current energy is noticeably higher
(31.5 vs 9 for blessed, 21 vs 4 for uncursed; capped by max energy so
bigger increase only matters if current is below max when quaffing).
Another code change while reformatting: '#turn' by non-priest/non-knight
casts the "turn undead" spell if the hero has learned it, but it was
forcing the spell code to aim at self rather than ask for a direction.
Evidently nobody has ever used that while knowing the spell and able to
cast it....
Fix the problem reported by ais where it was possible for one monster
to knock the hero onto a level teleporter (or trapdoor or hole),
destination was selected and allowed-to-level-teleport checks were made,
then for another monster to knock or teleport the not-yet-relocated-hero
onto the Amulet and have auto-pickup move it into inventory. At the end
of that turn's monster movement, hero would level teleport successfully
despite carrying the Amulet.
This short-circuits monster movement if the hero is scheduled to be
moved to a different level. The monsters who haven't moved yet don't
lose their pending movement points; they'll catch up if/when the hero
returns to the level.
Dipping a towel into a potion, fountain, or some other water source
makes the towel wet. Hitting with a wet towel deals up to 6 points
of damage, but every hit reduces wetness, as does throwing or applying
the towel. You can also wish for a moist or wet towel.
Another item from the "A few bugs" mail. Casting spell of protection
when previous casting(s) hadn't timed out yet miscalculated the new AC
boost. At low levels--when this spell probably gets its most use--the
bug wasn't noticeable. (At high levels when someone might cast it a
whole bunch of times in succession, the effect could be noticed but
was probably just assumed to be working as intended. Its behavior is
somewhat convoluted.)
Fix another item in the "A few bugs" mail. Monsters who wanted to flee
weren't able to use 'sstairs' (extra stairway leading to different branch
of dungeon) due to a logic error in the find_defensive() choices.
if (terrain==STAIR) {
} else if (terrain==LADDER) {
} else if (x==sstairs.sx && y==sstairs.sy) {
} else { /* check traps */
}
wouldn't find 'sstairs' because they have terrain type STAIRS. (Also,
the sstairs check wasn't screening out immobile monsters, but that bug
didn't have a chance to manifest.)
There's a bunch of reformatting, and some code re-organization to improve
other formatting, and some additional logic fixes.