experiment with air mines. thought they could make shoppa... interesting. ToDo: Allow mines to give up, tweak distances, real graphics, toggle for whether they can acquire a new target while they haven't given up.
authornemo
Fri, 16 Jan 2015 17:51:29 -0500
changeset 10789 acbf69e2e5cf
parent 10787 50a4cdeedb44
child 10790 7e8ea160152f
experiment with air mines. thought they could make shoppa... interesting. ToDo: Allow mines to give up, tweak distances, real graphics, toggle for whether they can acquire a new target while they haven't given up.
QTfrontend/weapons.h
hedgewars/uAIAmmoTests.pas
hedgewars/uConsts.pas
hedgewars/uGears.pas
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsHedgehog.pas
hedgewars/uGearsList.pas
hedgewars/uGearsRender.pas
hedgewars/uGearsUtils.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png
share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png
share/hedgewars/Data/Locale/en.txt
--- a/QTfrontend/weapons.h	Wed Jan 14 11:47:50 2015 +0300
+++ b/QTfrontend/weapons.h	Fri Jan 16 17:51:29 2015 -0500
@@ -22,60 +22,60 @@
 //structure------------------------------------------------------------------|
 
 
-#define AMMOLINE_DEFAULT_QT     "93919294221991210322351110012000000002111001010111110001"
-#define AMMOLINE_DEFAULT_PROB   "04050405416006555465544647765766666661555101011154111111"
-#define AMMOLINE_DEFAULT_DELAY  "00000000000002055000000400070040000000002200000006000200"
-#define AMMOLINE_DEFAULT_CRATE  "13111103121111111231141111111111111112111111011111111111"
+#define AMMOLINE_DEFAULT_QT     "939192942219912103223511100120000000021110010101111100010"
+#define AMMOLINE_DEFAULT_PROB   "040504054160065554655446477657666666615551010111541111111"
+#define AMMOLINE_DEFAULT_DELAY  "000000000000020550000004000700400000000022000000060002000"
+#define AMMOLINE_DEFAULT_CRATE  "131111031211111112311411111111111111121111110111111111111"
 
-#define AMMOLINE_CRAZY_QT       "99999999999999999929999999999999992999999999099999929991"
-#define AMMOLINE_CRAZY_PROB     "11111101111111111111111111111111111111111111011111111111"
-#define AMMOLINE_CRAZY_DELAY    "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_CRAZY_CRATE    "13111103121111111231141111111111111112111101011111111111"
+#define AMMOLINE_CRAZY_QT       "999999999999999999299999999999999929999999990999999299919"
+#define AMMOLINE_CRAZY_PROB     "111111011111111111111111111111111111111111110111111111111"
+#define AMMOLINE_CRAZY_DELAY    "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_CRAZY_CRATE    "131111031211111112311411111111111111121111010111111111111"
 
-#define AMMOLINE_PROMODE_QT     "90900090000000000000090000000000000000000000000000000000"
-#define AMMOLINE_PROMODE_PROB   "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_PROMODE_DELAY  "00000000000002055000000400070040000000002000000000000200"
-#define AMMOLINE_PROMODE_CRATE  "11111101111111111111111111111111111111111001011111111111"
+#define AMMOLINE_PROMODE_QT     "909000900000000000000900000000000000000000000000000000000"
+#define AMMOLINE_PROMODE_PROB   "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_PROMODE_DELAY  "000000000000020550000004000700400000000020000000000002000"
+#define AMMOLINE_PROMODE_CRATE  "111111011111111111111111111111111111111110010111111111111"
 
-#define AMMOLINE_SHOPPA_QT      "00000099000000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPA_PROB    "44444100442444022101121212224220000000020004000100110010"
-#define AMMOLINE_SHOPPA_DELAY   "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPA_CRATE   "11111101111111111111111111111111111111111011011111111110"
+#define AMMOLINE_SHOPPA_QT      "000000990000000000000000000000000000000000000000000000000"
+#define AMMOLINE_SHOPPA_PROB    "444441004424440221011212122242200000000200040001001100101"
+#define AMMOLINE_SHOPPA_DELAY   "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_SHOPPA_CRATE   "111111011111111111111111111111111111111110110111111111101"
 
