mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
v1.0.4.7.3
This commit is contained in:
parent
697abc3d98
commit
a8d8ceb860
@ -373,6 +373,10 @@ function Public.flamers_tech_multipliers()
|
||||
return 1/2
|
||||
end
|
||||
|
||||
function Public.flamers_base_nerf()
|
||||
return -0.2
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5,8 +5,8 @@ local inspect = require 'utils.inspect'.inspect
|
||||
local Public = {}
|
||||
|
||||
Public.scenario_id_name = 'pirates'
|
||||
Public.version_string = '1.0.4.7.2'
|
||||
Public.version_float = 1.0472
|
||||
Public.version_string = '1.0.4.7.3'
|
||||
Public.version_float = 1.0473
|
||||
|
||||
Public.blueprint_library_allowed = true
|
||||
Public.blueprint_importing_allowed = true
|
||||
|
@ -391,7 +391,7 @@ function Public.leave_crew(player, to_lobby, quiet)
|
||||
local surface_name = char.surface.name
|
||||
local message
|
||||
if quiet then
|
||||
-- message = player.name .. ' left.'
|
||||
message = player.name .. ' left.'
|
||||
else
|
||||
message = player.name .. ' left the crew.'
|
||||
Common.notify_force(player.force, message)
|
||||
@ -820,8 +820,8 @@ function Public.reset_crew_and_enemy_force(id)
|
||||
crew_force.technologies['advanced-material-processing'].researched = true
|
||||
crew_force.technologies['advanced-material-processing-2'].researched = true
|
||||
crew_force.technologies['solar-energy'].researched = true
|
||||
crew_force.technologies['inserter-capacity-bonus-1'].researched = true
|
||||
crew_force.technologies['inserter-capacity-bonus-2'].researched = true
|
||||
-- crew_force.technologies['inserter-capacity-bonus-1'].researched = true
|
||||
-- crew_force.technologies['inserter-capacity-bonus-2'].researched = true
|
||||
|
||||
--@TRYING this out:
|
||||
crew_force.technologies['coal-liquefaction'].enabled = true
|
||||
@ -874,19 +874,19 @@ function Public.reset_crew_and_enemy_force(id)
|
||||
crew_force.technologies['research-speed-4'].enabled = false
|
||||
crew_force.technologies['research-speed-5'].enabled = false
|
||||
crew_force.technologies['research-speed-6'].enabled = false
|
||||
crew_force.technologies['follower-robot-count-1'].enabled = false
|
||||
crew_force.technologies['follower-robot-count-2'].enabled = false
|
||||
crew_force.technologies['follower-robot-count-3'].enabled = false
|
||||
crew_force.technologies['follower-robot-count-4'].enabled = false
|
||||
-- crew_force.technologies['follower-robot-count-1'].enabled = false
|
||||
-- crew_force.technologies['follower-robot-count-2'].enabled = false
|
||||
-- crew_force.technologies['follower-robot-count-3'].enabled = false
|
||||
-- crew_force.technologies['follower-robot-count-4'].enabled = false
|
||||
crew_force.technologies['follower-robot-count-5'].enabled = false
|
||||
crew_force.technologies['follower-robot-count-6'].enabled = false
|
||||
crew_force.technologies['follower-robot-count-7'].enabled = false
|
||||
crew_force.technologies['inserter-capacity-bonus-3'].enabled = false
|
||||
crew_force.technologies['inserter-capacity-bonus-4'].enabled = false
|
||||
crew_force.technologies['inserter-capacity-bonus-5'].enabled = false
|
||||
crew_force.technologies['inserter-capacity-bonus-6'].enabled = false
|
||||
-- crew_force.technologies['inserter-capacity-bonus-3'].enabled = false
|
||||
-- crew_force.technologies['inserter-capacity-bonus-4'].enabled = false
|
||||
-- crew_force.technologies['inserter-capacity-bonus-5'].enabled = false
|
||||
-- crew_force.technologies['inserter-capacity-bonus-6'].enabled = false
|
||||
crew_force.technologies['inserter-capacity-bonus-7'].enabled = false
|
||||
crew_force.technologies['refined-flammables-3'].enabled = false
|
||||
-- crew_force.technologies['refined-flammables-3'].enabled = false
|
||||
crew_force.technologies['refined-flammables-4'].enabled = false
|
||||
crew_force.technologies['refined-flammables-5'].enabled = false
|
||||
crew_force.technologies['refined-flammables-6'].enabled = false
|
||||
|
@ -25,6 +25,8 @@ local Ores = require 'maps.pirates.ores'
|
||||
local Parrot = require 'maps.pirates.parrot'
|
||||
local Kraken = require 'maps.pirates.surfaces.sea.kraken'
|
||||
|
||||
local Jailed = require 'utils.datastore.jail_data'
|
||||
|
||||
local Crew = require 'maps.pirates.crew'
|
||||
local Quest = require 'maps.pirates.quest'
|
||||
local Shop = require 'maps.pirates.shop.shop'
|
||||
@ -201,13 +203,13 @@ local function kraken_damage(event)
|
||||
|
||||
if event.damage_type.name and (event.damage_type.name == 'explosion' or event.damage_type.name == 'poison') then
|
||||
-- if event.cause.name == 'artillery-turret' then
|
||||
adjusted_damage = adjusted_damage / 3
|
||||
adjusted_damage = adjusted_damage / 2.5
|
||||
elseif event.damage_type.name and (event.damage_type.name == 'fire') then
|
||||
adjusted_damage = adjusted_damage / 1.5
|
||||
adjusted_damage = adjusted_damage / 1.1
|
||||
end
|
||||
-- and additionally:
|
||||
if event.cause.name == 'artillery-turret' then
|
||||
adjusted_damage = adjusted_damage / 1.2
|
||||
adjusted_damage = adjusted_damage / 1.1
|
||||
end
|
||||
|
||||
if event.damage_type.name and (event.damage_type.name == 'laser') then
|
||||
@ -321,13 +323,13 @@ local function samurai_damage_dealt_changes(event)
|
||||
end
|
||||
|
||||
if extra_damage_to_deal > 0 then
|
||||
if event.entity.health > extra_damage_to_deal then
|
||||
if event.entity.health >= extra_damage_to_deal then
|
||||
event.entity.health = event.entity.health - extra_damage_to_deal
|
||||
else
|
||||
local surplus = (extra_damage_to_deal - event.entity.health)*0.8
|
||||
event.entity.die(character.force, character)
|
||||
local nearest = player.surface.find_nearest_enemy{position = {x = player.position.x, y = player.position.y}, max_distance = 2, force = character.force}
|
||||
if nearest then
|
||||
local nearest = player.surface.find_nearest_enemy{position = player.position, max_distance = 2, force = player.force}
|
||||
if nearest and nearest.valid then
|
||||
nearest.damage(surplus/big_number, character.force, 'acid', character)
|
||||
end
|
||||
end
|
||||
@ -907,7 +909,7 @@ function Public.research_apply_buffs(event)
|
||||
end
|
||||
|
||||
|
||||
function Public.flamer_nerfs()
|
||||
function Public.apply_flamer_nerfs()
|
||||
local memory = Memory.get_crew_memory()
|
||||
local difficulty = memory.difficulty
|
||||
local force = memory.force
|
||||
@ -930,8 +932,8 @@ function Public.flamer_nerfs()
|
||||
end
|
||||
flamer_power = flamer_power + (force.technologies[flame_researches[7].name].level - 7) * 0.2
|
||||
|
||||
force.set_ammo_damage_modifier('flamethrower', flamer_power * Balance.flamers_tech_multipliers())
|
||||
force.set_turret_attack_modifier('flamethrower-turret', flamer_power * Balance.flamers_tech_multipliers())
|
||||
force.set_ammo_damage_modifier('flamethrower', flamer_power * Balance.flamers_tech_multipliers() + Balance.flamers_base_nerf())
|
||||
force.set_turret_attack_modifier('flamethrower-turret', flamer_power * Balance.flamers_tech_multipliers() + Balance.flamers_base_nerf())
|
||||
end
|
||||
|
||||
local function event_on_research_finished(event)
|
||||
@ -945,7 +947,7 @@ local function event_on_research_finished(event)
|
||||
-- using a localised string means we have to write this out (recall that "" signals concatenation)
|
||||
memory.force.print({"", '>> ', event.research.localised_name, ' researched.'}, CoreData.colors.notify_force_light)
|
||||
|
||||
Public.flamer_nerfs()
|
||||
Public.apply_flamer_nerfs()
|
||||
Public.research_apply_buffs(event)
|
||||
|
||||
for _, e in ipairs(research.effects) do
|
||||
@ -1140,8 +1142,17 @@ end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
local function on_player_changed_surface(event)
|
||||
local player = game.players[event.player_index]
|
||||
local jailed = Jailed.get_jailed_table()
|
||||
|
||||
if player.name and jailed and jailed[player.name] then
|
||||
-- not quite sure this is necessary, but let's send their items to the crew:
|
||||
Common.send_important_items_from_player_to_crew(player, true)
|
||||
return
|
||||
end
|
||||
|
||||
Roles.update_privileges(player)
|
||||
end
|
||||
|
||||
|
@ -169,44 +169,7 @@ function Public.generate_overworld_destination(p)
|
||||
local scope = Surfaces[Surfaces.enum.ISLAND][subtype]
|
||||
|
||||
local static_params = Utils.deepcopy(scope.Data.static_params_default)
|
||||
local cost_to_leave, scheduled_raft_raids
|
||||
|
||||
-- temporarily placed this back here, as moving it to shorehit broke things:
|
||||
local playercount = Common.activecrewcount()
|
||||
local max_evo = 0.85
|
||||
if Common.difficulty() < 1 then max_evo = 0.72 end
|
||||
if Common.difficulty() > 1 then max_evo = 0.90 end
|
||||
|
||||
if macrop.x > 5 then
|
||||
scheduled_raft_raids = {}
|
||||
local times = {600, 360, 215, 210, 120, 30, 10, 5}
|
||||
for i = 1, #times do
|
||||
local t = times[i]
|
||||
if Math.random(7) == 1 and #scheduled_raft_raids < 6 then
|
||||
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
|
||||
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.52}
|
||||
end
|
||||
end
|
||||
elseif macrop.x == 5 then
|
||||
local times
|
||||
if playercount <= 2 then
|
||||
times = {1, 5, 10, 15, 20}
|
||||
elseif playercount <= 8 then
|
||||
times = {1, 5, 10, 15, 20, 25}
|
||||
elseif playercount <= 15 then
|
||||
times = {1, 5, 10, 15, 20, 25, 30}
|
||||
else
|
||||
times = {1, 5, 10, 15, 20, 25, 30, 35, 40}
|
||||
end
|
||||
scheduled_raft_raids = {}
|
||||
for _, t in pairs(times) do
|
||||
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.62}
|
||||
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
|
||||
end
|
||||
end
|
||||
|
||||
static_params.scheduled_raft_raids = scheduled_raft_raids
|
||||
|
||||
local cost_to_leave
|
||||
|
||||
-- These need to scale up slower than the static fuel depletion rate:
|
||||
local normal_costitems = {'small-lamp', 'engine-unit', 'advanced-circuit'}
|
||||
|
@ -62,13 +62,10 @@ function Public.market_generate_coin_offers(how_many)
|
||||
|
||||
if game_completion_progress < 0.2 then
|
||||
ret[#ret + 1] = loaderoffers[1]
|
||||
ret[#ret + 1] = loaderoffers[1]
|
||||
elseif game_completion_progress < 0.6 then
|
||||
ret[#ret + 1] = loaderoffers[2]
|
||||
ret[#ret + 1] = loaderoffers[2]
|
||||
else
|
||||
ret[#ret + 1] = loaderoffers[3]
|
||||
ret[#ret + 1] = loaderoffers[3]
|
||||
end
|
||||
|
||||
local toaddcount = how_many
|
||||
|
@ -158,38 +158,63 @@ function Public.destination_on_collide(destination)
|
||||
local index = destination.destination_index
|
||||
Crowsnest.paint_around_destination(index, CoreData.overworld_loading_tile)
|
||||
|
||||
-- local scheduled_raft_raids
|
||||
-- local playercount = Common.activecrewcount()
|
||||
-- local max_evo = 0.85
|
||||
-- if Common.difficulty() < 1 then max_evo = 0.68 end
|
||||
-- if memory.overworldx > 200 then
|
||||
-- scheduled_raft_raids = {}
|
||||
-- local times = {600, 360, 215, 210, 120, 30, 10, 5}
|
||||
-- for i = 1, #times do
|
||||
-- local t = times[i]
|
||||
-- if Math.random(7) == 1 and #scheduled_raft_raids < 6 then
|
||||
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
|
||||
-- -- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.52}
|
||||
-- end
|
||||
-- end
|
||||
-- elseif memory.overworldx == 200 then
|
||||
-- local times
|
||||
-- if playercount <= 2 then
|
||||
-- times = {1, 5, 10, 15}
|
||||
-- elseif playercount <= 7 then
|
||||
-- times = {1, 5, 10, 15, 20}
|
||||
-- elseif playercount <= 15 then
|
||||
-- times = {1, 5, 10, 15, 20, 25}
|
||||
-- else
|
||||
-- times = {1, 5, 10, 15, 20, 25, 30, 35}
|
||||
-- end
|
||||
-- scheduled_raft_raids = {}
|
||||
-- for _, t in pairs(times) do
|
||||
-- -- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.62}
|
||||
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
|
||||
-- end
|
||||
-- end
|
||||
-- destination.static_params.scheduled_raft_raids = scheduled_raft_raids
|
||||
|
||||
|
||||
|
||||
local scheduled_raft_raids
|
||||
-- temporarily placed this back here, as moving it to shorehit broke things:
|
||||
local playercount = Common.activecrewcount()
|
||||
local max_evo
|
||||
if Common.difficulty() < 1 then
|
||||
if memory.overworldx/40 < 20 then
|
||||
max_evo = 0.9 - (20 - memory.overworldx/40) * 1/100
|
||||
else
|
||||
max_evo = 0.91 + (memory.overworldx/40 - 20) * 0.5/100
|
||||
end
|
||||
elseif Common.difficulty() == 1 then
|
||||
if memory.overworldx/40 < 15 then
|
||||
max_evo = 0.9 - (15 - memory.overworldx/40) * 0.5/100
|
||||
else
|
||||
max_evo = 0.91 + (memory.overworldx/40 - 15) * 0.5/100
|
||||
end
|
||||
elseif Common.difficulty() > 1 then
|
||||
if memory.overworldx/40 < 10 then
|
||||
max_evo = 0.9
|
||||
else
|
||||
max_evo = 0.91 + (memory.overworldx/40 - 10) * 0.5/100
|
||||
end
|
||||
end
|
||||
|
||||
if memory.overworldx > 200 then
|
||||
scheduled_raft_raids = {}
|
||||
local times = {600, 360, 215, 210, 120, 30, 10, 5}
|
||||
for i = 1, #times do
|
||||
local t = times[i]
|
||||
if Math.random(6) == 1 and #scheduled_raft_raids < 6 then
|
||||
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
|
||||
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.52}
|
||||
end
|
||||
end
|
||||
elseif memory.overworldx == 200 or _DEBUG then
|
||||
local times
|
||||
if playercount <= 2 then
|
||||
times = {1, 5, 10, 15, 20}
|
||||
elseif playercount <= 8 then
|
||||
times = {1, 5, 10, 15, 20, 25}
|
||||
elseif playercount <= 15 then
|
||||
times = {1, 5, 10, 15, 20, 25, 30}
|
||||
else
|
||||
times = {1, 5, 10, 15, 20, 25, 30, 35, 40}
|
||||
end
|
||||
scheduled_raft_raids = {}
|
||||
for _, t in pairs(times) do
|
||||
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.62}
|
||||
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
|
||||
end
|
||||
end
|
||||
|
||||
destination.static_params.scheduled_raft_raids = scheduled_raft_raids
|
||||
|
||||
end
|
||||
|
||||
if memory.overworldx == 40*5 then Parrot.parrot_boats_warning() end
|
||||
@ -308,7 +333,7 @@ function Public.destination_on_arrival(destination)
|
||||
|
||||
if destination.subtype and destination.subtype == Islands.enum.MAZE then
|
||||
local force = memory.force
|
||||
force.manual_mining_speed_modifier = 0.5
|
||||
force.manual_mining_speed_modifier = 0.66
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -137,8 +137,8 @@ function Public.raft_raids(tickinterval)
|
||||
local scheduled_raft_raids = destination.static_params.scheduled_raft_raids
|
||||
local timer = destination.dynamic_data.timer
|
||||
|
||||
for _, raid in pairs(scheduled_raft_raids) do
|
||||
if timer == raid.timeinseconds then
|
||||
for k, raid in pairs(scheduled_raft_raids) do
|
||||
if timer >= raid.timeinseconds and (not scheduled_raft_raids[k].fired) then
|
||||
local type
|
||||
if memory.overworldx >= 40*16 then
|
||||
type = Boats.enum.RAFTLARGE
|
||||
@ -149,6 +149,7 @@ function Public.raft_raids(tickinterval)
|
||||
if boat then
|
||||
Ai.spawn_boat_biters(boat, raid.max_evo, Boats.get_scope(boat).Data.capacity, Boats.get_scope(boat).Data.width)
|
||||
end
|
||||
scheduled_raft_raids[k].fired = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -205,11 +205,11 @@ function Public.class_rewards_tick(tickinterval)
|
||||
local hold_bool = surfacedata.type == Surfaces.enum.HOLD
|
||||
|
||||
if class == Classes.enum.DECKHAND and on_ship_bool and (not hold_bool) then
|
||||
Classes.class_ore_grant(player, 5)
|
||||
Classes.class_ore_grant(player, 4)
|
||||
elseif class == Classes.enum.BOATSWAIN and hold_bool then
|
||||
Classes.class_ore_grant(player, 7)
|
||||
Classes.class_ore_grant(player, 6)
|
||||
elseif class == Classes.enum.SHORESMAN and (not on_ship_bool) then
|
||||
Classes.class_ore_grant(player, 3)
|
||||
Classes.class_ore_grant(player, 2)
|
||||
elseif class == Classes.enum.QUARTERMASTER then
|
||||
local nearby_players = #player.surface.find_entities_filtered{position = player.position, radius = Common.quartermaster_range, name = 'character'}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user