933 |
933 |
934 if (GameFlags and gfArtillery) = 0 then |
934 if (GameFlags and gfArtillery) = 0 then |
935 cArtillery:= false; |
935 cArtillery:= false; |
936 // have to sweep *all* current team hedgehogs since it is theoretically possible if you have enough invulnerabilities and switch turns to make your entire team invulnerable |
936 // have to sweep *all* current team hedgehogs since it is theoretically possible if you have enough invulnerabilities and switch turns to make your entire team invulnerable |
937 if (CurrentTeam <> nil) then |
937 if (CurrentTeam <> nil) then |
938 with CurrentTeam^ do |
938 with CurrentTeam^ do |
939 for i:= 0 to cMaxHHIndex do |
939 for i:= 0 to cMaxHHIndex do |
940 with Hedgehogs[i] do |
940 with Hedgehogs[i] do |
941 begin |
941 begin |
942 if (SpeechGear <> nil) then |
942 if (SpeechGear <> nil) then |
943 begin |
943 begin |
944 DeleteVisualGear(SpeechGear); // remove to restore persisting beyond end of turn. Tiy says was too much of a gameplay issue |
944 DeleteVisualGear(SpeechGear); // remove to restore persisting beyond end of turn. Tiy says was too much of a gameplay issue |
945 SpeechGear:= nil |
945 SpeechGear:= nil |
946 end; |
946 end; |
947 |
947 |
948 if (Gear <> nil) then |
948 if (Gear <> nil) then |
949 if (GameFlags and gfInvulnerable) = 0 then |
949 begin |
950 Gear^.Invulnerable:= false; |
950 if (GameFlags and gfInvulnerable) = 0 then |
951 end; |
951 Gear^.Invulnerable:= false; |
|
952 if (GameFlags and gfResetHealth) <> 0 then |
|
953 begin |
|
954 if Gear^.Health < InitialHealth then |
|
955 begin |
|
956 Gear^.Health:= InitialHealth; |
|
957 RenderHealth(CurrentHedgehog^); |
|
958 end; |
|
959 end; |
|
960 end; |
|
961 end; |
952 t:= GearsList; |
962 t:= GearsList; |
953 while t <> nil do |
963 while t <> nil do |
954 begin |
964 begin |
955 t^.PortalCounter:= 0; |
965 t^.PortalCounter:= 0; |
956 t:= t^.NextGear |
966 t:= t^.NextGear |
957 end; |
967 end; |
958 |
968 |
959 if (GameFlags and gfResetWeps) <> 0 then |
969 if (GameFlags and gfResetWeps) <> 0 then |
960 ResetWeapons |
970 ResetWeapons; |
|
971 if (GameFlags and gfResetHealth) <> 0 then |
|
972 RecountTeamHealth(CurrentTeam); |
961 end; |
973 end; |
962 |
974 |
963 procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource); |
975 procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource); |
964 var s: shortstring; |
976 var s: shortstring; |
965 vampDmg, tmpDmg, i: Longword; |
977 vampDmg, tmpDmg, i: Longword; |
1201 FindPlace(TrainingTargetGear, false, 0, LAND_WIDTH); |
1213 FindPlace(TrainingTargetGear, false, 0, LAND_WIDTH); |
1202 end; |
1214 end; |
1203 |
1215 |
1204 if ((GameFlags and gfForts) = 0) then |
1216 if ((GameFlags and gfForts) = 0) then |
1205 begin |
1217 begin |
1206 if ((GameFlags and gfMines) <> 0) then |
1218 for i:= 0 to Pred(cLandMines) do |
1207 for i:= 0 to Pred(cLandMines) do |
1219 begin |
1208 begin |
1220 Gear:= AddGear(0, 0, gtMine, 0, _0, _0, 0); |
1209 Gear:= AddGear(0, 0, gtMine, 0, _0, _0, 0); |
1221 FindPlace(Gear, false, 0, LAND_WIDTH); |
1210 FindPlace(Gear, false, 0, LAND_WIDTH); |
1222 end; |
1211 end; |
|
1212 for i:= 0 to Pred(cExplosives) do |
1223 for i:= 0 to Pred(cExplosives) do |
1213 begin |
1224 begin |
1214 Gear:= AddGear(0, 0, gtExplosives, 0, _0, _0, 0); |
1225 Gear:= AddGear(0, 0, gtExplosives, 0, _0, _0, 0); |
1215 FindPlace(Gear, false, 0, LAND_WIDTH); |
1226 FindPlace(Gear, false, 0, LAND_WIDTH); |
1216 end; |
1227 end; |