-#define AMMOLINE_CLEAN_QT       "10100090000100000110000000000000000000000000000010000000"
-#define AMMOLINE_CLEAN_PROB     "04050405416006555465544647765766666661555101011154111211"
-#define AMMOLINE_CLEAN_DELAY    "00000000000000000000000000000000000000000000000000000200"
-#define AMMOLINE_CLEAN_CRATE    "13111103121111111231141111111111111112111111011111111111"
+#define AMMOLINE_CLEAN_QT       "101000900001000001100000000000000000000000000000100000000"
+#define AMMOLINE_CLEAN_PROB     "040504054160065554655446477657666666615551010111541112111"
+#define AMMOLINE_CLEAN_DELAY    "000000000000000000000000000000000000000000000000000002000"
+#define AMMOLINE_CLEAN_CRATE    "131111031211111112311411111111111111121111110111111111111"
 
-#define AMMOLINE_MINES_QT       "00000099000900000003000000000000000000000000000000000000"
-#define AMMOLINE_MINES_PROB     "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_MINES_DELAY    "00000000000002055000000400070040000000002000000006000200"
-#define AMMOLINE_MINES_CRATE    "11111101111111111111111111111111111111111111011111111111"
+#define AMMOLINE_MINES_QT       "000000990009000000030000000000000000000000000000000000000"
+#define AMMOLINE_MINES_PROB     "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_MINES_DELAY    "000000000000020550000004000700400000000020000000060002000"
+#define AMMOLINE_MINES_CRATE    "111111011111111111111111111111111111111111110111111111111"
 
-#define AMMOLINE_PORTALS_QT     "90000090020000000021000000000000001100000900000000000000"
-#define AMMOLINE_PORTALS_PROB   "04050405416006555465544647765766666661555101011154111211"
-#define AMMOLINE_PORTALS_DELAY  "00000000000002055000000400070040000000002000000006000200"
-#define AMMOLINE_PORTALS_CRATE  "13111103121111111231141111111111111112111111011111111111"
+#define AMMOLINE_PORTALS_QT     "900000900200000000210000000000000011000009000000000000000"
+#define AMMOLINE_PORTALS_PROB   "040504054160065554655446477657666666615551010111541112111"
+#define AMMOLINE_PORTALS_DELAY  "000000000000020550000004000700400000000020000000060002000"
+#define AMMOLINE_PORTALS_CRATE  "131111031211111112311411111111111111121111110111111111111"
 
-#define AMMOLINE_ONEEVERY_QT    "11111191111111111111111111111111111111111111111111111111"
-#define AMMOLINE_ONEEVERY_PROB  "11111101111111111111111111111111111111111111111111111111"
-#define AMMOLINE_ONEEVERY_DELAY "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_ONEEVERY_CRATE "11111101111111111111111111111111111111111111111111111111"
+#define AMMOLINE_ONEEVERY_QT    "111111911111111111111111111111111111111111111111111111111"
+#define AMMOLINE_ONEEVERY_PROB  "111111011111111111111111111111111111111111111111111111111"
+#define AMMOLINE_ONEEVERY_DELAY "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_ONEEVERY_CRATE "111111011111111111111111111111111111111111111111111111111"
 
-#define AMMOLINE_HIGHLANDER_QT    "11111191111111111111019111111111100101111101111011001101"
-#define AMMOLINE_HIGHLANDER_PROB  "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_HIGHLANDER_DELAY "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_HIGHLANDER_CRATE "00000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_HIGHLANDER_QT    "111111911111111111110191111111111001011111011110110011010"
+#define AMMOLINE_HIGHLANDER_PROB  "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_HIGHLANDER_DELAY "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_HIGHLANDER_CRATE "000000000000000000000000000000000000000000000000000000000"
 
