Re: Magic System

From: George (greerga@CIRCLEMUD.ORG)
Date: 05/05/98


On Tue, 5 May 1998, Chris Powell wrote:

>Two things I've noticed.  The mag_damage and mag_points functions are
>almost identical, except in how they deal with what to do with the data
>they've collected. I think it would be simpler to have one mag_points
>function that would replace them.

Guess you haven't made a spell that both damages and heals someone. :)

Seriously, they are far apart enough in concept to warrant separate
functions.  One is for healing spells (no saving throw or damage() call)
and the other is for offensive spells (with the saving throw and damage()
call).

>Pretty much keep the current mag_points function but add all the
>mag_damage SPELL_ in the switch section.  Then at the end just have it do
>switch (spell_info[spellnum].routines) and for MAG_DAMAGE subtract the
>values and for MAG_POINTS add the value.

It's not that simple, at least for mag_damage().

>Also mag_areas and mag_masses are identical except mag_areas does more
>checks for pc's/pkill and the such.  Could we combine these 2 functions
>and add in the a check to see if it is MAG_AREAS and if it is do the extra
>checks?

I suppose we could, but the idea of the functions is to separate different
types of spells.

>Also it seems that the spell system is to spread out over the 4 files.  I
>know this is to help with readability, but I'm sure if you look long
>enough you'll see functions that can go to gether and simplify the code.

I'm sure the original idea was to get it working, not put everything
together.  I have a few ideas on a minor magic update and can rearrange
things then.

>Also through out the code spells are commonly referenced by skill.  This
>is kind of confusing, especially if you want to seperate skills from
>spells.  Also the implementation of skills is very...umm...strange.  FOr
>spells we have set functions to handle certain spell effects, damage,
>applies, etc.  Couldnt we set up the skills to a similar system?

We do, sort of. :)

spell_parser.c:#define skillo(skill) spello(skill, 0, 0, 0, 0, 0, 0, 0);

>Also whay are the TYPE_XXX defines in spells.h?  I mean why are they added
>to they ennd of spell/skill defines?  For some people who have tried to
>increase the max number of spells/skills, that is commonly over looked.

They are 'damage types' akin to the spells and skills almost...or at least
that's the excuse I can think of. :)

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST