1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-19 21:10:19 +02:00

attack tweaks

This commit is contained in:
MewMew 2020-03-26 19:27:15 +01:00
parent ae0c3a3554
commit 55ee9cf1bf

View File

@ -84,26 +84,14 @@ 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
return if global.on_entity_spawned_counter % b == 0 then
end send_wave(event.spawner, a ^ 2)
return
if global.on_entity_spawned_counter % 2048 == 1024 then end
send_wave(event.spawner, 256) end
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
local function on_entity_died(event) local function on_entity_died(event)
@ -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