magic4.c
SilentMists/src/magic4.c · 1.6 KB
From the archive startermud2.zip
Download the archive « Back to the archive contents
/***************************************************************************
MAGIC4.C: This file is to hold all spells/skills that are using the new
AFF_ and AFF2_ flags. The setup allows you to use normal AFF_ calls without
haveing to add the AFF2_ in merc.h or from within the spells. Just use
AFF_ as you would when you added stuff to the normal stock rom affects.
Chris Bunting - Silent Mists IMP and Coder.. April 1st 2001
***************************************************************************/
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "interp.h"
#include "magic.h"
#include "recycle.h"
/* Test spell for AFF 2 */
void spell_test_spell( int sn, int level, CHAR_DATA *ch, void *vo, int target)
{
CHAR_DATA *victim = (CHAR_DATA *) vo;
AFFECT_DATA af;
if (IS_AFFECTED2(victim, AFF_TEST_FLAG) )
{
if (victim == ch)
send_to_char("You can already sense a test flag in you.\n\r",ch);
else
act("$N can already sense a test flag.",ch, NULL, victim, TO_CHAR);
return;
}
af.where = TO_AFFECTS2;
af.type = sn;
af.level = level;
af.duration = level;
af.modifier = 0;
af.location = APPLY_NONE;
af.bitvector = AFF_TEST_FLAG;
affect_to_char( victim, &af );
send_to_char( "Your eyes flickers.\n\r", victim );
if ( ch != victim )
send_to_char( "Ok.\n\r", ch );
return;
}