/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
/************************************************************************
        Realms of Aurealis              James Callahan aka Darkenelf

druid.c                                Code relating to the Druid class

                ******** 100% Completely Original Code ********
                *** BE AWARE OF ALL RIGHTS AND RESERVATIONS ***
                ******** 100% Completely Original Code ********
                        All rights reserved henceforth.

    Please note that no guarantees are associated with any code from
Realms of Aurealis.  All code which has been released to the general
public has been done so with an 'as is' pretense.  RoA is based on both
Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well
as the RoA license.   *** Read, Learn, Understand, Improve ***
*************************************************************************/
#include "conf.h"
#include "sysdep.h"

#include "structures.h"
#include "utils.h"
#include "comm.h"
#include "interpreter.h"
#include "acmd.h"
#include "handler.h"
#include "db.h"
#include "magic.h"
#include "affect.h"
#include "fight.h"
#include "lists.h"
#include "darkenelf.h"


ASPELL(spell_thornstorm)
{
  int dam = 0;

  if (!victim)
    return SPELL_FAILED;

  dam = (number(2, 6) + Level(ch));

  SpellDamage(ch, victim, dam, SPELL_THORNSTORM, FALSE);

  return SPELL_NORMAL;
}


ASPELL(spell_obscure_passing)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (!affected_by_spell(victim, SPELL_OBSCURE_PASSING)) {
    NewAffect(&af);

    af.type      = SPELL_OBSCURE_PASSING;
    af.duration  = Level(ch) + number(1, 4);
    af.bitvector = AFF_SNEAK;

    affect_to_char(victim, &af);

    act("You sense an invisible force envelpoing you, obscuring your path...",
        FALSE, victim, 0, 0, TO_CHAR);

  } else
    if (victim == ch)
      SendChar("You are already hiding your passing...\r\n", ch);

  return SPELL_NORMAL;
}


ASPELL(spell_forest_warrior)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (!affected_by_spell(victim, SPELL_FOREST_WARRIOR)) {
    NewAffect(&af);

    af.type      = SPELL_FOREST_WARRIOR;
    af.duration  = (Level(ch) / 10) + number(1, 4);

    affect_to_char(victim, &af);

    act("In a vague manner, you feel more powerful.",
        FALSE, victim, 0, 0, TO_CHAR);
  } else
    if (victim == ch)
      SendChar("You are already a warrior of the forest.\r\n", ch);

  return SPELL_NORMAL;
}


ASPELL(spell_wall_of_fire)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (!affected_by_spell(victim, SPELL_WALL_FIRE)) {
    NewAffect(&af);

    af.type      = SPELL_WALL_FIRE;
    af.duration  = (Level(ch) / 10) + number(1, 12);

    affect_to_char(victim, &af);

    act("You hear the sound of fierce wind, and are suddenly surrounded by "
        "a wall of fire!", FALSE, victim, 0, 0, TO_CHAR);

    act("You hear the sound of fierce wind, and $n is suddenly surrounded "
        "by a wall of fire!", FALSE, victim, 0, 0, TO_ROOM);

    if (affected_by_spell(victim, SPELL_WALL_BRAMBLES)) {
      act("Your brambles are consumed by the flames that surround you.",
          FALSE, victim, 0, 0, TO_CHAR);
      act("$n's brambles are consumed by the flames that surround $m.",
          FALSE, victim, 0, 0, TO_ROOM);

      affect_from_char(victim, SPELL_WALL_BRAMBLES);
    }
  } else
    if (victim == ch)
      SendChar("You already have an existing wall.", ch);

  return SPELL_NORMAL;
}


ASPELL(spell_wall_of_brambles)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (!affected_by_spell(victim, SPELL_WALL_BRAMBLES)) {
    NewAffect(&af);

    af.type      = SPELL_WALL_BRAMBLES;
    af.duration  = (Level(ch) / 10) + number(1, 12);

    act("From the ground beneath you, a wall of brambles springs into "
        "existance.", FALSE, victim, 0, 0, TO_CHAR);
    act("From the ground beneath $n, a wall of brambles springs into "
        "existance.", FALSE, victim, 0, 0, TO_ROOM);

    if (affected_by_spell(victim, SPELL_WALL_FIRE)) {
      act("The brambles are consumed by the flames that surround you.",
          FALSE, victim, 0, 0, TO_CHAR);
      act("The brambles are consumed by the flames that surround $m.",
          FALSE, victim, 0, 0, TO_ROOM);
    } else
      affect_to_char(victim, &af);

  } else
    if (victim == ch)
      SendChar("You would simply destroy the existing wall.\n\r", ch);

  return SPELL_NORMAL;
}


