Initial stub for freezer
authornemo
Wed, 02 May 2012 19:16:12 -0400
changeset 7007 0ccdff4ae8e9
parent 7004 45d43f372107
child 7010 10a0a31804f3
Initial stub for freezer
QTfrontend/hwconsts.h
hedgewars/GSHandlers.inc
hedgewars/uAIAmmoTests.pas
hedgewars/uGears.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
share/hedgewars/Data/Locale/en.txt
--- a/QTfrontend/hwconsts.h	Wed May 02 18:36:27 2012 -0400
+++ b/QTfrontend/hwconsts.h	Wed May 02 19:16:12 2012 -0400
@@ -63,40 +63,40 @@
 
 #define HEDGEHOGS_PER_TEAM           8
 
-#define AMMOLINE_DEFAULT_QT     "939192942219912103223511100120100000021111010101111101"
-#define AMMOLINE_DEFAULT_PROB   "040504054160065554655446477657666666615551010111541101"
-#define AMMOLINE_DEFAULT_DELAY  "000000000000020550000004000700400000000022000000060000"
-#define AMMOLINE_DEFAULT_CRATE  "131111031211111112311411111111111111121111110111111101"
+#define AMMOLINE_DEFAULT_QT     "9391929422199121032235111001201000000211110101011111011"
+#define AMMOLINE_DEFAULT_PROB   "0405040541600655546554464776576666666155510101115411011"
+#define AMMOLINE_DEFAULT_DELAY  "0000000000000205500000040007004000000000220000000600000"
+#define AMMOLINE_DEFAULT_CRATE  "1311110312111111123114111111111111111211111101111111010"
 
-#define AMMOLINE_CRAZY_QT       "999999999999999999299999999999999929999999990999999209"
-#define AMMOLINE_CRAZY_PROB     "111111011111111111111111111111111111111111110111111101"
-#define AMMOLINE_CRAZY_DELAY    "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_CRAZY_CRATE    "131111031211111112311411111111111111121111010111111101"
+#define AMMOLINE_CRAZY_QT       "9999999999999999992999999999999999299999999909999992099"
+#define AMMOLINE_CRAZY_PROB     "1111110111111111111111111111111111111111111101111111011"
+#define AMMOLINE_CRAZY_DELAY    "0000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_CRAZY_CRATE    "1311110312111111123114111111111111111211110101111111011"
 
-#define AMMOLINE_PROMODE_QT     "909000900000000000000900000000000000000000000000000000"
-#define AMMOLINE_PROMODE_PROB   "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_PROMODE_DELAY  "000000000000020550000004000700400000000020000000000000"
-#define AMMOLINE_PROMODE_CRATE  "111111111111111111111111111111111111111110010111111101"
+#define AMMOLINE_PROMODE_QT     "9090009000000000000009000000000000000000000000000000000"
+#define AMMOLINE_PROMODE_PROB   "0000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_PROMODE_DELAY  "0000000000000205500000040007004000000000200000000000000"
+#define AMMOLINE_PROMODE_CRATE  "1111111111111111111111111111111111111111100101111111011"
 
-#define AMMOLINE_SHOPPA_QT      "000000990000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPA_PROB    "444441004424440221011212122242200000000200040001001100"
-#define AMMOLINE_SHOPPA_DELAY   "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_SHOPPA_CRATE   "111111111111111111111111111111111111111110110111111100"
+#define AMMOLINE_SHOPPA_QT      "0000009900000000000000000000000000000000000000000000000"
+#define AMMOLINE_SHOPPA_PROB    "4444410044244402210112121222422000000002000400010011000"
+#define AMMOLINE_SHOPPA_DELAY   "0000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_SHOPPA_CRATE   "1111111111111111111111111111111111111111101101111111001"
 
