 #######################################
 # Shadows of the Shroud Leader Traits #
 #######################################

# Patrons traits

leader_trait_whispering_mind = {
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_whispering_mind"
		RARITY = common
		COUNCIL = no
		TIER = 1
	}
	self_modifier = {
		species_leader_exp_gain = 0.2
		leader_lifespan_add = -10
	}
	triggered_fleet_modifier = {
		potential = { leader_class = commander }
		ship_tracking_mult = 0.1
		ship_accuracy_mult = 0.05
	}
	triggered_modifier = {
		potential = { leader_class = scientist }
		ship_anomaly_generation_chance_mult = 0.1
		ship_anomaly_research_speed_mult = 0.1
	}
	triggered_planet_modifier = {
		potential = { leader_class = official }
		planet_researchers_produces_mult = 0.05
		planet_structures_cost_mult = -0.05
	}
	leader_potential_add = {
		has_shroud_dlc = yes
		exists = from
		from = {
			has_country_flag = knowledge_accord
		}
	}
	leader_class = { commander scientist official }
	selectable_weight = {
		weight = @shared_trait_weight
		inline_script = paragon/not_council_weight_mult
	}
}

leader_trait_whispering_mind_2 = {
	replace_traits = { "leader_trait_whispering_mind" }
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_whispering_mind"
		RARITY = common
		COUNCIL = no
		TIER = 2
	}
	self_modifier = {
		species_leader_exp_gain = 0.4
		leader_lifespan_add = -20
	}
	triggered_fleet_modifier = {
		potential = { leader_class = commander }
		ship_tracking_mult = 0.15
		ship_accuracy_mult = 0.1
	}
	triggered_modifier = {
		potential = { leader_class = scientist }
		ship_anomaly_generation_chance_mult = 0.15
		ship_anomaly_research_speed_mult = 0.15
	}
	triggered_planet_modifier = {
		potential = { leader_class = official }
		planet_researchers_produces_mult = 0.1
		planet_structures_cost_mult = -0.1
	}
	leader_potential_add = {
		has_shroud_dlc = yes
		exists = from
		from = {
			has_country_flag = knowledge_accord
		}
	}
	leader_class = { commander scientist official }
}

leader_trait_whispering_mind_3 = {
	replace_traits = { "leader_trait_whispering_mind_2" }
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_whispering_mind"
		RARITY = common
		COUNCIL = no
		TIER = 3
	}
	self_modifier = {
		species_leader_exp_gain = 0.6
		leader_lifespan_add = -30
	}
	triggered_fleet_modifier = {
		potential = { leader_class = commander }
		ship_tracking_mult = 0.2
		ship_accuracy_mult = 0.15
	}
	triggered_modifier = {
		potential = { leader_class = scientist }
		ship_anomaly_generation_chance_mult = 0.2
		ship_anomaly_research_speed_mult = 0.2
	}
	triggered_planet_modifier = {
		potential = { leader_class = official }
		planet_researchers_produces_mult = 0.15
		planet_structures_cost_mult = -0.15
	}
	leader_potential_add = {
		has_shroud_dlc = yes
		exists = from
		from = {
			has_country_flag = knowledge_accord
		}
	}
	leader_class = { commander scientist official }
}

leader_trait_shroud_warped = {
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_shroud_warped"
		RARITY = common
		COUNCIL = no
		TIER = none
	}
	self_modifier = {
		leader_lifespan_add = 20
	}
	planet_modifier = {
		planet_pops_psionic_unity_produces_add = 0.5
		psionic_pop_bonus_workforce_mult = 0.1
	}
	sector_modifier = {
		planet_pops_psionic_unity_produces_add = 0.25
		psionic_pop_bonus_workforce_mult = 0.05
	}
	triggered_modifier = {
		potential = { leader_class = scientist }
		ship_archaeological_site_excavation_speed_mult = 0.25
	}
	triggered_modifier = {
		potential = {
			has_astral_planes_dlc = yes
			leader_class = scientist
		}
		ship_astral_rift_speed_mult = 0.25
	}
	triggered_army_modifier = {
		potential = { leader_class = commander }
		army_morale_damage_mult = 0.15
		custom_tooltip = leader_trait_shroud_warped_invasion_effect
		show_only_custom_tooltip = no
	}
	triggered_galcom_modifier = {
		potential = { leader_class = official }
		diplo_weight_mult = 0.1
	}
	triggered_federation_modifier = {
		potential = { leader_class = official }
		federation_experience_add = 0.5
	}
	leader_class = { commander scientist official }
	initial = no
	randomized = no
}

