Skip to content

Commit

Permalink
Ruins Tweak (#3758)
Browse files Browse the repository at this point in the history
- Bias ruin turret spawns towards picking low tiers.
  • Loading branch information
Damgam authored Sep 22, 2024
1 parent 8254c19 commit 61a8e77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions luarules/gadgets/ai_ruins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ for i = 1,#scavConfig.unprocessedScavTurrets do
end
if defs.type ~= "nuke" and UnitDefNames[unitName] and not UnitDefNames[unitName].isFactory then -- we don't want nukes and factories in ruins
if defs.surface == "land" then
for _ = 1,defs.maxExisting do
for _ = 1,defs.maxExisting*((7-i)^2) do
landDefences[#landDefences+1] = unitName
end
elseif defs.surface == "sea" then
for _ = 1,defs.maxExisting do
for _ = 1,defs.maxExisting*((7-i)^2) do
seaDefences[#seaDefences+1] = unitName
end
elseif defs.surface == "mixed" then
for _ = 1,defs.maxExisting do
for _ = 1,defs.maxExisting*((7-i)^2) do
landDefences[#landDefences+1] = unitName
seaDefences[#seaDefences+1] = unitName
end
Expand Down Expand Up @@ -240,7 +240,7 @@ function getNearestBlocker(x, z)
end
end
end
Spring.Echo(lowestDist, math.sqrt(lowestDist))
--Spring.Echo(lowestDist, math.sqrt(lowestDist))
return math.sqrt(lowestDist)
end

Expand Down

0 comments on commit 61a8e77

Please sign in to comment.