Engine:
authorsmxx
Sat, 10 Apr 2010 19:04:39 +0000
changeset 3331 8e05feb871c3
parent 3330 987ec27b6042
child 3332 3c90a923f156
Engine: * Moved "new crate" messages to group AmmoInfo * Show Sudden Death countdown * Fixed Sudden Death round counting (so '15 rounds' will really be 15 rounds, not 16)
hedgewars/uGears.pas
hedgewars/uLocale.pas
share/hedgewars/Data/Locale/de.txt
share/hedgewars/Data/Locale/en.txt
--- a/hedgewars/uGears.pas	Sat Apr 10 01:09:29 2010 +0000
+++ b/hedgewars/uGears.pas	Sat Apr 10 19:04:39 2010 +0000
@@ -625,6 +625,8 @@
             stAfterDelay, stChWin, stWater, stChWin2, stHealth,
             stSpawn, stNTurn) = stDelay;
 var Gear, t: PGear;
+    i: LongInt;
+    s: shortstring;
 begin
 PrvInactive:= AllInactive;
 AllInactive:= true;
@@ -697,7 +699,7 @@
             end;
     stWater: if (not bBetweenTurns) and (not isInMultiShoot) then
                 begin
-                if TotalRounds = cSuddenDTurns + 2 then bWaterRising:= true;
+                if TotalRounds = cSuddenDTurns + 1 then bWaterRising:= true;
 
                 if bWaterRising then
                 AddGear(0, 0, gtWaterUp, 0, _0, _0, 0);
@@ -709,13 +711,21 @@
             inc(step)
             end;
     stHealth: begin
-            if (TotalRounds = cSuddenDTurns) and (cHealthDecrease = 0) then
+            if (TotalRounds = cSuddenDTurns - 1) and (cHealthDecrease = 0) then
                 begin
                 cHealthDecrease:= 5;
                 AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
                 playSound(sndSuddenDeath)
+                end
+            else if (TotalRounds < cSuddenDTurns - 1) then
+                begin
+                i:= cSuddenDTurns - TotalRounds - 1;
+                s:= inttostr(i);
+                if i = 1 then
+                    AddCaption(trmsg[sidRoundSD], cWhiteColor, capgrpGameState)
+                else if i in [2, 5, 10, 15, 20, 25, 50, 100] then
+                    AddCaption(Format(trmsg[sidRoundsSD], s), cWhiteColor, capgrpGameState);
                 end;
-
             if bBetweenTurns
                 or isInMultiShoot
                 or (TotalRounds = -1) then inc(step)
@@ -2203,7 +2213,7 @@
     FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
     FollowGear^.Health:= 25;
     FollowGear^.Pos:= posCaseHealth;
-    AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpGameState);
+    AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
     end
 else if (t<a+h) then
     begin
@@ -2223,7 +2233,7 @@
           end;
         FollowGear^.Pos:= posCaseAmmo;
         FollowGear^.State:= Longword(i);
-        AddCaption(GetEventString(eidNewAmmoPack), cWhiteColor, capgrpGameState);
+        AddCaption(GetEventString(eidNewAmmoPack), cWhiteColor, capgrpAmmoInfo);
         end
     end
 else
@@ -2244,7 +2254,7 @@
           end;
         FollowGear^.Pos:= posCaseUtility;
         FollowGear^.State:= Longword(i);
-        AddCaption(GetEventString(eidNewUtilityPack), cWhiteColor, capgrpGameState);
+        AddCaption(GetEventString(eidNewUtilityPack), cWhiteColor, capgrpAmmoInfo);
         end
     end;
 
--- a/hedgewars/uLocale.pas	Sat Apr 10 01:09:29 2010 +0000
+++ b/hedgewars/uLocale.pas	Sat Apr 10 19:04:39 2010 +0000
@@ -32,7 +32,7 @@
 
     TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
-            sidNoEndTurn, sidNotYetAvailable);
+            sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD);
 
     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
             eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf,
--- a/share/hedgewars/Data/Locale/de.txt	Sat Apr 10 01:09:29 2010 +0000
+++ b/share/hedgewars/Data/Locale/de.txt	Sat Apr 10 19:04:39 2010 +0000
@@ -1,4 +1,4 @@
-; German locale
+; German locale
 
 00:00=Granate
 00:01=Splittergranate
@@ -57,6 +57,8 @@
 01:11=Waffe oder Werkzeug noch nicht verfügbar!
 01:10=Benutzung beendet nicht die eigene Runde!
 01:11=Waffe oder Werkzeug noch nicht verfügbar!
+01:12=Letzte Runde bis zum Sudden Death!
+01:13=%1 Runden bis zum Sudden Death!
 
 ; Event messages
 ; Hog (%1) died
--- a/share/hedgewars/Data/Locale/en.txt	Sat Apr 10 01:09:29 2010 +0000
+++ b/share/hedgewars/Data/Locale/en.txt	Sat Apr 10 19:04:39 2010 +0000
@@ -55,6 +55,8 @@
 01:09=Synchronizing...
 01:10=Using this utility won't end your turn!
 01:11=This weapon or utility is not yet available!
+01:12=Last round till Sudden Death!
+01:13=%1 rounds till Sudden Death!
 
 ; Event messages
 ; Hog (%1) died