-#define AMMOLINE_CONSTRUCTION_QT    "11000190000000100100000000000000000000000000000000000000"
-#define AMMOLINE_CONSTRUCTION_PROB  "11111101111111111111111111111111111111111111111111111111"
-#define AMMOLINE_CONSTRUCTION_DELAY "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_CONSTRUCTION_CRATE "11111101111111111111111111111111111111111111111111111111"
+#define AMMOLINE_CONSTRUCTION_QT    "110001900000001001000000000000000000000000000000000000000"
+#define AMMOLINE_CONSTRUCTION_PROB  "111111011111111111111111111111111111111111111111111111110"
+#define AMMOLINE_CONSTRUCTION_DELAY "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_CONSTRUCTION_CRATE "111111011111111111111111111111111111111111111111111111110"
 
-#define AMMOLINE_SHOPPAPRO_QT      "00000099000000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPAPRO_PROB    "44444000440444000000000000004000000000000000000000000000"
-#define AMMOLINE_SHOPPAPRO_DELAY   "00000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPAPRO_CRATE   "11111101111111111111111111111111111111111011011111111211"
+#define AMMOLINE_SHOPPAPRO_QT      "000000990000000000000000000000000000000000000000000000000"
+#define AMMOLINE_SHOPPAPRO_PROB    "444440004404440000000000000040000000000000000000000000000"
+#define AMMOLINE_SHOPPAPRO_DELAY   "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_SHOPPAPRO_CRATE   "111111011111111111111111111111111111111110110111111112110"
 
 
 //When adding new weapons also insert one element in cDefaultAmmos list (hwconsts.cpp.in)
--- a/hedgewars/uAIAmmoTests.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uAIAmmoTests.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -122,7 +122,8 @@
             (proc: nil;              flags: 0), // amLandGun
             (proc: nil;              flags: 0), // amIceGun
             (proc: nil;              flags: 0), // amKnife
-            (proc: nil;              flags: 0)  // amGirder
+            (proc: nil;              flags: 0), // amRubber
+            (proc: nil;              flags: 0)  // amAirMine
             );
 
 implementation
--- a/hedgewars/uConsts.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uConsts.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -231,6 +231,7 @@
     gstInvisible      = $00200000;
     gstSubmersible    = $00400000;
     gstFrozen         = $00800000;
+    gstNoGravity      = $01000000;
 
     // gear messages
     gmLeft           = $00000001;
--- a/hedgewars/uGears.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uGears.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -991,7 +991,8 @@
             @doStepIceGun,
             @doStepAddAmmo,
             @doStepGenericFaller,
-            @doStepKnife);
+            @doStepKnife,
+            @doStepAirMine);
 begin
     doStepHandlers:= handlers;
 
--- a/hedgewars/uGearsHandlersMess.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -57,6 +57,7 @@
 procedure doStepBlowTorchWork(Gear: PGear);
 procedure doStepBlowTorch(Gear: PGear);
 procedure doStepMine(Gear: PGear);
+procedure doStepAirMine(Gear: PGear);
 procedure doStepSMine(Gear: PGear);
 procedure doStepDynamite(Gear: PGear);
 procedure doStepRollingBarrel(Gear: PGear);
@@ -446,7 +447,8 @@
 
     if isFalling then
         begin
-        Gear^.dY := Gear^.dY + cGravity;
+        if Gear^.State and gstNoGravity = 0 then
+            Gear^.dY := Gear^.dY + cGravity;
         if (GameFlags and gfMoreWind) <> 0 then
             Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density
         end;
@@ -1661,6 +1663,7 @@
     Gear^.doStep := @doStepBlowTorchWork
 end;
 
+
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepMine(Gear: PGear);
 var vg: PVisualGear;
@@ -1749,6 +1752,109 @@
             Gear^.State := Gear^.State or gsttmpFlag;
 end;
 