ASPELL(spell_treeskin)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (affected_by_spell(victim, SPELL_STONE_SKIN) ||
      affected_by_spell(victim, SPELL_BARKSKIN) ||
      affected_by_spell(victim, SPELL_TREESKIN)) {
    if (victim == ch)
      act("Your skin is already in an altered state.", FALSE, ch, 0, 0, TO_CHAR);
    else
      act("$N's skin is already in an altered state.", FALSE, ch, 0, victim, TO_CHAR);
  } else {
    NewAffect(&af);

    af.type      = SPELL_TREESKIN;
    af.duration  = 24;
    af.modifier  = -Level(ch);
    af.location  = APPLY_AC;

    affect_to_char(victim, &af);

    act("Your skin suddenly takes on the texture of tree bark.",
        FALSE, victim, 0, 0, TO_CHAR);
    act("$n's skin suddenly takes on the texture of tree bark.",
        FALSE, victim, 0, 0, TO_ROOM);
  }

  return SPELL_NORMAL;
}


ASPELL(spell_protection_from_poison)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (!affected_by_spell(victim, SPELL_PROTECT_FROM_POISON)) {
    NewAffect(&af);

    af.type      = SPELL_PROTECT_FROM_POISON;
    af.duration  = (Level(ch) / 3) + number(1, 4);
    af.modifier  = (Level(ch) / 5);
    af.location  = APPLY_SV_POISON;
    affect_to_char(victim, &af);

    act("You close your eyes, and a feeling of purity flows through you.",
        FALSE, victim, 0, 0, TO_CHAR);

    act("$n briefly closes $s eyes, and a sudden flash of soft light emits "
        "from $s body.", TRUE, victim, 0, 0, TO_ROOM);
  } else
    SendChar("You are already resistant to toxins.\r\n", victim);

  return SPELL_NORMAL;
}


ASPELL(spell_protection_from_dragons)
{
  AffType af;
      
  if (!victim)
    return SPELL_FAILED;

  if (!affected_by_spell(victim, SPELL_PROTECT_FROM_DRAGON)) {
    NewAffect(&af);

    af.type      = SPELL_PROTECT_FROM_DRAGON;
    af.duration  = (Level(ch) / 3) + number(1, 4);
    af.modifier  = (Level(ch) / 5);
    af.location  = APPLY_SV_BREATH;
    affect_to_char(victim, &af);

    act("You feel as though a second skin has been fitted upon you.",
        FALSE, victim, 0, 0, TO_CHAR);
  } else
    SendChar("You are already resistant to dragon breath.\r\n", victim);

  return SPELL_NORMAL;
}


ASPELL(spell_protection_from_fire)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;
    
  if (!affected_by_spell(victim, SPELL_PROTECT_FROM_FIRE)) {
    NewAffect(&af);

    af.type      = SPELL_PROTECT_FROM_FIRE;
    af.duration  = (Level(ch) / 3) + number(1, 4);
    af.modifier  = (Level(ch) / 5);
    af.location  = APPLY_SV_HEAT;
    affect_to_char(victim, &af);
    
    act("You feel as though you have become enshrouded in protective ice.",
        FALSE, victim, 0, 0, TO_CHAR);
  } else
    SendChar("You are already resistant to fire.\r\n", victim);

  return SPELL_NORMAL;
}


ASPELL(spell_protection_from_cold)
{
  AffType af;
  
  if (!victim)
    return SPELL_FAILED;
  
  if (!affected_by_spell(victim, SPELL_PROTECT_FROM_COLD)) {
    NewAffect(&af);

    af.type      = SPELL_PROTECT_FROM_COLD;
    af.duration  = (Level(ch) / 3) + number(1, 4);
    af.modifier  = (Level(ch) / 5);
    af.location  = APPLY_SV_COLD;
    affect_to_char(victim, &af);
    
    act("You feel as though you have become enshrouded in protective flame.",
        FALSE, victim, 0, 0, TO_CHAR);
  } else
    SendChar("You are already resistant to cold.\r\n", victim);

  return SPELL_NORMAL;
}