-#define AMMOLINE_CLEAN_QT       "101000900001000001100000000000000000000000000000100000"
-#define AMMOLINE_CLEAN_PROB     "040504054160065554655446477657666666615551010111541101"
-#define AMMOLINE_CLEAN_DELAY    "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_CLEAN_CRATE    "131111031211111112311411111111111111121111110111111101"
+#define AMMOLINE_CLEAN_QT       "1010009000010000011000000000000000000000000000001000000"
+#define AMMOLINE_CLEAN_PROB     "0405040541600655546554464776576666666155510101115411011"
+#define AMMOLINE_CLEAN_DELAY    "0000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_CLEAN_CRATE    "1311110312111111123114111111111111111211111101111111011"
 
-#define AMMOLINE_MINES_QT       "000000990009000000030000000000000000000000000000000000"
-#define AMMOLINE_MINES_PROB     "000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_MINES_DELAY    "000000000000020550000004000700400000000020000000060000"
-#define AMMOLINE_MINES_CRATE    "111111111111111111111111111111111111111111110111111101"
+#define AMMOLINE_MINES_QT       "0000009900090000000300000000000000000000000000000000000"
+#define AMMOLINE_MINES_PROB     "0000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_MINES_DELAY    "0000000000000205500000040007004000000000200000000600000"
+#define AMMOLINE_MINES_CRATE    "1111111111111111111111111111111111111111111101111111011"
 
-#define AMMOLINE_PORTALS_QT     "900000900200000000210000000000000011000009000000000000"
-#define AMMOLINE_PORTALS_PROB   "040504054160065554655446477657666666615551010111541101"
-#define AMMOLINE_PORTALS_DELAY  "000000000000020550000004000700400000000020000000060000"
-#define AMMOLINE_PORTALS_CRATE  "131111031211111112311411111111111111121111110111111101"
+#define AMMOLINE_PORTALS_QT     "9000009002000000002100000000000000110000090000000000000"
+#define AMMOLINE_PORTALS_PROB   "0405040541600655546554464776576666666155510101115411011"
+#define AMMOLINE_PORTALS_DELAY  "0000000000000205500000040007004000000000200000000600000"
+#define AMMOLINE_PORTALS_CRATE  "1311110312111111123114111111111111111211111101111111011"
 
 //Different seasons; assigned to season (int)
 #define SEASON_NONE 0
--- a/hedgewars/GSHandlers.inc	Wed May 02 18:36:27 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Wed May 02 19:16:12 2012 -0400
@@ -5418,3 +5418,17 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
+(*
+WIP. The ice gun will have the following effects.  It has been proposed by sheepluva that it take the appearance of a large freezer
+spewing ice cubes.  The cubes will probably be visual gears only, although if they were gear particles, it could allow for impacting targets in a spray.
+For now we assume a "ray" like a deagle projected out from the gun.
+All these effects assume the ray's angle is not changed and that the target type was unchanged over a number of ticks.  This is a simplifying assumption for "gun was applying freezing effect to the same target".  
+  * When fired at water a layer of ice textured land is added above the water.
+  * When fired at non-ice land (land and $FF00 and not lfIce) the land is overlaid with a thin layer of ice textured land near that point. For attractiveness, a slope would probably be needed.
+  * When fired at a hog (land and $00FF <> 0), while the hog is targetted, the hog's state is set to frozen.  As long as the gun is on the hog, a frozen hog sprite creeps up from the feet to the head.  If the effect is interrupted before reaching the top, the freezing state is cleared.
+A frozen hog will animate differently.  To be decided, but possibly in a similar fashion to a grave when it comes to explosions.  The hog might (possibly) not be damaged by explosions.  This might make freezing potentially useful for friendlies in a bad position.  It might be better to allow damage though.
+A frozen hog stays frozen for a certain number of turns. Each turn the frozen overlay becomes fainter, until it fades and the hog animates normally again.
+*)
+procedure doStepIceGun(Gear: PGear);
+begin
+end;
--- a/hedgewars/uAIAmmoTests.pas	Wed May 02 18:36:27 2012 -0400
+++ b/hedgewars/uAIAmmoTests.pas	Wed May 02 19:16:12 2012 -0400
@@ -109,7 +109,8 @@
             (proc: @TestSnowball;    flags: 0), // amSnowball
             (proc: nil;              flags: 0), // amTardis
             (proc: nil;              flags: 0), // amStructure