+(*
+Just keeping track for my own benefit.
+Every second, locate new target.  Clear if target radius has been set to 0 or no target in range.
+Every... 16 milliseconds? Update vector to target.
+*)
+
+procedure doStepAirMine(Gear: PGear);
+var i,t,targDist,tmpDist: LongWord;
+    targ, tmpG: PGear;
+    trackSpeed, tX, tY: hwFloat;
+begin
+    if Gear^.dX.QWordValue > Gear^.Pos then
+         dec(Gear^.dX.QWordValue,Gear^.Pos)
+    else Gear^.dX:= _0;
+    if Gear^.dY.QWordValue > Gear^.Pos then
+         dec(Gear^.dY.QWordValue,Gear^.Pos)
+    else Gear^.dY:= _0;
+    doStepFallingGear(Gear);
+    if (Gear^.Angle = 0) or (Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.Gear = nil) then
+        begin
+        Gear^.Hedgehog:= nil;
+        targ:= nil;
+        end
+    else if Gear^.Hedgehog <> nil then
+        targ:= Gear^.Hedgehog^.Gear;
+    // todo, allow not finding new target, set timeout on target retention
+    if (Gear^.State and gsttmpFlag <> 0) and (Gear^.Angle > 0) and ((GameTicks and $FF) = 17) then // recheck hunted hog
+        begin
+        if targ <> nil then
+             targDist:= Distance(Gear^.X-targ^.X,Gear^.Y-targ^.Y).Round
+        else targDist:= 0;
+        for t:= 0 to Pred(TeamsCount) do
+            with TeamsArray[t]^ do
+                for i:= 0 to cMaxHHIndex do
+                    if Hedgehogs[i].Gear <> nil then
+                        begin
+                        tmpG:= Hedgehogs[i].Gear;
+                        tX:=Gear^.X-tmpG^.X;
+                        tY:=Gear^.Y-tmpG^.Y;
+                        if (Gear^.Angle = $FFFFFFFF) or
+                            ((tX.Round+tY.Round < Gear^.Angle) and
+                            (hwRound(hwSqr(tX) + hwSqr(tY)) < sqr(Gear^.Angle))) then
+                            begin
+                            if targ <> nil then tmpDist:= Distance(tX,tY).Round;
+                            if (targ = nil) or (tmpDist < targDist) then
+                                begin
+                                if targ = nil then targDist:= Distance(tX,tY).Round
+                                else targDist:= tmpDist;
+                                Gear^.Hedgehog:= @Hedgehogs[i];
+                                targ:= tmpG;
+                                end
+                            end
+                        end
+        end;
+    if targ <> nil then
+        begin
+        trackSpeed.QWordValue:= Gear^.Power;
+        if (Gear^.X < targ^.X) and (Gear^.dX < _0_1)  then
+             Gear^.dX:= Gear^.dX+trackSpeed
+        else if (Gear^.X > targ^.X) and (Gear^.dX > -_0_1) then
+            Gear^.dX:= Gear^.dX-trackSpeed;
+        if (Gear^.Y < targ^.Y) and (Gear^.dY < _0_1)  then
+             Gear^.dY:= Gear^.dY+trackSpeed
+        else if (Gear^.Y > targ^.Y) and (Gear^.dY > -_0_1) then
+            Gear^.dY:= Gear^.dY-trackSpeed;
+        end;
+
+    if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Health <> 0) then
+        if ((Gear^.State and gstAttacking) = 0) then
+            begin
+            if ((GameTicks and $1F) = 0) then
+                if targ <> nil then
+                    begin
+                    tX:=Gear^.X-targ^.X;
+                    tY:=Gear^.Y-targ^.Y;
+                    if (tX.Round+tY.Round < Gear^.Karma) and
+                       (hwRound(hwSqr(tX) + hwSqr(tY)) < sqr(Gear^.Karma)) then
+                    Gear^.State := Gear^.State or gstAttacking
+                    end
+                else if (Gear^.Angle > 0) and (CheckGearNear(Gear, gtHedgehog, Gear^.Karma, Gear^.Karma) <> nil) then
+                    Gear^.State := Gear^.State or gstAttacking
+            end
+        else // gstAttacking <> 0
+            begin
+            AllInactive := false;
+            if (Gear^.Timer and $FF) = 0 then
+                PlaySound(sndMineTick);
+            if Gear^.Timer = 0 then
+                begin
+                Gear^.Hedgehog:= CurrentHedgehog;
+                doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Karma, Gear^.Hedgehog, EXPLAutoSound);
+                DeleteGear(Gear);
+                exit
+                end;
+            dec(Gear^.Timer);
+            end
+    else // gsttmpFlag = 0
+        if (TurnTimeLeft = 0)
+        or ((GameFlags and gfInfAttack <> 0) and (GameTicks > Gear^.FlightTime))
+        or (CurrentHedgehog^.Gear = nil) then
+            Gear^.State := Gear^.State or gsttmpFlag;
+end;
+
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepSMine(Gear: PGear);
     var land: Word;
