Difference for server/spell_util.c from version 1.86 to 1.87


version 1.86 version 1.87
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_util_c =   * static char *rcsid_spell_util_c =
  *   "$Id: spell_util.c,v 1.86 2004/04/18 07:59:36 mwedel Exp $";   *   "$Id: spell_util.c,v 1.87 2004/05/11 06:57:38 mwedel Exp $";
  */   */
   
   
Line 912
 
Line 912
  *    parameters to a spell (eg, item to create, information for marking runes,   *    parameters to a spell (eg, item to create, information for marking runes,
  *    etc.   *    etc.
  * returns 1 on successful cast, or 0 on error.  These values should really   * returns 1 on successful cast, or 0 on error.  These values should really
  * be swapped, so that 0 is sucessful, and non zero is failure, with a code   * be swapped, so that 0 is successful, and non zero is failure, with a code
  * of what it failed.   * of what it failed.
  *   *
  * Note that this function is really a dispatch routine that calls other   * Note that this function is really a dispatch routine that calls other
Line 1007
 
Line 1007
  if (settings.casting_time == TRUE) {   if (settings.casting_time == TRUE) {
      op->casting_time = -1;       op->casting_time = -1;
  }   }
  return(random_roll(1, SP_level_spellpoint_cost(caster,spell_ob, SPELL_GRACE), op, PREFER_LOW));   op->stats.grace -= random_roll(1, SP_level_spellpoint_cost(caster,spell_ob, SPELL_GRACE), op, PREFER_LOW);
    return 0;
      } else if (spell_ob->stats.sp) {       } else if (spell_ob->stats.sp) {
  int failure = random_roll(0, 199, op, PREFER_HIGH) -   int failure = random_roll(0, 199, op, PREFER_HIGH) -
      op->contr->encumbrance +op->level - spell_ob->level +35;       op->contr->encumbrance +op->level - spell_ob->level +35;
Line 1019
 
Line 1020
    SP_level_spellpoint_cost(caster,spell_ob, SPELL_MANA),     SP_level_spellpoint_cost(caster,spell_ob, SPELL_MANA),
    skill);     skill);
      op->contr->shoottype = old_shoottype;       op->contr->shoottype = old_shoottype;
      return(random_roll(0, SP_level_spellpoint_cost(caster,spell_ob, SPELL_MANA), op, PREFER_LOW));       op->stats.sp -= random_roll(0, SP_level_spellpoint_cost(caster,spell_ob, SPELL_MANA), op, PREFER_LOW);
        return 0;
  }   }
      }       }
  }   }


Legend:
line(s) removed in v.1.86 
line(s) changed
 line(s) added in v.1.87

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:50