hedgewars/uGears.pas
changeset 12925 21827fc9ca98
parent 12923 6deb29364723
child 12933 fa402ce826c2
equal deleted inserted replaced
12924:0f02dd1ff4c9 12925:21827fc9ca98
  1042 begin
  1042 begin
  1043     if SuddenDeath then
  1043     if SuddenDeath then
  1044         exit;
  1044         exit;
  1045 
  1045 
  1046     SuddenDeath:= true;
  1046     SuddenDeath:= true;
       
  1047     SuddenDeathActive:= true;
       
  1048 
       
  1049     // Special effects (only w/ health decrease)
  1047     if cHealthDecrease <> 0 then
  1050     if cHealthDecrease <> 0 then
  1048     begin
  1051     begin
  1049         SuddenDeathDmg:= true;
  1052         SuddenDeathDmg:= true;
  1050         // flash
  1053         // White screen flash
  1051         ScreenFade:= sfFromWhite;
  1054         ScreenFade:= sfFromWhite;
  1052         ScreenFadeValue:= sfMax;
  1055         ScreenFadeValue:= sfMax;
  1053         ScreenFadeSpeed:= 1;
  1056         ScreenFadeSpeed:= 1;
  1054 
  1057 
       
  1058         // Clouds, flakes, sky tint
  1055         ChangeToSDClouds;
  1059         ChangeToSDClouds;
  1056         ChangeToSDFlakes;
  1060         ChangeToSDFlakes;
  1057         SetSkyColor(SDSkyColor.r * (SDTint.r/255) / 255, SDSkyColor.g * (SDTint.g/255) / 255, SDSkyColor.b * (SDTint.b/255) / 255);
  1061         SetSkyColor(SDSkyColor.r * (SDTint.r/255) / 255, SDSkyColor.g * (SDTint.g/255) / 255, SDSkyColor.b * (SDTint.b/255) / 255);
  1058         Ammoz[amTardis].SkipTurns:= 9999;
  1062     end;
  1059         Ammoz[amTardis].Probability:= 0;
  1063 
  1060     end;
  1064     // Disable tardis
       
  1065     Ammoz[amTardis].SkipTurns:= 9999;
       
  1066     Ammoz[amTardis].Probability:= 0;
       
  1067 
  1061     AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
  1068     AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
  1062     ScriptCall('onSuddenDeath');
  1069     ScriptCall('onSuddenDeath');
  1063     playSound(sndSuddenDeath);
  1070     playSound(sndSuddenDeath);
  1064     StopMusic;
  1071     StopMusic;
  1065     if SDMusicFN <> '' then
  1072     if SDMusicFN <> '' then