leader_trait_shroudshaper = {
	immortal_leaders = yes
	inline_script = {
		script = trait/icon_psionic
		CLASS = leader
		ICON = "GFX_leader_trait_shroudshaper"
		RARITY = common
		COUNCIL = triggered
		TIER = none
	}
	# Commander - Fleet Modifier
	triggered_fleet_modifier = {
		potential = {
			is_ruler = no
			leader_class = commander
		}
		ship_speed_mult = 0.20
		ship_fire_rate_mult = 0.20
		ship_sensor_range_add = 2
		mult = value:transcended_psionic_multiplier
	}
	# Commander - Army Modifier
	triggered_army_modifier = {
		potential = {
			is_ruler = no
			leader_class = commander
		}
		army_morale_damage_mult = 0.20
		army_morale = 0.20
		army_health = 0.20
		army_damage_mult = 0.20
		mult = value:transcended_psionic_multiplier
	}
	# Official - GalCom Modifier
	triggered_galcom_modifier = {
		potential = {
				is_ruler = no
				leader_class = official
		}
		resolution_category_greatergood_vote_strength_mult = 0.35
		resolutions_cost_mult = -0.15
		mult = value:transcended_psionic_multiplier
	}
	# Official - Federation Modifier
	triggered_federation_modifier = {
		potential = {
			is_ruler = no
			leader_class = official
		}
		federation_experience_add = 1.5
		cohesion_ethics_penalty_mult = -0.35
		mult = value:transcended_psionic_multiplier
	}
	# Scientist - Science Ship Modifier
	triggered_modifier = {
		potential = {
			is_ruler = no
			leader_class = scientist
		}
		science_ship_survey_speed = 0.10
		ship_anomaly_generation_chance_mult = 0.05
		mult = value:transcended_psionic_multiplier
	}
	# Any Class - Planet Modifier
	triggered_planet_modifier = {
		potential = { is_ruler = no }
		planet_jobs_upkeep_mult = -0.10
		mult = value:transcended_psionic_multiplier
	}
	triggered_planet_modifier = {
		potential = {
			is_ruler = no
			trait_is_gestalt_check = no
			exists = owner
			owner = {
				NOT = {
					has_valid_civic = civic_dystopian_society
				}
			}
		}
		job_telepath_add = 20			# This means a level 10 Shroudshaper provides as many Telepaths as a Psi-Corps building
		mult = trigger:has_total_skill
		# Bonus jobs are explicitly not increased by transcended authorities, since they scale by leader level
	}
	triggered_planet_modifier = {
		potential = {
			is_ruler = no
			trait_is_gestalt_check = no
			exists = owner
			owner = {
				has_valid_civic = civic_dystopian_society
			}
		}
		job_dystopian_telepath_add = 20			# This means a level 10 Shroudshaper provides as many Telepaths as a Psi-Corps building
		mult = trigger:has_total_skill
		# Bonus jobs are explicitly not increased by transcended authorities, since they scale by leader level
	}
	triggered_planet_modifier = {
		potential = {
			is_ruler = no
			trait_is_gestalt_check = yes
		}
		job_telepath_drone_add = 20
		mult = trigger:has_total_skill
		# Bonus jobs are explicitly not increased by transcended authorities, since they scale by leader level
	}
	# Any Class - Sector Modifier
	triggered_sector_modifier = {
		potential = { is_ruler = no }
		planet_jobs_upkeep_mult = -0.05
		mult = value:transcended_psionic_multiplier
	}
	triggered_sector_modifier = {
		potential = {
			is_ruler = no
			trait_is_gestalt_check = no
			exists = owner
			owner = {
				NOT = {
					has_valid_civic = civic_dystopian_society
				}
			}
		}
		job_telepath_add = 10
		mult = trigger:has_total_skill
		# Bonus jobs are explicitly not increased by transcended authorities, since they scale by leader level
	}
	triggered_sector_modifier = {
		potential = {
			is_ruler = no
			trait_is_gestalt_check = no
			exists = owner
			owner = {
				has_valid_civic = civic_dystopian_society
			}
		}
		job_dystopian_telepath_add = 10
		mult = trigger:has_total_skill
		# Bonus jobs are explicitly not increased by transcended authorities, since they scale by leader level
	}
	triggered_sector_modifier = {
		potential = {
			is_ruler = no
			trait_is_gestalt_check = yes
		}
		job_telepath_drone_add = 10
		mult = trigger:has_total_skill
		# Bonus jobs are explicitly not increased by transcended authorities, since they scale by leader level
	}
	# Any Class - Ruler
	triggered_councilor_modifier = {
		potential = { is_ruler = yes }
		country_ruler_influence_produces_add = 0.5
		shroud_delve_cooldown = -0.05
		all_technology_research_speed = 0.05
		country_naval_cap_mult = 0.05
		diplo_weight_mult = 0.05
		mult = value:transcended_psionic_multiplier
	}
	leader_class = { commander scientist official }
	initial = no
	randomized = no
}

