2016-10-07 07:30:31 -07:00
|
|
|
local config = {}
|
|
|
|
|
2017-05-31 18:46:53 -07:00
|
|
|
-- imported
|
|
|
|
|
2016-11-03 16:51:35 -07:00
|
|
|
local mathUtils = require("libs/MathUtils")
|
2017-05-31 18:46:53 -07:00
|
|
|
|
|
|
|
-- imported functions
|
|
|
|
|
2016-11-03 16:51:35 -07:00
|
|
|
local gaussianRandomRange = mathUtils.gaussianRandomRange
|
2017-05-31 18:46:53 -07:00
|
|
|
local mCeil = math.ceil
|
|
|
|
|
2017-06-01 00:03:07 -07:00
|
|
|
|
|
|
|
-- automatic mod detection
|
|
|
|
|
|
|
|
config.ionCannonPresent = settings.startup["ion-cannon-radius"] ~= nil
|
|
|
|
|
2017-05-31 18:46:53 -07:00
|
|
|
-- configurations
|
2016-11-03 16:51:35 -07:00
|
|
|
|
2016-10-07 07:30:31 -07:00
|
|
|
--[[
|
|
|
|
attackWaveScaling is used to calculate the attack wave size from the evolutionFactor
|
2021-02-19 23:31:36 -08:00
|
|
|
default is universe.attackWaveMaxSize * (evolutionFactor ^ 1.666667)
|
2016-10-14 17:00:18 -07:00
|
|
|
DOES NOT affect vanilla biters waves
|
2016-10-07 07:30:31 -07:00
|
|
|
--]]
|
2021-02-19 23:31:36 -08:00
|
|
|
config.attackWaveScaling = function (universe)
|
|
|
|
return mCeil(gaussianRandomRange(universe.attackWaveSize,
|
|
|
|
universe.attackWaveDeviation,
|
2019-11-03 22:19:22 -08:00
|
|
|
1,
|
2021-02-19 23:31:36 -08:00
|
|
|
universe.attackWaveUpperBound))
|
2016-10-07 07:30:31 -07:00
|
|
|
end
|
|
|
|
|
2021-02-19 23:31:36 -08:00
|
|
|
config.settlerWaveScaling = function (universe)
|
|
|
|
return mCeil(gaussianRandomRange(universe.settlerWaveSize,
|
|
|
|
universe.settlerWaveDeviation,
|
|
|
|
universe.expansionMinSize,
|
|
|
|
universe.expansionMaxSize))
|
2018-02-14 00:28:42 -08:00
|
|
|
end
|
|
|
|
|
2016-10-07 07:30:31 -07:00
|
|
|
return config
|
|
|
|
|
|
|
|
|