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