Re: [IDEA] Ideas for room affect spells

From: doppsoft (doppsoft@junctionnet.com)
Date: 12/05/96


>Could you share your room affects code?

The code is almost exactly the same as the code for spell affects.  Just 
look for the stuff like affect_to_char and make it with that.  I made a 
new struct called room_affects that has the same stuff as affected type, 
but without location and modifier.  You can leave those in, so that you 
can affect stuff like sector type or something.  It's pretty simple to 
do.  Here's a list of the functions I copied:

affect_modify
affect_remove
affect_from_char
affected_by_spell
affect_to_room
affect_total

Then I added a room affect bit to affect_total and made a 
'mag_room_affect' that did the same as mag_affect, but to rooms.  I 
didn't do affect_join as I didn't want to have room affects that can be 
added to.  You can if you want, but that's up to you.

>Is it the same as the room affects code on the snippit site?

As you can probably guess by now, it is DEFINITELY not the same as the 
one on the site.
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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