﻿gathas_scholar = {
	desc = gathas_scholar_desc
	category = fame
	
	shown_in_ruler_designer = yes
	
	learning = 2
	faith_conversion_piety_cost_mult = -0.1
	zoroastrianism_religion_opinion = 5
	tracks = {
		scholar = {
			50 = {
				learning = 3
				faith_conversion_piety_cost_mult = -0.2
				zoroastrianism_religion_opinion = 5
			}
			100 = {
				learning = 5
				faith_conversion_piety_cost_mult = -0.2
				zoroastrianism_religion_opinion = 10
			}
		}
		avestan = {
			50 = {
				zoroastrianism_religion_opinion = 10
			}
			100 = {
				zoroastrianism_religion_opinion = 20
			}
		}
	}
	icon = {
		first_valid = {
			triggered_desc = {
				trigger = { NOT = { exists = this } }
				desc = gathas_scholar.dds
			}
			triggered_desc = {
				trigger = {
					AND = {
						has_trait_xp = {
							trait = gathas_scholar
							track = scholar
							value >= 50
						}
						has_trait_xp = {
							trait = gathas_scholar
							track = avestan
							value >= 50
						}
					}
				}
				desc = gathas_scholar_track3.dds
			}
			triggered_desc = {
				trigger = {
					has_trait_xp = {
						trait = gathas_scholar
						track = scholar
						value >= 50
					}
				}
				desc = gathas_scholar_track1.dds
			}
			triggered_desc = {
				trigger = {
					has_trait_xp = {
						trait = gathas_scholar
						track = avestan
						value >= 50
					}
				}
				desc = gathas_scholar_track2.dds
			}
			desc = gathas_scholar.dds
		}
	}				
}

immortal_commander_trait = {
	desc = immortal_commander_trait_desc
	category = commander
	
	shown_in_ruler_designer = yes
	add_commander_trait = no
	
	heavy_infantry_toughness_mult = 0.25
	heavy_infantry_maintenance_mult = -0.2
	heavy_infantry_pursuit_add = 10
}

achaemenid_lifestyle_trait = {
	desc = achaemenid_lifestyle_trait_desc
	category = lifestyle

	shown_in_ruler_designer = yes

	monthly_dynasty_prestige_mult = 1
	monthly_dynasty_prestige = 0.25
}

achaemenid_historian = {
	desc = achaemenid_historian_desc
	category = lifestyle

	shown_in_ruler_designer = yes
	
	diplomacy = 1
	learning = 1

	tracks = {
		darius = {
			50 = {
				martial = 2
				advantage = 3
				title_creation_cost_mult = -0.1
			}
			100 = {
				martial = 2
				advantage = 2
				title_creation_cost_mult = -0.1
			}
		}
		cyrus = {
			50 = {
				stewardship = 2
				happy_powerful_vassal_tax_contribution_mult = 0.1
				parochial_tax_contribution_mult = 0.2
			}
			100 = {
				stewardship = 2
				happy_powerful_vassal_tax_contribution_mult = 0.05
				parochial_tax_contribution_mult = 0.1
			}
		}
		amastris = {
			50 = {
				intrigue = 2
				dread_gain_mult = 0.2
				dread_per_tyranny_add = 2
			}
			100 = {
				intrigue = 2
				dread_gain_mult = 0.1
				dread_per_tyranny_add = 1
				dread_baseline_add = 20
			}
		}
		zoroaster = {
			50 = {
				learning = 2
				health = 0.25
				long_reign_bonus_mult = 0.1
			}
			100 = {
				learning = 2
				health = 0.25
				long_reign_bonus_mult = 0.1
			}
		}
	}
}

lifestyle_mystic = {
	category = lifestyle
	icon = mystic.dds

	name = {
		first_valid = {
			#Miracle Worker
			triggered_desc = {
				trigger = {
					exists = this
					has_trait_xp = {
						trait = lifestyle_mystic
						value >= 100
					}
				}
				desc = trait_mystic_3
			}
			#Mystic
			triggered_desc = {
				trigger = { 
					exists = this
					has_trait_xp = {
						trait = lifestyle_mystic
						value >= 50
					}
				}
				desc = trait_mystic_2
			}
			#Wise Woman/Man
			triggered_desc = {
				trigger = {
					exists = this
					is_female = yes 
				}
				desc = trait_mystic_female_1
			}
			desc = trait_mystic_male_1
		}
	}

	# Loc
	desc = {
		first_valid = {
			#The trait can never go higher than the first level if it's not assigned to a character
			triggered_desc = {
				trigger = { 
					NOT = { exists = this } 
				}
				desc = trait_mystic_1_desc
			}
			triggered_desc = {
				trigger = { 
					has_trait_xp = {
						trait = lifestyle_mystic
						value >= 100
					}
				}
				desc = trait_mystic_3_character_desc
			}
			triggered_desc = {
				trigger = { 
					has_trait_xp = {
						trait = lifestyle_mystic
						value >= 50
					}
				}
				desc = trait_mystic_2_character_desc
			}
			desc = trait_mystic_1_character_desc
		}
	}

	# Modifiers
	learning = 1
	culture_modifier = {
		parameter = prowess_from_religious_traits
		prowess = 1
	}
	culture_modifier = {
		parameter = build_bonuses_on_religious_traits
		church_holding_build_gold_cost = -0.05
		church_holding_holding_build_gold_cost = -0.05
	}
	culture_modifier = {
		parameter = mystic_trait_gives_bonuses
		monthly_income_mult = 0.02
	}

	#achaemenid modifier
	culture_modifier = {
		parameter = zoroaster_blessing_mystic_bonus
		health = 0.5
		domain_tax_same_faith_mult = 0.20
		inbreeding_chance = -0.1
	}

	track = {
		50 = {
			learning = 1
			culture_modifier = {
				parameter = prowess_from_religious_traits
				prowess = 1
			}

			culture_modifier = {
				parameter = build_bonuses_on_religious_traits
				church_holding_build_gold_cost = -0.05
				church_holding_holding_build_gold_cost = -0.05
			}
			
			culture_modifier = {
				parameter = mystic_trait_gives_bonuses
				monthly_income_mult = 0.02
			}

			#achaemenid culture
			culture_modifier = {
				parameter = zoroaster_blessing_mystic_bonus
				health = 0.5
				domain_tax_same_faith_mult = 0.20
				inbreeding_chance = -0.1
			}			
		}
		100 = {
			learning = 2	
			culture_modifier = {
				parameter = prowess_from_religious_traits
				prowess = 1
			}
			culture_modifier = {
				parameter = build_bonuses_on_religious_traits
				church_holding_build_gold_cost = -0.05
				church_holding_holding_build_gold_cost = -0.05
			}				
			culture_modifier = {
				parameter = mystic_trait_gives_bonuses
				monthly_income_mult = 0.04
			}

			#achaemenid culture
			culture_modifier = {
				parameter = zoroaster_blessing_mystic_bonus
				health = 0.5
				domain_tax_same_faith_mult = 0.20
				inbreeding_chance = -0.1
			}
		}
	}
}