// Casts view hidden, detect invis and heartsight all at once.
ASPELL(spell_true_seeing)
{ 
  AffType af;
  
  if (!victim)
    return SPELL_FAILED;

  if (!IS_AFFECTED(ch, AFF_DETECT_ALIGN) ||
      !IS_AFFECTED(ch, AFF_DETECT_INVISIBLE)) {
    NewAffect(&af);

    af.type = SPELL_TRUE_SEEING;
    af.duration = Level(ch);
    af.bitvector = AFF_DETECT_ALIGN | AFF_DETECT_INVISIBLE;
    affect_to_char(victim, &af);

    SendChar("Your eyes glow silver for a moment.\r\n", victim);

    if (ch != victim)
      act("$n's eyes take on a silvery hue.", FALSE, victim, 0, 0, TO_ROOM);
    else
      act("$n's eyes glow silver.", FALSE, ch, 0, 0, TO_ROOM);
  } else
    SendChar("Nothing seems to happen\r\n", ch);

  return SPELL_NORMAL;
} 


ASPELL(spell_know_alignment)
{
  AffType af;
  
  if (!victim)
    return SPELL_FAILED;

  if (!IS_AFFECTED(ch, AFF_DETECT_ALIGN)) {
    NewAffect(&af);

    af.type = SPELL_KNOW_ALIGNMENT;
    af.duration = Level(ch);
    af.bitvector = AFF_DETECT_ALIGN;
    affect_to_char(victim, &af);

    SendChar("Your eyes turn yellow for a moment.\r\n", victim);

    act("$n's eyes turn momentarily yellow.", FALSE, victim, 0, 0, TO_ROOM);
  } else
    SendChar("Nothing seems to happen\r\n", ch);

  return SPELL_NORMAL;
}


ASPELL(spell_firestorm)
{
  struct room_affect_type af;

  if (spell_affects_room(InRoom(ch), SPELL_FIRESTORM)) {
    act("There is already a %1%Bfirestorm%0 raging here.",
        FALSE, ch, 0, 0, TO_CHAR);
    return SPELL_NORMAL;
  }

  af.spell = SPELL_FIRESTORM;
  af.caster = ch;
  af.duration  = number(1, 3);
  af.bitvector = 0;
 
  SendChar("You unleash a %B%1firestorm%0!", ch);
  affect_to_room(InRoom(ch), &af);
  return SPELL_NORMAL;
}


ASPELL(spell_animal_summoning)
{ 
  chdata *vict;
  int mobnum;
      
  if (Mana(ch) < Level(ch)) {
    SendChar("You haven't enough energy to cast the spell.\r\n", ch);
    return SPELL_FAILED;
  }

  if (MaxSummons(ch))
    return SPELL_FAILED;

  Mana(ch) -= Level(ch);
  if (GET_SKILL(ch, SPELL_ANIMAL_SUMMONING) < number(1, 101))
    return SPELL_FAILED;
  
  // Grab vnums from system zone 7, mobs 710 - 717 -callahan
  mobnum = 710 + (Level(ch) / 10);
  mobnum = number(710, mobnum);

  // 05/03/98 -callahan
  if ((mobnum == 717) && (Sex(ch) != SEX_FEMALE))
    mobnum = 718;

  if (!(vict = read_mobile(mobnum, VIRTUAL))) {
    SendChar("Seek immortal assistance, wildlife non-existance error.\r\n", ch);
    return SPELL_FAILED;
  }
  SET_BIT(CHAR_FLAGS(vict), CH_SUMMONED);

  SUMMONER(vict) = GET_IDNUM(ch);
  char_to_room(vict, InRoom(ch));

  act("You summon $N!", TRUE, ch, 0, vict, TO_CHAR);
  act("$n summons $N!", TRUE, ch, 0, vict, TO_ROOM);
  add_follower(vict, ch);

  return SPELL_NORMAL;
}


