
** THIS FILE IS OUT-OF-DATE **

Simply call set_mage() if you want you monster to cast offensive spells.






Monsters can cast spells.

Use the function set_spell_chance(chance, words) to set spells.
'Chance' is the chance for each round for the monster to start casting a
spell. 'Words' define the spell the monster will cast.

To have the monster cast fire grasp at attacker use:
  set_spell_chance(50, "exs fla grs");

Now you have to set the spellcasting skills:
  set_skill("cast essence", 80);
  set_skill("cast fire", 80);
  set_skill("cast grasp", 80);
  set_skill("mana control", 80);

You can set many spells with the set_spell_chance(). The chance to start
to start casting a spell will be the last one defined. Then it will random
a spell from the spells you have set.

To get a monster heal itself or someone else, see
'/doc/examples/healing_monster'.


Here is the list of word and what skills you need for them:

Magic types: (first word)
  "exs", "cast essence"

Damage types: (second word)
  "fla", "cast fire"
  "brr", "cast ice"
  "sol", "cast earth" (physical)
  "poi", "cast poison"
  "ssh", "cast acid"
  "zzt", "cast electricity"

Spell types: (third word)
  "grs", "cast grasp"
  "arr", "cast arrow"
  "blt", "cast bolt"
  "bls", "cast blast"
