1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-07 13:31:40 +02:00

balance update

This commit is contained in:
MewMew 2019-11-23 23:27:57 +01:00
parent d1d8f60d67
commit 8986cac385
3 changed files with 45 additions and 33 deletions

View File

@ -0,0 +1,20 @@
--Flamethrower Turret Nerf
local function on_research_finished(event)
local research = event.research
local force_name = research.force.name
if research.name == "military" then
if not global.flamethrower_damage then global.flamethrower_damage = {} end
global.flamethrower_damage[force_name] = -0.50
game.forces[force_name].set_turret_attack_modifier("flamethrower-turret", global.flamethrower_damage[force_name])
game.forces[force_name].set_ammo_damage_modifier("flamethrower", global.flamethrower_damage[force_name])
end
if string.sub(research.name, 0, 18) == "refined-flammables" then
global.flamethrower_damage[force_name] = global.flamethrower_damage[force_name] + 0.10
game.forces[force_name].set_turret_attack_modifier("flamethrower-turret", global.flamethrower_damage[force_name])
game.forces[force_name].set_ammo_damage_modifier("flamethrower", global.flamethrower_damage[force_name])
end
end
local event = require 'utils.event'
event.add(defines.events.on_research_finished, on_research_finished)

View File

@ -1,4 +1,5 @@
--require "modules.no_turrets"
require "maps.biter_hatchery.flamethrower_nerf"
local RPG = require "modules.rpg"
local Tabs = require 'comfy_panel.main'
local Map_score = require "modules.map_score"
@ -177,7 +178,7 @@ local function get_units(force_name)
local count = 0
for _, unit in pairs(global.map_forces[force_name].units) do
if not unit.unit_group then
if count > 160 then break end
if count > 256 then break end
units[#units + 1] = unit
count = count + 1
end

View File

@ -1,55 +1,46 @@
local raffle = {
["automation-science-pack"] = {{}, 1},
["automation-science-pack"] = {{}, 1},
["logistic-science-pack"] = {{}, 2},
["military-science-pack"] = {{}, 3},
["chemical-science-pack"] = {{}, 4},
["production-science-pack"] = {{}, 5},
["utility-science-pack"] = {{}, 5},
["space-science-pack"] = {{}, 6},
["space-science-pack"] = {{}, 9},
}
local function add_unit(t, size, chance)
for _ = 1, chance, 1 do table.insert(t, size .. "-spitter") end
for _ = 1, chance * 5, 1 do table.insert(t, size .. "-biter") end
end
local t = raffle["automation-science-pack"][1]
for _ = 1, 4, 1 do table.insert(t, "small-biter") end
for _ = 1, 1, 1 do table.insert(t, "small-spitter") end
add_unit(t, "small", 1)
local t = raffle["logistic-science-pack"][1]
for _ = 1, 40, 1 do table.insert(t, "small-biter") end
for _ = 1, 10, 1 do table.insert(t, "small-spitter") end
for _ = 1, 4, 1 do table.insert(t, "medium-biter") end
for _ = 1, 1, 1 do table.insert(t, "medium-spitter") end
add_unit(t, "small", 5)
add_unit(t, "medium", 1)
local t = raffle["military-science-pack"][1]
for _ = 1, 40, 1 do table.insert(t, "small-biter") end
for _ = 1, 10, 1 do table.insert(t, "small-spitter") end
for _ = 1, 40, 1 do table.insert(t, "medium-biter") end
for _ = 1, 10, 1 do table.insert(t, "medium-spitter") end
for _ = 1, 4, 1 do table.insert(t, "big-biter") end
for _ = 1, 1, 1 do table.insert(t, "big-spitter") end
add_unit(t, "small", 10)
add_unit(t, "medium", 3)
add_unit(t, "big", 1)
local t = raffle["chemical-science-pack"][1]
for _ = 1, 4, 1 do table.insert(t, "small-biter") end
for _ = 1, 1, 1 do table.insert(t, "small-spitter") end
for _ = 1, 32, 1 do table.insert(t, "medium-biter") end
for _ = 1, 8, 1 do table.insert(t, "medium-spitter") end
for _ = 1, 12, 1 do table.insert(t, "big-biter") end
for _ = 1, 3, 1 do table.insert(t, "big-spitter") end
add_unit(t, "small", 1)
add_unit(t, "medium", 9)
add_unit(t, "big", 2)
local t = raffle["production-science-pack"][1]
for _ = 1, 4, 1 do table.insert(t, "medium-biter") end
for _ = 1, 1, 1 do table.insert(t, "medium-spitter") end
for _ = 1, 40, 1 do table.insert(t, "big-biter") end
for _ = 1, 10, 1 do table.insert(t, "big-spitter") end
for _ = 1, 4, 1 do table.insert(t, "behemoth-biter") end
for _ = 1, 1, 1 do table.insert(t, "behemoth-spitter") end
add_unit(t, "medium", 1)
add_unit(t, "big", 12)
add_unit(t, "behemoth", 2)
local t = raffle["utility-science-pack"][1]
for _ = 1, 56, 1 do table.insert(t, "big-biter") end
for _ = 1, 14, 1 do table.insert(t, "big-spitter") end
for _ = 1, 8, 1 do table.insert(t, "behemoth-biter") end
for _ = 1, 2, 1 do table.insert(t, "behemoth-spitter") end
add_unit(t, "big", 5)
add_unit(t, "behemoth", 1)
local t = raffle["space-science-pack"][1]
for _ = 1, 4, 1 do table.insert(t, "behemoth-biter") end
for _ = 1, 1, 1 do table.insert(t, "behemoth-spitter") end
add_unit(t, "big", 1)
add_unit(t, "behemoth", 3)
return raffle