diff --git a/maps/pirates/coredata.lua b/maps/pirates/coredata.lua index 055bc0e3..f408e5c8 100644 --- a/maps/pirates/coredata.lua +++ b/maps/pirates/coredata.lua @@ -5,8 +5,8 @@ local inspect = require 'utils.inspect'.inspect local Public = {} Public.scenario_id_name = 'pirates' -Public.version_string = '1.0.4.6' -Public.version_float = 1.046 +Public.version_string = '1.0.4.6.1' +Public.version_float = 1.0461 Public.blueprint_library_allowed = true Public.blueprint_importing_allowed = true @@ -40,7 +40,7 @@ Public.colors = { notify_gameover = {r=249, g=84, b=84}, renderingtext_green = {r=88, g=219, b=88}, renderingtext_yellow = {r=79, g=136, b=209}, - quartermaster_rendering = {r=237, g=157, b=45}, + quartermaster_rendering = {r=237, g=157, b=45, a=0.3}, } Public.static_boat_floor = 'brown-refined-concrete' diff --git a/maps/pirates/gui/evo.lua b/maps/pirates/gui/evo.lua index 474b9f72..7ef9cb60 100644 --- a/maps/pirates/gui/evo.lua +++ b/maps/pirates/gui/evo.lua @@ -81,11 +81,11 @@ function Public.update(player) if memory.active_sea_enemies.krakens[i] then krakens = true break end end end - if krakens then --@FIXME: somehow this isn't triggering? - button.tooltip = string.format('Local biter evolution\n\nBase: %.2f\nKraken: %.2f\nTotal: %.2f', evolution_base, Balance.kraken_spawns_base_extra_evo + (memory.kraken_evo or 0), Balance.kraken_spawns_base_extra_evo + evo) + if krakens then + button.tooltip = string.format('Local biter evolution\n\nLeagues: %.2f\nKraken: %.2f\nTotal: %.2f', evolution_base, Balance.kraken_spawns_base_extra_evo + (memory.kraken_evo or 0), Balance.kraken_spawns_base_extra_evo + evo) button.number = Balance.kraken_spawns_base_extra_evo + evo else - button.tooltip = string.format('Local biter evolution\n\nBase: %.2f\nTotal: %.2f', evolution_base, evo) + button.tooltip = string.format('Local biter evolution\n\nLeagues: %.2f\nTotal: %.2f', evolution_base, evo) button.number = evo end else diff --git a/maps/pirates/gui/minimap.lua b/maps/pirates/gui/minimap.lua index ac681272..a85410e0 100644 --- a/maps/pirates/gui/minimap.lua +++ b/maps/pirates/gui/minimap.lua @@ -154,7 +154,7 @@ function Public.click(event) -- local shop_data = Shop.main_shop_data -- if eventname == 'buy_button' then - -- Shop.main_shop_try_purchase(event.element.parent.name) + -- Shop.Captains.main_shop_try_purchase(event.element.parent.name) -- end if eventname ~= 'camera' then return end diff --git a/maps/pirates/gui/shop.lua b/maps/pirates/gui/shop.lua index e9295215..b3284cd3 100644 --- a/maps/pirates/gui/shop.lua +++ b/maps/pirates/gui/shop.lua @@ -175,7 +175,7 @@ function Public.click(event) local memory = Memory.get_crew_memory() if eventname == 'buy_button' then - Shop.main_shop_try_purchase(player, event.element.parent.name) + Shop.Captains.main_shop_try_purchase(player, event.element.parent.name) end end diff --git a/maps/pirates/interface.lua b/maps/pirates/interface.lua index b005017b..473b3ad8 100644 --- a/maps/pirates/interface.lua +++ b/maps/pirates/interface.lua @@ -976,7 +976,8 @@ local function event_on_research_finished(event) p_force.recipes['locomotive'].enabled = false p_force.recipes['car'].enabled = false p_force.recipes['cargo-wagon'].enabled = false - p_force.recipes['rail'].enabled = true + p_force.recipes['slowdown-capsule'].enabled = false + -- p_force.recipes['rail'].enabled = false end local function event_on_player_joined_game(event) diff --git a/maps/pirates/loot.lua b/maps/pirates/loot.lua index 0c772e3c..ae9ba02c 100644 --- a/maps/pirates/loot.lua +++ b/maps/pirates/loot.lua @@ -326,8 +326,9 @@ Public.maze_treasure_data_raw = { {2, -1, 1, true, 'rocket', 18, 24}, {2, -1, 1, false, 'stack-inserter', 8, 10}, {2, -1, 1, false, 'stack-filter-inserter', 5, 6}, - {2, -1, 1, false, 'poison-capsule', 10, 12}, - {2, -1, 1, false, 'slowdown-capsule', 8, 10}, + {2, 0, 1, false, 'poison-capsule', 10, 12}, + {2, 0, 1, false, 'destroyer-capsule', 6, 6}, + {2, 0, 1, false, 'slowdown-capsule', 8, 8}, {2, 0, 1, false, 'uranium-rounds-magazine', 15, 25}, {2, 0, 1, false, 'artillery-shell', 5, 7}, @@ -353,11 +354,10 @@ Public.maze_treasure_data_raw = { {0.5, 0, 0.8, false, 'assembling-machine-3', 3, 3}, {1, 0, 0.7, false, 'electric-furnace', 4, 6}, - {1, 0, 0.9, false, 'destroyer-capsule', 6, 6}, {1, 0, 0.8, false, 'modular-armor', 1, 1}, {1, 0, 2, true, 'power-armor', 1, 1}, - {0.08, 0, 2, true, "power-armor-mk2", 1, 1}, + {0.1, 0, 2, true, 'power-armor-mk2', 1, 1}, {2, -1, 1, true, 'solar-panel-equipment', 3, 4}, {2, -1, 1, true, 'battery-equipment', 1, 1}, @@ -390,41 +390,42 @@ function Public.maze_treasure_loot() end Public.dredger_loot_raw = { - {20, 0, 1, false, 'iron-plate', 1, 1}, - {20, 0, 1, false, 'copper-plate', 1, 1}, - {20, 0, 1, false, 'coal', 1, 1}, + {10, 0, 1, false, 'iron-plate', 1, 1}, + {10, 0, 1, false, 'copper-plate', 1, 1}, + {10, 0, 1, false, 'coal', 1, 1}, {2, 0, 1, false, 'small-electric-pole', 1, 1}, {1, 0, 1, false, 'medium-electric-pole', 1, 1}, {0.1, 0, 1, false, 'big-electric-pole', 1, 1}, + {0.2, 0, 1, false, 'poison-capsule', 1, 1}, {0.2, 0, 1, false, 'slowdown-capsule', 1, 1}, {0.2, 0, 1, false, 'destroyer-capsule', 1, 1}, {0.2, 0, 1, false, 'defender-capsule', 1, 1}, {0.2, 0, 1, false, 'distractor-capsule', 1, 1}, - {10, 0, 1, false, 'automation-science-pack', 1, 1}, - {10, 0, 1, false, 'logistic-science-pack', 1, 1}, - {4, 0, 1, false, 'military-science-pack', 1, 1}, - {4, 0, 1, false, 'chemical-science-pack', 1, 1}, - {4, 0, 1, false, 'production-science-pack', 1, 1}, + {5, 0, 1, false, 'automation-science-pack', 1, 1}, + {5, 0, 1, false, 'logistic-science-pack', 1, 1}, + {2, 0, 1, false, 'military-science-pack', 1, 1}, + {2, 0, 1, false, 'chemical-science-pack', 1, 1}, + {2, 0, 1, false, 'production-science-pack', 1, 1}, - {0.0001, 0, 0.8, false, 'modular-armor', 1, 1}, - {0.0001, 0, 2, true, 'power-armor', 1, 1}, - {0.00008, 0, 2, true, "power-armor-mk2", 1, 1}, + {0.0003, 0, 0.75, false, 'modular-armor', 1, 1}, + {0.0003, 0, 2, true, 'power-armor', 1, 1}, + {0.0001, 0, 2, true, 'power-armor-mk2', 1, 1}, - {0.002, -1, 1, true, 'solar-panel-equipment', 1, 1}, - {0.002, -1, 1, true, 'battery-equipment', 1, 1}, - {0.001, 0, 2, true, 'battery-mk2-equipment', 1, 1}, - {0.002, -1, 1, true, 'energy-shield-equipment', 1, 1}, - {0.001, 0, 2, true, 'energy-shield-mk2-equipment', 1, 1}, - {0.001, -1, 1, true, 'personal-roboport-equipment', 1, 1}, - {0.005, 0, 2, true, 'personal-roboport-mk2-equipment', 1, 1}, - {0.005, 0, 0.8, false, 'night-vision-equipment', 1, 1}, - {0.001, 0, 1, false, 'personal-laser-defense-equipment', 1, 1}, - {0.005, 0, 1, false, 'fusion-reactor-equipment', 1, 1}, - {0.002, 0, 1, false, 'exoskeleton-equipment', 1, 1}, - {0.005, 0, 1, false, 'personal-laser-defense', 1, 1}, + {0.006, -1, 1, true, 'solar-panel-equipment', 1, 1}, + {0.006, -1, 1, true, 'battery-equipment', 1, 1}, + {0.003, 0, 2, true, 'battery-mk2-equipment', 1, 1}, + {0.006, -1, 1, true, 'energy-shield-equipment', 1, 1}, + {0.003, 0, 2, true, 'energy-shield-mk2-equipment', 1, 1}, + {0.003, -1, 1, true, 'personal-roboport-equipment', 1, 1}, + {0.015, 0, 2, true, 'personal-roboport-mk2-equipment', 1, 1}, + {0.015, 0, 0.8, false, 'night-vision-equipment', 1, 1}, + {0.003, 0, 1, false, 'personal-laser-defense-equipment', 1, 1}, + {0.015, 0, 1, false, 'fusion-reactor-equipment', 1, 1}, + {0.006, 0, 1, false, 'exoskeleton-equipment', 1, 1}, + {0.015, 0, 1, false, 'personal-laser-defense', 1, 1}, } function Public.dredger_loot() diff --git a/maps/pirates/main.lua b/maps/pirates/main.lua index 65be5b91..bd98688a 100644 --- a/maps/pirates/main.lua +++ b/maps/pirates/main.lua @@ -277,8 +277,8 @@ local function crew_tick() ClassTickFunctions.update_character_properties(30) end - if tick % 20 == 0 then - ClassTickFunctions.class_renderings(20) + if tick % 30 == 0 then + ClassTickFunctions.class_renderings(30) end if tick % 120 == 0 then diff --git a/maps/pirates/progression.lua b/maps/pirates/progression.lua index b2a0d291..875f426e 100644 --- a/maps/pirates/progression.lua +++ b/maps/pirates/progression.lua @@ -531,6 +531,8 @@ function Public.go_from_currentdestination_to_sea() memory.boat.position = new_boatposition memory.boat.surface_name = seaname + memory.kraken_evo = 0 --reset + memory.loadingticks = nil memory.mapbeingloadeddestination_index = nil diff --git a/maps/pirates/roles/classes.lua b/maps/pirates/roles/classes.lua index c1791758..34ca2440 100644 --- a/maps/pirates/roles/classes.lua +++ b/maps/pirates/roles/classes.lua @@ -79,7 +79,7 @@ Public.explanation = { [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 ore for the captain\'s cabin whilst offboard, but move slower onboard.', - [enum.BOATSWAIN] = 'They move faster and generate lots of ore for the captain\'s cabin whilst below deck, but move slower offboard.', + [enum.BOATSWAIN] = 'They move faster and generate ore for the captain\'s cabin whilst below deck, but move slower offboard.', [enum.PROSPECTOR] = 'They find more resources when handmining ore.', [enum.LUMBERJACK] = 'They find more resources when chopping trees.', [enum.MASTER_ANGLER] = 'They fish at much greater distance, and catch more.', @@ -87,7 +87,7 @@ Public.explanation = { [enum.CHIEF_EXCAVATOR] = 'They find many more resources when handmining ore.', [enum.HATAMOTO] = 'They are very tough, and *with no weapon equipped* fight well by melee.', [enum.IRON_LEG] = 'They are very resistant to damage when carrying 2500 iron ore.', - [enum.QUARTERMASTER] = 'Nearby crewmates generate a little ore for the captain\'s cabin, and have extra physical attack.', + [enum.QUARTERMASTER] = 'They give nearby crewmates extra physical attack, and generate ore for the captain\'s cabin for each one.', [enum.DREDGER] = 'They find surprising items when they fish.', [enum.SMOLDERING] = 'They periodically convert wood into coal, if they have less than 25 coal.', [enum.GOURMET] = 'They generate ore for the captain\'s cabin by eating fish in fancy locations on an empty stomach.', diff --git a/maps/pirates/shop/captains.lua b/maps/pirates/shop/captains.lua index f9d9c252..0e1ffb01 100644 --- a/maps/pirates/shop/captains.lua +++ b/maps/pirates/shop/captains.lua @@ -97,7 +97,7 @@ Public.main_shop_data_2 = { }, artillery_shell = { tooltip = '8 cannon shells.', - what_you_get_sprite_buttons = {['item/artillery-shell'] = 10}, + what_you_get_sprite_buttons = {['item/artillery-shell'] = 8}, base_cost = {coins = 800, fuel = 10}, }, artillery_remote = { diff --git a/maps/pirates/shop/dock.lua b/maps/pirates/shop/dock.lua index c6813293..2c3998b8 100644 --- a/maps/pirates/shop/dock.lua +++ b/maps/pirates/shop/dock.lua @@ -56,8 +56,9 @@ Public.market_sales = { {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'vehicle-machine-gun', count = 2}}, {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'substation', count = 6}}, {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'modular-armor', count = 1}}, - {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'distractor-capsule', count = 10}}, - {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'destroyer-capsule', count = 5}}, + {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'distractor-capsule', count = 15}}, + {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'destroyer-capsule', count = 10}}, + {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'slowdown-capsule', count = 10}}, {price = {{'coin', 2500}}, offer = {type = 'give-item', item = 'coin', count = 4000}}, } diff --git a/maps/pirates/tick_functions_classes.lua b/maps/pirates/tick_functions_classes.lua index 86d7be8a..308a68f5 100644 --- a/maps/pirates/tick_functions_classes.lua +++ b/maps/pirates/tick_functions_classes.lua @@ -42,7 +42,7 @@ function Public.class_renderings(tickinterval) local player_index = player.index if memory.classes_table[player_index] == Classes.enum.QUARTERMASTER then local r = memory.quartermaster_renderings[player_index] - processed_renderings[#processed_renderings + 1] = player_index + processed_renderings[player_index] = true if Common.validate_player_and_character(player) then if r and rendering.is_valid(r) then rendering.set_target(r, player.character) @@ -198,7 +198,7 @@ function Public.class_rewards_tick(tickinterval) if memory.classes_table and memory.classes_table[player_index] then local class = memory.classes_table[player_index] - if class == Classes.enum.DECKHAND or class == Classes.enum.SHORESMAN or class == Classes.enum.BOATSWAIN then + if class == Classes.enum.DECKHAND or class == Classes.enum.SHORESMAN or class == Classes.enum.BOATSWAIN or class == Classes.enum.QUARTERMASTER then --watch out for this line! local surfacedata = Surfaces.SurfacesCommon.decode_surface_name(player.surface.name) local type = surfacedata.type local on_ship_bool = type == Surfaces.enum.HOLD or type == Surfaces.enum.CABIN or type == Surfaces.enum.CROWSNEST or (player.surface.name == memory.boat.surface_name and Boats.on_boat(memory.boat, player.position)) @@ -210,18 +210,11 @@ function Public.class_rewards_tick(tickinterval) Classes.class_ore_grant(player, 7) elseif class == Classes.enum.SHORESMAN and (not on_ship_bool) then Classes.class_ore_grant(player, 3) - end - end - end - - if game.tick % (tickinterval*3) == 0 then - local nearby_players = player.surface.find_entities_filtered{position = player.position, radius = Common.quartermaster_range, name = 'character'} - - for _, p2 in pairs(nearby_players) do - if p2.player and p2.player.valid then - 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 - Classes.class_ore_grant(p2, 2) + elseif class == Classes.enum.QUARTERMASTER then + local nearby_players = #player.surface.find_entities_filtered{position = player.position, radius = Common.quartermaster_range, name = 'character'} + + if nearby_players > 1 then + Classes.class_ore_grant(player, nearby_players - 1) end end end