Skip to content

Commit

Permalink
Turret property improvements (#140)
Browse files Browse the repository at this point in the history
* Add files via upload

* Updating changelog

---------

Co-authored-by: KiwiHawk <[email protected]>
  • Loading branch information
Qatavin and KiwiHawk authored Nov 13, 2023
1 parent c2e2f51 commit f085e27
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
3 changes: 2 additions & 1 deletion bobwarfare/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Date: ???
- Fixed graphical gap between gates and reinforced walls #130
- Fixed crash related to setting Vehicle flamethrower starts fires #141
Changes:
- Increased the health, prepare range, and rotation speed of some higher tier turrets #84
- Added missing prerequisites #120
- Adjust tank recipe #129
- Adjusted tank recipe #129
- Don't add tech radars-1 when AAI Industry mod is enabled #133
---------------------------------------------------------------------------------------------------
Version: 1.1.6
Expand Down
43 changes: 37 additions & 6 deletions bobwarfare/prototypes/entity/turrets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,8 @@ local function bob_turret_extension(inputs)
end

local function bob_gun_turret(inputs)
local preparerange = inputs.range or 17
preparerange = preparerange + 1
return {
type = "ammo-turret",
name = inputs.name,
Expand All @@ -712,7 +714,7 @@ local function bob_gun_turret(inputs)
corpse = "gun-turret-remnants",
collision_box = { { -0.7, -0.7 }, { 0.7, 0.7 } },
selection_box = { { -1, -1 }, { 1, 1 } },
rotation_speed = 0.015,
rotation_speed = inputs.rotation_speed or 0.015,
preparing_speed = 0.08,
folding_speed = 0.08,
dying_explosion = "medium-explosion",
Expand Down Expand Up @@ -753,11 +755,14 @@ local function bob_gun_turret(inputs)
sound = sounds.heavy_gunshot,
},
call_for_help_radius = 40,
prepare_range = inputs.prepare_range or preparerange,
}
end

