﻿namespace = achaemenid_culture

achaemenid_culture.0001 = {
	type = character_event
	title = achaemenid_culture.0001.t
	desc = achaemenid_culture.0001.desc
	theme = culture_change
	left_portrait = root

	option = {
		name = achaemenid_culture.0001.a
		give_nickname = nick_the_achaemenid0002
		add_prestige = 2500
		add_piety = 2500
		hidden_effect = { culture:achaemenid = {
				add_random_innovation = culture_group_military
				add_random_innovation = culture_group_civic
				add_random_innovation = yes
				}
			}
		custom_label = gain_innovations_achaemenid_tooltip_custom
		dynasty = {
			add_dynasty_modifier = {
				modifier = great_achaemenid_revivers_modifier
				years = 50
			}
		}
	}
	option = {
		name = achaemenid_culture.0001.b
		trigger = {
			NOT = { has_faith = faith:mazdayasna }
		}
		give_nickname = nick_the_achaemenid0001
		hidden_effect = { culture:achaemenid = {
				add_random_innovation = culture_group_military
				add_random_innovation = culture_group_civic
				add_random_innovation = yes
				}
			}
		custom_label = gain_innovations_achaemenid_tooltip_custom
		set_character_faith_with_conversion = faith:mazdayasna
		add_trait = pure_blooded
		add_prestige = 2500
		dynasty = {
			add_dynasty_modifier = {
				modifier = ahura_mazda_guidance_achaemenid_modifier
				years = 50
			}
		}
	}
	option = {
		name = achaemenid_culture.0001.c
		exclusive = yes
		trigger = {
			has_faith = faith:mazdayasna
		}
		give_nickname = nick_the_achaemenid0002
		hidden_effect = { every_vassal= {
				limit = {
					culture = { has_cultural_pillar = heritage_iranian }
				}
				set_character_faith_with_conversion = faith:mazdayasna
			}
		}
		custom_label = achaemenid_culture_c_conversion_tooltip_custom
		hidden_effect = { culture:achaemenid = {
				add_random_innovation = culture_group_military
				add_random_innovation = culture_group_civic
				add_random_innovation = yes
				}
			}
		custom_label = gain_innovations_achaemenid_tooltip_custom
		add_trait = pure_blooded
		add_piety = 2500
		add_prestige = 2500
		dynasty = {
			add_dynasty_modifier = {
				modifier = ahura_mazda_guidance_achaemenid_modifier
				years = 50
			}
		}
	}
}

achaemenid_culture.0002 = {
	type = character_event
	title = achaemenid_culture.0002.t
	desc = achaemenid_culture.0002.desc
	theme = culture_change
	left_portrait = root
	
	option = {
		name = achaemenid_culture.0002.a
		current_travel_plan = {
				delay_travel_plan = { days = 14 }
		}
		add_trait = gathas_scholar
		trigger_event = {
			id = achaemenid_culture.0003
			days = 14
		}
		duel = {
			skill = learning
			value = 20
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = achaemenid_culture.0002.a.duel.success
				send_interface_toast = {
					title = achaemenid_culture.0002.a.duel.success
					left_icon = root
					add_prestige = medium_prestige_gain
					add_trait_xp = {
						trait = gathas_scholar
						track = scholar
						value = 20
					}
				}
				random_list = {
					25 = {
						add_character_modifier = {
							modifier = achaemenid_culture.0002.a.duel.success.modifier.0001
							years = 2
						}
					}
					25 = {
						add_character_modifier = {
							modifier = achaemenid_culture.0002.a.duel.success.modifier.0002
							years = 2
						}
					}
					25 = {
						add_character_modifier = {
							modifier = achaemenid_culture.0002.a.duel.success.modifier.0003
							years = 2
						}
					}
					25 = {
						add_character_modifier = {
							modifier = achaemenid_culture.0002.a.duel.success.modifier.0004
							years = 2
						}
					}
				}
			}
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = achaemenid_culture.0002.a.duel.failure
				send_interface_toast = {
					title = achaemenid_culture.0002.a.duel.failure
					left_icon = root
					add_prestige = medium_prestige_loss
				}
			}
		}
	}
	option = {
		name = achaemenid_culture.0002.b
		current_travel_plan = { cancel_travel_plan = yes }
	}
}

achaemenid_culture.0003 = {
	type = character_event
	title = achaemenid_culture.0003.t
	desc = achaemenid_culture.0003.desc
	theme = culture_change
	left_portrait = root
	
	option = {
		name = achaemenid_culture.0003.a
	}
}