ASPELL(spell_fire_servant)
{
  chdata *vict;
  int mobnum;
  AffType af;
    
  if (Mana(ch) < Level(ch)) {
    SendChar("You haven't enough energy to cast the spell.\r\n", ch);
    return SPELL_FAILED;
  }
   
  if (MaxSummons(ch))
    return SPELL_FAILED; 
  
  Mana(ch) -= Level(ch);
  if (GET_SKILL(ch, SPELL_FIRE_SERVANT) < number(1, 101))
    return SPELL_FAILED;
    
  // Grab vnums from system zone 7, mobs 700 - 704 -callahan
  if (InRange(Level(ch), 52, 75))
    mobnum = 704;
  else if (InRange(Level(ch), 47, 75))
    mobnum = 703;
  else if (InRange(Level(ch), 42, 75))
    mobnum = 702;
  else if (InRange(Level(ch), 37, 75))
    mobnum = 701;
  else if (InRange(Level(ch), 32, 75))
    mobnum = 700;

  mobnum = number(700, mobnum);
  if (!(vict = read_mobile(mobnum, VIRTUAL))) {
    SendChar("Seek immortal assistance, elemental non-existance error.\r\n", ch);
    return SPELL_FAILED;
  }
  SET_BIT(CHAR_FLAGS(vict), CH_SUMMONED);
  
  SUMMONER(vict) = GET_IDNUM(ch);
  char_to_room(vict, InRoom(ch));
  
  act("You summon $N!", TRUE, ch, 0, vict, TO_CHAR);
  act("$n throws $s hands into the air, and the ground erupts into a fiery "
      "pillar before $m. The sky-high flame abate into nothingness, leaving "
      "$N to stand in their wake!", TRUE, ch, 0, vict, TO_ROOM);
  add_follower(vict, ch);

  NewAffect(&af);
  
  af.type = SPELL_FIRE_SERVANT;
  af.bitvector = AFF_CHARM;
  af.duration = -1;
  affect_to_char(vict, &af);

  return SPELL_NORMAL;
}


ASPELL(spell_earth_servant)
{
  chdata *vict;
  int mobnum;
  AffType af;
    
  if (Mana(ch) < Level(ch)) {
    SendChar("You haven't enough energy to cast the spell.\r\n", ch);
    return SPELL_FAILED;  
  }
   
  if (MaxSummons(ch))
    return SPELL_FAILED;
  
  Mana(ch) -= Level(ch);
  if (GET_SKILL(ch, SPELL_EARTH_SERVANT) < number(1, 101))
    return SPELL_FAILED;
    
  // Grab vnums from system zone 7, mobs 705 - 709 -callahan
  if (InRange(Level(ch), 60, 75))
    mobnum = 709;
  else if (InRange(Level(ch), 55, 75))
    mobnum = 708;
  else if (InRange(Level(ch), 50, 75))
    mobnum = 707;
  else if (InRange(Level(ch), 45, 75))
    mobnum = 706;
  else if (InRange(Level(ch), 40, 75))
    mobnum = 705;

  mobnum = number(705, mobnum);
  if (!(vict = read_mobile(mobnum, VIRTUAL))) {
    SendChar("Seek immortal assistance, elemental non-existance error.\n\r", ch);
    return SPELL_FAILED;
  }
  SET_BIT(CHAR_FLAGS(vict), CH_SUMMONED);
  
  SUMMONER(vict) = GET_IDNUM(ch);
  char_to_room(vict, InRoom(ch));
  
  act("You summon $N!", TRUE, ch, 0, vict, TO_CHAR);
  act("$n gestures, and suddenly the ground is awash in an eerie green glow.\r\n"
      "The light coalesces, and forms into $N!", TRUE, ch, 0, vict, TO_ROOM);
  add_follower(vict, ch);
  
  NewAffect(&af);

  af.type = SPELL_EARTH_SERVANT;
  af.bitvector = AFF_CHARM;
  af.duration = -1;
  affect_to_char(vict, &af);

  return SPELL_NORMAL;
}


ASPELL(spell_forest_embrace)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (!check_mortal_combat(ch, victim))
    return SPELL_FAILED;

  if (saves_spell(victim, SPELL_FOREST_EMBRACE) ||
      MOB_FLAGGED(victim, MOB_NO_HOLD)) {
    if (ch != victim)
      act("$N is unaffected!", TRUE, ch, 0, victim, TO_CHAR);
    else
      act("You are unaffected.", TRUE, ch, 0, victim, TO_CHAR);
    return SPELL_NORMAL;
  }
 
  if (!affected_by_spell(victim, SPELL_FOREST_EMBRACE)) {
    NewAffect(&af);

    af.type      = SPELL_FOREST_EMBRACE;
    af.location  = APPLY_DEX;
    af.modifier  = -3;
    af.duration  = (Level(ch) / 3) + number(1, 4);
      
    affect_to_char(victim, &af);

    act("Vines and roots spring from the ground and entwine themselves "
        "tightly around your arms and legs!", FALSE, victim, 0, 0, TO_CHAR);
    act("Vines and roots spring from the ground and entwine themselves "
        "tightly around $n's arms and legs!", TRUE, victim, 0, 0, TO_ROOM);
  } else
    act("$N is already being held by the undergrowth.",
        TRUE, ch, 0, victim, TO_CHAR);

  return SPELL_NORMAL;
}


