inactivate sudden death if both health decrease and water rise is 0 and lower sudden death turns to 50 again
authorHenek
Mon, 08 Nov 2010 22:12:14 +0100
changeset 4215 36632d5b8492
parent 4214 a362676dec6d
child 4216 184181604092
child 4217 721bfa5f4f31
inactivate sudden death if both health decrease and water rise is 0 and lower sudden death turns to 50 again
QTfrontend/ammoSchemeModel.cpp
QTfrontend/pages.cpp
hedgewars/uGears.pas
--- a/QTfrontend/ammoSchemeModel.cpp	Mon Nov 08 14:24:31 2010 -0500
+++ b/QTfrontend/ammoSchemeModel.cpp	Mon Nov 08 22:12:14 2010 +0100
@@ -416,7 +416,7 @@
         << QVariant(100)           // damage modfier 22
         << QVariant(9999)          // turn time      23
         << QVariant(100)           // init health    24
-        << QVariant(999)           // sudden death   25
+        << QVariant(15)            // sudden death   25
         << QVariant(5)             // case prob      26
         << QVariant(3)             // mines time     27
         << QVariant(5)             // mines number   28
@@ -424,8 +424,8 @@
         << QVariant(2)             // explosives     30
         << QVariant(35)            // health case pct 31
         << QVariant(30)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(0)             // water rise amt 33
+        << QVariant(0)             // health dec amt 34
         ;
 
     schemes.append(defaultScheme);
--- a/QTfrontend/pages.cpp	Mon Nov 08 14:24:31 2010 -0500
+++ b/QTfrontend/pages.cpp	Mon Nov 08 22:12:14 2010 +0100
@@ -1617,7 +1617,7 @@
     l->setPixmap(QPixmap(":/res/iconSuddenDeath.png"));
     glBSLayout->addWidget(l,3,1,1,1);
     SB_SuddenDeath = new QSpinBox(gbBasicSettings);
-    SB_SuddenDeath->setRange(0, 999);
+    SB_SuddenDeath->setRange(0, 50);
     SB_SuddenDeath->setValue(15);
     SB_SuddenDeath->setSingleStep(3);
     glBSLayout->addWidget(SB_SuddenDeath,3,2,1,1);
--- a/hedgewars/uGears.pas	Mon Nov 08 14:24:31 2010 -0500
+++ b/hedgewars/uGears.pas	Mon Nov 08 22:12:14 2010 +0100
@@ -812,20 +812,23 @@
             inc(step)
             end;
     stHealth: begin
-            if (TotalRounds = cSuddenDTurns) and not SuddenDeathDmg and not isInMultiShoot then
+            if (cWaterRise <> 0) or (cHealthDecrease <> 0) then
                 begin
-                SuddenDeathDmg:= true;
-                AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
-                playSound(sndSuddenDeath)
-                end
-            else if (TotalRounds < cSuddenDTurns) and not isInMultiShoot then
-                begin
-                i:= cSuddenDTurns - TotalRounds;
-                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);
+                if (TotalRounds = cSuddenDTurns) and not SuddenDeathDmg and not isInMultiShoot then
+                    begin
+                    SuddenDeathDmg:= true;
+                    AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
+                    playSound(sndSuddenDeath)
+                    end
+                else if (TotalRounds < cSuddenDTurns) and not isInMultiShoot then
+                    begin
+                    i:= cSuddenDTurns - TotalRounds;
+                    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;
                 end;
             if bBetweenTurns
                 or isInMultiShoot