|
The Hysteria Project: Change Log
The Mobile Spell Casting System
An Overview:
With the implementation of this new spell system it is now possible for
mobiles to cast any and all spells and spell types a player can cast. This
system is completely separate from the mortal spell system, however, and thus
means that existing player spells are not automatically accessable to mobs.
Rather, new spells must be written in to the mob spell system (mspell).
To accommodate this, I have attempted to make the system extremely easy to
add spells to, requiring minimal actual code for most spells, and, in most
cases, no code additions to the actual casting function.
Spell Types:
The system can handle the same four spell types as the mortal spell system.
Combat spells (default spell type), Offensive (special attack spells), Healing
or special spells and Area spells (type 1). At least one of each type of
spell has been added and tested.
Adding Spells - The Spell Structure:
If you're making a special or offensive spell, I'll need a decent description
of what it's supposed to do, like.. cast sanctuary for 7 ticks or whatever.
A Sample Spell:
For example, this is the entry for the Mobile Acidblast spell:
/* Mob Acidblast */
{ 50, 0, 500, 50, SP_COMBAT, False, "&+ra&*c&+Ri&*d blast"&*, "&+Yacidblast&*", }
Writing a spell is that simple.
How It Works:
When fighting, at the start of each round for a mobile, a check is performed
to see if the mobile has the CanCast mflag. If it does, the mobile rolls. The
roll has a 35% chance of being successful. If successful, the mobile rolls again
to pick a spell. If the spell is not a combat spell, or if the mobile is not
high enough level to cast that spell, it rolls again until it finds a spell that
the mobile is capable of casting in battle and casts it on the player it is
fighting. As a result, any mobile can cast spells. It simply needs the CanCast
flag added in the zone file. And we don't have to worry about a level 10 player
getting pasted by a low lev mob casting a 900 damage acidstorm.
|
General:
Main
Plans
Discuss Ideas
Mobile Spell System
Hysteria's Guide to World Building
Hystory:
Edhadeya
Corwin
Change Log:
November 2003 December 2003 January 2004 February 2004 March 2004 April 2004 May 2004 November 2004 December 2004 January 2005 February 2005 March 2005 April 2005
Contact:
hysteria at mephie dot ws.
Credits
This site designed specifically for Mozilla Firefox
|