Difference for server/spell_attack.c from version 1.15 to 1.16


version 1.15 version 1.16
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_attack_c =   * static char *rcsid_spell_attack_c =
  *   "$Id: spell_attack.c,v 1.15 2004/06/11 07:23:43 mwedel Exp $";   *   "$Id: spell_attack.c,v 1.16 2004/08/14 09:48:40 ryo_saeba Exp $";
  */   */
   
   
Line 1417
 
Line 1417
  for (at=0; at < NROFATTACKS; at++)   for (at=0; at < NROFATTACKS; at++)
      if (spell->attacktype & (1 << at))       if (spell->attacktype & (1 << at))
  if (best_at == -1 || head->resist[at] > head->resist[best_at]) best_at = at;   if (best_at == -1 || head->resist[at] > head->resist[best_at]) best_at = at;
      }  
      if (best_at == -1) at=0;       if (best_at == -1) at=0;
      else {       else {
  if (head->resist[best_at] == 100) continue;   if (head->resist[best_at] == 100) continue;
Line 1425
 
Line 1425
      }       }
      at -= level / 5;       at -= level / 5;
      if (did_make_save(head, head->level, at)) continue;       if (did_make_save(head, head->level, at)) continue;
        }
           else    /* spell->attacktype */
               /*
                   Spell has no attacktype (charm & such), so we'll have a specific saving:
                    * if spell level < monster level, no go
                    * else, chance of effect = 20 + min( 50, 2 * ( spell level - monster level ) )
   
                   The chance will then be in the range [20-70] percent, not too bad.
   
                   This is required to fix the 'charm monster' abuse, where a player level 1 can
                   charm a level 125 monster...
   
                   Ryo, august 14th
               */
               {
               if ( head->level > level ) continue;
               if ( random_roll( 0, 100, caster, PREFER_LOW ) >= ( 20 + MIN( 50, 2 * ( level - head->level ) ) ) )
                   // Failed, no effect
                   continue;
               }
   
      /* Done with saving throw.  Now start effecting the monster */       /* Done with saving throw.  Now start effecting the monster */
   


Legend:
line(s) removed in v.1.15 
line(s) changed
 line(s) added in v.1.16

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