leader_trait_iron_will = {
	leader_trait_type = veteran
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_iron_will"
		RARITY = free_or_veteran
		COUNCIL = no
		TIER = none
	}
	triggered_planet_modifier = {
		potential = { 	trait_is_gestalt_check = no 
						exists = owner
						owner = { NOT = { has_origin = civic_dystopian_society } } }
		job_enforcer_add = 150
	}
	triggered_planet_modifier = {
		potential = { 	trait_is_gestalt_check = no 
						exists = owner
						owner = { has_origin = civic_dystopian_society } }
		job_dystopian_enforcer_add = 150
	}
	triggered_planet_modifier = {
		potential = { 	trait_is_gestalt_check = no 
						exists = owner
						owner = { NOT = { has_civic = civic_civil_education } } }
		job_enforcer_stability_add = 1.5
		planet_crime_add = -15
		planet_stability_add = 1.5
	}
	triggered_planet_modifier = {
		potential = {	trait_is_gestalt_check = no 
						exists = owner
						owner = { has_valid_civic = civic_civil_education } }
		job_enforcer_stability_add = 1.5
	}
	triggered_planet_modifier = {
		potential = { trait_is_gestalt_check = yes
					  trait_is_wilderness_check = no }
		planet_crime_no_happiness_add = -30
		planet_stability_add = 3
		job_evaluator_add = 100
	}
	triggered_planet_modifier = {
		potential = { trait_is_gestalt_check = yes
					  trait_is_wilderness_check = yes }
		planet_stability_add = 5
	}
	triggered_sector_modifier = {
		potential = { 	trait_is_gestalt_check = no 
						exists = owner
						owner = { NOT = { has_origin = civic_dystopian_society } } }
		job_enforcer_add = 75
	}
	triggered_sector_modifier = {
		potential = { 	trait_is_gestalt_check = no 
						exists = owner
						owner = { has_origin = civic_dystopian_society } }
		job_dystopian_enforcer_add = 75
	}
	triggered_sector_modifier = {
		potential = { 	trait_is_gestalt_check = no 
						exists = owner
						owner = { NOT = { has_civic = civic_civil_education } } }
		job_enforcer_stability_add = 0.75
		planet_crime_add = -7.5
		planet_stability_add = 0.75
	}
	triggered_sector_modifier = {
		potential = {	trait_is_gestalt_check = no 
						exists = owner
						owner = { has_valid_civic = civic_civil_education } }
		job_enforcer_stability_add = 0.75
	}
	triggered_sector_modifier = {
		potential = { trait_is_gestalt_check = yes
					  trait_is_wilderness_check = no }
		planet_crime_no_happiness_add = -15
		planet_stability_add = 1.5
		job_evaluator_add = 50
	}
	triggered_sector_modifier = {
		potential = { trait_is_gestalt_check = yes
					  trait_is_wilderness_check = yes }
		planet_stability_add = 2.5
	}
	fleet_modifier = {
		psionic_aura_resistance_mult = 0.85
		ship_armor_hardening_add = 0.25
		ship_tracking_mult = 0.25
	}
	army_modifier = {
		army_morale = 0.5
		army_health = 0.25
	}
	leader_class = { commander }
	initial = no
	randomized = no
}

# Shroud Patrons

leader_trait_disciple_of_the_cradle = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_disciple_of_the_cradle"
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	leader_class = { official }
	self_modifier = {
		leader_lifespan_add = 15
	}
	planet_modifier = {
		planet_stability_add = 10
		planet_crime_add = -10
		planet_jobs_sr_zro_produces_mult = 0.10
	}
	triggered_councilor_modifier = {
		custom_tooltip = leader_trait_disciple_of_the_cradle_envoys_zro
		show_only_custom_tooltip = no
		envoy_harm_relations_mult = 0.25
		envoy_improve_relations_mult = 0.25
		country_trust_cap_add = 25
	}
	initial = no
	randomized = no
}

leader_trait_disciple_of_the_eater = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_disciple_of_the_eater"
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	leader_class = { commander }
	triggered_fleet_modifier = {
		ship_fire_rate_mult = 0.35
		ship_weapon_damage = 0.25
		ship_disengage_chance_mult = -1
		custom_tooltip = leader_trait_disciple_of_the_eater_attunement_effect
		custom_tooltip = leader_trait_disciple_of_the_eater_zro_fleet_attack_effect
		show_only_custom_tooltip = no
	}
	triggered_army_modifier = {
		army_damage_mult = 0.5
		custom_tooltip = leader_trait_disciple_of_the_eater_zro_army_attack_effect
		show_only_custom_tooltip = no
	}
	initial = no
	randomized = no
}

