diff --git a/maps/labyrinth.lua b/maps/labyrinth.lua index 25a49582..91c72737 100644 --- a/maps/labyrinth.lua +++ b/maps/labyrinth.lua @@ -983,6 +983,21 @@ local function on_entity_damaged(event) end end +local function on_tick(event) + if game.tick % 4000 == 0 then + if math.random(1, 4) ~= 1 then return end + local surface = game.surfaces["labyrinth"] + local area = {{-10000, -10000}, {10000, 0}} + local biters = surface.find_entities_filtered({type = "unit", force = "enemy", area = area}) + for _, biter in pairs(biters) do + biter.set_command({type=defines.command.attack_area, destination={x = 16, y = 16}, radius=15, distraction=defines.distraction.by_anything}) + end + if #biters > 0 then + game.print("You hear them screeching in the depths. They are trying to reach the entrance!", {r=0.75, g=0, b=0}) + end + end +end + function dump_layout() local surface = game.surfaces["labyrinth"] game.write_file("layout.lua", "" , false) @@ -1026,6 +1041,7 @@ function dump_layout() end end +event.add(defines.events.on_tick, on_tick) event.add(defines.events.on_robot_built_entity, on_robot_built_entity) event.add(defines.events.on_entity_damaged, on_entity_damaged) event.add(defines.events.on_built_entity, on_built_entity) diff --git a/maps/labyrinth_changelog.txt b/maps/labyrinth_changelog.txt new file mode 100644 index 00000000..75c89ecc --- /dev/null +++ b/maps/labyrinth_changelog.txt @@ -0,0 +1,3 @@ +0.01 +loot table adjustments +the dungeon inhabitants will now try to swarm to the entrance sometimes \ No newline at end of file