mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
fix grace period
This commit is contained in:
parent
753c43615d
commit
1d6ce41f11
@ -54,7 +54,7 @@ function Public.Tick_actions(tickinterval)
|
||||
if destination.type ~= Surfaces.enum.ISLAND then return end
|
||||
if memory.boat.state ~= Boats.enum_state.LANDED and memory.boat.state ~= Boats.enum_state.RETREATING then return end
|
||||
|
||||
if (memory.game_lost) or (destination.dynamic_data.timeratlandingtime and destination.dynamic_data.timer < destination.dynamic_data.timeratlandingtime + Common.grace_period_on_arriving_at_island_seconds) then return end
|
||||
if (memory.game_lost) or (destination.dynamic_data.timeratlandingtime and destination.dynamic_data.timer < destination.dynamic_data.timeratlandingtime + Balance.grace_period_on_arriving_at_island_seconds) then return end
|
||||
|
||||
if game.tick % (tickinterval * 2) == 0 and memory.boat.state == Boats.enum_state.LANDED then
|
||||
local extra_evo = 2 * tickinterval / 60 * Balance.evolution_per_second()
|
||||
@ -155,8 +155,10 @@ function Public.wave_size_rng() -- random variance in attack sizes
|
||||
wave_size_multiplier = 1.5
|
||||
elseif rng2 >= 15 * rng_scale then
|
||||
wave_size_multiplier = 2
|
||||
else
|
||||
elseif rng2 >= 2 * rng_scale then
|
||||
wave_size_multiplier = 3
|
||||
else
|
||||
wave_size_multiplier = 4
|
||||
end
|
||||
end
|
||||
|
||||
@ -237,7 +239,7 @@ function Public.tell_biters_near_silo_to_attack_it()
|
||||
local enemy_force_name = memory.enemy_force_name
|
||||
|
||||
-- don't do this too early
|
||||
if destination.dynamic_data.timeratlandingtime and destination.dynamic_data.timer < destination.dynamic_data.timeratlandingtime + Common.grace_period_on_arriving_at_island_seconds * 2 then return end
|
||||
if destination.dynamic_data.timeratlandingtime and destination.dynamic_data.timer < destination.dynamic_data.timeratlandingtime + Balance.grace_period_on_arriving_at_island_seconds * 2 then return end
|
||||
if not (destination.dynamic_data.rocketsilos and destination.dynamic_data.rocketsilos[1] and destination.dynamic_data.rocketsilos[1].valid and destination.dynamic_data.rocketsilos[1].destructible) then return end
|
||||
|
||||
local attackcommand = Public.attack_target_entity(destination.dynamic_data.rocketsilos[1])
|
||||
|
@ -214,6 +214,8 @@ end
|
||||
|
||||
Public.expected_time_fraction = 0.7
|
||||
|
||||
Public.grace_period_on_arriving_at_island_seconds = 120
|
||||
|
||||
function Public.expected_time_on_island() --always >0
|
||||
return Public.expected_time_fraction * Public.max_time_on_island_formula_seconds() + Public.grace_period_on_arriving_at_island_seconds
|
||||
end
|
||||
|
@ -32,8 +32,6 @@ Public.autodisband_hours = 24 * 5 -- should not be zero (as this messes with sav
|
||||
|
||||
Public.boat_steps_at_a_time = 1
|
||||
|
||||
Public.grace_period_on_arriving_at_island_seconds = 150
|
||||
|
||||
Public.boat_default_starting_distance_from_shore = 22
|
||||
-- Public.mapedge_distance_from_boat_starting_position = 136
|
||||
Public.mapedge_distance_from_boat_starting_position = 272 -- to accommodate horseshoe
|
||||
|
Loading…
x
Reference in New Issue
Block a user