More ticker messages: Sick, king died, resurrect, time box return, timeout, kamikaze
--- a/ChangeLog.txt Thu Apr 06 05:54:45 2017 +0200
+++ b/ChangeLog.txt Thu Apr 06 07:34:00 2017 +0200
@@ -17,6 +17,7 @@
+ Color coding for the turn timer: green = ready timer, yellow = turn in progress, red = retreat timer, gray = timer paused
+ Play countdown sounds at 1-4 seconds turn time
+ Several new sound effects for weapons and utilities
+ + More ticker messages: Hog gets sick, king died, hog was resurrected, hog time travels (and returns), timeout, kamikaze
+ Small visual effects enhancements
+ Briefly show theme and music authors in chat at start of game
+ A few new funny ticker messages (English)
--- a/hedgewars/uGearsHandlersMess.pas Thu Apr 06 05:54:45 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas Thu Apr 06 07:34:00 2017 +0200
@@ -147,7 +147,7 @@
uses uConsts, uVariables, uVisualGearsList, uRandom, uCollisions, uGearsList, uUtils, uSound
, SDLh, uScript, uGearsHedgehog, uGearsUtils, uIO, uCaptions, uLandGraphics
, uGearsHandlers, uTextures, uRenderUtils, uAmmos, uTeams, uLandTexture, uCommands
- , uStore, uAI, uStats;
+ , uStore, uAI, uStats, uLocale;
procedure doStepPerPixel(Gear: PGear; step: TGearStepProcedure; onlyCheckIfChanged: boolean);
var
@@ -1752,14 +1752,6 @@
else // gstAttacking <> 0
begin
AllInactive := false;
- // tag of 1 means this mine has a random timer
- if (Gear^.Tag = 1) and (Gear^.Timer = 0) then
- begin
- if (GameTicks mod 2 = 0) then GetRandom(2);
- if (GameTicks mod 3 = 0) then GetRandom(2);
- Gear^.Timer:= GetRandom(51) * 100;
- Gear^.Tag:= 0;
- end;
if (Gear^.Timer and $FF) = 0 then
PlaySound(sndMineTick);
if Gear^.Timer = 0 then
@@ -3040,6 +3032,7 @@
HHGear: PGear;
sparkles: PVisualGear;
hasWishes: boolean;
+ s: ansistring;
begin
AllInactive := false;
hasWishes:= ((Gear^.Message and (gmPrecise or gmSwitch)) = (gmPrecise or gmSwitch));
@@ -3137,6 +3130,8 @@
FrameTicks:= random(400) + 250
end
end;
+ s:= ansistring(Gear^.Hedgehog^.Name);
+ AddCaption(FormatA(GetEventString(eidKamikaze), s), cWhiteColor, capgrpMessage);
AfterAttack;
HHGear^.Message:= HHGear^.Message or gmDestroy;
DeleteGear(Gear);
@@ -5440,6 +5435,7 @@
resgear: PGear;
hh: PHedgehog;
i: LongInt;
+ s: ansistring;
begin
if (TurnTimeLeft > 0) then
dec(TurnTimeLeft);
@@ -5511,6 +5507,8 @@
RenderHealth(resgear^.Hedgehog^);
RecountTeamHealth(resgear^.Hedgehog^.Team);
resgear^.Hedgehog^.Effects[heResurrected]:= 1;
+ s:= ansistring(resgear^.Hedgehog^.Name);
+ AddCaption(FormatA(GetEventString(eidResurrected), s), cWhiteColor, capgrpMessage);
// only make hat-less hedgehogs look like zombies, preserve existing hats
if resgear^.Hedgehog^.Hat = 'NoHat' then
@@ -5714,6 +5712,7 @@
procedure doStepTardisWarp(Gear: PGear);
var HH: PHedgehog;
i,j,cnt: LongWord;
+ s: ansistring;
begin
HH:= Gear^.Hedgehog;
if Gear^.Pos = 2 then
@@ -5731,7 +5730,11 @@
end
//else if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible <> 0) then
else if (HH^.GearHidden <> nil) then// and (HH^.Gear^.State and gstInvisible <> 0) then
- RestoreHog(HH)
+ begin
+ RestoreHog(HH);
+ s:= ansistring(HH^.Name);
+ AddCaption(FormatA(GetEventString(eidTimeTravelEnd), s), cWhiteColor, capgrpMessage)
+ end
end;
inc(Gear^.Timer);
--- a/hedgewars/uGearsHedgehog.pas Thu Apr 06 05:54:45 2017 +0200
+++ b/hedgewars/uGearsHedgehog.pas Thu Apr 06 07:34:00 2017 +0200
@@ -1204,6 +1204,7 @@
var t: PGear;
wasJumping: boolean;
Hedgehog: PHedgehog;
+ s: ansistring;
begin
Hedgehog:= HHGear^.Hedgehog;
if not isInMultiShoot then
@@ -1224,7 +1225,14 @@
TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= 0;
if ((HHGear^.State and gstAttacked) = 0) and (HHGear^.Damage = 0) then
+ begin
AddVoice(sndBoring, Hedgehog^.Team^.voicepack);
+ if (GameFlags and gfInfAttack = 0) then
+ begin
+ s:= Hedgehog^.Name;
+ AddCaption(FormatA(GetEventString(eidTimeout), s), cWhiteColor, capgrpMessage);
+ end;
+ end;
isCursorVisible:= false;
HHGear^.State:= HHGear^.State and (not (gstHHDriven or gstAnimation or gstAttacking));
AttackBar:= 0;
@@ -1387,7 +1395,10 @@
Gear^.doStep:= @doStepHedgehogDead;
// Death message
s:= ansistring(Gear^.Hedgehog^.Name);
- AddCaption(FormatA(GetEventString(eidDied), s), cWhiteColor, capgrpMessage);
+ if Gear^.Hedgehog^.King then
+ AddCaption(FormatA(GetEventString(eidKingDied), s), cWhiteColor, capgrpMessage)
+ else
+ AddCaption(FormatA(GetEventString(eidDied), s), cWhiteColor, capgrpMessage);
end;
end
else
--- a/hedgewars/uGearsList.pas Thu Apr 06 05:54:45 2017 +0200
+++ b/hedgewars/uGearsList.pas Thu Apr 06 07:34:00 2017 +0200
@@ -418,11 +418,10 @@
gear^.Elasticity:= _0_55;
gear^.Friction:= _0_995;
gear^.Density:= _1;
- gear^.Tag:= 0;
if gear^.Timer = 0 then
begin
if cMinesTime < 0 then
- gear^.Tag:= 1 // gear tag of 1 means mine timer will be random
+ gear^.Timer:= getrandom(51)*100
else
gear^.Timer:= cMinesTime
end
--- a/hedgewars/uGearsUtils.pas Thu Apr 06 05:54:45 2017 +0200
+++ b/hedgewars/uGearsUtils.pas Thu Apr 06 07:34:00 2017 +0200
@@ -84,6 +84,7 @@
i, cnt: LongInt;
wrap: boolean;
bubble: PVisualGear;
+ s: ansistring;
begin
if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');
if Radius > 25 then KickFlakes(Radius, X, Y);
@@ -178,7 +179,14 @@
if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) and
(Gear^.Hedgehog^.Effects[heInvulnerable] = 0) and (Gear^.Hedgehog^.Effects[heFrozen] = 0) and
(Gear^.State and gstHHDeath = 0) then
- Gear^.Hedgehog^.Effects[hePoisoned] := 5;
+ begin
+ if Gear^.Hedgehog^.Effects[hePoisoned] = 0 then
+ begin
+ s:= ansistring(Gear^.Hedgehog^.Name);
+ AddCaption(FormatA(GetEventString(eidPoisoned), s), cWhiteColor, capgrpMessage)
+ end;
+ Gear^.Hedgehog^.Effects[hePoisoned] := 5;
+ end
end;
end;
@@ -664,7 +672,10 @@
DrownGear(Gear);
Gear^.State := Gear^.State and (not gstHHDriven);
s:= ansistring(Gear^.Hedgehog^.Name);
- AddCaption(FormatA(GetEventString(eidDrowned), s), cWhiteColor, capgrpMessage);
+ if Gear^.Hedgehog^.King then
+ AddCaption(FormatA(GetEventString(eidKingDied), s), cWhiteColor, capgrpMessage)
+ else
+ AddCaption(FormatA(GetEventString(eidDrowned), s), cWhiteColor, capgrpMessage);
end
end
else
@@ -724,6 +735,7 @@
var tempTeam : PTeam;
sparkles: PVisualGear;
gX, gY: LongInt;
+ s: ansistring;
begin
if (Gear^.LastDamage <> nil) then
uStats.HedgehogDamaged(Gear, Gear^.LastDamage, 0, true)
@@ -760,6 +772,8 @@
AddVisualGear(hwRound(gear^.X), hwRound(gear^.Y), vgtExplosion);
PlaySound(sndWarp);
RenderHealth(gear^.Hedgehog^);
+ s:= ansistring(gear^.Hedgehog^.Name);
+ AddCaption(FormatA(GetEventString(eidResurrected), s), cWhiteColor, capgrpMessage);
ScriptCall('onGearResurrect', gear^.uid);
gear^.State := gstWait;
end;
--- a/hedgewars/uTypes.pas Thu Apr 06 05:54:45 2017 +0200
+++ b/hedgewars/uTypes.pas Thu Apr 06 07:34:00 2017 +0200
@@ -465,7 +465,8 @@
// Events that are important for the course of the game or at least interesting for other reasons
TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped,
- eidHurtSelf, eidHomerun, eidGone);
+ eidHurtSelf, eidHomerun, eidGone, eidPoisoned, eidResurrected,
+ eidKamikaze, eidTimeTravelEnd, eidTimeout, eidKingDied);
TGoalStrId = (gidCaption, gidSubCaption, gidPlaceKing, gidLowGravity, gidInvulnerable,
gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery,
--- a/share/hedgewars/Data/Locale/en.txt Thu Apr 06 05:54:45 2017 +0200
+++ b/share/hedgewars/Data/Locale/en.txt Thu Apr 06 07:34:00 2017 +0200
@@ -89,7 +89,7 @@
01:25=Press the target button to mark the target
; Event messages
-; Hog (%1) died
+; Normal hog (%1) died (0 health)
02:00=%1 has kicked the bucket!
02:00=%1 has seen the light!
02:00=%1 never saw that coming!
@@ -181,7 +181,7 @@
02:00=%1 dropped dead
02:00=%1 is six feet under
-; Hog (%1) drowned
+; Normal hog (%1) drowned
02:01=%1 plays submarine!
02:01=%1 mimics the Titanic!
02:01=%1 swims like a stone!
@@ -507,6 +507,24 @@
02:11=%1 has to do some homework
02:11=%1 walks away from the trouble
+; Hog (%1) was poisoned
+02:12=%1 feels sick
+
+; Hog (%1) was resurrected
+02:13=%1 has been resurrected
+
+; Hog (%1) explodes after an kamikaze attack
+02:14=%1 dies in honor
+
+; Hog (%1) returned from time-travel with the time box
+02:15=%1 returns from time travel
+
+; Hog (%1) runs out of turn time (not shown in infinite attack mode)
+02:16=%1 was too slow
+
+; King (%1) has died
+02:17=%1 is dead! Long live %1!
+
; Weapon Categories
03:00=Timed grenade
03:01=Timed grenade