mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-19 21:10:19 +02:00
attack tweaks
This commit is contained in:
parent
ae0c3a3554
commit
55ee9cf1bf
@ -84,25 +84,13 @@ end
|
|||||||
|
|
||||||
local function on_entity_spawned(event)
|
local function on_entity_spawned(event)
|
||||||
global.on_entity_spawned_counter = global.on_entity_spawned_counter + 1
|
global.on_entity_spawned_counter = global.on_entity_spawned_counter + 1
|
||||||
|
if global.on_entity_spawned_counter % 2 == 1 then return end
|
||||||
if global.on_entity_spawned_counter % 16384 == 8192 then
|
for a = 14, 4, -2 do
|
||||||
send_wave(event.spawner, 512)
|
local b = 2 ^ a
|
||||||
|
if global.on_entity_spawned_counter % b == 0 then
|
||||||
|
send_wave(event.spawner, a ^ 2)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if global.on_entity_spawned_counter % 2048 == 1024 then
|
|
||||||
send_wave(event.spawner, 256)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if global.on_entity_spawned_counter % 512 == 256 then
|
|
||||||
send_wave(event.spawner, 128)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if global.on_entity_spawned_counter % 128 == 64 then
|
|
||||||
send_wave(event.spawner, 16)
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -255,9 +243,9 @@ local function send_tick_wave()
|
|||||||
|
|
||||||
local search_radius = 4
|
local search_radius = 4
|
||||||
for _, player in pairs(game.connected_players) do
|
for _, player in pairs(game.connected_players) do
|
||||||
if player.position.x > search_radius then search_radius = math_floor(player.position.x) end
|
if player.position.x * 0.5 > search_radius then search_radius = math_floor(player.position.x * 0.5) end
|
||||||
end
|
end
|
||||||
if search_radius > 512 then search_radius = 512 end
|
if search_radius > 256 then search_radius = 256 end
|
||||||
|
|
||||||
send_wave(spawners[math_random(1, #spawners)], search_radius)
|
send_wave(spawners[math_random(1, #spawners)], search_radius)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user