-            (proc: nil;              flags: 0) // amLandGun
+            (proc: nil;              flags: 0), // amLandGun
+            (proc: nil;              flags: 0)  // amIceGun
             );
 
 const BadTurn = Low(LongInt) div 4;
--- a/hedgewars/uGears.pas	Wed May 02 18:36:27 2012 -0400
+++ b/hedgewars/uGears.pas	Wed May 02 19:16:12 2012 -0400
@@ -1302,7 +1302,8 @@
             @doStepSnowflake,
             @doStepStructure,
             @doStepLandGun,
-            @doStepTardis);
+            @doStepTardis,
+            @doStepIceGun);
 begin
     doStepHandlers:= handlers;
 
--- a/hedgewars/uTypes.pas	Wed May 02 18:36:27 2012 -0400
+++ b/hedgewars/uTypes.pas	Wed May 02 19:16:12 2012 -0400
@@ -102,7 +102,7 @@
             gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 44
             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 50
             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 55
-            gtNapalmBomb, gtSnowball, gtFlake, gtStructure, gtLandGun, gtTardis); // 61
+            gtNapalmBomb, gtSnowball, gtFlake, gtStructure, gtLandGun, gtTardis, gtIceGun); // 62
 
     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
@@ -150,7 +150,7 @@
             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); // 54
+            amResurrector, amDrillStrike, amSnowball, amTardis, amStructure, amLandGun, amIceGun); // 54
 
     // Different kind of crates that e.g. hedgehogs can pick up
     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
@@ -400,7 +400,8 @@
             sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower,
-            sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing, sidTardis, sidStructure, sidLandGun);
+            sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing, sidTardis, 
+	    sidStructure, sidLandGun, sidIceGun);
 
     TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
--- a/hedgewars/uVariables.pas	Wed May 02 18:36:27 2012 -0400
+++ b/hedgewars/uVariables.pas	Wed May 02 19:16:12 2012 -0400
@@ -2305,6 +2305,31 @@
             PosCount: 1;
             PosSprite: sprWater;
             ejectX: 0; //20;
+            ejectY: -3),
+// Freezer
+            (NameId: sidIceGun;
+            NameTex: nil;
+            Probability: 20;
+            NumberInCase: 1;
+            Ammo: (Propz: ammoprop_ForwMsgs or 
+                          ammoprop_NeedUpDown or
+                          ammoprop_DontHold;
+                Count: 1;
+                NumPerTurn: 0;
+                Timer: 5001;
+                Pos: 0;
+                AmmoType: amFlamethrower;
+                AttackVoice: sndNone;
+                Bounciness: 1000);
+            Slot: 2;
+            TimeAfterTurn: 0;
+            minAngle: 0;
+            maxAngle: 0;
+            isDamaging: true;
+            SkipTurns: 0;
+            PosCount: 1;
+            PosSprite: sprWater;
+            ejectX: 0; //20;
             ejectY: -3)
         );
 
@@ -2372,6 +2397,7 @@
 (*      gtStructure *) , amStructure  // TODO - This will undoubtedly change once there is more than one structure
 (*        gtLandGun *) , amLandGun
 (*         gtTardis *) , amTardis
+(*         gtIceGun *) , amIceGun
     );
 
 var
--- a/share/hedgewars/Data/Locale/en.txt	Wed May 02 18:36:27 2012 -0400
+++ b/share/hedgewars/Data/Locale/en.txt	Wed May 02 19:16:12 2012 -0400
@@ -56,6 +56,7 @@
 00:53=TimeBox
 00:54=Structure
 00:55=Land Spray
+00:56=Freezer
 
 01:00=Let's fight!
 01:01=Round draw