--- a/hedgewars/uGearsHedgehog.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uGearsHedgehog.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -290,6 +290,7 @@
 
             case CurAmmoType of
                       amGrenade: newGear:= AddGear(hwRound(lx), hwRound(ly), gtGrenade,         0, newDx, newDy, CurWeapon^.Timer);
+                      amAirMine: newGear:= AddGear(hwRound(lx), hwRound(ly), gtAirMine,         0, newDx, newDy, 0);
                       amMolotov: newGear:= AddGear(hwRound(lx), hwRound(ly), gtMolotov,      0, newDx, newDy, 0);
                   amClusterBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb,  0, newDx, newDy, CurWeapon^.Timer);
                       amGasBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb,      0, newDx, newDy, CurWeapon^.Timer);
@@ -425,7 +426,8 @@
                      amBazooka, amSnowball,
                          amBee, amSMine,
                       amMortar, amWatermelon,
-                 amHellishBomb, amDrill: FollowGear:= newGear;
+                 amHellishBomb, amDrill,
+                     amAirMine: FollowGear:= newGear;
 
                      amShotgun, amPickHammer,
                         amRope, amDEagle,
@@ -443,9 +445,10 @@
                       amTardis, amPiano,
                       amIceGun, amRubber: CurAmmoGear:= newGear;
             end;
-	    if CurAmmoType = amCake then FollowGear:= newGear;
+            if CurAmmoType = amCake then FollowGear:= newGear;
+            if CurAmmoType = amAirMine then newGear^.Hedgehog:= nil;
 
-            if ((CurAmmoType = amMine) or (CurAmmoType = amSMine)) and (GameFlags and gfInfAttack <> 0) then
+            if ((CurAmmoType = amMine) or (CurAmmoType = amSMine) or (CurAmmoType = amAirMine)) and (GameFlags and gfInfAttack <> 0) then
                 newGear^.FlightTime:= GameTicks + 1000
             else if CurAmmoType = amDrill then
                 newGear^.FlightTime:= GameTicks + 250;
--- a/hedgewars/uGearsList.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uGearsList.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -103,6 +103,7 @@
 (*        gtAddAmmo *) , amNothing
 (*  gtGenericFaller *) , amNothing
 (*          gtKnife *) , amKnife
+(*        gtAirMine *) , amAirMine
     );
 
 
@@ -359,6 +360,21 @@
                         gear^.Timer:= cMinesTime
                     end
                 end;
+     gtAirMine: begin
+                gear^.ImpactSound:= sndDenied;
+                gear^.nImpactSounds:= 1;
+                gear^.Health:= 30;
+                gear^.State:= gear^.State or gstMoving or gstNoGravity;
+                gear^.Radius:= 3;
+                gear^.Elasticity:= _0_55;
+                gear^.Friction:= _0_995;
+                gear^.Density:= _1;
+                gear^.Angle:= 125; // Radius at which air bombs will start "seeking". $FFFFFFFF = unlimited. check is skipped.
+                gear^.Power:= 536871; // hwFloat converted. 1/4 g default. defines the "seek" speed when a gear is in range.
+                gear^.Pos:= 134217; // air friction. slows it down when not hitting stuff
+                gear^.Karma:= 30; // damage
+                gear^.Timer:= 500;
+                end;
        gtSMine: begin
                 gear^.Health:= 10;
                 gear^.State:= gear^.State or gstMoving;
