Re: Spells affecting mobs or objects...

From: Patrick J. Dughi (dughi@IMAXX.NET)
Date: 07/16/97


On Wed, 16 Jul 1997, Heartless wrote:

> Hiya!
>
>         I'm somewhat confused as to how to make a manual spell affect
> either an object OR a character/mob.  I mean, in the actual code for the
> spell, is there any convenient way to check and see if the argument
> passed is an object or a spell?
>         I don't want you folks to think I'm slacking, I looked around for
> such a device already in the code, but I just couldn't find one.  Did I
> just miss something, or is this trickier than I anticipate?
>
        I think I was curious about this a while ago - I seem to remember
the fuction "generic_find" or something of that sort being used. Basically
what it did was search through the char's eq, inv, room, mobs, objs, etc..
in some particular (logical) order.  Then, it checks and sees (just like
act()) if there's anything in the pointer (obj, ch, vict) when its
referenced.  If there's no object, the pointer will be null, and the spell
(if focused on an object) will say something like "can't find it" or
"can't cast SPELL_X_ on that!

                                Just do a search though I think, the
call_magic fnction....

                                                PjD


     +------------------------------------------------------------+
     | 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/08/00 PST