﻿-- chunkname: @scripts/settings/buff/buff_settings.lua

local BreedQueries = require("scripts/utilities/breed_queries")
local minion_breeds = BreedQueries.minion_breeds()
local buff_settings = {}

buff_settings.minion_effects_priorities = {
	ailment_effects = 10,
	default = 1,
	mutators = 30,
	player_effects = 50,
}
buff_settings.buff_categories = table.enum("generic", "talents", "weapon_traits", "talents_secondary", "gadget", "hordes_buff", "hordes_sub_buff", "aura")
buff_settings.buff_category_order = {
	buff_settings.buff_categories.generic,
	buff_settings.buff_categories.talents_secondary,
	buff_settings.buff_categories.aura,
	buff_settings.buff_categories.talents,
	buff_settings.buff_categories.weapon_traits,
	buff_settings.buff_categories.hordes_buff,
	buff_settings.buff_categories.hordes_sub_buff,
}
buff_settings.keywords = table.enum("adamant_drone_shocks_enemies_in_range", "adamant_hunt_stance", "adamant_dog_bloodlust", "adamant_mine_explode_on_finish", "adamant_terminus_warrant", "allow_backstabbing", "allow_extra_ability_charges", "allow_flanking", "allow_hipfire_during_sprint", "armor_penetrating", "ogryn_basic_box_spawns_cluster", "beast_of_nurgle_liquid_immunity", "beast_of_nurgle_vomit", "bleeding", "block_gives_warp_charge", "block_unblockable", "bolstered", "bolter_proficiency", "burning", "can_block_ranged", "cluster_explode_on_super_armored", "coherency_with_all_no_chain", "concealed", "corrupted", "has_nurgle_parasite", "blessed_by_nurgle_parasite", "can_attack_during_invisibility", "count_as_blocking", "count_as_blocking_vs_ranged", "count_as_dodge_vs_netgunner", "count_as_dodge_vs_chaos_hound_pounce", "count_as_dodge_vs_all", "count_as_dodge_vs_melee", "count_as_dodge_vs_ranged", "count_as_staggered", "critical_hit_infinite_cleave", "critical_melee_hit_infinite_cleave", "critical_strike_second_projectile", "cultist_flamer_liquid_immunity", "damage_immune", "damage_volume_burning", "damage_volume_electrical", "damage_volume_radioactive", "damage_volume_instakill", "despawn_on_death", "deterministic_recoil", "disable_elite_minions_collision_during_dodge", "disable_elite_minions_collision_during_sprint", "disable_horde_minions_collision_during_dodge", "disable_horde_minions_collision_during_sprint", "double_ammo_consumption", "electrocuted", "empowered", "fire_trail_on_lunge", "fully_charged_attacks_infinite_cleave", "guaranteed_critical_strike", "guaranteed_leadbelcher", "guaranteed_melee_critical_strike", "guaranteed_ranged_critical_strike", "guaranteed_smite_critical_strike", "guaranteed_weakspot_on_hit", "guaranteed_wind_slash_critical_strike", "health_segment_breaking_reduce_damage_taken", "havoc_gardens_embrace", "hit_mass_reduction_on_weakspot_hit", "hud_nameplates_disabled", "ignore_armor_aborts_attack_critical_strike", "ignore_armor_aborts_attack", "improved_ammo_pickups", "improved_medical_crate", "in_toxic_gas", "invisible", "invulnerable", "knock_down_on_slide", "limit_health_damage_taken", "melee_alternate_fire_interrupt_immune", "melee_infinite_cleave_critical_strike", "melee_infinite_cleave_on_headshot", "melee_infinite_cleave", "melee_push_immune", "no_ammo_consumption_on_crits", "no_ammo_consumption", "no_coherency_stickiness_limit", "no_parry_block_cost", "no_stagger", "no_sprint", "ogryn_box_of_surprise", "ogryn_combat_ability_stance", "ogryn_improved_lunge", "plasma_proficiency", "puked_on", "power_weapon_proficiency", "prevent_coherency_buffs_from_other_players", "prevent_coherency_toughness_buff", "prevent_critical_strike", "prevent_all_healing", "prevent_healing_health", "prevent_healing_corruption", "prevent_toughness_replenish_except_all_combat_abilities", "prevent_toughness_replenish_except_abilities", "prevent_toughness_replenish", "psychic_fortress", "psyker_chain_lightning_full_charge", "psyker_empowered_grenade", "psyker_overcharge", "random_damage_immune", "ranged_alternate_fire_interrupt_immune", "ranged_attack_infinite_cleave", "ranged_push_immune", "reduced_ammo_consumption", "reduced_toughness_generation", "renegade_flamer_liquid_immunity", "renegade_grenadier_liquid_immunity", "resist_death", "shock_grenade_shock", "shout_forces_strong_stagger", "slowdown_immune", "special_ammo", "sprint_dodge_in_overtime", "sticky_projectiles", "stimmed", "stun_immune_block_broken", "stun_immune_toughness_broken", "stun_immune", "super_armor_override", "infested_head_armor_override", "suppression_immune", "syringe_ability", "syringe_power", "syringe_speed", "taunted", "uninterruptible", "unperceivable", "use_overheat_soft_lockout", "use_reduced_hit_mass", "uses_nearby_broadphase", "veteran_combat_ability_stance", "veteran_tag", "warpfire_burning", "weakspot_hit_gains_armor_penetration", "weapon_special_extra_explosion_on_hit_armor", "zealot_channel_heals_corruption", "zealot_maniac_empowered_martyrdom", "zealot_toughness", "zero_slide_friction")
buff_settings.network_synced_keywords = {
	[buff_settings.keywords.improved_ammo_pickups] = true,
	[buff_settings.keywords.invisible] = true,
	[buff_settings.keywords.fire_trail_on_lunge] = true,
}

