void spell_detect_traps (int sn, int level, CHAR_DATA *ch, void *vo, int target)
{
CHAR_DATA *victim = (CHAR_DATA *) vo;
AFFECT_DATA af;
if (victim != ch)
{
SEND("You can only cast that on yourself.\r\n",ch);
return;
}
if (is_affected(ch, gsn_detect_traps))
{
SEND("You already sense traps.\r\n",ch);
return;
}
af.where = TO_AFFECTS;
af.type = sn;
af.level = level;
af.duration = level;
if (is_affected (ch, gsn_extension) && victim == ch)
af.duration += number_range((af.duration * 1/5), (af.duration * 2/5));
af.modifier = 0;
af.location = APPLY_NONE;
af.bitvector = gsn_detect_traps;
affect_to_char (victim, &af);
SEND ("You feel an inner sense of traps.\r\n", victim);
return;
}
if (is_affected(ch, gsn_detect_traps))