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

22 lines
669 B
Lua
Raw Normal View History

local config = {}
2016-11-04 01:51:35 +02:00
local mathUtils = require("libs/MathUtils")
local gaussianRandomRange = mathUtils.gaussianRandomRange
--[[
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
--]]
2017-05-06 11:03:28 +02:00
config.attackWaveScaling = function (evolutionFactor, natives)
local attackWaveMaxSize = natives.attackWaveMaxSize
2017-04-30 09:46:04 +02:00
return math.ceil(gaussianRandomRange(attackWaveMaxSize * (evolutionFactor ^ 1.66667),
(attackWaveMaxSize * 0.5) * 0.333,
2016-11-04 01:51:35 +02:00
1,
2017-04-30 09:46:04 +02:00
attackWaveMaxSize + (attackWaveMaxSize * 0.25)))
end
return config