Re: Non character sourced spells

From: Doppleganger Software (doppsoft@TZC.COM)
Date: 04/15/98


>As opposed to re-vamping the entire spell-casting routines to allow
>objects to cast spells, I basically duplicated all of my spellcasting
>code for traps and made it so that an object was the caster. Not that
>hard, just tons of work and tons of code. It's probably a horrid way of
>doing it because of all the duplicated code, but that's how I did it and
>it works.

As much as I want the idea, I hate duplicating code even more.  :)
Personally, I was thingking somthing along the lines of another parameter
sent to the spell casting code, like maybe a "bool source" that lets you
define if it has a real live source.  Or maybe make it "int source" and
have 0 mean no source (perhaps the room cast it), 1 be character sourced,
and 2 be object sourced.  That way, you can handle all events.  However,
this chain of thought leads to NUMEROUS problems.  For example, you would
either have to define all spells with new variables defining sources
(kinda like they have targets now) and check that first, or have each
spell check.  Either that, or you could have only certain types of spells
work....only damage spells, affect spells, and affect_remove.  It's going
to require a lot of coding, but personally, I think that a 'universal'
spell casting system would be nice.

---
"One hundred years from now, none of this will matter because you and I
will be dead -- unless the Grim Reaper has switched his record-keeping to
a Windows 95-based system, in which case we all might live forever. "
-- Associated Press


     +------------------------------------------------------------+
     | 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