[CIRCLE][NEWBIE] Spell Force Bolt

From: Jason Benzin (benz0020@cs.fredonia.edu)
Date: 12/18/96


OKay, with all your help I managed to write a kinda neat "in my opinion 
:)" spell, force bolt.  Thought I'd share it with you, and ask what lines 
you would add to allow a multiple agrument that determines the direction
the mob will be thrown in.  Ie user defined "attempt" variable.  I 
asked this before, but didn't include the full code.

  
ASPELL(spell_force_bolt)
{
  int attempt, throw_how_far, was_smashed, i;
        
  was_smashed = 0;
            
  throw_how_far = GET_LEVEL(ch) / 20;
        
  if ((number(0,25) + throw_how_far) > GET_STR(victim))
    {
      act("$n resists the forcefull blow!", FALSE, victim, 0, 0, TO_ROOM);
      return;
    }
  
  attempt = number(0, NUM_OF_DIRS - 1);
  for (i = 1; i < throw_how_far; i++ )
    if (CAN_GO(victim, attempt))
      {
        act("$n is blasted clear into the next room!", FALSE, victim, 0, 
             0, TO_ROOM);
        do_simple_move(victim, attempt, FALSE);
      }
    else
      { 
        if (!was_smashed)
          {
            act("$n is blasted up against a wall, OUCH!", FALSE, victim, 
                 0, 0, TO_ROOM);
            was_smashed = 1;
          }
        damage(ch, victim, dice(3,8), 99);
      }
}


Thanx!!!

-Jason Benzin
                      '
                    (@ @)  
+----------------ooO'(_)'Ooo---------------------+

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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