ASPELL(spell_nature_communion)
{
  AffType af;
    
  if (IN_NOWHERE(ch) || IS_NPC(ch))
    return SPELL_FAILED;
                
  if (affected_by_spell(ch, SPELL_NATURE_COMMUNION)) {
    SendChar("You are already communing with nature.\n\r",ch);
    return SPELL_FAILED;
  }
  
  NewAffect(&af);
   
  af.type      = SPELL_NATURE_COMMUNION;
  af.duration  = (Level(ch) / 10) + 2;
  af.modifier  = Level(ch) + 10;
  af.location  = APPLY_HIT_REGEN;

  affect_to_char(ch, &af);

  NewAffect(&af);
   
  af.type      = SPELL_NATURE_COMMUNION;
  af.duration  = (Level(ch) / 10) + 2;
  af.modifier  = Level(ch) + 10;
  af.location  = APPLY_MANA_REGEN;

  affect_to_char(ch, &af);
  
  NewAffect(&af);
   
  af.type      = SPELL_NATURE_COMMUNION;
  af.duration  = (Level(ch) / 10) + 2;  
  af.modifier  = Level(ch) + 10;
  af.location  = APPLY_MOVE_REGEN; 
 
  affect_to_char(ch, &af);
  
  act("$n suddenly emits a faintly green, glowing aura.",
      TRUE, ch, 0, 0, TO_ROOM);
  act("You feel reassured, and refreshed.", TRUE, ch, 0, 0, TO_CHAR);

  return SPELL_NORMAL;
}


ASPELL(spell_water_walk)
{
  AffType af;
      
  if (!victim)
    return SPELL_FAILED;

  if (!affected_by_spell(victim, SPELL_WATER_WALK)) {
    NewAffect(&af);
   
    af.type = SPELL_WATER_WALK;
    af.duration = (Level(ch) / 3) + number(1, 4);
    affect_to_char(victim, &af);

    SendChar("You feel somewhat lighter.\r\n", victim);
  } else
    SendChar("Nothing seems to happen\n\r", ch);
  
  return SPELL_NORMAL;
}


ASPELL(spell_natures_caltrops)
{
  struct room_affect_type af;

  if (spell_affects_room(InRoom(ch), SPELL_NATURES_CALTROPS)) {
    act("That spell is already in effect here.", FALSE, ch, 0, 0, TO_CHAR);
    return SPELL_NORMAL;
  }

  af.spell = SPELL_NATURES_CALTROPS;
  af.caster = ch;
  af.duration  = (Level(ch) / 5) + number(1, 4);
  af.bitvector = 0;
 
  act("You unleash upon the ground many wickedly-pointed spikes!",
      FALSE, ch, 0, 0, TO_CHAR);
  affect_to_room(InRoom(ch), &af);
  return SPELL_NORMAL;
}


ASPELL(spell_tongues)
{
  AffType af;
                
  if (!victim)
    return SPELL_FAILED;
                        
  if (!affected_by_spell(victim, SPELL_TONGUES)) {
    NewAffect(&af);

    af.type = SPELL_TONGUES;
    af.duration = (Level(ch) / 5) + number(1, 10);
    affect_to_char(victim, &af);

    SendChar("A lifetime of knowledge seems to slip into your head.\r\n", victim);
  } else
    SendChar("Nothing seems to happen\n\r", ch);

  return SPELL_NORMAL;
}


