# HG changeset patch
# User nemo
# Date 1360507809 18000
# Node ID 53b91a602955dda596067cf2d551e7bcc4b80af4
# Parent  1a84f8b08ca7d3f7d5d21f51274655b7f1d1d50d
Cleaver tweaks based on feedback.  Nerf damage, shrink radius.  This means cleaver will embed into ground quite a bit further.

diff -r 1a84f8b08ca7 -r 53b91a602955 hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sun Feb 10 09:22:29 2013 -0500
+++ b/hedgewars/GSHandlers.inc	Sun Feb 10 09:50:09 2013 -0500
@@ -5276,7 +5276,7 @@
 var   a: real;
 begin
     // Gear is shrunk so it can actually escape the hog without carving into the terrain
-    if (Gear^.Radius = 6) and (Gear^.CollisionMask = $FFFF) then Gear^.Radius:= 16;
+    if (Gear^.Radius = 4) and (Gear^.CollisionMask = $FFFF) then Gear^.Radius:= 7;
     if Gear^.Damage > 100 then Gear^.CollisionMask:= 0
     else if Gear^.Damage > 30 then
         if GetRandom(max(4,18-Gear^.Damage div 10)) < 3 then Gear^.CollisionMask:= 0;
@@ -5285,8 +5285,9 @@
     if (Gear^.State and gstMoving <> 0) and (Gear^.State and gstCollision = 0) then
         begin
         DeleteCI(Gear);
+        Gear^.Radius:= 7;
         // used for damage and impact calc. needs balancing I think
-        Gear^.Health:= hwRound(hwSqr((hwAbs(Gear^.dY)+hwAbs(Gear^.dX))*_4));
+        Gear^.Health:= hwRound(hwSqr((hwAbs(Gear^.dY)+hwAbs(Gear^.dX))*_3_2));
         doStepFallingGear(Gear);
         AllInactive := false;
         a:= Gear^.DirAngle;
@@ -5320,9 +5321,8 @@
         Gear^.dX:= _0;
         Gear^.dY:= _0;
         Gear^.State:= Gear^.State and (not gstMoving) or gstCollision;
-        Gear^.Radius:= 20;
+        Gear^.Radius:= 16;
         if Gear^.Health > 0 then AmmoShove(Gear, Gear^.Health, 0);
-        Gear^.Radius:= 16;
         Gear^.Health:= 0;
         Gear^.Timer:= 500;
         AddGearCI(Gear)
diff -r 1a84f8b08ca7 -r 53b91a602955 hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Sun Feb 10 09:22:29 2013 -0500
+++ b/hedgewars/uGearsHedgehog.pas	Sun Feb 10 09:50:09 2013 -0500
@@ -279,7 +279,7 @@
                         amKnife: begin 
                                  newGear:= AddGear(hwRound(lx), hwRound(ly), gtKnife,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
                                  newGear^.State:= newGear^.State or gstMoving; 
-                                 newGear^.Radius:= 6 // temporarily shrink so it doesn't instantly embed in the ground
+                                 newGear^.Radius:= 4 // temporarily shrink so it doesn't instantly embed in the ground
                                  end;
                        amDEagle: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0);
                       amSineGun: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSineGunShot, 0, xx * _0_5, yy * _0_5, 0);
@@ -1015,6 +1015,8 @@
 
 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
     begin
+    if (Hedgehog^.CurAmmoType = amKnife) then
+       LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat);
     if TagTurnTimeLeft = 0 then
         TagTurnTimeLeft:= TurnTimeLeft;
     TurnTimeLeft:= 0;
diff -r 1a84f8b08ca7 -r 53b91a602955 hedgewars/uGearsList.pas
--- a/hedgewars/uGearsList.pas	Sun Feb 10 09:22:29 2013 -0500
+++ b/hedgewars/uGearsList.pas	Sun Feb 10 09:50:09 2013 -0500
@@ -327,7 +327,7 @@
                 end;
        gtKnife: begin
                 gear^.Density:= _4;
-                gear^.Radius:= 16
+                gear^.Radius:= 7
                 end;
         gtCase: begin
                 gear^.ImpactSound:= sndGraveImpact;