1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-17 20:58:13 +02:00

scale up weapon damage upgrade cost

This commit is contained in:
danielmartin0 2024-09-13 12:38:24 +01:00
parent bf14c4b935
commit 0cfa6e34f1
2 changed files with 5 additions and 2 deletions

View File

@ -514,7 +514,10 @@ function Public.weapon_damage_upgrade_percentage()
end
function Public.weapon_damage_upgrade_price()
return { { name = 'coin', amount = 2000 }, { name = 'steel-plate', amount = 100 } } --NOTE: Should be different to other 'nothing' costs. See the use of this function in shop.lua.
-- local steel_plate_cost = 100
local steel_plate_cost = 100 * (1 + 0.1 * (Common.overworldx() / 40))
return { { name = 'coin', amount = 2000 }, { name = 'steel-plate', amount = steel_plate_cost } } --NOTE: Coin cost should be different to other 'nothing' costs. See the use of this function in shop.lua.
end
Public.quest_structures_first_appear_at = 40

View File

@ -216,7 +216,7 @@ function Public.event_on_market_item_purchased(event)
end
else
if thisPurchaseData.offer_type == 'nothing' then
local isDamageUpgrade = thisPurchaseData.price[1].amount == Balance.weapon_damage_upgrade_price()[1].amount and thisPurchaseData.price[1].name == Balance.weapon_damage_upgrade_price()[1].name and thisPurchaseData.price[2] and thisPurchaseData.price[2].amount == Balance.weapon_damage_upgrade_price()[2].amount and thisPurchaseData.price[2].name == Balance.weapon_damage_upgrade_price()[2].name
local isDamageUpgrade = thisPurchaseData.price[1].amount == Balance.weapon_damage_upgrade_price()[1].amount and thisPurchaseData.price[1].name == Balance.weapon_damage_upgrade_price()[1].name
if isDamageUpgrade then
Common.notify_force_light(player.force, { 'pirates.market_event_attack_upgrade_purchased', player.name, Balance.weapon_damage_upgrade_percentage() })