Skip to content

Commit

Permalink
Mtn v3 - nerf biter health and set pause timer above wave 1500 to 10min
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerkiz committed Oct 9, 2023
1 parent b54d915 commit edf6fdc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
6 changes: 5 additions & 1 deletion maps/mountain_fortress_v3/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,11 @@ local function on_wave_created(event)
local wave_number = event.wave_number

if wave_number % 50 == 0 then
WD.set_pause_wave_in_ticks(random(18000, 54000))
if wave_number >= 1500 then
WD.set_pause_wave_in_ticks(random(36000, 54000))
else
WD.set_pause_wave_in_ticks(random(18000, 54000))
end
end
end

Expand Down
4 changes: 2 additions & 2 deletions maps/mountain_fortress_v3/stateful/table.lua
Original file line number Diff line number Diff line change
Expand Up @@ -952,12 +952,12 @@ function Public.increase_enemy_damage_and_health()
this.enemies_boosted = true

if this.rounds_survived == 1 then
Event.raise(WD.events.on_biters_evolved, {force = game.forces.enemy})
Event.raise(WD.events.on_biters_evolved, {force = game.forces.enemy, health_increase = true})
Event.raise(WD.events.on_biters_evolved, {force = game.forces.aggressors})
Event.raise(WD.events.on_biters_evolved, {force = game.forces.aggressors_frenzy})
else
for _ = 1, this.rounds_survived do
Event.raise(WD.events.on_biters_evolved, {force = game.forces.enemy})
Event.raise(WD.events.on_biters_evolved, {force = game.forces.enemy, health_increase = true})
Event.raise(WD.events.on_biters_evolved, {force = game.forces.aggressors})
Event.raise(WD.events.on_biters_evolved, {force = game.forces.aggressors_frenzy})
end
Expand Down
17 changes: 14 additions & 3 deletions modules/wave_defense/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,20 @@ local function increase_biter_damage(force)
local bio = new - 0.02
local e_old_melee = e.get_ammo_damage_modifier('melee')
local e_old_biological = e.get_ammo_damage_modifier('biological')
local e_old_speed_melee = e.get_gun_speed_modifier('melee')
local e_old_speed_biological = e.get_gun_speed_modifier('biological')

Public.debug_print('Melee: ' .. melee + e_old_melee)
Public.debug_print('Biological: ' .. bio + e_old_biological)
Public.debug_print('Melee damage: ' .. melee + e_old_melee)
Public.debug_print('Biological damage: ' .. bio + e_old_biological)

Public.debug_print('Melee speed: ' .. melee + e_old_speed_melee)
Public.debug_print('Biological speed: ' .. bio + e_old_speed_biological)

e.set_ammo_damage_modifier('melee', melee + e_old_melee)
e.set_ammo_damage_modifier('biological', bio + e_old_biological)

e.set_gun_speed_modifier('melee', melee + e_old_speed_melee)
e.set_gun_speed_modifier('biological', bio + e_old_speed_biological)
end

local function increase_biters_health()
Expand Down Expand Up @@ -1410,7 +1418,10 @@ Event.add(
end

increase_biter_damage(event.force)
increase_biters_health()

if event.health_increase then
increase_biters_health()
end
end
)

Expand Down

0 comments on commit edf6fdc

Please sign in to comment.