Interposing Hand [by JTP94]
Snippet Posted Wednesday, August 12th @ 11:29:18 PM, by George Greer in the Skills dept.
Added Jul 6, 1998. Click the link below to read it or download it.

From: JTP94 <JTP94@AOL.COM>
Subject: Interposing hand spell

This is my version of the well known spell, I would like suggestions on
how to improve upon performance of this spell. Currently the mana is used
as a countdown to determine when the spell creature has run out of energy.
Problem I foresee is mana increasing spells I have will sustain this when
they are not meant to. Therefore I have devised a IS_A_SPELL Affect which
will be useable on NPC's so thats not a problem. Any other things that you
might be able to assist me with would be greatly appreciated.

#define MOB_INTERPOSER   16
ASPELL(spell_interposing_hand)
{
  struct char_data *mob;
  struct affected_type af;

  mob = read_mobile(MOB_INTERPOSER, VIRTUAL);
  GET_MAX_HIT(mob)  = GET_HIT(ch);
  GET_HIT(mob)      = GET_MAX_HIT(mob);
  GET_LEVEL(mob)    = GET_LEVEL(ch);
  GET_AC(mob)       = 0;
  GET_MAX_MANA(mob) = 3 * GET_LEVEL(ch); /* max is 35th level to increase */
  if (GET_MAX_MANA(mob) > 105)
    GET_MAX_MANA(mob) = 105;
  GET_MANA(mob) = GET_MAX_MANA(mob);

  char_to_room(mob, victim->in_room);
  IS_CARRYING_W(mob) = 1000;
  IS_CARRYING_N(mob) = 1000;
  remember(victim, mob);
  if (FIGHTING(victim))
   stop_fighting(victim);
  hit(mob, victim, TYPE_UNDEFINED);
}

One other thing this mob has a MOB_BLOCKER flag and it knows its victim to
block through MOB_MEMORY. I don't want this thing orderable like the
original spell it duplicates.


<< Innate Object Code [by Danny Jacobs] | Reply | View as text | Flattened | Interpreter Tree Search (commands) [by Angus] >>

 


Related Links
  download
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.