1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-24 03:47:58 +02:00

purchasing artillery also increases max artillery hp

This commit is contained in:
Piratux 2022-06-04 21:52:55 +03:00
parent 0bc327ba50
commit 4dc9dbfdca
5 changed files with 10 additions and 7 deletions

View File

@ -182,6 +182,7 @@ market_error_not_captain_or_officer=Purchase error: You need to be a captain or
market_error_maximum_loading_time=Purchase error: Reached the maximum allowed loading time.
repaired_cannons=[font=heading-1]__1__ repaired the ship's cannons.[/font]
upgraded_cannons=[font=heading-1]__1__ repaired and upgraded the ship's cannons.[/font]
upgrade_hold=[font=heading-1]__1__ upgraded the ship's hold.[/font]
upgrade_power=[font=heading-1]__1__ upgraded the ship's power.[/font]
upgrade_merchants=[font=heading-1]__1__ unlocked merchant ships at future islands.[/font]

View File

@ -27,8 +27,9 @@ local _inspect = require 'utils.inspect'.inspect
Public.base_extra_character_speed = 1.44
Public.respawn_speed_boost = 1.75
Public.cannon_extra_hp_for_upgrade = 1000
Public.cannon_starting_hp = 2000
Public.cannon_resistance_factor = 2.5
Public.cannon_resistance_factor = 2
Public.technology_price_multiplier = 1
Public.rocket_launch_coin_reward = 5000

View File

@ -233,7 +233,7 @@ function Public.progress_to_destination(destination_index)
-- memory.mainshop_availability_bools.buy_fast_loader = true
-- memory.mainshop_availability_bools.sell_copper = true
memory.mainshop_availability_bools.repair_cannons = true
memory.mainshop_availability_bools.upgrade_cannons = true
local boat_for_sale_type = Common.current_destination().static_params.boat_for_sale_type
if boat_for_sale_type then
@ -412,7 +412,7 @@ function Public.check_for_end_of_boat_movement(boat)
memory.mainshop_availability_bools.buy_copper = false
-- memory.mainshop_availability_bools.buy_fast_loader = false
-- memory.mainshop_availability_bools.sell_copper = false
memory.mainshop_availability_bools.repair_cannons = false
memory.mainshop_availability_bools.upgrade_cannons = false
memory.mainshop_availability_bools.extra_hold = false
memory.mainshop_availability_bools.upgrade_power = false

View File

@ -28,8 +28,8 @@ local Public = {}
-- WARNING: The Crowsnest caption pulls data from this data. But the actual dock market pulls from boat_upgrades.lua.
Public.main_shop_data_1 = {
repair_cannons = {
tooltip = 'Repair the cannons.',
upgrade_cannons = {
tooltip = 'Increase cannons max health. This will also repair them.',
what_you_get_sprite_buttons = {['item/artillery-turret'] = false},
base_cost = {coins = 1000},
},
@ -139,7 +139,7 @@ function Public.initialise_captains_shop()
new_boat_cutter_with_hold = false,
new_boat_cutter = false,
buy_iron = false,
repair_cannons = false,
upgrade_cannons = false,
-- sell_iron = false,
-- buy_fast_loader = true,
-- sell_copper = false,

View File

@ -185,13 +185,14 @@ function Public.event_on_market_item_purchased(event)
local healthbar = memory.boat.healthbars[unit_number]
if healthbar then
healthbar.max_health = healthbar.max_health + Balance.cannon_extra_hp_for_upgrade
healthbar.health = healthbar.max_health
Common.update_healthbar_rendering(healthbar, healthbar.max_health)
else
log('error: healthbar ' .. unit_number .. ' not found')
end
end
Common.notify_force(force,{'pirates.repaired_cannons', player.name})
Common.notify_force(force,{'pirates.upgraded_cannons', player.name})
market.remove_market_item(offer_index)
else
local upgrade_type = Common.current_destination().static_params.upgrade_for_sale