Re: Affects

From: Johan Dustler (epkjodu@hmepks1.ericsson.se)
Date: 06/03/96


> From: Corey Hoitsma <choitsma@netcom.com>
> 
> Hello all:)
> I have another question for you all!
> 
> How do I make it so that eq can give you spells...
> Like aff_fly or aff_sanct when you wear them?
> 
> Thanks!
> 
> Myrddin
> 
> PS Oh, who do I mail to get my mud on the Circle HTML site? Thanks:)
> 
> 
> Corey Hoitsma                   AKA -= Myrddin =-
>              choitsma@netcom.com
> Tazmania			tazmania.ah.net 7000
> 

Hi,
The code for spell affections is already done, the only thing that
is missing is the part that assigns affection bits to the objects.
The code that follows should fix it so you can use spell affections.

In db.c, add an extra letter after Extra description and Affect fields.

    case 'A':
      if (j >= MAX_OBJ_AFFECT) {
        fprintf(stderr, "Too many A fields (%d max), %s\n", MAX_OBJ_AFFECT, buf2
);
        exit(1);
      }
      get_line(obj_f, line);
      sscanf(line, " %d %d ", t, t + 1);
      obj_proto[i].affected[j].location = t[0];
      obj_proto[i].affected[j].modifier = t[1];
      j++;
      break;

/* New code begins here */

    case 'B': /* B for bitvector */
      get_line(obj_f, line);
      obj_proto[i].obj_flags.bitvector = asciiflag_conv(line);
      break;

/* New code ends */


-Johan



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