1
0
mirror of https://github.com/veden/Rampant.git synced 2025-02-05 13:14:51 +02:00
Rampant/config.lua

41 lines
1.1 KiB
Lua
Raw Normal View History

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
--[[
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
--]]
2017-05-31 18:46:53 -07:00
config.attackWaveScaling = function (natives)
return mCeil(gaussianRandomRange(natives.attackWaveSize,
2019-11-03 22:19:22 -08:00
natives.attackWaveDeviation,
1,
natives.attackWaveUpperBound))
end
config.settlerWaveScaling = function (natives)
return mCeil(gaussianRandomRange(natives.settlerWaveSize,
2019-11-03 22:19:22 -08:00
natives.settlerWaveDeviation,
natives.expansionMinSize,
natives.expansionMaxSize))
end
return config