-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuff_discharge.lua
More file actions
32 lines (29 loc) · 1.36 KB
/
buff_discharge.lua
File metadata and controls
32 lines (29 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- Buff discharge defense equipment
local discharge = data.raw["active-defense-equipment"]["discharge-defense-equipment"]
discharge.attack_parameters = table.deepcopy(data.raw["electric-turret"]["tesla-turret"].attack_parameters)
discharge.attack_parameters.ammo_type.energy_consumption = "75kJ" -- 50% more than personal laser shots
discharge.attack_parameters.damage_modifier = 0.25
discharge.attack_parameters.range = 12
discharge.attack_parameters.cooldown = 60
discharge.automatic = true
discharge.localised_name = {"item-name.tesla-discharge-defense-equipment"}
discharge.localised_description = {"item-description.tesla-discharge-defense-equipment"}
-- Adjust recipe
local recipe = data.raw["recipe"]["discharge-defense-equipment"]
for _, ingredient in pairs(recipe.ingredients) do
if ingredient.name == "laser-turret" then
ingredient.name = "tesla-turret"
end
end
recipe.category = "electromagnetics"
-- Rebalance tech
local tech = data.raw["technology"]["discharge-defense-equipment"]
local tesla_tech = data.raw["technology"]["tesla-weapons"]
tech.unit = {
count = 2000,
ingredients = tesla_tech.unit.ingredients,
time = tesla_tech.unit.time,
}
table.insert(tech.prerequisites, "tesla-weapons")
tech.localised_name = {"item-name.tesla-discharge-defense-equipment"}
tech.localised_description = {"item-description.tesla-discharge-defense-equipment"}