hedgewars/uGears.pas
changeset 4792 68f9b331014a
parent 4790 4cb3f7890fbd
child 4806 48c1a395f0a7
equal deleted inserted replaced
4791:458d9854c679 4792:68f9b331014a
   555         begin
   555         begin
   556         if (hwRound(Gear^.Y) >= cWaterLine) then
   556         if (hwRound(Gear^.Y) >= cWaterLine) then
   557             begin
   557             begin
   558             t:= max(Gear^.Damage, Gear^.Health);
   558             t:= max(Gear^.Damage, Gear^.Health);
   559             Gear^.Damage:= t;
   559             Gear^.Damage:= t;
   560             if (cWaterOpacity < $FF) and (hwRound(Gear^.Y) < cWaterLine + 256) then
   560             if ((not SuddenDeathDmg and (cWaterOpacity < $FF)) or (SuddenDeathDmg and (cWaterOpacity < $FF))) and (hwRound(Gear^.Y) < cWaterLine + 256) then
   561                 spawnHealthTagForHH(Gear, t);
   561                 spawnHealthTagForHH(Gear, t);
   562             uStats.HedgehogDamaged(Gear)
   562             uStats.HedgehogDamaged(Gear)
   563             end;
   563             end;
   564 
   564 
   565         team:= Gear^.Hedgehog^.Team;
   565         team:= Gear^.Hedgehog^.Team;
   791             inc(step)
   791             inc(step)
   792             end;
   792             end;
   793     stHealth: begin
   793     stHealth: begin
   794             if (cWaterRise <> 0) or (cHealthDecrease <> 0) then
   794             if (cWaterRise <> 0) or (cHealthDecrease <> 0) then
   795                 begin
   795                 begin
   796                 if (TotalRounds = cSuddenDTurns) and not SuddenDeathDmg and not isInMultiShoot then
   796                 if (TotalRounds = cSuddenDTurns) and not SuddenDeath and not isInMultiShoot then
   797                     begin
   797                     begin
   798                     SuddenDeathDmg:= true;
   798                     SuddenDeath:= true;
       
   799                     if cHealthDecrease <> 0 then
       
   800                         begin
       
   801                         SuddenDeathDmg:= true;
       
   802                         ChangeToSDClouds
       
   803                         end;
   799                     AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
   804                     AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
   800                     playSound(sndSuddenDeath);
   805                     playSound(sndSuddenDeath);
   801                     MusicFN:= SDMusic;
   806                     MusicFN:= SDMusic;
   802                     ChangeMusic
   807                     ChangeMusic
   803                     end
   808                     end
  1883     RegisterVariable('hogsay', vtCommand, @chHogSay, true );
  1888     RegisterVariable('hogsay', vtCommand, @chHogSay, true );
  1884 
  1889 
  1885     CurAmmoGear:= nil;
  1890     CurAmmoGear:= nil;
  1886     GearsList:= nil;
  1891     GearsList:= nil;
  1887     KilledHHs:= 0;
  1892     KilledHHs:= 0;
       
  1893     SuddenDeath:= false;
  1888     SuddenDeathDmg:= false;
  1894     SuddenDeathDmg:= false;
  1889     SpeechType:= 1;
  1895     SpeechType:= 1;
  1890     TrainingTargetGear:= nil;
  1896     TrainingTargetGear:= nil;
  1891     skipFlag:= false;
  1897     skipFlag:= false;
  1892 
  1898