local function bob_laser_turret(inputs)
local size = inputs.size or 1
local preparerange = inputs.range or 25
preparerange = preparerange + 1
local turret = {
type = "electric-turret",
name = inputs.name,
Expand All @@ -770,7 +775,7 @@ local function bob_laser_turret(inputs)
collision_box = { { -0.7 * size, -0.7 * size }, { 0.7 * size, 0.7 * size } },
selection_box = { { -1 * size, -1 * size }, { 1 * size, 1 * size } },
dying_explosion = "medium-explosion",
rotation_speed = 0.01,
rotation_speed = inputs.rotation_speed or 0.01,
preparing_speed = 0.05,
folding_speed = 0.05,
fast_replaceable_group = "turret",
Expand Down Expand Up @@ -835,6 +840,7 @@ local function bob_laser_turret(inputs)
},
},
}
turret.prepare_range = inputs.prepare_range or preparerange
else
turret.attack_parameters = {
type = "beam",
Expand All @@ -859,6 +865,7 @@ local function bob_laser_turret(inputs)
},
},
}
turret.prepare_range = inputs.prepare_range or preparerange
end
return turret
end
Expand All @@ -867,52 +874,60 @@ data:extend({
-- bob_gun_turret{name = "gun-turret", health = 400, inventory_size = 1, automated_ammo_count = 10, ammo_category = "bullet", damage_modifier = 1, cooldown = 6, range = 18, tint = white, , base_tint = white},
bob_gun_turret({
name = "bob-gun-turret-2",
health = 500,
health = 800,
inventory_size = 1,
automated_ammo_count = 10,
ammo_category = "bullet",
damage_modifier = 1.25,
cooldown = 6,
range = 19,
prepare_range = 19.5,
rotation_speed = 0.017,
tint = red,
gun_type = "gun",
base = bob_turret_base({ type = "gun", tint = blue }),
}),
bob_gun_turret({
name = "bob-gun-turret-3",
health = 600,
health = 1200,
inventory_size = 2,
automated_ammo_count = 20,
ammo_category = "bullet",
damage_modifier = 1.5,
cooldown = 6,
range = 20,
prepare_range = 21,
rotation_speed = 0.019,
tint = blue,
gun_type = "gun",
base = bob_turret_base({ type = "gun", tint = blue }),
}),
bob_gun_turret({
name = "bob-gun-turret-4",
health = 700,
health = 1600,
inventory_size = 2,
automated_ammo_count = 20,
ammo_category = "bullet",
damage_modifier = 1.75,
cooldown = 6,
range = 21,
prepare_range = 22.5,
rotation_speed = 0.021,
tint = purple,
gun_type = "gun",
base = bob_turret_base({ type = "gun", tint = blue }),
}),
bob_gun_turret({
name = "bob-gun-turret-5",
health = 800,
health = 2000,
inventory_size = 3,
automated_ammo_count = 30,
ammo_category = "bullet",
damage_modifier = 2,
cooldown = 6,
range = 22,
prepare_range = 24,
rotation_speed = 0.023,
tint = green,
gun_type = "gun",
base = bob_turret_base({ type = "gun", tint = blue }),
Expand All @@ -927,6 +942,7 @@ data:extend({
damage_modifier = 15,
cooldown = 150,
range = 30,
prepare_range = 32,
tint = yellow,
gun_type = "gun",
base = bob_turret_base({ type = "laser", tint = red }),
Expand All @@ -940,6 +956,7 @@ data:extend({
damage_modifier = 20,
cooldown = 120,
range = 35,
prepare_range = 37,
tint = blue,
gun_type = "gun",
base = bob_turret_base({ type = "laser", tint = red }),
Expand All @@ -953,6 +970,7 @@ data:extend({
damage_modifier = 25,
cooldown = 105,
range = 40,
prepare_range = 42,
tint = green,
gun_type = "gun",
base = bob_turret_base({ type = "laser", tint = red }),
Expand All @@ -971,6 +989,8 @@ data:extend({
damage_modifier = 3,
cooldown = 35,
range = 26,
prepare_range = 26.5,
rotation_speed = 0.011,
tint = red,
base = bob_turret_base({ type = "laser", tint = yellow }),
}),
Expand All @@ -986,6 +1006,8 @@ data:extend({
damage_modifier = 4.2,
cooldown = 30,
range = 28,
prepare_range = 29,
rotation_speed = 0.012,
tint = blue,
base = bob_turret_base({ type = "laser", tint = yellow }),
}),
Expand All @@ -1001,6 +1023,8 @@ data:extend({
damage_modifier = 5.6,
cooldown = 25,
range = 30,
prepare_range = 31.5,
rotation_speed = 0.013,
tint = purple,
base = bob_turret_base({ type = "laser", tint = yellow }),
}),
Expand All @@ -1016,6 +1040,8 @@ data:extend({
damage_modifier = 7.2,
cooldown = 20,
range = 32,
prepare_range = 34,
rotation_speed = 0.014,
tint = green,
base = bob_turret_base({ type = "laser", tint = yellow }),
}),
Expand All @@ -1040,6 +1066,7 @@ data:extend({
damage_modifier = 12 * 1,
cooldown = 200,
range = 60,
prepare_range = 62,
sound = warefareSounds.plasmaTurret(0.7),
min_range = 30,
direction_deviation = 0,
Expand Down Expand Up @@ -1071,6 +1098,7 @@ data:extend({
damage_modifier = 12 * 1.5,
cooldown = 150,
range = 65,
prepare_range = 67,
sound = warefareSounds.plasmaTurret(0.75),
min_range = 30,
direction_deviation = 0,
Expand Down Expand Up @@ -1102,6 +1130,7 @@ data:extend({
damage_modifier = 12 * 2.1,
cooldown = 120,
range = 70,
prepare_range = 72,
sound = warefareSounds.plasmaTurret(0.8),
min_range = 30,
direction_deviation = 0,
Expand Down Expand Up @@ -1133,6 +1162,7 @@ data:extend({
damage_modifier = 12 * 2.8,
cooldown = 100,
range = 75,
prepare_range = 77,
sound = warefareSounds.plasmaTurret(0.9),
min_range = 30,
direction_deviation = 0,
Expand Down Expand Up @@ -1164,6 +1194,7 @@ data:extend({
damage_modifier = 12 * 3.6,
cooldown = 85,
range = 80,
prepare_range = 82,
sound = warefareSounds.plasmaTurret(1),
min_range = 30,
direction_deviation = 0,
Expand Down

0 comments on commit f085e27

Please sign in to comment.