Building with an old version of gcc with various warnings enabled
generated a lot of noise. Most of it was due to not guarding string
literals with `const', but there were a couple of actual problems too.
Some recent newsgroup discussion claiming that a pet ki-rin was
wearing a helmet (I think poster was hallucinating) caused me to look
at some of the hat handling code. There were a couple of noticeable
problems and one latent one in code added for 3.4.1. Polymorphing
into a minotaur pushes hard helmets off hero's head, but nothing
prevented you from putting one right back on. Helmet wearing monsters
who polymorphed into minotaurs weren't affected at all. And message
handling always assumed multiple horns even though we have some singled
horned monsters, but since all those have no hands they can't wear any
armor and that potential pluralization issue wasn't noticeable.
<Someone> wrote: "Also, hobbits can't wear armour,
at least, you can't wear armour when polymorphed into a hobbit, even
though hobbits do tend to be carrying elven mithril-coats.
It's tempting to suggest adding an explicit exception in
sliparm() for elven mithril just to keep the Tolkienness."
- added a general routine for adding race-based /object
combination exceptions.
- hobbits can wear elven mithril-coats
<Someone> reported several incorrect death messages
1) "petrified by deliberately gazing at Medusa's hideous countenance" is
too long and won't fit on the tombstone. I reworded it, which also better
reflects that Medusa's gaze is really an active attack.
2) "killed by war hammer named Mjollnir" for partly identified Mjollnir now
says "killed by a war hammer named Mjollnir".
3) "using a magical horn on himself" was missing the "killed by" prefix
4) there were supposedly cases the the a/an article was missing after being
killed by a monster. I didn't see where this was occuring (eg AoLS resets
killer_format before it returns), but now done_in_by always resets
killer_format, which should address any such cases.
Polymorphing into creature with horns such as a minotaur,
will cause your helmet to fall off if it is made of a hard material.
Only minotaurs pass the has_horns() test in include/mondata.h
because the complaint specifically referred to them, but that
should perhaps be reviewed at some point by someone who is
certain which creatures have horns growing from their
head (some demons?)
Fix the problem [reported in the newsgroup and forwarded by <Someone>]
of blessed potions of gain level having the possibility of reducing
your experience points if you were already level 30. The random XP
value that averages "half way to next level" could be less than your
current experience if you had gotten to level 30 via such a blessed
potion or had drunk at least one of same since reaching that level.
This didn't really make any difference to game play since you weren't
losing any levels, HP, mana, or score, but it was visible to users who
enable the `showexp' option.
As per <Someone>:
> I had a game today where I was polymorphed (by a sink) into a mimic, and
> #monster-ed (hid). The symbol on the map for me was ]. Then, I polymorphed
> again, this time into a kobold lord -- but the symbol remained ]. This
> seems wrong.
Handle this similar to the polyman code.
When potions of full healing got added, they included the
ability to restore lost experience levels when blessed ones are
quaffed. This patch throttles them so that when multiple levels
have been lost, drinking multiple potions can only restore half
of those levels. Also, it prevents them from fixing any level
loss which occurs if you polymorph into a "new man" (or woman
or dwarf, &c, where you can gain or lose up to 2 levels).
This also makes the "golden glow" prayer result be at least
as good as blessed full healing by restoring a lost level instead
of giving 5 extra hit points when you have any recoverable lost
levels pending.
And tangentially related: gaining a level while polymorphed
now gives your current monster form an extra hit die in addition
to the latent boost your normal human/whatever form gets.
Files patched:
src/exper.c, polyself.c, potion.c, pray.c