Difference for server/apply.c from version 1.106 to 1.107


version 1.106 version 1.107
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_apply_c =   * static char *rcsid_apply_c =
  *   "$Id: apply.c,v 1.106 2004/05/05 07:25:54 mwedel Exp $";   *   "$Id: apply.c,v 1.107 2004/05/08 13:38:05 ryo_saeba Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 675
 
Line 675
 {  {
     object *tmp;      object *tmp;
   
     if (armour->magic >= 5) {      if (armour->magic >= settings.armor_max_enchant) {
         new_draw_info(NDI_UNIQUE, 0,op,"This armour can not be enchanted any further.");          new_draw_info(NDI_UNIQUE, 0,op,"This armour can not be enchanted any further.");
  return 0;   return 0;
     }      }
Line 699
 
Line 699
   
     armour->magic++;      armour->magic++;
   
     ARMOUR_SPEED(armour)=(ARMOUR_SPEED(&armour->arch->clone)*(100+armour->magic*10))/100;      if ( !settings.armor_speed_linear )
     armour->weight = (armour->arch->clone.weight*(100-armour->magic*10))/100;          {
           int base = 100;
           int pow = 0;
           while ( pow < armour->magic )
               {
               base = base - ( base * settings.armor_speed_improvement ) / 100;
               pow++;
               }
   
           ARMOUR_SPEED( armour ) = ( ARMOUR_SPEED( &armour->arch->clone ) * base ) / 100;
           }
       else
           ARMOUR_SPEED( armour ) = ( ARMOUR_SPEED( &armour->arch->clone ) * ( 100 + armour->magic * settings.armor_speed_improvement ) )/100;
   
       if ( !settings.armor_weight_linear )
           {
           int base = 100;
           int pow = 0;
           while ( pow < armour->magic )
               {
               base = base - ( base * settings.armor_weight_reduction ) / 100;
               pow++;
               }
   
           armour->weight = ( armour->arch->clone.weight * base ) / 100;
           }
       else
           armour->weight = ( armour->arch->clone.weight * ( 100 - armour->magic * settings.armor_weight_reduction ) ) / 100;
   
       if ( armour->weight <= 0 )
           {
           LOG( llevInfo, "Warning: enchanted armours can have negative weight\n." );
           armour->weight = 1;
           }
   
     armour->item_power = get_power_from_ench(armour->arch->clone.item_power + armour->magic);      armour->item_power = get_power_from_ench(armour->arch->clone.item_power + armour->magic);
   
     if (op->type == PLAYER) {      if (op->type == PLAYER) {


Legend:
line(s) removed in v.1.106 
line(s) changed
 line(s) added in v.1.107

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