Soviet1: If USSR has no engineers AND doesn't have two radar domes, then mission is lost.

This commit is contained in:
Justin Marshall
2020-07-20 15:09:04 -07:00
parent e30fe11a96
commit 77b03a8b8e
+8 -1
View File
@@ -18,11 +18,18 @@ function map_frame()
Lose(Houses.USSR) Lose(Houses.USSR)
end end
-- Ensure USSR has atleast 1 engineer, and if not ussr has two radar domes
if CountInfantry(InfantryTypes.E6, Houses.USSR) == 0 then
if not (CountBuildings(BuildingTypes.DOME, Houses.USSR) == 2) then
Lose(Houses.USSR)
end
end
-- Check to see if the soviets have two radar domes, if so the player has won. -- Check to see if the soviets have two radar domes, if so the player has won.
if CountBuildings(BuildingTypes.DOME, Houses.USSR) == 2 then if CountBuildings(BuildingTypes.DOME, Houses.USSR) == 2 then
ToggleFireSale(Houses.GREECE, 1) -- Renable the fire sale for the AI ToggleFireSale(Houses.GREECE, 1) -- Renable the fire sale for the AI
Win(Houses.USSR) Win(Houses.USSR)
end end
numTeslaTanks = CountUnits(VehicleTypes.TESLATANK) numTeslaTanks = CountUnits(VehicleTypes.TESLATANK)
if numTeslaTanks == 0 then if numTeslaTanks == 0 then