local group_keywords = table.enum("allow_action_during_sprint")
local group_to_keywords = {
	[group_keywords.allow_action_during_sprint] = {
		[buff_settings.keywords.allow_hipfire_during_sprint] = true,
	},
}

buff_settings.group_keywords = group_keywords
buff_settings.group_to_keywords = group_to_keywords
buff_settings.targets = table.enum("player_only", "minion_only", "any")
buff_settings.min_proc_events_size = 20
buff_settings.max_proc_events = 300
buff_settings.proc_events_stride = 2
buff_settings.max_stack_count = 31
buff_settings.proc_event_validation = {
	on_action_start = {
		action_name = "string",
		action_settings = "table",
	},
	on_action_finish = {
		action_name = "string",
		action_settings = "table",
		charge_level = "number",
	},
	on_ammo_consumed = {
		ammo_usage = "number",
		charged_ammo = "bool",
		is_critical_strike = "bool",
		num_shots_fired = "number",
		t = "number",
	},
	on_ammo_pickup = {
		new_ammo_amount = "number",
		pickup_amount = "number",
		pickup_name = "string",
	},
	on_warp_fire_applied = {
		buff_name = "string",
		buffed_unit = "unit",
		buffer_unit = "unit",
	},
	on_coherency_enter = {
		enter_unit = "unit",
		number_of_unit_in_coherency = "unit",
	},
	on_coherency_exit = {
		exit_unit = "unit",
		number_of_unit_in_coherency = "unit",
	},
	on_combat_ability = {
		unit = "unit",
		warp_charge_percent = "number",
	},
	on_player_companion_spawn = {
		companion_breed = "string",
		companion_unit = "unit",
		owner_unit = "unit",
	},
	on_player_companion_pounce = {
		companion_breed = "string",
		companion_unit = "unit",
		owner_unit = "unit",
		pounced_unit = "unit",
		target_unit_breed_name = "string",
	},
	on_player_companion_pounce_finish = {
		companion_breed = "string",
		companion_unit = "unit",
		owner_unit = "unit",
		pounced_unit = "unit",
		reason = "string",
		target_unit_breed_name = "string",
	},
	on_player_companion_knock_away = {
		companion_breed = "string",
		companion_unit = "unit",
		owner_unit = "unit",
		target_unit_breed_name = "string",
	},
	on_grenade_thrown = {
		unit = "unit",
	},
	on_player_projectile_finished = {
		impact_hit = "bool",
		num_impact_hit_elite = "number",
		num_impact_hit_kill = "number",
		num_impact_hit_minion = "number",
		num_impact_hit_special = "number",
		num_impact_hit_weakspot = "number",
		projectile_name = "string",
	},
	on_player_grenade_exploded = {
		item_name = "string",
		owner_unit = "unit",
		position = "Vector3",
		projectile_template = "table",
		triggered_on_impact = "bool",
	},
	on_projectile_stick = {
		owner_unit = "unit",
		projectile_template_name = "string",
		projectile_unit = "unit",
		target_unit = "unit",
	},
	on_critical_strike = {
		attack_type = "string",
		attacking_unit = "unit",
	},
	on_damage_taken = {
		attack_type = "string",
		attacked_unit = "unit",
		attacking_unit = "unit",
		attacking_unit_owner_unit = "unit",
		damage_amount = "number",
		damage_profile_name = "string",
		permanent_damage = "number",
		toughness_damage_amount = "number",
		will_die = "bool",
	},
	on_minion_damage_taken = {
		attack_type = "string",
		attacked_unit = "unit",
		attacking_unit = "unit",
		attacking_unit_owner_unit = "unit",
		damage_amount = "number",
		damage_profile_name = "string",
		permanent_damage = "number",
	},
	on_dodge_start = {},
	on_dodge_end = {},
	on_explosion_hit = {
		attack_instigator_unit = "unit",
		attacking_unit = "unit",
		charge_level = "number",
		item_slot_origin = "string",
		number_of_hit_units = "number",
		weapon_special = "bool",
	},
	on_lunge_aim_start = {},
	on_lunge_aim_end = {},
	on_lunge_start = {
		lunge_direction = "Vector3",
		lunge_template_name = "string",
		lunging_unit = "unit",
	},
	on_lunge_end = {
		last_hit_unit = "unit",
		lunge_direction = "Vector3",
		lunge_template_name = "string",
		lunging_unit = "unit",
	},
	on_slide_start = {},
	on_slide_end = {},
	on_healing_taken = {
		heal_amount = "number",
		heal_type = "string",
	},
	on_pellet_hits = {
		attacked_unit = "unit",
		damage = "number",
		is_critical_strike = "bool",
		max_number_of_pellets = "number",
		number_of_pellets_hit = "number",
	},
	on_psyker_shout_finish = {
		num_hits = "number",
	},
	on_psyker_shout_hit_ally = {
		ally_unit = "unit",
	},
	on_ogryn_shout = {
		num_hits = "number",
	},
	on_hit = {
		actual_damage_dealt = "number",
		alternative_fire = "bool",
		attack_direction = "Vector3",
		attack_instigator_unit = "unit",
		attack_instigator_unit_breed_name = "string",
		attack_result = "string",
		attack_type = "string",
		attacked_unit = "unit",
		attacking_unit = "unit",
		attacking_unit_breed_name = "string",
		breed_name = "string",
		charge_level = "number",
		close_explosion_hit = "bool",
		damage = "number",
		damage_efficiency = "string",
		damage_profile = "table",
		damage_type = "string",
		hit_weakspot = "bool",
		hit_world_position = "Vector3",
		hit_zone_name = "string",
		is_backstab = "bool",
		is_critical_strike = "bool",
		melee_attack_strength = "string",
		one_hit_kill = "bool",
		stagger_result = "string",
		sticky_attack = "bool",
		tags = "table",
		target_index = "number",
		weapon_special = "bool",
	},
	on_direct_flamer_hit = {},
	on_kill = {
		alternative_fire = "bool",
		attack_direction = "Vector3",
		attack_instigator_unit = "unit",
		attack_instigator_unit_breed_name = "string",
		attack_result = "string",
		attack_type = "string",
		attacked_unit = "unit",
		attacked_unit_position = "Vector3",
		attacking_unit = "unit",
		attacking_unit_breed_name = "string",
		breed_name = "string",
		charge_level = "number",
		close_explosion_hit = "bool",
		damage = "number",
		damage_efficiency = "string",
		damage_type = "string",
		hit_weakspot = "bool",
		hit_world_position = "Vector3",
		is_backstab = "bool",
		is_critical_strike = "bool",
		melee_attack_strength = "string",
		one_hit_kill = "bool",
		stagger_result = "string",
		sticky_attack = "bool",
		tags = "table",
		target_index = "number",
		weapon_special = "bool",
	},
	on_damage_dealt = {
		actual_damage_dealt = "number",
		alternative_fire = "bool",
		attack_direction = "Vector3",
		attack_instigator_unit = "unit",
		attack_result = "string",
		attack_type = "string",
		attacked_unit = "unit",
		attacking_unit = "unit",
		breed_name = "string",
		charge_level = "number",
		close_explosion_hit = "bool",
		damage = "number",
		damage_efficiency = "string",
		damage_profile_name = "string",
		damage_type = "string",
		hit_weakspot = "bool",
		hit_world_position = "Vector3",
		is_backstab = "bool",
		is_critical_strike = "bool",
		melee_attack_strength = "string",
		one_hit_kill = "bool",
		stagger_result = "string",
		sticky_attack = "bool",
		tags = "table",
		target_index = "number",
		weapon_special = "bool",
	},
	on_player_hit_received = {
		alternative_fire = "bool",
		attack_direction = "Vector3",
		attack_instigator_unit = "unit",
		attack_type = "string",
		attacked_unit = "unit",
		attacking_unit = "unit",
		close_explosion_hit = "bool",
		damage = "number",
		damage_absorbed = "number",
		damage_efficiency = "string",
		damage_type = "string",
		hit_weakspot = "bool",
		is_backstab = "bool",
		is_critical_strike = "bool",
		melee_attack_strength = "string",
		permanent_damage = "number",
		result = "string",
		sticky_attack = "bool",
	},
	on_minion_death = {
		attack_type = "string",
		attacking_unit = "unit",
		breed_name = "string",
		damage_profile_name = "string",
		damage_type = "string",
		dying_unit = "unit",
		position = "Vector3",
		side_name = "string",
		tags = "table",
	},
	on_bleeding_minion_death = {
		attack_type = "string",
		attacking_unit = "unit",
		bleed_stacks = "number",
		breed_name = "string",
		damage_profile_name = "string",
		damage_type = "string",
		dying_unit = "unit",
		position = "Vector3",
		side_name = "string",
		tags = "table",
	},
	on_push_hit = {
		pushed_unit = "unit",
		pushing_unit = "unit",
		stagger_result = "string",
	},
	on_push_finish = {
		num_hit_units = "number",
	},
	on_block = {
		attack_type = "string",
		attacking_unit = "unit",
		block_broken = "bool",
		block_cost = "number",
	},
	on_perfect_block = {
		action_name = "string",
		attacking_unit = "unit",
		block_broken = "bool",
		block_cost = "number",
	},
	on_reload = {
		shotgun = "bool",
		weapon_template = "table",
	},
	on_reload_start = {
		shotgun = "bool",
		weapon_template = "table",
	},
	on_shoot_start = {},
	on_shoot = {
		attacking_unit = "unit",
		combo_count = "number",
		hit_all_pellets = "bool",
		hit_all_pellets_on_same = "bool",
		hit_weakspot = "bool",
		is_critical_strike = "bool",
		num_hit_units = "number",
		num_shots_fired = "number",
	},
	on_shoot_projectile = {
		attacking_unit = "unit",
		combo_count = "number",
		num_shots_fired = "number",
		projectile_template_name = "string",
	},
	on_shoot_finish = {},
	on_action_damage_target = {
		attacked_unit = "unit",
		attacking_unit = "unit",
		damage_type = "string",
	},
	on_ranged_dodge = {},
	on_sprint_dodge = {},
	on_sprint_ended = {},
	on_sprint_started = {},
	on_stamina_depleted = {
		unit = "unit",
	},
	on_successful_dodge = {
		attack_type = "string",
		attacking_unit = "unit",
		dodge_type = "string",
		dodging_unit = "unit",
	},
	on_weapon_special_activate = {
		num_special_charges = "number",
		t = "number",
	},
	on_weapon_special_deactivate = {
		t = "number",
	},
	on_wield = {
		weapon_template = "table",
	},
	on_wield_ranged = {
		previously_wielded_slot = "string",
		weapon_template = "table",
	},
	on_wield_melee = {
		previously_wielded_slot = "string",
		weapon_template = "table",
	},
	on_sweep_start = {
		combo_count = "number",
		is_auto_completed = "bool",
		is_chain_action = "bool",
		is_heavy = "bool",
		is_weapon_special_active = "bool",
	},
	on_sweep_finish = {
		combo_count = "number",
		hit_weakspot = "bool",
		is_heavy = "bool",
		num_hit_units = "number",
	},
	on_windup_start = {
		combo_count = "number",
	},
	on_windup_trigger = {},
	on_side_mission_objective_complete = {
		unit = "unit",
	},
	on_all_grimoires_picked_up = {
		unit = "unit",
	},
	on_tag_unit = {
		tag_name = "string",
		tagger_unit = "unit",
		unit = "unit",
	},
	on_untag_unit = {
		tagger_unit = "unit",
		unit = "unit",
	},
	on_revive = {
		target_unit = "unit",
		unit = "unit",
	},
	on_rescue = {
		target_unit = "unit",
		unit = "unit",
	},
	on_pull_up = {
		target_unit = "unit",
		unit = "unit",
	},
	on_remove_net = {
		target_unit = "unit",
		unit = "unit",
	},
	on_ally_knocked_down = {
		downed_unit = "unit",
	},
	on_player_toughness_broken = {
		unit = "unit",
	},
	on_alternative_fire_start = {
		unit = "unit",
	},
	on_chain_lightning_start = {
		unit = "unit",
	},
	on_chain_lightning_finish = {
		unit = "unit",
	},
	on_chain_lightning_jump = {
		unit = "unit",
	},
	on_psyker_force_field_equip = {},
	on_psyker_force_field_unequip = {},
	on_unit_touch_force_field = {
		force_field_owner_unit = "unit",
		force_field_unit = "unit",
		is_player_unit = "bool",
		passing_unit = "unit",
	},
	on_unit_leave_force_field = {
		force_field_owner_unit = "unit",
		force_field_unit = "unit",
		is_player_unit = "bool",
		passing_unit = "unit",
	},
	on_unit_enter_fog = {
		fog_owner_unit = "unit",
		target_unit = "unit",
	},
	on_unit_exit_fog = {
		fog_owner_unit = "unit",
		target_unit = "unit",
	},
	on_warp_charge_changed = {
		percentage_change = "number",
	},
	on_toughness_replenished = {
		amount = "number",
		reason = "string",
		recovered_amount = "number",
	},
	on_overheat_lockout = {},
	on_overheat_soft_lockout = {},
	on_buff_added = {
		template_name = "string",
		unit = "unit",
	},
	on_buff_stack_added = {
		template_name = "string",
		unit = "unit",
	},
	on_max_stack_refresh_buff = {
		template_name = "string",
		unit = "unit",
	},
}