ASPELL(spell_hold_animal)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (!IS_NPC(victim))
    return SPELL_FAILED;

  if (!MOB_CLASS_FLAGGED(victim, MOB_MAMMAL | MOB_AVIAN | MOB_INSECT |
                                 MOB_ARACHNID | MOB_ORC | MOB_OGRE |
                                 MOB_REPTILE | MOB_GOBLINOID | MOB_AQUATIC |
                                 MOB_CRUSTACEAN)) {
    SendChar(tprintf("%s cannot be affected by this spell.\r\n",
                         Name(victim)), ch);
    return SPELL_FAILED;
  }

  if (Level(ch) < LEV_CIMP)
    if (saves_spell(victim, SPELL_HOLD_ANIMAL) ||
        MOB_FLAGGED(victim, MOB_NO_HOLD) || Level(victim) - Level(ch) > 5) {
     act("$N is enraged at your attempt to hold $M!",
              TRUE, ch, 0, victim, TO_CHAR);

     if (!number(0, 2))
       do_kill(victim, Name(ch), 0, 0);
     return SPELL_NORMAL;
   }
  
  if (!affected_by_spell(victim, SPELL_HOLD_ANIMAL) &&
      !affected_by_spell(victim, SPELL_ENSNARE)) {
    NewAffect(&af);

    af.type      = SPELL_HOLD_ANIMAL;
    af.duration  = (GET_INT(ch) / 9) + 1;
    af.bitvector = AFF_HOLD;

    affect_to_char(victim, &af);
  
    act("You have been held!", FALSE, victim, 0, 0, TO_CHAR);
    act("$n is %4frozen%0 in place!", FALSE, victim, 0, 0, TO_ROOM);
   
    HOLDER(victim) = ch;
  } else
    act("$N is already held in place!", FALSE, ch, 0, victim, TO_CHAR);
      
  return SPELL_NORMAL;
}


ASPELL(spell_rock_to_mud)
{
  struct room_affect_type af;

  if (spell_affects_room(InRoom(ch), SPELL_ROCK_TO_MUD)) {
    act("The ground already has a mudlike texture.", FALSE, ch, 0, 0, TO_CHAR);
    return SPELL_NORMAL;
  }

  af.spell = SPELL_ROCK_TO_MUD;
  af.caster = ch;
  af.duration  = (Level(ch) / 4) + number(2, 6);

  af.bitvector = 0;
 
  act("Your efforts have rendered the ground to a wretched muck.", FALSE, ch, 0, 0, TO_CHAR);
  affect_to_room(InRoom(ch), &af);
  return SPELL_NORMAL;
}


ASPELL(spell_shapechange);
ASPELL(spell_woodbrittle);


ASPELL(spell_insect_death)
{
  AffType af;

  if (!victim)
    return SPELL_FAILED;

  if (saves_spell(victim, SPELL_INSECT_DEATH)) {
    act("$N is unaffected.", TRUE, ch, 0, victim, TO_CHAR);

    return SPELL_NORMAL;
  }
  
  if (!affected_by_spell(victim, SPELL_INSECT_DEATH)) {
    NewAffect(&af);

    af.type      = SPELL_INSECT_DEATH;
    af.duration  = (Level(ch) / 10) + number(1, 4);

    affect_to_char(victim, &af);
  
    act("You hear the buzzing of many insects, and then your vision is "
        "obscured and you fall into agony!", FALSE, victim, 0, 0, TO_CHAR);
    act("You hear the buzzing of many insects, and then suddenly a swarm "
        "converges upon $n and attacks $m!", FALSE, victim, 0, 0, TO_ROOM);
  }

  return SPELL_NORMAL;
}


// NON-Druid spells, temporarily here.
// // // // // // // // // // // // //

// Grabs affects from item and transfers to char. Needed by golem spell
void ObjAffToChar(CharData *ch, ObjData *obj)
{
  int i;

  for (i = 0; i < MAX_OBJ_AFFECT; i++)
    affect_modify(ch, obj->affected[i].location, obj->affected[i].modifier,
                  obj->eqaffbit, obj->eqaff2bit, TRUE);
}


