Engine:
authorsmxx
Mon, 01 Mar 2010 22:25:57 +0000
changeset 2908 bd1909984a09
parent 2907 b29c1358498d
child 2909 f982208e7f21
Engine: * Added damage modifier to game mode/rule display * Added low gravity activation sound
hedgewars/HHHandlers.inc
hedgewars/uConsts.pas
hedgewars/uLocale.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Locale/de.txt
share/hedgewars/Data/Locale/en.txt
share/hedgewars/Data/Sounds/lowgravity.ogg
--- a/hedgewars/HHHandlers.inc	Mon Mar 01 19:57:09 2010 +0000
+++ b/hedgewars/HHHandlers.inc	Mon Mar 01 22:25:57 2010 +0000
@@ -192,7 +192,10 @@
                         amDrill: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
                       amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun,  0, xx * _0_5, yy * _0_5, 0);
                     amJetpack: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtJetpack, 0, _0, _0, 0);
-                      amLowGravity: cGravity:= cMaxWindSpeed / 2;
+                      amLowGravity: begin
+                                    PlaySound(sndLowGravity);
+                                    cGravity:= cMaxWindSpeed / 2
+                                    end;
                       amExtraDamage: cDamageModifier:= _1_5;
                       amInvulnerable: Invulnerable:= true;
                       amExtraTime: TurnTimeLeft:= TurnTimeLeft + 30000;
--- a/hedgewars/uConsts.pas	Mon Mar 01 19:57:09 2010 +0000
+++ b/hedgewars/uConsts.pas	Mon Mar 01 22:25:57 2010 +0000
@@ -104,9 +104,9 @@
 			sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack,
 			sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat,
 			sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
-			sndHomerun, sndMolotov, sndWalking, sndCover, sndUhOh,
-			sndOops, sndNooo, sndHello, sndRopeShot, sndRopeAttach,
-			sndRopeRelease, sndSwitchHog, sndVictory, sndSniperReload, sndSteps);
+			sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops,
+			sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease,
+			sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity);
 
 	TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer,
 			amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip,
@@ -290,6 +290,7 @@
 	tfIgnoreDelays  = $00000008;
 	tfTargetRespawn = $00000010;
 	
+	gfAny            = $FFFFFFFF;
 	gfForts          = $00000001;
 	gfMultiWeapon    = $00000002;
 	gfSolidLand      = $00000004;
@@ -754,7 +755,6 @@
 			(FileName:         'shutterclick.ogg'; Path: ptSounds),// sndShutter
 			(FileName:              'homerun.ogg'; Path: ptSounds),// sndHomerun
 			(FileName:              'molotov.ogg'; Path: ptSounds),// sndMolotov
-			(FileName:              ''; Path: ptSounds),// sndWalking
 			(FileName:            'Takecover.ogg'; Path: ptVoices),// sndCover
 			(FileName:                'Uh-oh.ogg'; Path: ptVoices),// sndUhOh
 			(FileName:                 'Oops.ogg'; Path: ptVoices),// sndOops
@@ -766,7 +766,8 @@
 			(FileName:            'switchhog.ogg'; Path: ptSounds),// sndSwitchHog
 			(FileName:              'victory.ogg'; Path: ptVoices),// sndVictory
 			(FileName:         'sniperreload.ogg'; Path: ptSounds),// sndSniperReload
-			(FileName:                'steps.ogg'; Path: ptSounds) // sndSteps
+			(FileName:                'steps.ogg'; Path: ptSounds),// sndSteps
+			(FileName:           'lowgravity.ogg'; Path: ptSounds) // sndLowGravity
 			);
 
 	Ammoz: array [TAmmoType] of record
--- a/hedgewars/uLocale.pas	Mon Mar 01 19:57:09 2010 +0000
+++ b/hedgewars/uLocale.pas	Mon Mar 01 22:25:57 2010 +0000
@@ -40,7 +40,8 @@
 
 	TGoalStrId = (gidCaption, gidSubCaption, gidForts, gidLowGravity, gidInvulnerable,
 			gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery,
-			gidSolidLand, gidSharedAmmo, gidMineTimer, gidNoMineTimer, gidRandomMineTimer);
+			gidSolidLand, gidSharedAmmo, gidMineTimer, gidNoMineTimer, gidRandomMineTimer,
+			gidDamageModifier);
 
 const MAX_EVENT_STRINGS = 100;
 var trammo: array[TAmmoStrId] of ansistring;
--- 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);
 
--- a/share/hedgewars/Data/Locale/de.txt	Mon Mar 01 19:57:09 2010 +0000
+++ b/share/hedgewars/Data/Locale/de.txt	Mon Mar 01 22:25:57 2010 +0000
@@ -1,4 +1,4 @@
-; German locale
+; German locale
 
 00:00=Granate
 00:01=Splittergranate
@@ -260,4 +260,5 @@
 05:11=Gemeinsames Arsenal: Alle Teams gleicher Farbe teilen sich ihr Arsenal
 05:12=Minenzünder: Minen explodieren nach %1 Sekunde(n)
 05:13=Minenzünder: Minen explodieren sofort
-05:14=Minenzünder: Minen explodieren nach 0 - 4 Sekunden
\ No newline at end of file
+05:14=Minenzünder: Minen explodieren nach 0 - 4 Sekunden
+05:15=Schadensmodifikator: Alle Waffen verursachen %1 % Schaden
--- a/share/hedgewars/Data/Locale/en.txt	Mon Mar 01 19:57:09 2010 +0000
+++ b/share/hedgewars/Data/Locale/en.txt	Mon Mar 01 22:25:57 2010 +0000
@@ -460,6 +460,7 @@
 05:09=Artillery: Hogs can't walk to change position
 05:10=Indestructible Terrain: Most weapons won't destroy terrain
 05:11=Shared Ammo: All teams of the same color share their ammunition
-05:12=Mine timers: Mines will detonate after %1 second(s)
-05:13=Mine timers: Mines will detonate instantly
-05:14=Mine timers: Mines will detonate after 0 - 4 seconds
\ No newline at end of file
+05:12=Mine Timers: Mines will detonate after %1 second(s)
+05:13=Mine Timers: Mines will detonate instantly
+05:14=Mine Timers: Mines will detonate after 0 - 4 seconds
+05:15=Damage Modifier: All weapons will do %1% damage
Binary file share/hedgewars/Data/Sounds/lowgravity.ogg has changed