Resurrector weapon: do not make it end turn, add description,
authorTobias Neumann <mail@tobias-neumann.eu>
Thu, 14 Oct 2010 16:01:43 +0200
changeset 3975 3f605cca9215
parent 3973 0d1a420531ef
child 3976 abaf741a4e21
Resurrector weapon: do not make it end turn, add description, add doStepHedgehogMoving while resurrecting
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
share/hedgewars/Data/Locale/en.txt
--- a/hedgewars/GSHandlers.inc	Wed Oct 13 00:57:20 2010 +0200
+++ b/hedgewars/GSHandlers.inc	Thu Oct 14 16:01:43 2010 +0200
@@ -4100,6 +4100,8 @@
     DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF,
             $FF);
 
+    doStepHedgehogMoving(hh^.Gear);
+
     if ((Gear^.Message and gmUp) <> 0) then begin
         if (GameTicks and $F) <> 0 then exit;
     end else begin
@@ -4108,9 +4110,14 @@
 
     graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius);
 
+    if Length(graves) = 0 then begin
+        Gear^.Timer := 250;
+        Gear^.doStep := @doStepIdle;
+        exit;
+    end;
+
     if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) then begin
         i := getRandom(Length(graves));
-        writeln(i);
         dec(hh^.Gear^.Health);
         inc(graves[i]^.Health);
 {-for i:= 0 to High(graves) do begin
--- a/hedgewars/uConsts.pas	Wed Oct 13 00:57:20 2010 +0200
+++ b/hedgewars/uConsts.pas	Thu Oct 14 16:01:43 2010 +0200
@@ -2180,7 +2180,7 @@
             NameTex: nil;
             Probability: 0;
             NumberInCase: 1;
-            Ammo: (Propz: ammoprop_NoCrosshair;
+            Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_NoRoundEndHint;
                 Count: 1;
                 NumPerTurn: 0;
                 Timer: 0;
--- a/share/hedgewars/Data/Locale/en.txt	Wed Oct 13 00:57:20 2010 +0200
+++ b/share/hedgewars/Data/Locale/en.txt	Thu Oct 14 16:01:43 2010 +0200
@@ -430,6 +430,7 @@
 03:46=Hot Hot Hot!
 03:47=Stick these somewhere useful!
 03:48=It's Hammer time!
+03:49=Does what you guess
 
 ; Weapon Descriptions (use | as line breaks)
 04:00=Attack your enemies using a simple grenade.|It will explode once its timer reaches zero.|1-5: Set grenade's timer|Attack: Hold to throw with more power
@@ -481,6 +482,7 @@
 04:46=Cover your foes with sizzling liquid flame.|Heartwarming!|Attack: Activate|Up/Down: Continue aiming|Left/Right: Modify spitting power
 04:47=Double the fun with two spiky, sneaky, sticky mines.|Set up a chain reaction or defend yourself (or both!)|Attack: Hold to shoot with more power (twice)
 04:48=Why should the moles get all the abuse?|Wacking a hog can be just as fun! A good|blow from this hammer will shave off one|third of a hog's health and plunge them|underground.|Attack: Activate
+04:49=Resurrect your friends!|But beware that this also resurrects your foes.|Attack: Keep attack pressed to resurrect slowly|Up: Accelerate resurrection
 
 ; Game goal strings
 05:00=Game Modes