ASPELL(spell_armor_golem)
{
  int armor;
  AffType af;
  CharData *golem;
  ObjData *head, *body, *arms, *legs, *hands, *feet;
  char descbuf[MAX_STRING_LENGTH];
 
  for (obj = world[InRoom(ch)].contents; obj; obj = obj->next_content)
    if (IS_ARMOR(obj)) {
      if (CAN_WEAR(obj, ITEM_WEAR_HEAD))
        if (!head) {
          head = obj;
          continue;
        }

      if (CAN_WEAR(obj, ITEM_WEAR_BODY))
        if (!body) {
          body = obj;
          continue;
        }

      if (CAN_WEAR(obj, ITEM_WEAR_ARMS))
        if (!arms) {
          arms = obj;
          continue;
        }

      if (CAN_WEAR(obj, ITEM_WEAR_LEGS))
        if (!legs) {
          legs = obj;
          continue;
        }

      if (CAN_WEAR(obj, ITEM_WEAR_FEET))
        if (!feet) {
          feet = obj;
          continue;
        }

      if (CAN_WEAR(obj, ITEM_WEAR_HANDS))
        if (!hands) { 
          hands = obj;
          continue;
        }
    }

  if (!head || !body || !arms || !legs || !hands || !feet) {
    SendChar("You do not have all of the components necessary to complete "
             "the spell.\r\n", ch);
    return SPELL_FAILED;
  }
   
  if (!(golem = read_mobile(740, VIRTUAL))) {
    SendChar("There seems to be a problem with reality. Consult a god.\r\n", ch);
    return SPELL_FAILED;
  }

  AC(golem) = 100;

  // Values are in compliance with apply_ac() in affect.c
  armor += head->value[0] * 2;
  armor += body->value[0] * 3;
  armor += arms->value[0] * 1;
  armor += legs->value[0] * 2;
  armor += hands->value[0] * 1;
  armor += feet->value[0] * 1;

  AC(golem) -= armor;

  MaxHits(golem) = dice((armor / 4), 10) + (Level(ch) * 4);
  Hits(golem) = MaxHits(golem);

  MaxMoves(golem) = MaxMoves(ch);
  Moves(golem) = MaxMoves(golem);
  
  Level(golem) = (armor / 4) + (Level(ch) / 4);

  NewAffect(&af);
  af.type = SPELL_ARMOR_GOLEM;
  af.bitvector = AFF_CHARM;
  af.duration = -1;
  affect_to_char(golem, &af);

  ObjAffToChar(golem, head);
  ObjAffToChar(golem, body);
  ObjAffToChar(golem, arms);
  ObjAffToChar(golem, legs);
  ObjAffToChar(golem, hands);
  ObjAffToChar(golem, feet);

  sprintf(descbuf, "You see a creature formed from an assortment of armor "
                   "that was bound together and imbued with magical life."
                   "  Its head appears to be %s, and its body was fashioned "
                   "from %s.  Its arms are made from %s, while its legs were "
                   "formed from %s.  Its hands are %s, and it walks by means "
                   "of %s.\r\n",
          head->shdesc, body->shdesc, arms->shdesc, legs->shdesc,
          hands->shdesc, feet->shdesc);

  golem->player.description = STR_DUP(descbuf);

  act("$n waves $s hand over a pile of armor.", FALSE, ch, 0, 0, TO_ROOM);
  act("You wave your hands over the pile of armor.", FALSE, ch, 0, 0, TO_CHAR);
  act("The armor flys together to form a humanoid figure!", FALSE, ch, 0, 0,
      TO_ROOM);
  
  act("$N is quickly assembled from the pieces", FALSE, ch, 0, golem, TO_CHAR);
  
  extract_obj(head);
  extract_obj(body);
  extract_obj(arms);
  extract_obj(legs);
  extract_obj(hands);
  extract_obj(feet);

  char_to_room(golem, InRoom(ch));
  add_follower(golem, ch);

  return SPELL_NORMAL;
}


ASPELL(spell_forceful_wind)
{
  CharData *temp;

  if (!Adjacents(ch)) {
    SendChar("There is nothing here to blow down...\r\n", ch);
    return SPELL_FAILED;
  }

  SendChar("You inhale deeply, and exhale a forceful wind!\r\n", ch);
  act("$n inhales deeply, and exhales a forceful wind!",
      FALSE, ch, 0, 0, TO_ROOM);
    
  for (victim = Adjacents(ch); victim; victim = temp) {
    temp = NextInRoom(victim);

    if (ch != victim) {
      if (!InSameGroup(ch, victim)) {
        if (saves_spell(victim, SPELL_FORCEFUL_WIND)) {
          SendChar("You feel a slight breeze as the wind blows past.\r\n",
                   victim);
          continue;
        }

        VWAIT(victim) = 2;
        WAIT_STATE(victim, PULSE_VIOLENCE * 2);

        Position(victim) = POS_SITTING;
        act("$n is sent sprawling.", FALSE, victim, 0, 0, TO_ROOM);
      } else
        SendChar("You feel a slight breeze as the wind blows past.\r\n",
                 victim);
    }
  }
  return SPELL_NORMAL;
}


ASPELL(self_keeping)
{
 return SPELL_FAILED;
}