Make wands of speed or slow monster known if their effect
on monsters is observed; likewise for speed boots. Also, avoid
giving odd "the bat is moving faster" when seeing a bat created
in gehennom and inaccurate "the monster is moving slower" when
a monster puts on speed boots.
Add absent prototypes to some core routines.
Also add some port function() to function(void) in some win32 routines.
Also updates the Borland C Makefile for win32.
1. The switch statement was using the material "GOLD"
rather than GOLD_CLASS.
2. If getobj() had been working for gold when it
came to touchstones, there would have been a
memory leak here because the object returned
would have been from mkgoldobj(). The goldobj
was not being freed anywhere, nor was it being
put on a chain. You also would have had zero
gold after rubbing it on the stone. The intent
was clearly to allow gold since there was a
case in the switch statement.
3. getobj() wasn't working properly for gold
selection here anyway, so this was
not the cause of <Someone>'s gold obj in inventory.
You ended up dropping through to code that
was supposed to print "You cannot verb object."
For touchstones that came out as:
"You cannot rub on the stone gold."
This patch, based on code sent to us by <Someone> well over a year ago, addresses
bugs recently resurfaced. Namely, that lava does not generally do anything
to monsters or objects that land in java. Newly renamed minliquid() handles
both water and lava, and new fire_damage() is used similar to water_damage().
If you have an unidentified gray stone in your pack,
you just had to use the 'a'pply command. If it was
a touchstone, it would be included in the list,
otherwise it wouldn't.
This allows any stone to be included in the 'a'pply
command.
Also, adds missing punctuation to the use_stone()
messages.
Also prevents rubbing a stone on itself.
Summary of spell changes:
-- wimpiness of 'default' spell fixed by doing half damage for magic resistance
instead of 1 damage, and using half monster level instead of 1/3. It may
still need tweaking, but is much better than before.
-- 'default' spell for cleric monsters is now the wounds spell, by analogy with
wizard monsters.
-- added clerical lightning strike, flame strike, gush of water
-- all spells should now say the monster is casting a spell, and all spells
should have messages. (Side effect: monsters speeding up by other means
also give a message saying so).
-- casting undirected spells is not affected by whether the monster knows
where you are. Monsters that are attacking your displaced image, that are
several squares away, or that are peaceful can use undirected spells.
-- messages should correctly say whether the spell is undirected (a monster
was always casting at thin air or pointing at you and cursing, without checking
to see if the spell wouldn't require pointing)
-- Monsters which are attacking your displaced image, etc. use up mspec_used.
If they are casting an undirected spell, the spell still works.
-- Monsters which are not attacking can cast spells that don't attack.
-- If a monster didn't have ranged spellcasting ability (which most don't),
it would print a curse message from buzzmu() every round it was at range,
creating a useless stream of constant curse messages
I still haven't made spellcasters "smarter" in the sense of noticing whether
you have reflection, fire resistance, etc. That opens a big can of worms
because it would mean giving monsters a memory.
Known bug: the higher level a monster is, the more spells it has; since it
chooses a noncombat spell by randomly picking a spell and casting if it
happens to be noncombat, the higher level the monster is the greater the
chance of getting nothing.