achaemenid_culture.0004 = {
	type = character_event
	title = achaemenid_culture.0004.t
	desc = achaemenid_culture.0004.desc
	theme = culture_change
	left_portrait = root
	
	option = {
		name = achaemenid_culture.0004.a
		add_character_modifier = { 
			modifier = dedicate_life_to_gathas_study
			years = 5
		}
		trigger_event = { 
			id = achaemenid_culture.0005
			years = 5
		}
		add_character_flag = { 
			flag = is_studying_avestan
		}
	}
	
	option = { 
		name = achaemenid_culture.0004.b
		add_character_modifier = {
			modifier = dedicate_large_attention_to_gathas_study
			years = 5
		}
		trigger_event = {
			id = achaemenid_culture2.0006
			years = 5
		}
		add_character_flag = { 
			flag = is_studying_avestan
		}
	}
	
	option = {
		name = achaemenid_culture.0004.c
		add_character_modifier = {
			modifier = dedicate_small_attention_to_gathas_study
			years = 5
		}
		trigger_event = {
			id = achaemenid_culture2.0007
			years = 5
		}
		add_character_flag = { 
			flag = is_studying_avestan
		}
	}
	
	option = { #cancel
		name = achaemenid_culture.0004.d
	}
}

achaemenid_culture.0005 = {
	type = character_event
	title = achaemenid_culture.0005.t
	desc = achaemenid_culture.0005.desc
	theme = culture_change
	left_portrait = root
	
	option = {
		name = achaemenid_culture.0005.a
		add_trait_xp = {
			trait = gathas_scholar
			track = avestan
			value = 100
		}
		if = {
			limit = {
				root = {
					has_character_flag = is_studying_avestan
				}
			}
			remove_character_flag = is_studying_avestan
		}
	}
}

achaemenid_culture.0006 = {
	type = character_event
	title = achaemenid_culture.0006.t
	desc = achaemenid_culture.0006.desc
	theme = culture_change
	left_portrait = root

	option = { #study Darius
		name = achaemenid_culture.0006.a
		duel = {
			skill = martial
			value = 15
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = achaemenid_culture.0006.a.duel.success
				custom_tooltip = {
					text = mysterious_after_effect_duel_success_tooltip
					trigger_event = { 
						id = achaemenid_culture.0007
						days = { 280 420 }
					}
				}
				send_interface_toast = {
					title = achaemenid_culture.0006.a.duel.success
					left_icon = root
					if = {
						limit = {
							NOT = { has_trait = achaemenid_lifestyle_trait }
						}
						add_achaemenid_lifestyle_perk_points = 1
					}
					add_trait_xp = {
						trait = achaemenid_historian
						track = darius
						value = 25
					}
				}
			}
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = achaemenid_culture.0006.a.duel.failure
				send_interface_toast = {
					title = achaemenid_culture.0006.a.duel.failure
					left_icon = root
					add_prestige = medium_prestige_loss
					add_character_modifier = {
						modifier = study_achaemenid_heroes_duel_failure_modifier_martial
						years = 2
					}
				}
			}
		}
	}

	option = { #study Cyrus
		name = achaemenid_culture.0006.b
		duel = {
			skill = stewardship
			value = 15
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = achaemenid_culture.0006.b.duel.success
				custom_tooltip = {
					text = mysterious_after_effect_duel_success_tooltip
					trigger_event = { 
						id = achaemenid_culture.0008
						days = { 280 420 }
					}
				}
				send_interface_toast = {
					title = achaemenid_culture.0006.b.duel.success
					left_icon = root
					if = {
						limit = {
							NOT = { has_trait = achaemenid_lifestyle_trait }
						}
						add_achaemenid_lifestyle_perk_points = 1
					}
					add_trait_xp = {
						trait = achaemenid_historian
						track = cyrus
						value = 25
					}
				}
			}
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = achaemenid_culture.0006.b.duel.failure
				send_interface_toast = {
					title = achaemenid_culture.0006.b.duel.failure
					left_icon = root
					add_prestige = medium_prestige_loss
					add_character_modifier = {
						modifier = study_achaemenid_heroes_duel_failure_modifier_stewardship
						years = 2
					}
				}
			}
		}
	}

	option = { #study Amastris
		name = achaemenid_culture.0006.c
		duel = {
			skill = intrigue
			value = 15
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = achaemenid_culture.0006.c.duel.success
				custom_tooltip = {
					text = mysterious_after_effect_duel_success_tooltip
					trigger_event = { 
						id = achaemenid_culture.0009
						days = { 280 420 }
					}
				}
				send_interface_toast = {
					title = achaemenid_culture.0006.c.duel.success
					left_icon = root
					if = {
						limit = {
							NOT = { has_trait = achaemenid_lifestyle_trait }
						}
						add_achaemenid_lifestyle_perk_points = 1
					}
					add_trait_xp = {
						trait = achaemenid_historian
						track = amastris
						value = 25
					}
				}
			}
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = achaemenid_culture.0006.c.duel.failure
				send_interface_toast = {
					title = achaemenid_culture.0006.c.duel.failure
					left_icon = root
					add_prestige = medium_prestige_loss
					add_character_modifier = {
						modifier = study_achaemenid_heroes_duel_failure_modifier_intrigue
						years = 2
					}
				}
			}
		}
	}

	option = { #study Zoroaster
		name = achaemenid_culture.0006.d
		duel = {
			skill = learning
			value = 15
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = achaemenid_culture.0006.d.duel.success
				custom_tooltip = {
					text = mysterious_after_effect_duel_success_tooltip
					trigger_event = { 
						id = achaemenid_culture.0010
						days = { 280 420 }
					}
				}
				send_interface_toast = {
					title = achaemenid_culture.0006.d.duel.success
					left_icon = root
					if = {
						limit = {
							NOT = { has_trait = achaemenid_lifestyle_trait }
						}
						add_achaemenid_lifestyle_perk_points = 1
					}
					add_trait_xp = {
						trait = achaemenid_historian
						track = zoroaster
						value = 25
					}
				}
			}
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = achaemenid_culture.0006.d.duel.failure
				send_interface_toast = {
					title = achaemenid_culture.0006.d.duel.failure
					left_icon = root
					add_prestige = medium_prestige_loss
					add_character_modifier = {
						modifier = study_achaemenid_heroes_duel_failure_modifier_learning
						years = 2
					}
				}
			}
		}
	}
}

