﻿-- chunkname: @scripts/settings/buff/weapon_traits_buff_templates/weapon_traits_bespoke_shotgun_p4_buff_templates.lua

local BaseWeaponTraitBuffTemplates = require("scripts/settings/buff/weapon_traits_buff_templates/base_weapon_trait_buff_templates")
local BuffSettings = require("scripts/settings/buff/buff_settings")
local ConditionalFunctions = require("scripts/settings/buff/helper_functions/conditional_functions")
local FireStepFunctions = require("scripts/settings/buff/fire_step_functions")
local stat_buffs = BuffSettings.stat_buffs
local templates = {}

table.make_unique(templates)

templates.weapon_trait_bespoke_shotgun_p4_increase_power_on_close_kill_parent = table.clone(BaseWeaponTraitBuffTemplates.increase_power_on_close_kill_parent)
templates.weapon_trait_bespoke_shotgun_p4_increase_power_on_close_kill_child = table.clone(BaseWeaponTraitBuffTemplates.increase_power_on_close_kill_child)
templates.weapon_trait_bespoke_shotgun_p4_increase_power_on_close_kill_parent.child_buff_template = "weapon_trait_bespoke_shotgun_p4_increase_power_on_close_kill_child"
templates.weapon_trait_bespoke_shotgun_p4_increase_close_damage_on_close_kill_parent = table.clone(BaseWeaponTraitBuffTemplates.increase_close_damage_on_close_kill_parent)
templates.weapon_trait_bespoke_shotgun_p4_increase_close_damage_on_close_kill_child = table.clone(BaseWeaponTraitBuffTemplates.increase_close_damage_on_close_kill_child)
templates.weapon_trait_bespoke_shotgun_p4_increase_close_damage_on_close_kill_parent.child_buff_template = "weapon_trait_bespoke_shotgun_p4_increase_close_damage_on_close_kill_child"
templates.weapon_trait_bespoke_shotgun_p4_count_as_dodge_vs_ranged_on_close_kill = table.clone(BaseWeaponTraitBuffTemplates.count_as_dodge_vs_ranged_on_close_kill)
templates.weapon_trait_bespoke_shotgun_p4_suppression_on_close_kill = table.clone(BaseWeaponTraitBuffTemplates.suppression_on_close_kill)
templates.weapon_trait_bespoke_shotgun_p4_power_bonus_on_hitting_single_enemy_with_all = table.clone(BaseWeaponTraitBuffTemplates.power_bonus_on_hitting_single_enemy_with_all)
templates.weapon_trait_bespoke_shotgun_p4_bleed_on_crit = table.clone(BaseWeaponTraitBuffTemplates.bleed_on_crit_pellets)
templates.weapon_trait_bespoke_shotgun_p4_crit_chance_on_hitting_multiple_with_one_shot_parent = table.clone(BaseWeaponTraitBuffTemplates.crit_chance_on_multiple_pellet_hit_parent)
templates.weapon_trait_bespoke_shotgun_p4_crit_chance_on_hitting_multiple_with_one_shot_parent.child_buff_template = "weapon_trait_bespoke_shotgun_p4_crit_chance_on_hitting_multiple_with_one_shot_child"
templates.weapon_trait_bespoke_shotgun_p4_crit_chance_on_hitting_multiple_with_one_shot_child = table.clone(BaseWeaponTraitBuffTemplates.crit_chance_on_multiple_pellet_hit_child)
templates.weapon_trait_bespoke_shotgun_p4_stagger_count_bonus_damage = table.clone(BaseWeaponTraitBuffTemplates.stagger_count_bonus_damage)
templates.weapon_trait_bespoke_shotgun_p4_cleave_on_crit = table.clone(BaseWeaponTraitBuffTemplates.infinite_cleave_on_crit)
templates.weapon_trait_bespoke_shotgun_p4_toughness_on_continuous_fire = table.merge({
	toughness_fixed_percentage = 0.1,
	continuous_fire_step_func = FireStepFunctions.toughness_regen_continuous_fire_step_func,
}, BaseWeaponTraitBuffTemplates.toughness_on_continuous_fire)
templates.weapon_trait_bespoke_shotgun_p4_reload_speed_on_slide_parent = table.clone(BaseWeaponTraitBuffTemplates.reload_speed_on_close_kill_parent)
templates.weapon_trait_bespoke_shotgun_p4_reload_speed_on_slide_child = table.clone(BaseWeaponTraitBuffTemplates.reload_speed_on_close_kill_child)
templates.weapon_trait_bespoke_shotgun_p4_reload_speed_on_slide_parent.child_buff_template = "weapon_trait_bespoke_shotgun_p4_reload_speed_on_slide_child"
templates.weapon_trait_bespoke_shotgun_p4_hipfire_while_sprinting = table.clone(BaseWeaponTraitBuffTemplates.hipfire_while_sprinting)
templates.weapon_trait_bespoke_shotgun_p4_toughness_on_close_range_kills = table.clone(BaseWeaponTraitBuffTemplates.toughness_recovery_on_close_kill)
templates.weapon_trait_bespoke_shotgun_p4_stagger_bonus_damage = table.clone(BaseWeaponTraitBuffTemplates.stagger_bonus_damage)
templates.weapon_trait_bespoke_shotgun_p4_damage_bonus_vs_electrocuted = {
	class_name = "buff",
	hide_icon_in_hud = true,
	predicted = false,
	conditional_stat_buffs = {
		[stat_buffs.damage_vs_electrocuted] = 0.5,
	},
	conditional_stat_buffs_func = ConditionalFunctions.is_item_slot_wielded,
}
templates.weapon_trait_bespoke_shotgun_p4_recoil_reduction_and_suppression_increase_on_close_kills = table.clone(BaseWeaponTraitBuffTemplates.recoil_reduction_and_suppression_increase_on_close_kills)
templates.weapon_trait_bespoke_shotgun_p4_followup_shots_ranged_weakspot_damage = table.clone(BaseWeaponTraitBuffTemplates.followup_shots_ranged_weakspot_damage)
templates.weapon_trait_bespoke_shotgun_p4_followup_shots_ranged_weakspot_damage.use_combo = true
templates.weapon_trait_bespoke_shotgun_p4_followup_shots_ranged_damage = table.clone(BaseWeaponTraitBuffTemplates.followup_shots_ranged_damage)
templates.weapon_trait_bespoke_shotgun_p4_followup_shots_ranged_damage.use_combo = true

return templates
