1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-07 23:01:39 +02:00
Rampant/config.lua

41 lines
1.1 KiB
Lua
Raw Normal View History

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
--[[
attackWaveScaling is used to calculate the attack wave size from the evolutionFactor
2021-02-20 09:31:36 +02:00
default is universe.attackWaveMaxSize * (evolutionFactor ^ 1.666667)
2016-10-15 02:00:18 +02:00
DOES NOT affect vanilla biters waves
--]]
2021-02-20 09:31:36 +02:00
config.attackWaveScaling = function (universe)
return mCeil(gaussianRandomRange(universe.attackWaveSize,
universe.attackWaveDeviation,
2019-11-04 08:19:22 +02:00
1,
2021-02-20 09:31:36 +02:00
universe.attackWaveUpperBound))
end
2021-02-20 09:31:36 +02:00
config.settlerWaveScaling = function (universe)
return mCeil(gaussianRandomRange(universe.settlerWaveSize,
universe.settlerWaveDeviation,
universe.expansionMinSize,
universe.expansionMaxSize))
end
return config