achaemenid_culture.0007 = { #a small immortal army spawns
	type = character_event
	title = achaemenid_culture.0007.t
	desc = achaemenid_culture.0007.desc
	theme = culture_change
	left_portrait = root

	option = {
		name = achaemenid_culture.0007.a

		spawn_army = {
			location = root.capital_province
			name = darius_summoned_army
			men_at_arms = {
				type = immortals
				stacks = 3
			}
		}
	}
}

achaemenid_culture.0008 = { #generate an artifact
	type = character_event
	title = achaemenid_culture.0008.t
	desc = achaemenid_culture.0008.desc
	theme = culture_change
	left_portrait = root

	option = {
		name = achaemenid_culture.0008.a

		custom_tooltip = {
			text = achaemenid_culture.0008.a.tooltip
			random_list = {
				25 = {
					create_artifact = {
						name = lost_cyrus_coin
						description = lost_cyrus_coin_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_build_time_4_modifier
						modifier = artifact_domain_limit_1_modifier
						decaying = yes
						visuals = medallion
						creator = root
					}
				}
				25 = {
					create_artifact = {
						name = lost_cyrus_coin
						description = lost_cyrus_coin_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_stewardship_3_modifier
						modifier = artifact_domain_tax_mult_4_modifier
						decaying = yes
						visuals = medallion
						creator = root
					}
				}
				25 = {
					create_artifact = {
						name = lost_cyrus_coin
						description = lost_cyrus_coin_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_development_growth_10_modifier
						modifier = artifact_different_faith_opinion_8_modifier
						decaying = yes
						visuals = medallion
						creator = root
					}
				}
				25 = {
					create_artifact = {
						name = lost_cyrus_coin
						description = lost_cyrus_coin_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_fertility_gain_3_modifier
						modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier
						decaying = yes
						visuals = medallion
						creator = root
					}
				}
			}
		}
	}

	option = {
		name = achaemenid_culture.0008.b

		custom_tooltip = {
			text = achaemenid_culture.0008.b.tooltip
			random_list = {
				25 = {
					create_artifact = {
						name = lost_cyrus_manuscript
						description = lost_cyrus_manuscript_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_different_faith_opinion_10_modifier
						modifier = artifact_church_holding_build_gold_cost_10_modifier
						decaying = yes
						visuals = book
						creator = root
					}
				}
				25 = {
					create_artifact = {
						name = lost_cyrus_manuscript
						description = lost_cyrus_manuscript_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_monthly_piety_3_modifier
						modifier = artifact_courtier_and_guest_opinion_7_modifier 
						decaying = yes
						visuals = book
						creator = root
					}
				}
				25 = {
					create_artifact = {
						name = lost_cyrus_manuscript
						description = lost_cyrus_manuscript_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_development_growth_10_modifier
						modifier = artifact_different_faith_opinion_8_modifier
						decaying = yes
						visuals = book
						creator = root
					}
				}
				25 = {
					create_artifact = {
						name = lost_cyrus_manuscript
						description = lost_cyrus_manuscript_desc
						rarity = masterwork
						type = miscellaneous
						modifier = artifact_powerful_vassal_opinion_6_modifier
						modifier = artifact_vassal_tax_contribution_mult_2_modifier
						decaying = yes
						visuals = book
						creator = root
					}
				}
			}
		}
	}
}

achaemenid_culture.0009 = { #gain a lot of dread
	type = character_event
	title = achaemenid_culture.0009.t
	desc = achaemenid_culture.0009.desc
	theme = culture_change
	left_portrait = root

	option = {
		name = achaemenid_culture.0009.a

		add_dread = 50
	}
}

achaemenid_culture.0010 = { #small chance to become pure-blooded
	type = character_event
	title = achaemenid_culture.0010.t
	desc = achaemenid_culture.0010.desc
	theme = culture_change
	left_portrait = root

	option = {
		name = achaemenid_culture.0010.a

		random = {
			chance = 5
			add_trait = pure_blooded
		}
	}
}
