Re: [Circle] Cleric.c to check if spell affect already in place

From: Demetrius Harris (ldh1@Archive.MsState.Edu)
Date: 08/08/96


Well I just made the armor spell non cumulative...

my two cents

Shame the Imp -- SliceMUD -- [lotus.cim.msstate.edu 4000] 
				 [130.18.216.23 4000]

On Thu, 8 Aug 1996, Ian Stephenson wrote:

> Hello, I've been trying to modify the cleric.c "freebie-for-newbie" code
> to check if a spell affect is already upon a character (eg: bless,
> armor).  This is because the duration is cumulative, so I have
> characters running around with 600 hours of armor in place.  I want a
> check so the spell is cast only if the victim is not already affected.
> I've applied the following to the cleric code in spec_procs.c:
> 
>     switch (number(1, GET_LEVEL(vict))) { 
>         case 1: cast_spell(ch, vict, NULL, SPELL_CURE_LIGHT); break;
>         case 2:
>             if (!affected_by_spell(vict, SPELL_BLESS))
>                 cast_spell(ch, vict, NULL, SPELL_BLESS);
>             break;
>         .
>         .
>         . and so on, applying the "if (!affected_by_spell..." at every
>           occurance of "armor" and "bless" in the code.
> 
> However, the "if(!affected_by_spell(vict, SPELL_BLESS))" is effectively
> ignored, and the bless (or armor) spell is cast anyway.  I presume the
> parameter SPELL_BLESS is incorrect, but can't work out what it should
> be.
> 
> Can anyone assist?
> 
> Regards,
> Ian Stephenson
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> +-----------------------------------------------------------+
> 
+-----------------------------------------------------------+
| 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/07/00 PST