From d1b79be1bfb052d07fc578c0062f7b240d3da13b Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Mon, 18 May 2020 21:40:34 +0100 Subject: [PATCH 1/2] fix an awful bug --- maps/chronosphere/balance.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maps/chronosphere/balance.lua b/maps/chronosphere/balance.lua index 67496184..c50f430e 100644 --- a/maps/chronosphere/balance.lua +++ b/maps/chronosphere/balance.lua @@ -26,7 +26,7 @@ end local function difficulty_exp(difficulty,exponent) - return math_floor(math_pow(difficulty,exponent)) + return math_pow(difficulty,exponent) end -- EXPONENT GUIDE -- exponent 1 -> {0.25, 0.50, 0.75, 1.00, 1.50, 3.00, 5.00} @@ -115,7 +115,7 @@ function Public.post_jump_initial_pollution(jumps, difficulty) end -function Public.pollution_spent_per_attack(difficulty) return 60 * difficulty_exp(difficulty, -1.4) end +function Public.pollution_spent_per_attack(difficulty) return math_ceil(60 * difficulty_exp(difficulty, -1.4)) end function Public.defaultai_attack_pollution_consumption_modifier(difficulty) return 0.8 * difficulty_exp(difficulty, -1.4) end From 1f6fd1bc628bda5a3026605641c6080349b046f0 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Mon, 18 May 2020 21:42:44 +0100 Subject: [PATCH 2/2] and another fix... --- maps/chronosphere/ai.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maps/chronosphere/ai.lua b/maps/chronosphere/ai.lua index 2dcddcaf..d00bf92d 100644 --- a/maps/chronosphere/ai.lua +++ b/maps/chronosphere/ai.lua @@ -228,6 +228,7 @@ end Public.send_near_biters_to_objective = function() local objective = Chrono_table.get_table() if objective.chronojumps == 0 then return end + if objective.passivetimer < 60 then return end if not objective.locomotive then return end if not objective.locomotive_cargo[1] then return end if not objective.locomotive_cargo[2] then return end @@ -510,6 +511,7 @@ end Public.pre_main_attack = function() local objective = Chrono_table.get_table() if objective.chronojumps == 0 then return end + if objective.passivetimer < 60 then return end local surface = game.surfaces[objective.active_surface_index] set_biter_raffle_table(surface) end @@ -517,6 +519,7 @@ end Public.perform_main_attack = function() local objective = Chrono_table.get_table() if objective.chronojumps == 0 then return end + if objective.passivetimer < 60 then return end local surface = game.surfaces[objective.active_surface_index] create_attack_group(surface) end @@ -524,6 +527,7 @@ end Public.wake_up_sleepy_groups = function() local objective = Chrono_table.get_table() if objective.chronojumps == 0 then return end + if objective.passivetimer < 60 then return end local entity local unit_group for _, biter in pairs(objective.active_biters) do