# HG changeset patch # User Wuzzy # Date 1518070179 -3600 # Node ID 21827fc9ca98c5db18c0304c7ac1850b53bc59f2 # Parent 0f02dd1ff4c98dd36c6099b6267f9edf4037800c Fix timebox being usable in SD w/ damage=0 diff -r 0f02dd1ff4c9 -r 21827fc9ca98 ChangeLog.txt --- a/ChangeLog.txt Wed Feb 07 12:30:11 2018 +0100 +++ b/ChangeLog.txt Thu Feb 08 07:09:39 2018 +0100 @@ -4,6 +4,7 @@ Game: + New weapon: Minigun + Change weapon icons: Mudball, air mine + * Fix time box being usable in Sudden Death with 0 health decrease * Fix chat input key being sometimes registered twice Content: diff -r 0f02dd1ff4c9 -r 21827fc9ca98 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Feb 07 12:30:11 2018 +0100 +++ b/hedgewars/uGears.pas Thu Feb 08 07:09:39 2018 +0100 @@ -1044,20 +1044,27 @@ exit; SuddenDeath:= true; + SuddenDeathActive:= true; + + // Special effects (only w/ health decrease) if cHealthDecrease <> 0 then begin SuddenDeathDmg:= true; - // flash + // White screen flash ScreenFade:= sfFromWhite; ScreenFadeValue:= sfMax; ScreenFadeSpeed:= 1; + // Clouds, flakes, sky tint ChangeToSDClouds; ChangeToSDFlakes; SetSkyColor(SDSkyColor.r * (SDTint.r/255) / 255, SDSkyColor.g * (SDTint.g/255) / 255, SDSkyColor.b * (SDTint.b/255) / 255); - Ammoz[amTardis].SkipTurns:= 9999; - Ammoz[amTardis].Probability:= 0; end; + + // Disable tardis + Ammoz[amTardis].SkipTurns:= 9999; + Ammoz[amTardis].Probability:= 0; + AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState); ScriptCall('onSuddenDeath'); playSound(sndSuddenDeath); diff -r 0f02dd1ff4c9 -r 21827fc9ca98 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Wed Feb 07 12:30:11 2018 +0100 +++ b/hedgewars/uGearsUtils.pas Thu Feb 08 07:09:39 2018 +0100 @@ -1192,7 +1192,7 @@ usable:= true; HH:= HHGear^.Hedgehog; if HHGear <> nil then - if (HHGear = nil) or (HH^.King) or (SuddenDeathDmg) then + if (HHGear = nil) or (HH^.King) or (SuddenDeathActive) then usable:= false; cnt:= 0; for j:= 0 to Pred(HH^.Team^.Clan^.TeamsNumber) do diff -r 0f02dd1ff4c9 -r 21827fc9ca98 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Wed Feb 07 12:30:11 2018 +0100 +++ b/hedgewars/uStore.pas Thu Feb 08 07:09:39 2018 +0100 @@ -1000,7 +1000,7 @@ if (CurrentTeam <> nil) and (Ammoz[atype].SkipTurns >= CurrentTeam^.Clan^.TurnNumber) then // weapon or utility is not yet available begin - if (atype = amTardis) and (suddenDeathDmg) then + if (atype = amTardis) and (SuddenDeathActive) then extra:= trmsg[sidNotAvailableInSD] else extra:= trmsg[sidNotYetAvailable]; diff -r 0f02dd1ff4c9 -r 21827fc9ca98 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Wed Feb 07 12:30:11 2018 +0100 +++ b/hedgewars/uVariables.pas Thu Feb 08 07:09:39 2018 +0100 @@ -2480,8 +2480,9 @@ AllInactive: boolean; PrvInactive: boolean; KilledHHs: Longword; - SuddenDeath: Boolean; - SuddenDeathDmg: Boolean; + SuddenDeath: Boolean; // If the Sudden Death check has been made + SuddenDeathActive: Boolean; // Is in Sudden Death with any gameplay effect + SuddenDeathDmg: Boolean; // Is in Sudden Death with damage SpeechType: Longword; SpeechText: shortstring; PlacingHogs: boolean; // a convenience flag to indicate placement of hogs is still in progress