Room affect spells (WAS: Re: Mob Problems.... Mob probs.. heh, Thats funny ;))

From: Edward J Glamkowski (eglamkowski@ANGELFIRE.COM)
Date: 09/09/98


On Wed, 9 Sep 1998 11:33:09    Jimmy Brians wrote:
><<
>Any chance room affect spells will ever be part of
>stock circle?  It is a nice addition that doesn't
>alter how anything else works.
>>>
>
> Well, room affect spells are extremely easy to code
> in, just fyi. I've done about 50 room things and it
> gets easier every day. A simple for statement will do
> it :

I've done room affects, and as a spell, it is a bit
more complicated than you indicated.  Either that or
we are thinking of two different things ;)

You have to create a new RAFF_xxx bitvector, a new
room_aff struct to contain the info of the spell (which
room the spell is affecting, what affect it is,
duration of spell, etc.).
Add a mag_room() function in magic.c to actually take
care of the casting of the spell.  Add in code to
handle the countdown of the spell's duration and its
eventual dissipation.
mag_rooms() really just sets the flags and associated
parameters, so you then have to add stuff in the code
to actually use those flags.

For example, a wall of fog spell which would block all
vision in a room.  So, mag_rooms() would set the
RAFF_FOG flag on the room it is cast in, and then
whenever anybody entered the room or typed 'look' in
the affected room, they would get a message like:
"You can't see a bloody thing through all this fog!"

Or a rock to mud spell which sets RAFF_MUD on the room
and increases the movement needed to cross through the
room by 50% or +10 movement points or whatever.

There's a lot of detail involved, but it allows for
some interesting and creative spells! :)



Angelfire for your free web-based e-mail. http://www.angelfire.com


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