diff --git a/maps/mountain_fortress_v3/locomotive.lua b/maps/mountain_fortress_v3/locomotive.lua index 04833e4dd..b90a09a60 100644 --- a/maps/mountain_fortress_v3/locomotive.lua +++ b/maps/mountain_fortress_v3/locomotive.lua @@ -1650,8 +1650,8 @@ local function place_market() end local function on_research_finished() - local chunk_load_tick = WPT.get('chunk_load_tick') - if chunk_load_tick > game.tick then + local market_announce = WPT.get('market_announce') + if market_announce > game.tick then return end diff --git a/maps/mountain_fortress_v3/main.lua b/maps/mountain_fortress_v3/main.lua index 75388c494..80322d3b5 100644 --- a/maps/mountain_fortress_v3/main.lua +++ b/maps/mountain_fortress_v3/main.lua @@ -232,6 +232,7 @@ function Public.reset_map() HS.get_scores() this.chunk_load_tick = game.tick + 1200 + this.market_announce = game.tick + 1200 this.game_lost = false end diff --git a/maps/mountain_fortress_v3/table.lua b/maps/mountain_fortress_v3/table.lua index d0fc16cc1..d15a086b0 100644 --- a/maps/mountain_fortress_v3/table.lua +++ b/maps/mountain_fortress_v3/table.lua @@ -200,6 +200,7 @@ function Public.reset_table() multiply = 0.25, highest = 10 } + this.market_announce = game.tick + 1200 --!reset player tables for _, player in pairs(this.players) do diff --git a/modules/biter_health_booster_v2.lua b/modules/biter_health_booster_v2.lua index b038f6511..253898680 100644 --- a/modules/biter_health_booster_v2.lua +++ b/modules/biter_health_booster_v2.lua @@ -180,6 +180,25 @@ local function on_entity_damaged(event) biter.die(biter.force) end +local function on_entity_died(event) + local biter = event.entity + if not (biter and biter.valid) then + return + end + if not entity_types[biter.type] then + return + end + + local biter_health_boost_units = this.biter_health_boost_units + + local unit_number = biter.unit_number + + local health_pool = biter_health_boost_units[unit_number] + if health_pool then + biter_health_boost_units[unit_number] = nil + end +end + function Public.get(key) if key then return this[key] @@ -199,11 +218,19 @@ function Public.set(key, value) end end +function Public.set_active_surface(str) + if str and type(str) == 'string' then + this.active_surface = str + end + return this.active_surface +end + local on_init = function() Public.reset_table() end Event.on_init(on_init) Event.add(defines.events.on_entity_damaged, on_entity_damaged) +Event.add(defines.events.on_entity_died, on_entity_died) return Public diff --git a/modules/wave_defense/main.lua b/modules/wave_defense/main.lua index 218ffc235..befcf29c5 100644 --- a/modules/wave_defense/main.lua +++ b/modules/wave_defense/main.lua @@ -522,8 +522,8 @@ local function increase_biters_health() -- this sets normal units health local modified_unit_health = WD.get('modified_unit_health') - if modified_unit_health > 10 then - modified_unit_health = 10 + if modified_unit_health > 30 then + modified_unit_health = 30 end debug_print('[HEALTHBOOSTER] > Normal Units Health Boosted: ' .. modified_unit_health) WD.set('modified_unit_health', modified_unit_health + 0.02) @@ -533,7 +533,7 @@ local function increase_biters_health() boosted_health = 1.20 end boosted_health = boosted_health * (wave_number * 0.03) - local sum = boosted_health * 5 + local sum = boosted_health * 4 debug_print('[HEALTHBOOSTER] > Boss Health Boosted: ' .. sum) if sum >= 100 then sum = 100 diff --git a/modules/wave_defense/table.lua b/modules/wave_defense/table.lua index ee44e0171..678ca59a4 100644 --- a/modules/wave_defense/table.lua +++ b/modules/wave_defense/table.lua @@ -76,7 +76,7 @@ function Public.reset_wave_defense() this.increase_boss_health_per_wave = true this.increase_health_per_wave = false this.fill_tiles_so_biter_can_path = true - this.modified_unit_health = 0.02 + this.modified_unit_health = 1.02 end function Public.get(key)