2016-10-07 07:30:31 -07:00
|
|
|
local config = {}
|
|
|
|
|
2016-11-03 16:51:35 -07:00
|
|
|
local mathUtils = require("libs/MathUtils")
|
|
|
|
local gaussianRandomRange = mathUtils.gaussianRandomRange
|
|
|
|
|
2016-10-07 07:30:31 -07:00
|
|
|
--[[
|
|
|
|
attackWaveScaling is used to calculate the attack wave size from the evolutionFactor
|
2017-05-06 02:03:28 -07:00
|
|
|
default is natives.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
|
|
|
--]]
|
2017-05-06 02:03:28 -07:00
|
|
|
config.attackWaveScaling = function (evolutionFactor, natives)
|
|
|
|
local attackWaveMaxSize = natives.attackWaveMaxSize
|
2017-04-30 00:46:04 -07:00
|
|
|
return math.ceil(gaussianRandomRange(attackWaveMaxSize * (evolutionFactor ^ 1.66667),
|
|
|
|
(attackWaveMaxSize * 0.5) * 0.333,
|
2016-11-03 16:51:35 -07:00
|
|
|
1,
|
2017-04-30 00:46:04 -07:00
|
|
|
attackWaveMaxSize + (attackWaveMaxSize * 0.25)))
|
2016-10-07 07:30:31 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
return config
|
|
|
|
|
|
|
|
|