Cleaver tweaks based on feedback. Nerf damage, shrink radius. This means cleaver will embed into ground quite a bit further.
authornemo
Sun, 10 Feb 2013 09:50:09 -0500
changeset 8494 53b91a602955
parent 8493 1a84f8b08ca7
child 8495 f1223400b473
Cleaver tweaks based on feedback. Nerf damage, shrink radius. This means cleaver will embed into ground quite a bit further.
hedgewars/GSHandlers.inc
hedgewars/uGearsHedgehog.pas
hedgewars/uGearsList.pas
--- 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)
--- 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;
--- 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;