###########################
# Treasure Hunters Traits #
###########################

leader_trait_buccaneer = {
	starting_ruler_trait = yes
	allowed_origins = { origin_treasure_hunters }
	cost = 1
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_buccaneer"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}

	councilor_modifier = {
		enemy_ship_destroyed_energy_add = 25
	}

	leader_class = { official commander scientist }
	leader_potential_add = { is_ruler = yes 
							 exists = owner
							 owner = { has_origin = origin_treasure_hunters }
	}

	initial = no
	randomized = no
}

leader_trait_buccaneer_2 = {
	replace_traits = { "leader_trait_buccaneer" }
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_buccaneer"
		RARITY = common
		COUNCIL = yes
		TIER = 2
	}

	councilor_modifier = {
		enemy_ship_destroyed_energy_add = 50
	}

	leader_class = { official commander scientist }

	initial = no
}

leader_trait_buccaneer_3 = {
	replace_traits = { "leader_trait_buccaneer_2" }
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_buccaneer"
		RARITY = common
		COUNCIL = yes
		TIER = 3
	}

	councilor_modifier = {
		enemy_ship_destroyed_energy_add = 75
	}

	leader_class = { official commander scientist }

	initial = no
}

leader_trait_trailblazer = {
	starting_ruler_trait = yes
	allowed_origins = { origin_treasure_hunters }
	cost = 1
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_trailblazer"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}

	councilor_modifier = {
		ship_sensor_range_add = 1
		ship_hyperlane_range_add = 1
		ship_speed_mult = 0.15
	}

	leader_class = { official commander scientist }
	leader_potential_add = { is_ruler = yes 
							 exists = owner
							 owner = { has_origin = origin_treasure_hunters }
	}

	initial = no
	randomized = no
}

leader_trait_trailblazer_2 = {
	replace_traits = { "leader_trait_trailblazer" }
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_trailblazer"
		RARITY = common
		COUNCIL = yes
		TIER = 2
	}

	councilor_modifier = {
		ship_sensor_range_add = 2
		ship_hyperlane_range_add = 2
		ship_speed_mult = 0.25
	}

	leader_class = { official commander scientist }

	initial = no
}

leader_trait_trailblazer_3 = {
	replace_traits = { "leader_trait_trailblazer_2" }
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_trailblazer"
		RARITY = common
		COUNCIL = yes
		TIER = 3
	}

	councilor_modifier = {
		ship_sensor_range_add = 3
		ship_hyperlane_range_add = 3
		ship_speed_mult = 0.35
	}

	leader_class = { official commander scientist }

	initial = no
}

leader_trait_treasure_hoarder = {
	starting_ruler_trait = yes
	allowed_origins = { origin_treasure_hunters }
	cost = 1
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_treasure_hoarder"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}

	councilor_modifier = {
		deposit_increase_on_survey_chance_mult = 0.2
	}

	leader_class = { official commander scientist }
	leader_potential_add = { is_ruler = yes 
							 exists = owner
							 owner = { has_origin = origin_treasure_hunters }
	}

	initial = no
	randomized = no
}

leader_trait_treasure_hoarder_2 = {
	replace_traits = { "leader_trait_treasure_hoarder" }
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_treasure_hoarder"
		RARITY = common
		COUNCIL = yes
		TIER = 2
	}

	councilor_modifier = {
		deposit_increase_on_survey_chance_mult = 0.35
	}

	leader_class = { official commander scientist }

	initial = no
}

leader_trait_treasure_hoarder_3 = {
	replace_traits = { "leader_trait_treasure_hoarder_2" }
	inline_script = {
		script = trait/icon
		ICON = "GFX_leader_trait_treasure_hoarder"
		RARITY = common
		COUNCIL = yes
		TIER = 3
	}

	councilor_modifier = {
		deposit_increase_on_survey_chance_mult = 0.5
	}

	leader_class = { official commander scientist }

	initial = no
}

leader_trait_pirate_queen = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_pirate_queen
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		owner = {
			country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
		}
	}
	fleet_modifier = {
		ship_steal_defeated_ship_chance = 0.15
		ship_weapon_damage = 0.15
	}
	leader_class = { commander }
	leader_potential_add = {
		has_trait = subclass_commander_admiral
	}
	background_icon = GFX_leader_background_destiny_1

	initial = no
	randomized = no
}

#########################
# Primal Calling Traits #
#########################

leader_trait_trophy_hunter = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = GFX_leader_trait_trophy_hunter
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		owner = {
			country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
		}
	}
	fleet_modifier = {
		ship_damage_against_space_fauna_mult = 0.2
		ship_weapon_damage = 0.2
		ship_tracking_mult = 0.2
		ship_accuracy_mult = 0.2
	}
	leader_class = { commander }
	leader_potential_add = {
		has_trait = subclass_commander_admiral
	}
	background_icon = GFX_leader_background_destiny_1

	initial = no
	randomized = no
}

