Re: dispel magic - the code

From: Richard Glover (
Date: 02/09/99

Ok, from your code snippet, you are only dispelling the 'sanctuary only' on
a target.  The problem that you are having to dispel 'sanctuary' on a mob is
that if they are set with AFF_SANCTUARY in the mob file, you cannot dispel
this through the standard spell system.  The system looks for
SPELL_SANCTUARY on the target and removes the accompanying affect.
Basically, if the spell wasn't "cast" on the target then you won't be able
to dispel it using this method.

If you want to make a realistic 'dispel magic' spell, then you will have to
create a 'manual' spell as shown in spells.c.  This dispel magic spell
should look at the affects of the target and remove them, just like the
wizard command 'unaffect'.  Take a look at the code in act.wizard.c for


-----Original Message-----
From: Jan T. Pedersen <>
To: <>
Date: Tuesday, February 09, 1999 2:24 PM
Subject:  dispel magic - the code

>this is my code in magic.c
>under: void mag_unaffects
>    spell = SPELL_SANCTUARY;
>    to_vict = "Your sanctuary got dispelled!.";
>    break;

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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