--- a/hedgewars/uGearsRender.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uGearsRender.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -684,6 +684,7 @@
                 amHellishBomb: DrawSpriteRotated(sprHandHellish, hx, hy, sign, aangle);
                 amGasBomb: DrawSpriteRotated(sprHandCheese, hx, hy, sign, aangle);
                 amMine: DrawSpriteRotated(sprHandMine, hx, hy, sign, aangle);
+                amAirMine: DrawSpriteRotated(sprHandMine, hx, hy, sign, aangle);
                 amSMine: DrawSpriteRotated(sprHandSMine, hx, hy, sign, aangle);
                 amKnife: DrawSpriteRotatedF(sprHandKnife, hx, hy, 0, sign, aangle);
                 amSeduction: begin
@@ -1119,6 +1120,7 @@
                        DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle)
                     else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
                     end;
+         gtAirMine:  DrawSpriteRotated(sprMineOff, x, y, 0, 0);
 
            gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
                            DrawSpriteRotated(sprSMineOff, x, y, 0, Gear^.DirAngle)
--- a/hedgewars/uGearsUtils.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uGearsUtils.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -127,6 +127,7 @@
                 gtClusterBomb,
             //    gtCluster, too game breaking I think
                 gtSMine,
+                gtAirMine,
                 gtCase,
                 gtTarget,
                 gtFlame,
--- a/hedgewars/uTypes.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uTypes.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -104,7 +104,7 @@
             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 50
             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 55
             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
-            gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife); // 65
+            gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtAirMine); // 66
 
     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
@@ -154,7 +154,8 @@
             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
-            amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, amIceGun, amKnife, amRubber); // 56
+            amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, // 53
+            amIceGun, amKnife, amRubber, amAirMine); // 57
 
     // Different kind of crates that e.g. hedgehogs can pick up
     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
@@ -445,7 +446,7 @@
             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb,
             sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector,
             sidDrillStrike, sidSnowball, sidNothing, sidTardis,
-            {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber);
+            {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber, sidAirMine);
 
     TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
--- a/hedgewars/uVariables.pas	Wed Jan 14 11:47:50 2015 +0300
+++ b/hedgewars/uVariables.pas	Fri Jan 16 17:51:29 2015 -0500
@@ -2300,6 +2300,31 @@
             PosCount: 4;
             PosSprite: sprAmRubber;
             ejectX: 0;
+            ejectY: 0),
+// Air Mine
+            (NameId: sidAirMine;
+            NameTex: nil;
+            Probability: 100;
+            NumberInCase: 1;
+            Ammo: (Propz: ammoprop_Power or
+                          ammoprop_AltUse or
+                          ammoprop_NeedUpDown;
+                Count: 2;
+                NumPerTurn: 0;
+                Timer: 0;
+                Pos: 0;
+                AmmoType: amAirMine;
+                AttackVoice: sndLaugh;
+                Bounciness: 1000);
+            Slot: 5;
+            TimeAfterTurn: 5000;
+            minAngle: 0;
+            maxAngle: 0;
+            isDamaging: true;
+            SkipTurns: 0;
+            PosCount: 1;
+            PosSprite: sprWater;
+            ejectX: 0;
             ejectY: 0)
         );
 
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed
--- a/share/hedgewars/Data/Locale/en.txt	Wed Jan 14 11:47:50 2015 +0300
+++ b/share/hedgewars/Data/Locale/en.txt	Fri Jan 16 17:51:29 2015 -0500
@@ -59,6 +59,7 @@
 00:55=Freezer
 00:56=Cleaver
 00:57=Rubber
+00:58=Air Mine
 
 01:00=Let's fight!
 01:01=Round draw