1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-30 04:40:54 +02:00

77 lines
2.2 KiB
Lua
Raw Normal View History

2020-10-30 22:05:05 +01:00
local Difficulty = require 'modules.difficulty_vote_by_amount'
local Public = require 'maps.mountain_fortress_v3.table'
2020-05-17 12:23:55 +02:00
function Public.init_enemy_weapon_damage()
local data = {
2020-07-28 11:24:16 +02:00
['artillery-shell'] = -1.3,
2020-06-03 20:09:00 +02:00
['biological'] = 0,
2021-05-16 14:42:15 +02:00
['beam'] = 0,
2020-06-03 20:09:00 +02:00
['bullet'] = 0,
2020-05-17 12:23:55 +02:00
['cannon-shell'] = 0,
['capsule'] = 0,
['electric'] = 0,
['flamethrower'] = 0,
['grenade'] = 0,
2021-05-16 14:42:15 +02:00
['laser'] = 0,
2020-05-17 12:23:55 +02:00
['landmine'] = 0,
2020-06-03 20:09:00 +02:00
['melee'] = 0,
2020-05-17 12:23:55 +02:00
['rocket'] = 0,
['shotgun-shell'] = 0
}
local e = game.forces.enemy
2023-09-20 21:37:45 +02:00
local a = game.forces.aggressors
local af = game.forces.aggressors_frenzy
2020-05-17 12:23:55 +02:00
2020-06-03 20:09:00 +02:00
e.technologies['refined-flammables-1'].researched = true
e.technologies['refined-flammables-2'].researched = true
e.technologies['energy-weapons-damage-1'].researched = true
2023-09-20 21:37:45 +02:00
a.technologies['refined-flammables-1'].researched = true
a.technologies['refined-flammables-2'].researched = true
a.technologies['energy-weapons-damage-1'].researched = true
af.technologies['refined-flammables-1'].researched = true
af.technologies['refined-flammables-2'].researched = true
af.technologies['energy-weapons-damage-1'].researched = true
2020-05-17 12:23:55 +02:00
for k, v in pairs(data) do
e.set_ammo_damage_modifier(k, v)
2023-09-20 21:37:45 +02:00
a.set_ammo_damage_modifier(k, v)
af.set_ammo_damage_modifier(k, v)
2020-05-17 12:23:55 +02:00
end
end
function Public.enemy_weapon_damage()
2020-05-17 12:23:55 +02:00
local e = game.forces.enemy
2023-09-20 21:37:45 +02:00
local a = game.forces.aggressors
local af = game.forces.aggressors_frenzy
2020-05-17 12:23:55 +02:00
local data = {
2020-10-29 13:07:42 +01:00
['artillery-shell'] = 0.05,
['biological'] = 0.06,
2021-05-16 14:42:15 +02:00
['beam'] = 0.08,
2020-05-23 21:18:18 +02:00
['bullet'] = 0.08,
['capsule'] = 0.08,
['electric'] = 0.08,
['flamethrower'] = 0.08,
2021-05-16 14:42:15 +02:00
['laser'] = 0.08,
2020-06-03 20:09:00 +02:00
['landmine'] = 0.08,
2020-05-23 21:18:18 +02:00
['melee'] = 0.08
2020-05-17 12:23:55 +02:00
}
for k, v in pairs(data) do
local new = Difficulty.get().value * v
2020-05-17 12:23:55 +02:00
local e_old = e.get_ammo_damage_modifier(k)
2023-09-20 21:37:45 +02:00
local a_old = a.get_ammo_damage_modifier(k)
local af_old = af.get_ammo_damage_modifier(k)
2020-05-17 12:23:55 +02:00
e.set_ammo_damage_modifier(k, new + e_old)
2023-09-20 21:37:45 +02:00
a.set_ammo_damage_modifier(k, new + a_old)
af.set_ammo_damage_modifier(k, new + af_old)
2020-05-17 12:23:55 +02:00
end
end
return Public