--- a/QTfrontend/hwconsts.h Thu May 03 03:18:10 2012 +0200
+++ b/QTfrontend/hwconsts.h Thu May 03 00:21:17 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/QTfrontend/hwform.cpp Thu May 03 03:18:10 2012 +0200
+++ b/QTfrontend/hwform.cpp Thu May 03 00:21:17 2012 -0400
@@ -624,8 +624,12 @@
OnPageShown(id, lastid);
ui.Pages->setCurrentIndex(id);
- if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
+
+ /* if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
stopAnim = true;
+ This were disabled due to broken flake animations. I believe the more general problems w/ opacity that forced its disable makes blocking these
+ unnecessary.
+ */
#if (QT_VERSION >= 0x040600)
if (!stopAnim)
@@ -646,7 +650,7 @@
//New page animation
animationNewSlide = new QPropertyAnimation(ui.Pages->widget(id), "pos");
animationNewSlide->setDuration(duration);
- animationNewSlide->setStartValue(QPoint(this->width()*1.5/coeff, 0));
+ animationNewSlide->setStartValue(QPoint(width()/coeff, 0));
animationNewSlide->setEndValue(QPoint(0, 0));
animationNewSlide->setEasingCurve(QEasingCurve::OutExpo);
@@ -664,7 +668,7 @@
animationOldSlide = new QPropertyAnimation(ui.Pages->widget(lastid), "pos");
animationOldSlide->setDuration(duration);
animationOldSlide->setStartValue(QPoint(0, 0));
- animationOldSlide->setEndValue(QPoint(this->width()*1.5/coeff, 0));
+ animationOldSlide->setEndValue(QPoint(-width()/coeff, 0));
animationOldSlide->setEasingCurve(QEasingCurve::OutExpo);
#ifdef false
@@ -685,6 +689,8 @@
group->start();
connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide()));
+ /* this is for the situation when the animation below is interrupted by a new animation. For some reason, finished is not being fired */
+ for(int i=0;i<MAX_PAGE;i++) if (i!=id && i!=lastid) ui.Pages->widget(i)->hide();
}
#endif
}
@@ -718,8 +724,8 @@
stopAnim = true;
GoBack();
}
- if (curid == ID_PAGE_DRAWMAP)
- stopAnim = true;
+ /*if (curid == ID_PAGE_DRAWMAP)
+ stopAnim = true; */
if ((!hwnet) || (!hwnet->isInRoom()))
if (id == ID_PAGE_NETGAME || id == ID_PAGE_NETGAME)
--- a/QTfrontend/hwform.h Thu May 03 03:18:10 2012 +0200
+++ b/QTfrontend/hwform.h Thu May 03 00:21:17 2012 -0400
@@ -152,29 +152,30 @@
enum PageIDs
{
- ID_PAGE_SETUP_TEAM = 0,
- ID_PAGE_SETUP = 1,
- ID_PAGE_MULTIPLAYER = 2,
- ID_PAGE_DEMOS = 3,
- ID_PAGE_NET = 4,
- ID_PAGE_NETGAME = 5,
- ID_PAGE_INFO = 6,
- ID_PAGE_MAIN = 7,
- ID_PAGE_GAMESTATS = 8,
- ID_PAGE_SINGLEPLAYER = 9,
- ID_PAGE_TRAINING = 10,
- ID_PAGE_SELECTWEAPON = 11,
- ID_PAGE_NETSERVER = 12,
- ID_PAGE_INGAME = 13,
- ID_PAGE_ROOMSLIST = 14,
- ID_PAGE_CONNECTING = 15,
- ID_PAGE_SCHEME = 16,
- ID_PAGE_ADMIN = 17,
- ID_PAGE_NETTYPE = 18,
- ID_PAGE_CAMPAIGN = 19,
- ID_PAGE_DRAWMAP = 20,
- ID_PAGE_DATADOWNLOAD = 21,
- ID_PAGE_FEEDBACK = 22
+ ID_PAGE_SETUP_TEAM ,
+ ID_PAGE_SETUP ,
+ ID_PAGE_MULTIPLAYER ,
+ ID_PAGE_DEMOS ,
+ ID_PAGE_NET ,
+ ID_PAGE_NETGAME ,
+ ID_PAGE_INFO ,
+ ID_PAGE_MAIN ,
+ ID_PAGE_GAMESTATS ,
+ ID_PAGE_SINGLEPLAYER ,
+ ID_PAGE_TRAINING ,
+ ID_PAGE_SELECTWEAPON ,
+ ID_PAGE_NETSERVER ,
+ ID_PAGE_INGAME ,
+ ID_PAGE_ROOMSLIST ,
+ ID_PAGE_CONNECTING ,
+ ID_PAGE_SCHEME ,
+ ID_PAGE_ADMIN ,
+ ID_PAGE_NETTYPE ,
+ ID_PAGE_CAMPAIGN ,
+ ID_PAGE_DRAWMAP ,
+ ID_PAGE_DATADOWNLOAD ,
+ ID_PAGE_FEEDBACK ,
+ MAX_PAGE
};
QPointer<HWGame> game;
QPointer<HWNetServer> pnetserver;
--- a/hedgewars/GSHandlers.inc Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/GSHandlers.inc Thu May 03 00:21:17 2012 -0400
@@ -5089,7 +5089,7 @@
DeleteGear(graves[i]);
RenderHealth(resgear^.Hedgehog^);
RecountTeamHealth(resgear^.Hedgehog^.Team);
- resgear^.Hedgehog^.Effects[heResurrected]:= true;
+ resgear^.Hedgehog^.Effects[heResurrected]:= 1;
// only make hat-less hedgehogs look like zombies, preserve existing hats
if resgear^.Hedgehog^.Hat = 'NoHat' then
@@ -5418,3 +5418,66 @@
////////////////////////////////////////////////////////////////////////////////
+(*
+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 be visual gears only. The scatter from them and the impact snow dust should help hide imprecisions in things like the GearsNear effect.
+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 around that point (say, 1 or 2px into land, 1px above). 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);
+var
+ HHGear, iter: PGear;
+ ndX, ndY: hwFloat;
+ gX, gY: LongInt;
+begin
+ with Gear^ do
+ begin
+ HHGear := Hedgehog^.Gear;
+ HedgehogChAngle(HHGear);
+ ndX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX);
+ ndY:= -AngleCos(HHGear^.Angle);
+ if (ndX <> dX) or (ndY <> dY) then
+ begin
+ Pos:= 0;
+ Target.X:= NoPointX;
+ LastDamage:= nil;
+ X:= HHGear^.X;
+ Y:= HHGear^.Y;
+// unfreeze all semifrozen hogs
+ iter := GearsList;
+ while iter <> nil do
+ begin
+ if (iter^.Kind = gtHedgehog) and
+ (iter^.Hedgehog^.Effects[heFrozen] < 0) then
+ iter^.Hedgehog^.Effects[heFrozen]:= 0;
+ iter:= iter^.NextGear;
+ end;
+ end
+ else
+ begin
+ gX:= hwRound(X);
+ gY:= hwRound(Y);
+ X:= X + dX;
+ Y:= Y + dY;
+ if Target.X <> NoPointX then
+ inc(Pos)
+ else if (gY > cWaterLine) or
+ (((gX and LAND_WIDTH_MASK = 0) and (gY and LAND_HEIGHT_MASK = 0))
+ and ((Land[gY, gX] and $FF00 and not lfIce <> 0) or
+ (Land[gY, gX] and $00FF <> 0))) then
+ begin
+ Target.X:= gX;
+ Target.Y:= gY;
+ if Land[gY, gX] and $00FF <> 0 then // locate and tag hogs
+ begin
+ //GearsNear(X, Y, gtHedgehog, Radius);
+ end;
+ end
+ end
+ end;
+end;
--- a/hedgewars/uAIAmmoTests.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uAIAmmoTests.pas Thu May 03 00:21:17 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 Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uGears.pas Thu May 03 00:21:17 2012 -0400
@@ -110,7 +110,7 @@
dec(Gear^.Health, dmg);
if (Gear^.Hedgehog^.Team = CurrentTeam) and (Gear^.Damage <> Gear^.Karma)
- and (not Gear^.Hedgehog^.King) and (not Gear^.Hedgehog^.Effects[hePoisoned]) and (not SuddenDeathDmg) then
+ and (not Gear^.Hedgehog^.King) and (Gear^.Hedgehog^.Effects[hePoisoned] = 0) and (not SuddenDeathDmg) then
Gear^.State:= Gear^.State or gstLoser;
spawnHealthTagForHH(Gear, dmg);
@@ -141,7 +141,7 @@
if Gear^.Kind = gtHedgehog then
begin
tmp:= 0;
- if Gear^.Hedgehog^.Effects[hePoisoned] then
+ if Gear^.Hedgehog^.Effects[hePoisoned] <> 0 then
begin
inc(tmp, ModifyDamage(5, Gear));
if (GameFlags and gfResetHealth) <> 0 then
@@ -1302,7 +1302,8 @@
@doStepSnowflake,
@doStepStructure,
@doStepLandGun,
- @doStepTardis);
+ @doStepTardis,
+ @doStepIceGun);
begin
doStepHandlers:= handlers;
--- a/hedgewars/uGearsHedgehog.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uGearsHedgehog.pas Thu May 03 00:21:17 2012 -0400
@@ -356,6 +356,7 @@
//amMelonStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 4, _0, _0, 0);
amStructure: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtStructure, gstWait, SignAs(_0_02, dX), _0, 3000);
amTardis: newGear:= AddGear(hwRound(X), hwRound(Y), gtTardis, 0, _0, _0, 5000);
+ amIceGun: newGear:= AddGear(hwRound(X), hwRound(Y), gtIceGun, 0, _0, _0, 0);
end;
case CurAmmoType of
@@ -379,7 +380,8 @@
amJetpack, amBirdy,
amFlamethrower, amLandGun,
amResurrector, amStructure,
- amTardis, amPiano: CurAmmoGear:= newGear;
+ amTardis, amPiano,
+ amIceGun: CurAmmoGear:= newGear;
end;
if ((CurAmmoType = amMine) or (CurAmmoType = amSMine)) and (GameFlags and gfInfAttack <> 0) then
@@ -611,7 +613,7 @@
end;
posCaseHealth: begin
inc(HH^.Health, Gear^.Health);
- HH^.Hedgehog^.Effects[hePoisoned] := false;
+ HH^.Hedgehog^.Effects[hePoisoned] := 0;
str(Gear^.Health, s);
s:= '+' + s;
AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
@@ -1157,8 +1159,8 @@
if (Gear^.State and gstHHGone) = 0 then
begin
- Gear^.Hedgehog^.Effects[hePoisoned] := false;
- if Gear^.Hedgehog^.Effects[heResurrectable] then
+ Gear^.Hedgehog^.Effects[hePoisoned] := 0;
+ if Gear^.Hedgehog^.Effects[heResurrectable] <> 0 then
begin
ResurrectHedgehog(Gear);
end
--- a/hedgewars/uGearsList.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uGearsList.pas Thu May 03 00:21:17 2012 -0400
@@ -148,7 +148,7 @@
gear^.Z:= cHHZ;
if (GameFlags and gfAISurvival) <> 0 then
if gear^.Hedgehog^.BotLevel > 0 then
- gear^.Hedgehog^.Effects[heResurrectable] := true;
+ gear^.Hedgehog^.Effects[heResurrectable] := 0;
end;
gtShell: begin
gear^.Radius:= 4;
@@ -541,8 +541,8 @@
inc(KilledHHs);
RecountTeamHealth(team);
- if (CurrentHedgehog <> nil) and CurrentHedgehog^.Effects[heResurrectable] and
- (not Gear^.Hedgehog^.Effects[heResurrectable]) then
+ if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Effects[heResurrectable] <> 0) and
+ (Gear^.Hedgehog^.Effects[heResurrectable] = 0) then
with CurrentHedgehog^ do
begin
inc(Team^.stats.AIKills);
--- a/hedgewars/uGearsRender.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uGearsRender.pas Thu May 03 00:21:17 2012 -0400
@@ -232,7 +232,7 @@
HatVisible:= false;
- if HH^.Effects[hePoisoned] then
+ if HH^.Effects[hePoisoned] <> 0 then
begin
Tint($00, $FF, $40, $40);
DrawTextureRotatedF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360);
@@ -877,12 +877,12 @@
end
end;
- if HH^.Effects[hePoisoned] then
+ if HH^.Effects[hePoisoned] <> 0 then
begin
Tint($00, $FF, $40, $80);
DrawTextureRotatedF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360);
end;
- if HH^.Effects[heResurrected] then
+ if HH^.Effects[heResurrected] <> 0 then
begin
Tint($f5, $db, $35, $20);
DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
@@ -914,8 +914,10 @@
if Gear^.Target.X <> NoPointX then
if Gear^.AmmoType = amBee then
DrawSpriteRotatedF(sprTargetBee, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360)
- else
- DrawSpriteRotatedF(sprTargetP, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
+ else if Gear^.AmmoType = amIceGun then
+ DrawSprite(sprSnowDust, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, (RealTicks shr 3) mod 360)
+ else
+ DrawSpriteRotatedF(sprTargetP, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
case Gear^.Kind of
gtGrenade: DrawSpriteRotated(sprBomb, x, y, 0, Gear^.DirAngle);
--- a/hedgewars/uGearsUtils.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uGearsUtils.pas Thu May 03 00:21:17 2012 -0400
@@ -132,7 +132,7 @@
if Gear^.Kind <> gtFlame then FollowGear:= Gear
end;
if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) and (not Gear^.Invulnerable) then
- Gear^.Hedgehog^.Effects[hePoisoned] := true;
+ Gear^.Hedgehog^.Effects[hePoisoned] := 1;
end;
end;
@@ -371,7 +371,7 @@
and (Gear^.Kind <> gtDEagleShot) and (Gear^.Kind <> gtSineGunShot) then
if Gear^.Kind = gtHedgehog then
begin
- if Gear^.Hedgehog^.Effects[heResurrectable] then
+ if Gear^.Hedgehog^.Effects[heResurrectable] <> 0 then
ResurrectHedgehog(Gear)
else
begin
@@ -449,8 +449,8 @@
gear^.dY := _0;
gear^.Damage := 0;
gear^.Health := gear^.Hedgehog^.InitialHealth;
- gear^.Hedgehog^.Effects[hePoisoned] := false;
- if not CurrentHedgehog^.Effects[heResurrectable] then
+ gear^.Hedgehog^.Effects[hePoisoned] := 0;
+ if CurrentHedgehog^.Effects[heResurrectable] = 0 then
with CurrentHedgehog^ do
begin
inc(Team^.stats.AIKills);
@@ -593,7 +593,7 @@
begin
OutError('Can''t find place for Gear', false);
if Gear^.Kind = gtHedgehog then
- Gear^.Hedgehog^.Effects[heResurrectable] := false;
+ Gear^.Hedgehog^.Effects[heResurrectable] := 0;
DeleteGear(Gear);
Gear:= nil
end
--- a/hedgewars/uScript.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uScript.pas Thu May 03 00:21:17 2012 -0400
@@ -1103,7 +1103,7 @@
else begin
gear := GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Hedgehog <> nil) then
- gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_toboolean(L, 3);
+ gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_tointeger(L, 3);
end;
lc_seteffect := 0;
end;
@@ -1118,9 +1118,9 @@
begin
gear:= GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Hedgehog <> nil) then
- lua_pushboolean(L, gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))])
+ lua_pushinteger(L, gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))])
else
- lua_pushboolean(L, false)
+ lua_pushinteger(L, 0)
end;
lc_geteffect:= 1
end;
--- a/hedgewars/uTeams.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uTeams.pas Thu May 03 00:21:17 2012 -0400
@@ -384,7 +384,7 @@
begin
Hedgehogs[0].King:= true;
Hedgehogs[0].Hat:= 'crown';
- Hedgehogs[0].Effects[hePoisoned] := false;
+ Hedgehogs[0].Effects[hePoisoned] := 0;
h:= Hedgehogs[0].Gear^.Health;
Hedgehogs[0].Gear^.Health:= hwRound(int2hwFloat(th)*_0_375);
if Hedgehogs[0].Gear^.Health > h then
--- a/hedgewars/uTypes.pas Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uTypes.pas Thu May 03 00:21:17 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);
@@ -209,7 +209,7 @@
PrevTexture, NextTexture: PTexture;
end;
- THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected);
+ THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected, heFrozen);
TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite);
@@ -347,7 +347,7 @@
King: boolean; // Flag for a bunch of hedgehog attributes
Unplaced: boolean; // Flag for hog placing mode
Timer: Longword;
- Effects: array[THogEffect] of boolean;
+ Effects: array[THogEffect] of LongInt;
end;
TTeam = record
@@ -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 Thu May 03 03:18:10 2012 +0200
+++ b/hedgewars/uVariables.pas Thu May 03 00:21:17 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 Thu May 03 03:18:10 2012 +0200
+++ b/share/hedgewars/Data/Locale/en.txt Thu May 03 00:21:17 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