hedgewars/uGearsHandlersMess.pas
changeset 11277 d63ef6afabe3
parent 11236 413714b915d2
child 11286 9bd2acb1b577
equal deleted inserted replaced
11275:13ce106c8836 11277:d63ef6afabe3
  5253                     // do 1/2 current hp worth of damage if extra damage is enabled (1/3 damage if not)
  5253                     // do 1/2 current hp worth of damage if extra damage is enabled (1/3 damage if not)
  5254                     if cDamageModifier > _1 then
  5254                     if cDamageModifier > _1 then
  5255                         d:= 2
  5255                         d:= 2
  5256                     else
  5256                     else
  5257                         d:= 3;
  5257                         d:= 3;
  5258                     // always round up
  5258 
  5259                     if dmg mod d > 0 then
  5259                     // always rounding down
  5260                         dmg:= dmg div d + 1
  5260                     dmg:= dmg div d;
  5261                     else
  5261 
  5262                         dmg:= dmg div d;
  5262                     if dmg > 0 then
  5263 
  5263                         ApplyDamage(tmp, CurrentHedgehog, dmg, dsUnknown);
  5264                     ApplyDamage(tmp, CurrentHedgehog, dmg, dsUnknown);
       
  5265                     end;
  5264                     end;
  5266                 end;
  5265                 end;
  5267 
  5266 
  5268             if (tmp^.Kind <> gtHedgehog) or (dmg > 0) or (tmp^.Health > tmp^.Damage) then
  5267             if (tmp^.Kind <> gtHedgehog) or (dmg > 0) or (tmp^.Health > tmp^.Damage) then
  5269                 begin
  5268                 begin