mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
v1.0.4.1
This commit is contained in:
parent
eb62abf3b1
commit
50aae02473
@ -424,7 +424,7 @@ function Public.try_spawner_spend_fraction_of_available_pollution_on_biters(spaw
|
||||
end
|
||||
|
||||
if destination.subtype and destination.subtype == IslandsCommon.enum.MAZE then
|
||||
base_pollution_cost_multiplier = base_pollution_cost_multiplier * 1.2 --biters 20% less aggressive
|
||||
base_pollution_cost_multiplier = base_pollution_cost_multiplier * 1.25 --biters 25% less aggressive
|
||||
end
|
||||
|
||||
if budget >= minimum_avg_units * Common.averageUnitPollutionCost(evolution) * base_pollution_cost_multiplier then
|
||||
|
@ -109,12 +109,12 @@ end
|
||||
function Public.fuel_depletion_rate_sailing()
|
||||
if (not Common.overworldx()) then return 0 end
|
||||
|
||||
return - 8 * (1 + 0.13 * (Common.overworldx()/40)^(9/10)) * Math.sloped(Common.difficulty(), 3/5)
|
||||
return - 7.5 * (1 + 0.13 * (Common.overworldx()/40)^(9/10)) * Math.sloped(Common.difficulty(), 1/5) --shouldn't depend on difficulty much, as available resources don't depend much on difficulty
|
||||
end
|
||||
|
||||
function Public.silo_total_pollution()
|
||||
return (
|
||||
400 * (Common.difficulty()^(1.2)) * Public.crew_scale()^(2/5) * (3.2 + 0.7 * (Common.overworldx()/40)^(1.6)) --shape of the curve with x is tuned
|
||||
380 * (Common.difficulty()^(1.2)) * Public.crew_scale()^(2/5) * (3.2 + 0.7 * (Common.overworldx()/40)^(1.6)) --shape of the curve with x is tuned
|
||||
)
|
||||
end
|
||||
|
||||
@ -122,20 +122,20 @@ function Public.boat_passive_pollution_per_minute(time)
|
||||
local boost = 1
|
||||
local T = Public.max_time_on_island_formula()
|
||||
if time then
|
||||
if time >= 90/100 * T then
|
||||
boost = 15
|
||||
if time >= 95/100 * T then
|
||||
boost = 16
|
||||
elseif time >= 90/100 * T then
|
||||
boost = 12
|
||||
elseif time >= 85/100 * T then
|
||||
boost = 8
|
||||
elseif time >= 80/100 * T then
|
||||
boost = 6
|
||||
boost = 5
|
||||
elseif time >= 70/100 * T then
|
||||
boost = 4
|
||||
elseif time >= 55/100 * T then
|
||||
boost = 3
|
||||
elseif time >= 40/100 * T then
|
||||
elseif time >= 60/100 * T then
|
||||
boost = 2
|
||||
elseif time >= 25/100 * T then
|
||||
boost = 1.5
|
||||
elseif time >= 50/100 * T then
|
||||
boost = 1
|
||||
end
|
||||
end
|
||||
|
||||
@ -234,7 +234,7 @@ function Public.periodic_free_resources_per_destination_5_seconds(x)
|
||||
end
|
||||
|
||||
function Public.class_resource_scale()
|
||||
return 1 / (Public.crew_scale()^(3/5))
|
||||
return 1 / (Public.crew_scale()^(2/5)) --already helped by longer timescales
|
||||
end
|
||||
|
||||
function Public.biter_base_density_scale()
|
||||
@ -269,7 +269,7 @@ function Public.apply_crew_buffs_per_x(force)
|
||||
end
|
||||
|
||||
function Public.class_cost()
|
||||
return 9000
|
||||
return 8000
|
||||
-- return Math.ceil(10000 / (Public.crew_scale()*10/4)^(1/6))
|
||||
end
|
||||
|
||||
@ -291,7 +291,7 @@ function Public.kraken_kill_reward()
|
||||
end
|
||||
|
||||
function Public.kraken_health()
|
||||
return Math.ceil(3000 * Math.max(1, 1 + 0.1 * ((Common.overworldx()/40)^(13/10)-6)) * (Public.crew_scale()^(5/8)) * Math.sloped(Common.difficulty(), 3/4))
|
||||
return Math.ceil(3500 * Math.max(1, 1 + 0.08 * ((Common.overworldx()/40)^(13/10)-6)) * (Public.crew_scale()^(5/8)) * Math.sloped(Common.difficulty(), 3/4))
|
||||
end
|
||||
|
||||
Public.kraken_regen_scale = 0.1 --starting off low
|
||||
@ -327,10 +327,6 @@ function Public.main_shop_cost_multiplier()
|
||||
return 1
|
||||
end
|
||||
|
||||
function Public.covered_entry_price_scale()
|
||||
return 0.9 * (1 + 0.025 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty(), 1/2) --whilst resource scales tend to be held fixed with crew size, we account slightly for the fact that more players tend to handcraft more
|
||||
end
|
||||
|
||||
function Public.barter_decay_parameter()
|
||||
return 0.95
|
||||
end
|
||||
@ -437,6 +433,11 @@ end
|
||||
|
||||
|
||||
|
||||
function Public.covered_entry_price_scale()
|
||||
return 0.9 * (1 + 0.025 * (Common.overworldx()/40 - 1)) * ((1 + Public.crew_scale())^(1/3)) * Math.sloped(Common.difficulty(), 1/2) --whilst resource scales tend to be held fixed with crew size, we account slightly for the fact that more players tend to handcraft more
|
||||
end
|
||||
|
||||
-- if the prices are too high, players will accidentally throw too much in when they can't do it
|
||||
|
||||
Public.covered1_entry_price_data_raw = { --watch out that the raw_materials chest can only hold e.g. 4.8 iron-plates
|
||||
-- choose things that are easy to make at outposts
|
||||
@ -463,8 +464,8 @@ Public.covered1_entry_price_data_raw = { --watch out that the raw_materials ches
|
||||
price = {name = 'electronic-circuit', count = 800},
|
||||
raw_materials = {{name = 'iron-plate', count = 800}, {name = 'copper-plate', count = 1200}}}, {}},
|
||||
{1, 0, 1, false, {
|
||||
price = {name = 'firearm-magazine', count = 500},
|
||||
raw_materials = {{name = 'iron-plate', count = 2000}}}, {}},
|
||||
price = {name = 'firearm-magazine', count = 800},
|
||||
raw_materials = {{name = 'iron-plate', count = 3200}}}, {}},
|
||||
|
||||
{1, 0.1, 1, false, {
|
||||
price = {name = 'stone-furnace', count = 400},
|
||||
@ -473,13 +474,13 @@ Public.covered1_entry_price_data_raw = { --watch out that the raw_materials ches
|
||||
price = {name = 'advanced-circuit', count = 100},
|
||||
raw_materials = {{name = 'iron-plate', count = 200}, {name = 'copper-plate', count = 500}, {name = 'plastic-bar', count = 200}}}, {}},
|
||||
|
||||
{1, -1, 1, true, {
|
||||
{0.5, 0, 0.5, true, {
|
||||
price = {name = 'wooden-chest', count = 400},
|
||||
raw_materials = {}}, {}},
|
||||
{1, 0, 1, true, {
|
||||
{0.5, 0, 1, true, {
|
||||
price = {name = 'iron-chest', count = 300},
|
||||
raw_materials = {{name = 'iron-plate', count = 2400}}}, {}},
|
||||
{1, 0.2, 1.8, true, {
|
||||
{0.5, 0.2, 1.8, true, {
|
||||
price = {name = 'steel-chest', count = 150},
|
||||
raw_materials = {{name = 'steel-plate', count = 1200}}}, {}},
|
||||
}
|
||||
|
@ -5,8 +5,8 @@ local inspect = require 'utils.inspect'.inspect
|
||||
local Public = {}
|
||||
|
||||
Public.scenario_id_name = 'pirates'
|
||||
Public.version_string = '1.0.4.0.4'
|
||||
Public.version_float = 1.0404
|
||||
Public.version_string = '1.0.4.1'
|
||||
Public.version_float = 1.041
|
||||
|
||||
Public.blueprint_library_allowed = false
|
||||
Public.blueprint_importing_allowed = true
|
||||
@ -15,7 +15,7 @@ Public.rocket_silo_death_causes_loss = false
|
||||
|
||||
Public.victory_x = 1000
|
||||
|
||||
Public.total_max_biters = 4000
|
||||
Public.total_max_biters = 3000
|
||||
|
||||
Public.lobby_surface_name = '000-000-Lobby'
|
||||
|
||||
|
@ -564,7 +564,7 @@ function Public.click(event)
|
||||
-- local proposal_name = string.sub(flow.proposals.body.proposal_maker.body.namefield.text, 1, 30)
|
||||
|
||||
local capacity_option = flow.proposals.body.proposal_maker.body.options.capacity.capacity.slider.slider_value
|
||||
local difficulty_option = 2
|
||||
local difficulty_option = 1
|
||||
-- local difficulty_option = flow.proposals.body.proposal_maker.body.options.difficulty.difficulty.slider.slider_value
|
||||
-- local mode_option = flow.proposals.body.proposal_maker.body.options.mode.mode.switch.switch_state
|
||||
|
||||
|
@ -264,7 +264,7 @@ local function scout_damage_dealt_changes(event)
|
||||
local player_index = event.cause.player.index
|
||||
if memory.classes_table and memory.classes_table[player_index] and memory.classes_table[player_index] == Classes.enum.SCOUT then
|
||||
if event.final_health > 0 then --lethal damage is unaffected, as otherwise they can never kill
|
||||
event.entity.health = event.entity.health + 0.5 * event.final_damage_amount
|
||||
event.entity.health = event.entity.health + 0.4 * event.final_damage_amount
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -340,8 +340,6 @@ local function maze_walls_resistance(event)
|
||||
local entity = event.entity
|
||||
if not entity.valid then return end
|
||||
|
||||
if not (event.damage_type.name and (event.damage_type.name == 'explosion' or event.damage_type.name == 'poison')) then return end
|
||||
|
||||
local destination = Common.current_destination()
|
||||
if not (destination and destination.subtype and destination.subtype == Islands.enum.MAZE) then return end
|
||||
|
||||
@ -349,8 +347,15 @@ local function maze_walls_resistance(event)
|
||||
|
||||
if not ((entity.type and entity.type == 'tree') or entity.name == 'rock-huge' or entity.name == 'rock-big' or entity.name == 'sand-rock-big') then return end
|
||||
|
||||
|
||||
local damage = event.final_damage_amount
|
||||
event.entity.health = event.entity.health + damage
|
||||
|
||||
if (event.damage_type.name and (event.damage_type.name == 'explosion' or event.damage_type.name == 'poison')) then
|
||||
event.entity.health = event.entity.health + damage
|
||||
else
|
||||
if string.sub(event.cause.force.name, 1, 4) ~= 'crew' then return end --player damage only
|
||||
event.entity.health = event.entity.health + damage * 0.9
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -564,7 +569,7 @@ local function event_on_player_mined_entity(event)
|
||||
if available and destination.type == Surfaces.enum.ISLAND then
|
||||
|
||||
if destination and destination.subtype and destination.subtype == Islands.enum.MAZE then
|
||||
if Math.random(1, 50) == 1 then
|
||||
if Math.random(1, 45) == 1 then
|
||||
tick_tack_trap(memory.enemy_force_name, entity.surface, entity.position)
|
||||
return
|
||||
end
|
||||
@ -603,7 +608,7 @@ local function event_on_player_mined_entity(event)
|
||||
|
||||
|
||||
if memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.MASTER_ANGLER then
|
||||
Common.give(player, {{name = 'raw-fish', count = 5}, {name = 'coin', count = 5}}, entity.position)
|
||||
Common.give(player, {{name = 'raw-fish', count = 5}, {name = 'coin', count = 10}}, entity.position)
|
||||
else
|
||||
Common.give(player, {{name = 'raw-fish', count = 3}}, entity.position)
|
||||
end
|
||||
@ -644,7 +649,7 @@ local function event_on_player_mined_entity(event)
|
||||
if available and destination.type == Surfaces.enum.ISLAND then
|
||||
|
||||
if destination and destination.subtype and destination.subtype == Islands.enum.MAZE then
|
||||
if Math.random(1, 50) == 1 then
|
||||
if Math.random(1, 45) == 1 then
|
||||
tick_tack_trap(memory.enemy_force_name, entity.surface, entity.position)
|
||||
return
|
||||
end
|
||||
|
@ -9,8 +9,8 @@ local inspect = require 'utils.inspect'.inspect
|
||||
local Public = {}
|
||||
|
||||
Public.buried_treasure_loot_data_raw = {
|
||||
{100, 0, 1, false, 'coin', 10, 20},
|
||||
{100, 0, 1, false, 'steel-plate', 100, 150},
|
||||
{100, 0, 1, false, 'coin', 1, 600},
|
||||
{50, 0, 1, false, 'steel-plate', 100, 150},
|
||||
{50, 0, 1, false, 'defender-capsule', 5, 18},
|
||||
{25, 0, 1, false, 'distractor-capsule', 5, 18},
|
||||
{10, 0, 1, false, 'destroyer-capsule', 5, 18},
|
||||
@ -300,7 +300,7 @@ end
|
||||
--@TODO: Perhaps add more modular armor chance here?
|
||||
|
||||
function Public.maze_camp_loot()
|
||||
if Math.random(2) == 1 then
|
||||
if Math.random(10) <= 7 then
|
||||
return {Public.random_plates()}
|
||||
else
|
||||
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.chest_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (15/100 + Common.game_completion_progress()))))
|
||||
|
@ -104,9 +104,9 @@ function Public.generate_overworld_destination(p)
|
||||
end
|
||||
elseif macrop.x == 8 then --game length decrease, pending more content
|
||||
type = nil
|
||||
elseif macrop.x == 9 then --just before krakens
|
||||
type = Surfaces.enum.ISLAND
|
||||
subtype = Surfaces.Island.enum.RED_DESERT
|
||||
-- elseif macrop.x == 9 then --just before krakens
|
||||
-- type = Surfaces.enum.ISLAND
|
||||
-- subtype = Surfaces.Island.enum.RED_DESERT
|
||||
elseif macrop.x == 10 then --krakens appear
|
||||
type = nil
|
||||
-- elseif macrop.x == 11 then
|
||||
@ -252,7 +252,7 @@ function Public.generate_overworld_destination(p)
|
||||
-- }
|
||||
-- end
|
||||
-- cost_to_leave = nil
|
||||
elseif macrop.x <= 5 then
|
||||
elseif macrop.x <= 6 then
|
||||
-- cost_to_leave = {['small-lamp'] = 5}
|
||||
cost_to_leave = nil
|
||||
elseif macrop.x <= 8 then
|
||||
|
@ -492,7 +492,7 @@ function Public.undock_from_dock()
|
||||
|
||||
local force = memory.force
|
||||
if not (force and force.valid) then return end
|
||||
Common.notify_force_light(force,'Leaving the dock.')
|
||||
Common.notify_force(force,'Leaving the dock.')
|
||||
end
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ Public.display_form = {
|
||||
Public.explanation = {
|
||||
[enum.DECKHAND] = 'They move faster and generate iron ore for the captain\'s cabin whilst onboard above deck, but move slower offboard.',
|
||||
[enum.FISHERMAN] = 'They fish at greater distance.',
|
||||
[enum.SCOUT] = 'They are faster, but frail and deal much less damage.',
|
||||
[enum.SCOUT] = 'They are faster, but frail and deal less damage.',
|
||||
[enum.SAMURAI] = 'They are tough, and *with no weapon equipped* fight well by melee, but poorly otherwise.',
|
||||
[enum.MERCHANT] = 'They generate 40 coins per league, but are frail.',
|
||||
[enum.SHORESMAN] = 'They move slightly faster and generate iron ore for the captain\'s cabin whilst offboard, but move slower onboard.',
|
||||
|
@ -48,7 +48,7 @@ Public.market_sales = {
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'coal', count = 900}},
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'firearm-magazine', count = 500}},
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine', count = 75}},
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine', count = 25}},
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine', count = 30}},
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'piercing-shotgun-shell', count = 60}},
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'raw-fish', count = 300}},
|
||||
{price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'laser-turret', count = 1}},
|
||||
|
@ -96,7 +96,7 @@ Public.main_shop_data_2 = {
|
||||
artillery_shell = {
|
||||
tooltip = '10 cannon shells.',
|
||||
what_you_get_sprite_buttons = {['item/artillery-shell'] = 10},
|
||||
base_cost = {coins = 2000, fuel = 50},
|
||||
base_cost = {coins = 1000, fuel = 50},
|
||||
},
|
||||
artillery_remote = {
|
||||
tooltip = 'An artillery targeting remote.',
|
||||
@ -111,7 +111,7 @@ Public.main_shop_data_2 = {
|
||||
uranium_ore = {
|
||||
tooltip = '10 green rocks of unknown origin.',
|
||||
what_you_get_sprite_buttons = {['item/uranium-238'] = 10},
|
||||
base_cost = {coins = 1000, fuel = 800},
|
||||
base_cost = {coins = 1000, fuel = 100},
|
||||
},
|
||||
}
|
||||
|
||||
@ -364,10 +364,10 @@ function Public.event_on_market_item_purchased(event)
|
||||
|
||||
if offer_type == 'nothing' then
|
||||
decay_type = 'one-off'
|
||||
elseif dock_bool and purchase_bool and (offer_giveitem_name) and not (offer_giveitem_name == 'stone' or offer_giveitem_name == 'iron-ore' or offer_giveitem_name == 'copper-ore') then
|
||||
decay_type = 'one-off'
|
||||
elseif dock_bool and purchase_bool and (offer_giveitem_name) and (offer_giveitem_name == 'stone' or offer_giveitem_name == 'iron-ore' or offer_giveitem_name == 'copper-ore' or offer_giveitem_name == 'crude-oil-barrel') then
|
||||
decay_type = 'double_decay'
|
||||
elseif dock_bool and purchase_bool and (offer_giveitem_name) then
|
||||
decay_type = 'one-off'
|
||||
elseif simple_efficiency_trade_bool or (offer_giveitem_name and (offer_giveitem_name == 'defender-capsule' or offer_giveitem_name == 'gun-turret')) then
|
||||
decay_type = 'static'
|
||||
else
|
||||
|
@ -142,10 +142,10 @@ function Public.post_creation_process(special_name, components)
|
||||
|
||||
if force_name and string.sub(force_name, 1, 15) and string.sub(force_name, 1, 15) == 'ancient-hostile' then
|
||||
if e.name == 'gun-turret' then
|
||||
if memory.overworldx < 500 then
|
||||
e.insert({name = "firearm-magazine", count = 64})
|
||||
else
|
||||
if memory.overworldx < 800 then
|
||||
e.insert({name = "piercing-rounds-magazine", count = 64})
|
||||
else
|
||||
e.insert({name = "uranium-rounds-magazine", count = 64})
|
||||
end
|
||||
end
|
||||
elseif force_name and string.sub(force_name, 1, 16) and string.sub(force_name, 1, 16) == 'ancient-friendly' then
|
||||
|
@ -205,8 +205,8 @@ function Public.spawn_ores_on_arrival(destination, points_to_avoid)
|
||||
|
||||
local farness_boost_low, farness_boost_high = 0, 0
|
||||
if destination.subtype == enum.MAZE then
|
||||
farness_boost_low = 0.1
|
||||
farness_boost_high = 0.3
|
||||
farness_boost_low = 0.08
|
||||
farness_boost_high = 0.25
|
||||
end
|
||||
|
||||
for _, ore in pairs(ores) do
|
||||
|
@ -280,7 +280,7 @@ local function radioactive_tick()
|
||||
destination.dynamic_data.evolution_accrued_time = destination.dynamic_data.evolution_accrued_time + extra_evo
|
||||
-- faster pollute:
|
||||
-- local pollution = 1000 * Common.difficulty() * tickinterval / 60
|
||||
local pollution = 4 * (6 * Common.difficulty()^(1.1) * (Common.overworldx()/40)^(16/10) * (Balance.crew_scale())^(0.6)) / 3600 * tickinterval * (1 + 0.001 * (destination.dynamic_data.timer or 0))
|
||||
local pollution = 5 * (6 * Common.difficulty()^(1.1) * (Common.overworldx()/40)^(14/10) * (Balance.crew_scale())^(0.6)) / 3600 * tickinterval * (1 + 0.001 * (destination.dynamic_data.timer or 0))
|
||||
if not memory.floating_pollution then memory.floating_pollution = 0 end
|
||||
memory.floating_pollution = memory.floating_pollution + pollution
|
||||
|
||||
|
@ -26,7 +26,7 @@ function Public.base_ores()
|
||||
['iron-ore'] = 2.0,
|
||||
['coal'] = 6.8,
|
||||
['stone'] = 0.5,
|
||||
['crude-oil'] = 40,
|
||||
['crude-oil'] = 50,
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -22,7 +22,7 @@ function Public.base_ores()
|
||||
['copper-ore'] = 1.7,
|
||||
['iron-ore'] = 2.2,
|
||||
['coal'] = 4,
|
||||
['crude-oil'] = 80,
|
||||
['crude-oil'] = 100,
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -304,7 +304,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.25
|
||||
force.manual_mining_speed_modifier = 0.5
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -140,7 +140,7 @@ function Public.update_character_properties(tickinterval)
|
||||
if on_ship_bool then
|
||||
speed_boost = speed_boost - 0.25
|
||||
else
|
||||
speed_boost = speed_boost + 0.065
|
||||
speed_boost = speed_boost + 0.07
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -180,11 +180,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
|
||||
class_ore_grant(player, 8)
|
||||
class_ore_grant(player, 4)
|
||||
elseif class == Classes.enum.BOATSWAIN and hold_bool then
|
||||
class_ore_grant(player, 15)
|
||||
class_ore_grant(player, 7)
|
||||
elseif class == Classes.enum.SHORESMAN and (not on_ship_bool) then
|
||||
class_ore_grant(player, 5)
|
||||
class_ore_grant(player, 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -195,7 +195,7 @@ function Public.class_rewards_tick(tickinterval)
|
||||
for _, p2 in pairs(nearby_players) do
|
||||
local p2_index = p2.player.index
|
||||
if p2_index ~= player_index and memory.classes_table[p2_index] and memory.classes_table[p2_index] == Classes.enum.QUARTERMASTER then
|
||||
class_ore_grant(p2, 3)
|
||||
class_ore_grant(p2, 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user