local proc_event_names = table.keys(buff_settings.proc_event_validation)

buff_settings.proc_events = table.enum(unpack(proc_event_names))
buff_settings.stat_buff_types = {
	ability_cooldown_flat_reduction = "value",
	ability_cooldown_modifier = "additive_multiplier",
	ability_extra_charges = "value",
	alternate_fire_movement_speed_reduction_modifier = "multiplicative_multiplier",
	ammo_reserve_capacity = "additive_multiplier",
	ammo_usage = "multiplicative_multiplier",
	armored_damage = "additive_multiplier",
	assist_speed_modifier = "additive_multiplier",
	attack_speed = "additive_multiplier",
	backstab_damage = "additive_multiplier",
	backstab_rending_multiplier = "additive_multiplier",
	berserker_damage = "additive_multiplier",
	block_angle_modifier = "additive_multiplier",
	block_cost_modifier = "additive_multiplier",
	block_cost_multiplier = "multiplicative_multiplier",
	block_cost_ranged_modifier = "additive_multiplier",
	block_cost_ranged_multiplier = "multiplicative_multiplier",
	burning_damage = "additive_multiplier",
	burning_duration = "additive_multiplier",
	chain_lightning_damage = "additive_multiplier",
	chain_lightning_jump_time_multiplier = "multiplicative_multiplier",
	chain_lightning_max_angle = "value",
	chain_lightning_max_jumps = "value",
	chain_lightning_max_radius = "value",
	chain_lightning_staff_max_jumps = "value",
	charge_level_modifier = "additive_multiplier",
	charge_movement_reduction_multiplier = "multiplicative_multiplier",
	charge_up_time = "additive_multiplier",
	clip_size_modifier = "additive_multiplier",
	close_range_rending_multiplier = "additive_multiplier",
	coherency_radius_modifier = "additive_multiplier",
	coherency_radius_multiplier = "multiplicative_multiplier",
	coherency_stickiness_time_value = "value",
	combat_ability_cooldown_modifier = "additive_multiplier",
	companion_damage_modifier = "additive_multiplier",
	companion_damage_multiplier = "multiplicative_multiplier",
	companion_damage_vs_elites = "additive_multiplier",
	companion_damage_vs_melee = "additive_multiplier",
	companion_damage_vs_ranged = "additive_multiplier",
	companion_damage_vs_special = "additive_multiplier",
	consumed_hit_mass_modifier = "multiplicative_multiplier",
	consumed_hit_mass_modifier_on_kill = "multiplicative_multiplier",
	consumed_hit_mass_modifier_on_ranged_critical_hit = "multiplicative_multiplier",
	consumed_hit_mass_modifier_on_ranged_hit = "multiplicative_multiplier",
	consumed_hit_mass_modifier_on_weakspot_hit = "multiplicative_multiplier",
	corruption_taken_grimoire_multiplier = "multiplicative_multiplier",
	corruption_taken_multiplier = "multiplicative_multiplier",
	critical_strike_chance = "value",
	critical_strike_chance_to_damage_convert = "value",
	critical_strike_damage = "additive_multiplier",
	critical_strike_rending_multiplier = "additive_multiplier",
	critical_strike_weakspot_damage = "additive_multiplier",
	damage = "additive_multiplier",
	damage_far = "additive_multiplier",
	damage_near = "additive_multiplier",
	damage_taken_from_bleeding = "additive_multiplier",
	damage_taken_from_burning = "additive_multiplier",
	damage_taken_from_electrocution = "additive_multiplier",
	damage_taken_from_explosions = "additive_multiplier",
	damage_taken_from_kinetic = "additive_multiplier",
	damage_taken_from_toxic_gas_multiplier = "multiplicative_multiplier",
	damage_taken_modifier = "additive_multiplier",
	damage_taken_multiplier = "multiplicative_multiplier",
	damage_taken_vs_taunted = "additive_multiplier",
	damage_vs_bleeding = "additive_multiplier",
	damage_vs_burning = "additive_multiplier",
	damage_vs_captains = "additive_multiplier",
	damage_vs_electrocuted = "additive_multiplier",
	damage_vs_elites = "additive_multiplier",
	damage_vs_healthy = "additive_multiplier",
	damage_vs_horde = "additive_multiplier",
	damage_vs_monsters = "additive_multiplier",
	damage_vs_nonthreat = "additive_multiplier",
	damage_vs_ogryn = "additive_multiplier",
	damage_vs_ogryn_and_monsters = "additive_multiplier",
	damage_vs_specials = "additive_multiplier",
	damage_vs_staggered = "additive_multiplier",
	damage_vs_suppressed = "additive_multiplier",
	damage_vs_unaggroed = "additive_multiplier",
	disgustingly_resilient_damage = "additive_multiplier",
	dodge_cooldown_reset_modifier = "additive_multiplier",
	dodge_distance_modifier = "additive_multiplier",
	dodge_linger_time_melee_modifier = "additive_multiplier",
	dodge_linger_time_modifier = "additive_multiplier",
	dodge_linger_time_ranged_modifier = "additive_multiplier",
	dodge_speed_multiplier = "multiplicative_multiplier",
	elusiveness_modifier = "multiplicative_multiplier",
	explosion_arming_distance_multiplier = "multiplicative_multiplier",
	explosion_impact_modifier = "additive_multiplier",
	explosion_radius_modifier = "additive_multiplier",
	explosion_radius_modifier_frag = "additive_multiplier",
	explosion_radius_modifier_shock = "additive_multiplier",
	extra_consecutive_dodges = "value",
	extra_grenade_throw_chance = "value",
	extra_max_amount_of_grenades = "value",
	extra_max_amount_of_wounds = "value",
	finesse_ability_multiplier = "multiplicative_multiplier",
	finesse_close_range_modifier = "additive_multiplier",
	finesse_modifier_bonus = "additive_multiplier",
	flanking_damage = "additive_multiplier",
	flanking_rending_multiplier = "additive_multiplier",
	force_staff_melee_damage = "additive_multiplier",
	force_staff_secondary_damage = "additive_multiplier",
	force_staff_single_target_damage = "additive_multiplier",
	force_weapon_damage = "additive_multiplier",
	fov_multiplier = "multiplicative_multiplier",
	frag_damage = "additive_multiplier",
	fully_charged_damage = "additive_multiplier",
	grenade_ability_cooldown_modifier = "additive_multiplier",
	healing_recieved_modifier = "additive_multiplier",
	health_segment_damage_taken_multiplier = "multiplicative_multiplier",
	impact_modifier = "additive_multiplier",
	increased_suppression = "additive_multiplier",
	inner_push_angle_modifier = "additive_multiplier",
	knocked_down_health_modifier = "additive_multiplier",
	krak_damage = "additive_multiplier",
	leadbelcher_chance_bonus = "value",
	leech = "value",
	lunge_distance = "value",
	max_health_damage_taken_per_hit = "value",
	max_health_modifier = "additive_multiplier",
	max_health_multiplier = "multiplicative_multiplier",
	max_hit_mass_attack_modifier = "additive_multiplier",
	max_hit_mass_impact_modifier = "additive_multiplier",
	max_melee_hit_mass_attack_modifier = "additive_multiplier",
	medical_crate_healing_modifier = "additive_multiplier",
	melee_attack_speed = "additive_multiplier",
	melee_critical_strike_chance = "value",
	melee_critical_strike_damage = "additive_multiplier",
	melee_damage = "additive_multiplier",
	melee_damage_taken_modifier = "additive_multiplier",
	melee_damage_taken_multiplier = "multiplicative_multiplier",
	melee_finesse_modifier_bonus = "additive_multiplier",
	melee_fully_charged_damage = "additive_multiplier",
	melee_heavy_damage = "additive_multiplier",
	melee_heavy_power_level_modifier = "additive_multiplier",
	melee_impact_modifier = "additive_multiplier",
	melee_power_level_modifier = "additive_multiplier",
	melee_rending_multiplier = "additive_multiplier",
	melee_rending_vs_staggered_multiplier = "additive_multiplier",
	melee_toughness_damage_taken_modifier = "additive_multiplier",
	melee_toughness_damage_taken_multiplier = "multiplicative_multiplier",
	melee_weakspot_damage = "additive_multiplier",
	melee_weakspot_damage_vs_bleeding = "additive_multiplier",
	melee_weakspot_damage_vs_staggered = "additive_multiplier",
	melee_weakspot_impact_modifier = "additive_multiplier",
	melee_weakspot_power_modifier = "additive_multiplier",
	minion_accuracy_modifier = "multiplicative_multiplier",
	minion_num_shots_modifier = "multiplicative_multiplier",
	monster_damage_taken_multiplier = "multiplicative_multiplier",
	movement_speed = "additive_multiplier",
	non_warp_damage_taken_multiplier = "multiplicative_multiplier",
	ogryn_damage_taken_multiplier = "multiplicative_multiplier",
	ogryn_friendly_rock_damage_modifier = "additive_multiplier",
	ogryn_grenade_box_cluster_amount = "value",
	opt_in_stagger_duration_multiplier = "multiplicative_multiplier",
	outer_push_angle_modifier = "additive_multiplier",
	overheat_amount = "multiplicative_multiplier",
	overheat_dissipation_multiplier = "multiplicative_multiplier",
	overheat_explosion_damage_modifier = "additive_multiplier",
	overheat_explosion_radius_modifier = "additive_multiplier",
	overheat_explosion_speed_modifier = "additive_multiplier",
	overheat_immediate_amount = "multiplicative_multiplier",
	overheat_immediate_amount_critical_strike = "multiplicative_multiplier",
	overheat_over_time_amount = "multiplicative_multiplier",
	perfect_block_timing = "value",
	permanent_damage_converter = "value",
	permanent_damage_converter_resistance = "value",
	permanent_damage_ratio = "value",
	pocketable_ability_cooldown_modifier = "additive_multiplier",
	power_level = "value",
	power_level_modifier = "additive_multiplier",
	power_level_modifier_vs_aggroed_elites = "additive_multiplier",
	power_level_modifier_vs_aggroed_monsters = "additive_multiplier",
	psyker_force_field_movespeed_reduction_multiplier = "multiplicative_multiplier",
	psyker_smite_cost_multiplier = "multiplicative_multiplier",
	psyker_smite_max_hit_mass_attack_modifier = "additive_multiplier",
	psyker_smite_max_hit_mass_impact_modifier = "additive_multiplier",
	psyker_throwing_knife_speed_modifier = "additive_multiplier",
	psyker_throwing_knives_damage_multiplier = "additive_multiplier",
	push_cost_multiplier = "multiplicative_multiplier",
	push_impact_modifier = "additive_multiplier",
	push_speed_modifier = "additive_multiplier",
	random_damage_immunity_chance = "value",
	ranged_attack_speed = "additive_multiplier",
	ranged_critical_strike_chance = "value",
	ranged_critical_strike_damage = "additive_multiplier",
	ranged_critical_strike_rending_multiplier = "additive_multiplier",
	ranged_damage = "additive_multiplier",
	ranged_damage_far = "additive_multiplier",
	ranged_damage_taken_multiplier = "multiplicative_multiplier",
	ranged_finesse_modifier_bonus = "additive_multiplier",
	ranged_impact_modifier = "additive_multiplier",
	ranged_max_hit_mass_attack_modifier = "additive_multiplier",
	ranged_power_level_modifier = "additive_multiplier",
	ranged_rending_multiplier = "additive_multiplier",
	ranged_toughness_damage_taken_modifier = "additive_multiplier",
	ranged_toughness_damage_taken_multiplier = "multiplicative_multiplier",
	ranged_weakspot_damage = "additive_multiplier",
	ranged_weakspot_damage_vs_staggered = "additive_multiplier",
	recoil_modifier = "additive_multiplier",
	reload_decrease_movement_reduction = "multiplicative_multiplier",
	reload_speed = "additive_multiplier",
	rending_multiplier = "additive_multiplier",
	rending_vs_staggered_multiplier = "additive_multiplier",
	resistant_damage = "additive_multiplier",
	revive_duration_multiplier = "multiplicative_multiplier",
	revive_speed_modifier = "additive_multiplier",
	shout_damage = "additive_multiplier",
	shout_impact_modifier = "additive_multiplier",
	shout_radius_modifier = "additive_multiplier",
	smite_attack_speed = "additive_multiplier",
	smite_damage = "additive_multiplier",
	smite_damage_multiplier = "multiplicative_multiplier",
	smite_same_target_discount = "multiplicative_multiplier",
	smoke_fog_duration_modifier = "additive_multiplier",
	spread_modifier = "additive_multiplier",
	sprint_dodge_reduce_angle_threshold_rad = "max_value",
	sprint_movement_speed = "additive_multiplier",
	sprinting_cost_multiplier = "multiplicative_multiplier",
	stagger_burning_reduction_modifier = "multiplicative_multiplier",
	stagger_count_damage = "additive_multiplier",
	stagger_duration_multiplier = "multiplicative_multiplier",
	stagger_weakspot_reduction_modifier = "multiplicative_multiplier",
	stamina_cost_multiplier = "multiplicative_multiplier",
	stamina_modifier = "value",
	stamina_regeneration_delay = "value",
	stamina_regeneration_modifier = "additive_multiplier",
	stamina_regeneration_multiplier = "multiplicative_multiplier",
	static_movement_reduction_multiplier = "multiplicative_multiplier",
	super_armor_damage = "additive_multiplier",
	super_armor_impact_on_crit = "additive_multiplier",
	suppression_dealt = "additive_multiplier",
	suppressor_decay_multiplier = "multiplicative_multiplier",
	sway_modifier = "multiplicative_multiplier",
	threat_weight_multiplier = "multiplicative_multiplier",
	toughness = "value",
	toughness_bonus = "additive_multiplier",
	toughness_bonus_flat = "value",
	toughness_coherency_regen_rate_modifier = "value",
	toughness_coherency_regen_rate_multiplier = "additive_multiplier",
	toughness_damage = "additive_multiplier",
	toughness_damage_taken_modifier = "additive_multiplier",
	toughness_damage_taken_multiplier = "multiplicative_multiplier",
	toughness_extra_regen_rate = "value",
	toughness_melee_replenish = "additive_multiplier",
	toughness_regen_delay_modifier = "additive_multiplier",
	toughness_regen_delay_multiplier = "multiplicative_multiplier",
	toughness_regen_rate_modifier = "additive_multiplier",
	toughness_regen_rate_multiplier = "multiplicative_multiplier",
	toughness_replenish_modifier = "additive_multiplier",
	toughness_replenish_multiplier = "multiplicative_multiplier",
	unarmored_damage = "additive_multiplier",
	vent_overheat_damage_multiplier = "multiplicative_multiplier",
	vent_overheat_speed = "multiplicative_multiplier",
	vent_warp_charge_damage_multiplier = "multiplicative_multiplier",
	vent_warp_charge_decrease_movement_reduction = "multiplicative_multiplier",
	vent_warp_charge_multiplier = "multiplicative_multiplier",
	vent_warp_charge_speed = "multiplicative_multiplier",
	warp_attacks_rending_multiplier = "additive_multiplier",
	warp_charge_amount = "multiplicative_multiplier",
	warp_charge_amount_smite = "multiplicative_multiplier",
	warp_charge_block_cost = "multiplicative_multiplier",
	warp_charge_dissipation_multiplier = "multiplicative_multiplier",
	warp_charge_immediate_amount = "multiplicative_multiplier",
	warp_charge_over_time_amount = "multiplicative_multiplier",
	warp_damage = "additive_multiplier",
	warp_damage_taken_multiplier = "multiplicative_multiplier",
	weakspot_damage = "additive_multiplier",
	weakspot_damage_taken = "additive_multiplier",
	weakspot_power_level_modifier = "additive_multiplier",
	weapon_action_movespeed_reduction_multiplier = "multiplicative_multiplier",
	weapon_special_max_activations = "value",
	wield_speed = "additive_multiplier",
	windup_action_movespeed_reduction_multiplier = "multiplicative_multiplier",
}

