[CODE] Spell Affects

From: Brian Christopher Guilbault (guil9964@nova.gmi.edu)
Date: 10/21/96

Okay Guys-

This one is killing me. I have been trying to convert my mud from pl8 to 
pl11 for a long time. I am finally almost done, just working out the 
final bugs (basically recoded it from the ground up because I didn't know 
what I was doing back then). Anyway, I am having trouble with my haste 
and slow spells. They don't seem to affect the player they are cast on at 
all. The part that kills me is that the code is identical to the pl8 code 
except with the af.x lines changed to af[0].x. Here is what is happening.

The case in magic.c works fine. It sets the duration and everything and 
even sends the message to the room that the spell got cast, so the case 
works. The spell is declared in spell.h, assigned in class.c, and called 
with a spello in spell_parser.c. It is also named in spell_parser.c with 
all of the other spells. Now, in act.informative.c there is a line that 
says this:

if (affted_by_spell(ch, SPELL_HASTE)
  strcat(buf, You are hasted\r\n");

just like all of the other spells. The problem is that it doesn't show up 
in the score screen like all of the other spells, and it doesn't show up 
as affecting players in the stat screen either. I know that this is 
because the player is NOT affected by it because it doesn't work in 
fight.c either:

if (affected_by_spell(ch, SPELL_HASTE)) attacks=attacks++;

And the same with SPELL_SLOW. Now this code all works in my old code and 
nothing should be different between them. Here are the cases if you want 
to take a look at them. For some reason, the player is not getting 
affected by the spell even though the case is getting executed.

    af[0].duration = (GET_LEVEL(ch) / 8);
    accum_duration = FALSE;
    to_vict = "You feel your speed increase.";
    to_room = "$n seems to move a little faster.";

  case SPELL_SLOW:
    af[0].duration = (GET_LEVEL(ch) / 10);
    accum_duration = FALSE;
    to_vict = "Your body feels heavier and slower.";
    to_room = "$n's body appears to become slow and sluggish.";

If you can help me with this one, please drop me a line. Iam sure that I 
know how to add a spell, and all of my other added spells work fine, only 
these two do not. ANY help is appreciated.

Thanks a million,


Brian Guilbault - GMI Engineering Institute
E-mail: guil9964@gmi.edu, dante@i-55.com
WWW: http://apollo.gmi.edu/~guil9964
QuarantineMUD: Telnet to exit1.i-55.com 4000

| 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