hedgewars/uWorld.pas
changeset 2908 bd1909984a09
parent 2905 f3c79f7193a9
child 2921 b7a636503298
--- a/hedgewars/uWorld.pas	Mon Mar 01 19:57:09 2010 +0000
+++ b/hedgewars/uWorld.pas	Mon Mar 01 22:25:57 2010 +0000
@@ -78,7 +78,7 @@
     g: ansistring;
 
     // helper functions to create the goal/game mode string
-    function AddGoal(s: ansistring; gf: LongInt; si: TGoalStrId; i: LongInt): ansistring;
+    function AddGoal(s: ansistring; gf: longword; si: TGoalStrId; i: LongInt): ansistring;
     var t: ansistring;
     begin
         if (GameFlags and gf) <> 0 then
@@ -89,7 +89,7 @@
         AddGoal:= s;
     end;
 
-    function AddGoal(s: ansistring; gf: LongInt; si: TGoalStrId): ansistring;
+    function AddGoal(s: ansistring; gf: longword; si: TGoalStrId): ansistring;
     begin
         if (GameFlags and gf) <> 0 then
             s:= s + trgoal[si] + '|';
@@ -117,8 +117,25 @@
    CurrentTeam:= ClansArray[0]^.Teams[0];
    end;
 
-// if special game flags are set, add them to the game mode notice window and then show it
+// if special game flags/settings are changed, add them to the game mode notice window and then show it
 g:= ''; // no text/things to note yet
+
+// modified damage modificator?
+if cDamagePercent <> 100 then
+	g:= AddGoal(g, gfAny, gidDamageModifier, cDamagePercent);
+
+// modified mine timers?
+if cMinesTime <> 3000 then
+	begin
+	if cMinesTime = 0 then
+		g:= AddGoal(g, gfMines, gidNoMineTimer)
+	else if cMinesTime < 0 then
+		g:= AddGoal(g, gfMines, gidRandomMineTimer)
+	else
+		g:= AddGoal(g, gfMines, gidMineTimer, cMinesTime div 1000);
+	end;
+
+// check different game flags
 g:= AddGoal(g, gfForts, gidForts); // forts?
 g:= AddGoal(g, gfLowGravity, gidLowGravity); // low gravity?
 g:= AddGoal(g, gfInvulnerable, gidInvulnerable); // invulnerability?
@@ -129,15 +146,7 @@
 g:= AddGoal(g, gfArtillery, gidArtillery); // artillery?
 g:= AddGoal(g, gfSolidLand, gidSolidLand); // solid land?
 g:= AddGoal(g, gfSharedAmmo, gidSharedAmmo); // shared ammo?
-if cMinesTime <> 3000 then // changed mine timer?
-	begin
-	if cMinesTime = 0 then
-		g:= AddGoal(g, gfMines, gidNoMineTimer)
-	else if cMinesTime < 0 then
-		g:= AddGoal(g, gfMines, gidRandomMineTimer)
-	else
-		g:= AddGoal(g, gfMines, gidMineTimer, cMinesTime div 1000);
-	end;
+
 // if the string has been set, show it for (default timeframe) seconds
 if g <> '' then ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);