Difference for server/attack.c from version 1.19 to 1.20


version 1.19 version 1.20
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_attack_c =   * static char *rcsid_attack_c =
  *   "$Id: attack.c,v 1.19 2000/11/08 20:17:41 avogl Exp $";   *   "$Id: attack.c,v 1.20 2000/11/17 11:16:45 peterm Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 46
 
Line 46
  * any further action (like destroying the item).   * any further action (like destroying the item).
  */   */
   
 int did_make_save_item(object *op, int type) {  int did_make_save_item(object *op, int type,object *originator) {
   int i, saves=0,materials=0, orig_type=type;    int i, saves=0,materials=0, orig_type=type;
   
   type &= (~op->immune & ~op->protected);    type &= (~op->immune & ~op->protected);
Line 75
 
Line 75
       materials++;        materials++;
       if(RANDOM()%20+1>=material[i].save[type]-op->magic)        if(RANDOM()%20+1>=material[i].save[type]-op->magic)
  saves++;   saves++;
         /* if the attack is too weak */
         if((20-material[i].save[type])/3 > originator->stats.dam) saves++;
     }      }
   if (saves==materials || materials==0) return 1;    if (saves==materials || materials==0) return 1;
   if ((saves==0) || (RANDOM()%materials+1 > saves)) return 0;    if ((saves==0) || (RANDOM()%materials+1 > saves)) return 0;
Line 88
 
Line 90
   
 void save_throw_object (object *op, int type, object *originator)  void save_throw_object (object *op, int type, object *originator)
 {  {
     if ( ! did_make_save_item (op, type))      if ( ! did_make_save_item (op, type,originator))
     {      {
  object *env=op->env;   object *env=op->env;
  int x=op->x,y=op->y;   int x=op->x,y=op->y;
Line 268
 
Line 270
       retflag |=1;        retflag |=1;
       if (was_destroyed (op, op_tag))        if (was_destroyed (op, op_tag))
         break;          break;
     } else if (tmp->material) {      } else if (tmp->material && op->stats.dam > 0) {
       save_throw_object(tmp,type,op);        save_throw_object(tmp,type,op);
       if (was_destroyed (op, op_tag))        if (was_destroyed (op, op_tag))
         break;          break;


Legend:
line(s) removed in v.1.19 
line(s) changed
 line(s) added in v.1.20

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