hedgewars/uGears.pas
changeset 13642 3d14950641a4
parent 13634 73c2a669c1fd
child 13651 56a925256039
equal deleted inserted replaced
13641:007813b81f1b 13642:3d14950641a4
   342             else if (TotalRounds < cSuddenDTurns) and (not isInMultiShoot) then
   342             else if (TotalRounds < cSuddenDTurns) and (not isInMultiShoot) then
   343                 begin
   343                 begin
   344                 i:= cSuddenDTurns - TotalRounds;
   344                 i:= cSuddenDTurns - TotalRounds;
   345                 s:= ansistring(inttostr(i));
   345                 s:= ansistring(inttostr(i));
   346                 if i = 1 then
   346                 if i = 1 then
   347                     AddCaption(trmsg[sidRoundSD], cWhiteColor, capgrpGameState)
   347                     AddCaption(trmsg[sidRoundSD], capcolDefault, capgrpGameState)
   348                 else if (i = 2) or ((i > 0) and ((i mod 50 = 0) or ((i <= 25) and (i mod 5 = 0)))) then
   348                 else if (i = 2) or ((i > 0) and ((i mod 50 = 0) or ((i <= 25) and (i mod 5 = 0)))) then
   349                     AddCaption(FormatA(trmsg[sidRoundsSD], s), cWhiteColor, capgrpGameState);
   349                     AddCaption(FormatA(trmsg[sidRoundsSD], s), capcolDefault, capgrpGameState);
   350                 end;
   350                 end;
   351             end;
   351             end;
   352             if bBetweenTurns
   352             if bBetweenTurns
   353             or isInMultiShoot
   353             or isInMultiShoot
   354             or (TotalRounds = -1) then
   354             or (TotalRounds = -1) then
   993             begin
   993             begin
   994             FollowGear^.Pos := posCaseHealth;
   994             FollowGear^.Pos := posCaseHealth;
   995             // health crate is smaller than the other crates
   995             // health crate is smaller than the other crates
   996             FollowGear^.Radius := cCaseHealthRadius;
   996             FollowGear^.Radius := cCaseHealthRadius;
   997             FollowGear^.Health := content;
   997             FollowGear^.Health := content;
   998             AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
   998             AddCaption(GetEventString(eidNewHealthPack), capcolDefault, capgrpAmmoInfo);
   999             end;
   999             end;
  1000         AmmoCrate:
  1000         AmmoCrate:
  1001             begin
  1001             begin
  1002             FollowGear^.Pos := posCaseAmmo;
  1002             FollowGear^.Pos := posCaseAmmo;
  1003             FollowGear^.AmmoType := TAmmoType(content);
  1003             FollowGear^.AmmoType := TAmmoType(content);
  1004             AddCaption(GetEventString(eidNewAmmoPack), cWhiteColor, capgrpAmmoInfo);
  1004             AddCaption(GetEventString(eidNewAmmoPack), capcolDefault, capgrpAmmoInfo);
  1005             end;
  1005             end;
  1006         UtilityCrate:
  1006         UtilityCrate:
  1007             begin
  1007             begin
  1008             FollowGear^.Pos := posCaseUtility;
  1008             FollowGear^.Pos := posCaseUtility;
  1009             FollowGear^.AmmoType := TAmmoType(content);
  1009             FollowGear^.AmmoType := TAmmoType(content);
  1010             AddCaption(GetEventString(eidNewUtilityPack), cWhiteColor, capgrpAmmoInfo);
  1010             AddCaption(GetEventString(eidNewUtilityPack), capColDefault, capgrpAmmoInfo);
  1011             end;
  1011             end;
  1012     end;
  1012     end;
  1013 
  1013 
  1014     if ( (x = 0) and (y = 0) ) then
  1014     if ( (x = 0) and (y = 0) ) then
  1015         FindPlace(FollowGear, true, 0, LAND_WIDTH);
  1015         FindPlace(FollowGear, true, 0, LAND_WIDTH);
  1032         HealthCrate:
  1032         HealthCrate:
  1033             begin
  1033             begin
  1034             FollowGear^.Pos := FollowGear^.Pos + posCaseHealth;
  1034             FollowGear^.Pos := FollowGear^.Pos + posCaseHealth;
  1035             // health crate is smaller than the other crates
  1035             // health crate is smaller than the other crates
  1036             FollowGear^.Radius := cCaseHealthRadius;
  1036             FollowGear^.Radius := cCaseHealthRadius;
  1037             AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
  1037             AddCaption(GetEventString(eidNewHealthPack), capcolDefault, capgrpAmmoInfo);
  1038             end;
  1038             end;
  1039         AmmoCrate:
  1039         AmmoCrate:
  1040             begin
  1040             begin
  1041             FollowGear^.Pos := FollowGear^.Pos + posCaseAmmo;
  1041             FollowGear^.Pos := FollowGear^.Pos + posCaseAmmo;
  1042             AddCaption(GetEventString(eidNewAmmoPack), cWhiteColor, capgrpAmmoInfo);
  1042             AddCaption(GetEventString(eidNewAmmoPack), capcolDefault, capgrpAmmoInfo);
  1043             end;
  1043             end;
  1044         UtilityCrate:
  1044         UtilityCrate:
  1045             begin
  1045             begin
  1046             FollowGear^.Pos := FollowGear^.Pos + posCaseUtility;
  1046             FollowGear^.Pos := FollowGear^.Pos + posCaseUtility;
  1047             AddCaption(GetEventString(eidNewUtilityPack), cWhiteColor, capgrpAmmoInfo);
  1047             AddCaption(GetEventString(eidNewUtilityPack), capcolDefault, capgrpAmmoInfo);
  1048             end;
  1048             end;
  1049     end;
  1049     end;
  1050 
  1050 
  1051     if ( (x = 0) and (y = 0) ) then
  1051     if ( (x = 0) and (y = 0) ) then
  1052         FindPlace(FollowGear, true, 0, LAND_WIDTH);
  1052         FindPlace(FollowGear, true, 0, LAND_WIDTH);
  1079 
  1079 
  1080     // Disable tardis
  1080     // Disable tardis
  1081     Ammoz[amTardis].SkipTurns:= 9999;
  1081     Ammoz[amTardis].SkipTurns:= 9999;
  1082     Ammoz[amTardis].Probability:= 0;
  1082     Ammoz[amTardis].Probability:= 0;
  1083 
  1083 
  1084     AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState);
  1084     AddCaption(trmsg[sidSuddenDeath], capcolDefault, capgrpGameState);
  1085     ScriptCall('onSuddenDeath');
  1085     ScriptCall('onSuddenDeath');
  1086     playSound(sndSuddenDeath);
  1086     playSound(sndSuddenDeath);
  1087     StopMusic;
  1087     StopMusic;
  1088     if SDMusicFN <> '' then
  1088     if SDMusicFN <> '' then
  1089         PlayMusic
  1089         PlayMusic