for name, _ in pairs(minion_breeds) do
	buff_settings.stat_buff_types["damage_vs_" .. name] = "additive_multiplier"
	buff_settings.stat_buff_types["damage_taken_by_" .. name .. "_multiplier"] = "multiplicative_multiplier"
end

local stat_buff_names = table.keys(buff_settings.stat_buff_types)

buff_settings.stat_buffs = table.enum(unpack(stat_buff_names))
buff_settings.stat_buff_base_values = {
	additive_multiplier = 1,
	max_value = 0,
	multiplicative_multiplier = 1,
	value = 0,
}
buff_settings.stat_buff_type_base_values = Script.new_map(256)

for name, buff_type in pairs(buff_settings.stat_buff_types) do
	buff_settings.stat_buff_type_base_values[name] = buff_settings.stat_buff_base_values[buff_type]
end

buff_settings.meta_stat_buff_types = {
	mission_reward_credit_modifier = "value",
	mission_reward_drop_chance_modifier = "additive_multiplier",
	mission_reward_gear_instead_of_weapon_modifier = "additive_multiplier",
	mission_reward_rare_loot_modifier = "additive_multiplier",
	mission_reward_weapon_drop_rarity_modifier = "additive_multiplier",
	mission_reward_xp_modifier = "value",
	side_mission_reward_credit_modifier = "value",
	side_mission_reward_xp_modifier = "value",
}

local meta_stat_buff_names = table.keys(buff_settings.meta_stat_buff_types)

buff_settings.meta_stat_buffs = table.enum(unpack(meta_stat_buff_names))
buff_settings.meta_stat_buff_type_base_values = Script.new_map(32)

for name, buff_type in pairs(buff_settings.meta_stat_buff_types) do
	buff_settings.meta_stat_buff_type_base_values[name] = buff_settings.stat_buff_base_values[buff_type]
end

buff_settings.keyword_settings = {
	[buff_settings.keywords.improved_medical_crate] = {
		heal_multiplier = 2,
		permanent_damage_multiplier = 0.5,
		toughness_percentage_per_second = 0.01,
	},
}

return buff_settings