leader_trait_gifted_trapper = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = scientist
		ICON = GFX_leader_trait_gifted_trapper
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	on_gained_effect = {
		owner = {
			country_event = { id = timeline.50 } # Timeline First Leader with Destiny Trait
		}
	}
	triggered_background_planet_modifier = {
		potential = {	leader_class = scientist
						exists = FROM
						FROM = {	exists = owner
									owner = { is_same_value = root.owner } } 
						trait_is_gestalt_check = yes }
		planet_biologists_engineering_research_produces_add  = 0.15
		planet_biologists_physics_research_produces_add  = 0.15
		job_calculator_biologist_add = 150
	}
	triggered_background_planet_modifier = {
		potential = {	leader_class = scientist
						exists = FROM
						FROM = {	exists = owner
									owner = { is_same_value = root.owner } } 
						trait_is_gestalt_check = no }
		planet_biologists_engineering_research_produces_add  = 0.15
		planet_biologists_physics_research_produces_add  = 0.15
		job_biologist_add  = 150
	}
	modifier = {
		ship_capture_chance_add = 0.25
		gravity_snare_cooldown_mult = -0.25
		on_fauna_capture_scientist_exp_gain = @gravity_snare_experience_reward
		ship_speed_mult = 0.25
	}
	leader_class = { scientist }
	leader_potential_add = {
		has_trait = subclass_scientist_explorer
	}
	background_icon = GFX_leader_background_destiny_1

	initial = no
	randomized = no
}

leader_trait_void_hunter = {
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_void_hunter"
		RARITY = common
		COUNCIL = no
		TIER = 1
	}
	fleet_modifier = {
		ship_damage_against_space_fauna_mult = 0.1
		ship_speed_mult = 0.1
		ship_weapon_range_mult = 0.1
		space_fauna_ship_speed_mult = 0.1
	}
	leader_potential_add = {
		has_grand_archive_dlc = yes
		exists = owner
		owner = {
			has_encountered_any_fauna = yes
		}
	}
	leader_class = { commander }
	selectable_weight = {
		weight = @shared_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

leader_trait_void_hunter_2 = {
	replace_traits = { "leader_trait_void_hunter" }
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_void_hunter"
		RARITY = common
		COUNCIL = no
		TIER = 2
	}
	fleet_modifier = {
		ship_damage_against_space_fauna_mult = 0.2
		ship_speed_mult = 0.2
		ship_weapon_range_mult = 0.2
		space_fauna_ship_speed_mult = 0.2
	}
	leader_class = { commander }
}

leader_trait_void_tracker = {
	inline_script = {
		script = trait/icon
		CLASS = scientist
		ICON = "GFX_leader_trait_void_tracker"
		RARITY = common
		COUNCIL = no
		TIER = 1
	}
	triggered_background_planet_modifier = {
		potential = {	exists = FROM
						FROM = { 	exists = owner
									owner = {	is_same_value = root.owner } } 
						trait_is_gestalt_check = no }
		planet_metallurgists_society_research_produces_add = 0.1
		job_foundry_add = 50
	}
	triggered_background_planet_modifier = {
		potential = {	exists = FROM
						FROM = { 	exists = owner
									owner = {	is_same_value = root.owner } } 
						trait_is_gestalt_check = yes }
		planet_metallurgists_society_research_produces_add = 0.1
		job_fabricator_add = 50
	}
	modifier = {
		gravity_snare_cost_mult = -0.1
		gravity_snare_cooldown_mult = -0.1
		ship_capture_chance_add = 0.1
		ship_capture_amount_add = 1
	}
	leader_potential_add = {
		has_grand_archive_dlc = yes
		exists = from
		FROM = {
			has_technology = tech_gravity_wells
		}
	}
	leader_class = { scientist }
	selectable_weight = {
		weight = @shared_trait_weight
		inline_script = paragon/pilot_weight_mult
	}
}

leader_trait_void_tracker_2 = {
	replace_traits = { "leader_trait_void_tracker" }
	inline_script = {
		script = trait/icon
		CLASS = scientist
		ICON = "GFX_leader_trait_void_tracker"
		RARITY = common
		COUNCIL = no
		TIER = 2
	}
	triggered_background_planet_modifier = {
		potential = {	exists = FROM
						FROM = { 	exists = owner
									owner = {	is_same_value = root.owner } } 
						trait_is_gestalt_check = no }
		planet_metallurgists_society_research_produces_add = 0.2
		job_foundry_add = 100
	}
	triggered_background_planet_modifier = {
		potential = {	exists = FROM
						FROM = { 	exists = owner
									owner = {	is_same_value = root.owner } } 
						trait_is_gestalt_check = yes }
		planet_metallurgists_society_research_produces_add = 0.2
		job_fabricator_add = 100
	}
	modifier = {
		gravity_snare_cost_mult = -0.2
		gravity_snare_cooldown_mult = -0.2
		ship_capture_chance_add = 0.2
		ship_capture_amount_add = 2
	}
	leader_class = { scientist }
}

leader_trait_cutholoid_victim = {
	leader_trait_type = negative
	inline_script = {
		script = trait/icon_negative
		CLASS = leader
		ICON = "GFX_leader_trait_maimed"
		RARITY = common
		COUNCIL = yes
		TIER = none
	}
	self_modifier = {
		leader_lifespan_mult = -0.15
	}
	triggered_councilor_modifier = {
		potential = { trait_is_gestalt_check = no }
		category_biology_research_speed_mult = 0.15
	}
	leader_class = { scientist }
	initial = no
	randomized = no
}
