>I wanted to implement a dispel spell, which would remove a spell (or
>several) on someone. The trick is that I wanted to have different chances
>to work depending on level of caster and level of the guy who casted the
>spell you want to cancel.
Planning on doing this myself, eventually. Or rather have one of my coders
do it, since the magic system is supposed to be his thing.
>But, I wasn't able to get where the level of COSTC (caster of spell to
>cancel :) ) is located. I even believed it is not stored (as it might not
>have appeared to be necessary). So I wandered around code, and found the
I believe you are correct.
>following struct in structs.h :
>
>/* An affect structure. Used in char_file_u *DO*NOT*CHANGE* */
>struct affected_type {
> sh_int type; /* The type of spell that caused this */
> sh_int duration; /* For how long its effects will last */
> sbyte modifier; /* This is added to apropriate ability */
> byte location; /* Tells which ability to change(APPLY_XXX)*/
> long bitvector; /* Tells which bits to set (AFF_XXX) */
>
> struct affected_type *next;
>};
>
>which seems to be the struct to modify to add a int level variable in it.
>But it's written *DO*NOT*CHANGE* ...
>
Unless you pwipe or have ascii pfiles, listen to it. =)
>So, I think there might be another way to code a level of COSTC ? Or is it
>already in, but I missed it ? Or is it safe to modify this struct ? If so,
>what modifications should I do to rest of code to handle the modification
>?
>
>
>Sorry if it's a damned easy question or it has been answered many many
>times ...
>
My suggestion: switch to ascii pfiles. *grin* 'Tis that simple. With ascii
pfiles you can add things without the worry of fubar'ing something up as
easily, and if you do, that's what pico/vi/ed/emacs/etc is for. And your
needs of wiping player files decrease to almost nill...
StormeRider --- http://www.windsofstorm.net/wos/
silk@ici.net --- telnet://cmoo.com:4004
+------------------------------------------------------------+
| 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