leader_trait_disciple_of_the_instrument = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_disciple_of_the_instrument"
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	leader_class = { official }
	triggered_planet_modifier = {
		planet_jobs_produces_mult = 0.2
		planet_miners_sr_zro_produces_add = 0.5
		planet_jobs_trade_produces_mult = 0.2
		custom_tooltip = leader_trait_disciple_of_the_instrument_planetary_decision_effect
		show_only_custom_tooltip = no
	}
	triggered_sector_modifier = {
		planet_jobs_produces_mult = 0.1
		planet_miners_sr_zro_produces_add = 0.25
		planet_jobs_trade_produces_mult = 0.1
	}
	initial = no
	randomized = no
}

leader_trait_disciple_of_the_composer = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_disciple_of_the_composer"
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	leader_class = { scientist }
	triggered_planet_modifier = {
		planet_jobs_physics_research_produces_mult = 0.05
		planet_jobs_society_research_produces_mult = 0.05
		planet_jobs_engineering_research_produces_mult = 0.05
		planet_biologists_sr_zro_produces_add = 0.1
		planet_researchers_upkeep_mult = 0.15
		planet_pops_upkeep_mult = 0.15
		logistic_growth_mult = 0.15
	}
	triggered_sector_modifier = {
		planet_jobs_physics_research_produces_mult = 0.025
		planet_jobs_society_research_produces_mult = 0.025
		planet_jobs_engineering_research_produces_mult = 0.025
		planet_biologists_sr_zro_produces_add = 0.05
		planet_researchers_upkeep_mult = 0.075
		planet_pops_upkeep_mult = 0.075
		logistic_growth_mult = 0.075
	}
	initial = no
	randomized = no
}

leader_trait_disciple_of_the_composer_2 = {
	leader_trait_type = destiny
	replace_traits = { "leader_trait_disciple_of_the_composer" }
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_disciple_of_the_composer"
		RARITY = paragon
		COUNCIL = no
		TIER = 2
	}
	leader_class = { scientist }
	self_modifier = {
		leader_lifespan_mult = -0.35
	}
	triggered_planet_modifier = {
		planet_jobs_physics_research_produces_mult = 0.1
		planet_jobs_society_research_produces_mult = 0.1
		planet_jobs_engineering_research_produces_mult = 0.1
		planet_biologists_sr_zro_produces_add = 0.25
		planet_researchers_upkeep_mult = 0.35
		planet_pops_upkeep_mult = 0.35
		logistic_growth_mult = 0.35
	}
	triggered_sector_modifier = {
		planet_jobs_physics_research_produces_mult = 0.05
		planet_jobs_society_research_produces_mult = 0.05
		planet_jobs_engineering_research_produces_mult = 0.05
		planet_biologists_sr_zro_produces_add = 0.125
		planet_researchers_upkeep_mult = 0.175
		planet_pops_upkeep_mult = 0.175
		logistic_growth_mult = 0.175
	}
	initial = no
}

leader_trait_disciple_of_the_whisperers = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_disciple_of_the_whisperers"
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	leader_class = { scientist }
	triggered_councilor_modifier = {
		rare_tech_draw_chance_mult = 0.25
		rare_tech_research_speed_mult = 0.25
	}
	triggered_councilor_modifier = {
		custom_tooltip = leader_trait_disciple_of_the_whisperers_effects
		show_only_custom_tooltip = no
		shroud_delve_cooldown = -0.2
	}
	initial = no
	randomized = no
}

leader_trait_disciple_of_the_end = {
	leader_trait_type = destiny
	inline_script = {
		script = trait/icon
		CLASS = leader
		ICON = "GFX_leader_trait_disciple_of_the_end"
		RARITY = paragon
		COUNCIL = no
		TIER = none
	}
	leader_class = { commander }
	triggered_fleet_modifier = {
		custom_tooltip = leader_trait_disciple_of_the_end_effects
		show_only_custom_tooltip = no
		ship_jumpdrive_cooldown_mult = -0.50
		ship_damage_against_starbases_mult = 0.5
		ship_speed_mult = 0.25
		ship_fire_rate_mult = 0.25
	}
	initial = no
	randomized = no
}

# Endbringers

leader_trait_blinded = {
	leader_trait_type = negative
	inline_script = {
		script = trait/icon_negative
		CLASS = leader
		ICON = "GFX_leader_trait_blinded"
		RARITY = common
		COUNCIL = no
		TIER = none
	}
	triggered_modifier = {
		potential = { leader_class = scientist }
		science_ship_survey_speed = -1
		ship_archaeological_site_excavation_speed_mult = -1
		ship_astral_rift_speed_mult = -1
	}
	councilor_modifier = {
		country_unity_produces_mult = 1
		council_agenda_progress_speed = -0.1
	}
	leader_class = { commander scientist official }
	initial = no
	randomized = no
}
