Re: Haste Spell

From: Cervo (chrisf@PTD.NET)
Date: 06/28/98


On Sun, 28 Jun 1998, I Chose No Name wrote:

> Okay, here's my problem: I added the spell haste to my mud (show ya the code
> in a sec) and everything compiled right...
>
> (magic.c)
> case SPELL_HASTE:
>   af[0].duration = 4;
>   af[0].bitvector = AFF_HASTE;
>   to_vict = "The world slows down around you.";
>   to_room = "$n begins to move quickly.";
>   break;
>
> (spell_parser.c)
> spello(SPELL_HASTE, 50, 25, 5, POS_FIGHTING, TAR_CHAR_ROOM, FALSE,
> MAG_AFFECTS);
>
> ...as well as the AFF_X and SPELL_X and all that stuff in the appropriate
> files.  But, when I compile and run, here's what happens:
>
> > c 'haste
> Okay.
> The world slows down around you.
> > stat self
> ...
> AFF: NOBITS
> (there are no affects/spells)
>
within spell_parser.c towards the beginning there is a list of spells, you
must add the spell there, as well as the message of when the spell wears
off into constants.c.


Constants.c

affected_bits
this must match the aff_haste definition in utils.h


spl_wear_off_message:
This will give a message when the spell wears off, such as you feel
yourself slowing down a bit.

Also within magic.c there is the array of spell names
spells

Anyway this all must match with whatever number you give the spell name.
I have circle bpl11, but I imagine it is the same.  When I made the spell
on my really old mud I added something like af.type which made it say
spell haste sets HASTE or something like that, and it was a special flag.
Anyway, I'd just check those arrays.  also it will probably put the spell
under the AFF bits depending upon how stat was coded on your mud.


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