Finally overhauled some spell stuff. --Ken A.

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.
This commit is contained in:
arromdee
2002-01-11 01:09:07 +00:00
parent 95143950a9
commit 157840766d
10 changed files with 512 additions and 276 deletions

View File

@@ -50,18 +50,6 @@ stone-to-flesh monsters' inventory? [psmith@spod-central.org]
Releasing your pet from a bear trap by displacing is silly.
[eino.keskitalo@purkki.mbnet.fi]
Monster spellcasting is in serious need of overhaul.
Clerical spell `case 1' has ``if (...) {} /* else fall into default */''
but the default case has been moved away so the comment is a lie.
Monsters which cast spells automatically "cast at thin air" if they don't know
where you are. In fact, castmu() includes undirected spells (healing) which
should still be possible under these circumstances.
The higher level a monster is, the more likely it becomes to cast the wimpy
"default" spell. This is particularly silly for the Wizard who has a higher
level each time he's reincarnated. Beyond that, spell using monsters ought
to pick their spells intelligently rather than randomly, especially once
they learn that their target is magic resistant.
Recoil from throwing while levitating won't trigger every type of trap.
Some were checked for and added in 3.3.2 (magic_portal, fire, pits et al on
Sokoban), but there are others that you can bypass just by throwing