namespace = fp3_dynasty_decision

#########################################
# Embellish Capital Decision Events 	#
# By Ola Jentzsch 						#
# Reworked by Chad Uhl					#
#########################################

scripted_effect fp3_dynasty_decision_0003_fire_follow_up_event_effect = {
	# Fire the event based on the option selected
	if = { # Royal Architect
		limit = { scope:embellish_capital_royal_architect = yes }
		trigger_event = {
			id = fp3_dynasty_decision.0004
			days = { 3 10 }
		}
	}
	else_if = { # Consort or Courtier
		limit = { scope:embellish_capital_consort_courtier = yes }
		trigger_event = {
			id = fp3_dynasty_decision.0005
			days = { 3 10 }
		}
	}
	else_if = { # Court Chaplain
		limit = { scope:embellish_capital_chaplain = yes }
		trigger_event = {
			id = fp3_dynasty_decision.0007
			days = { 3 10 }
		}
	}
	else_if = { # Me
		limit = { scope:embellish_capital_me = yes }
		trigger_event = {
			id = fp3_dynasty_decision.0008
			days = { 3 10 }
		}
	}
}

# If you have both the gold and the recently conquered county for the Embellish Capital decision, we let you decide how to proceed here
fp3_dynasty_decision.0003 = {
	type = character_event
	title = fp3_dynasty_decision.0003.t
	desc = {
		desc = fp3_dynasty_decision.0003.intro
		triggered_desc = {
			trigger = { scope:chosen_architect != root }
			desc = fp3_dynasty_decision.0003.char
		}
		desc = fp3_dynasty_decision.0003.desc
	}
	theme = realm

	left_portrait = {
		character = root
		animation = personality_greedy
	}
	right_portrait = {
		trigger = { scope:chosen_architect != root }
		character = scope:chosen_architect
		animation = personality_honorable
	}

	override_background = { reference = market_east }

	option = { # Pay by plundering the target conquered county
		name = fp3_dynasty_decision.0003.a

		scope:target_county = {
			add_county_modifier = {
				modifier = fp3_plundered_county_modifier 
				years = 30
			}
		}

		remove_variable = embellish_capital_cost

		# Fire the event based on the option selected
		fp3_dynasty_decision_0003_fire_follow_up_event_effect = yes

		if = {
			limit = { scope:chosen_architect != root }
			reverse_add_opinion = {
				target = scope:chosen_architect
				modifier = trusted_me_opinion
				opinion = 10 
			}
		}

		stress_impact = { 
			callous = minor_stress_impact_loss
		}

		ai_chance = { #social AI prefer this option
			base = 50
			ai_value_modifier = {
				ai_sociability = 1 
			}
		} 	
	}

	option = { # Pay with gold
		name = fp3_dynasty_decision.0003.b

		remove_treasury_or_gold = var:embellish_capital_cost

		# Fire the event based on the option selected
		fp3_dynasty_decision_0003_fire_follow_up_event_effect = yes

		if = {
			limit = { scope:chosen_architect != root }
			reverse_add_opinion = {
				target = scope:chosen_architect
				modifier = trusted_me_opinion
				opinion = 10 
			}
		}

		stress_impact = { 
			generous = minor_stress_impact_loss
		}

		ai_chance = { #rational AI prefer this option
			base = 50
			ai_value_modifier = {
				ai_rationality = 1 
			}
		} 	
	}

	option = { #I'd rather wait
		name = fp3_dynasty_decision.0003.c

		# Clear the cooldown.
		remove_decision_cooldown = fp3_embellish_capital_decision

		# No stress impact for opting out.
	}
}

# Royal Architect 
fp3_dynasty_decision.0004 = {
	type = character_event
	title = fp3_dynasty_decision.0004.t
	desc = {
		desc = fp3_dynasty_decision.0004.intro
		triggered_desc = {
			trigger = { has_variable = embellish_capital_cost }
			desc = fp3_dynasty_decision.0004.plunder.desc
		}
		desc = fp3_dynasty_decision.0004.desc
	}
	theme = realm
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:chosen_architect
		animation = steward
	}

	immediate = {
		scope:capital_county = {
			add_county_modifier = {
				modifier = fp3_architectural_splendor_county_modifier  
				years = 30
			}
		}
	}

	option = { #New fountains and aqueducts
		name = fp3_dynasty_decision.0004.a

		scope:chosen_architect = {
			duel = {
				skill = stewardship
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect
							dynasty ?= { add_dynasty_prestige = major_dynasty_prestige_value }
							house = {
								every_house_member = {
									custom = every_house_member
									add_opinion = {
										target = root 
										modifier = approving_opinion
									}
								}
							}
						}
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect
							dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value }
						}		
					}
				}
			}
		}

		ai_chance = { #ambitious AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_boldness = 1 
				ai_greed = 0.5
			}
		} 	
	}

	option = { #impress the local people
		name = fp3_dynasty_decision.0004.b

		scope:chosen_architect = {
			duel = {
				skills = { stewardship diplomacy }
				value = medium_skill_rating
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect
				
							if = {
								limit = {
									scope:capital_county.culture != root.culture
								}
								culture = {
									change_cultural_acceptance = {
										target = scope:capital_county.culture
										value = medium_positive_culture_acceptance
										desc = cultural_acceptance_built_magnificent_capital	
									}
								}
							}
							else = {
								scope:capital_county = {
									change_county_control = 20
								}	
							}
							every_vassal = {
								custom = every_minority_vassal
								vassal_stance = minority
								add_opinion = {
									target = root 
									modifier = approving_opinion
								}
							}			
						}		
					}	
				}
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect

							if = {
								limit = {
									scope:capital_county.culture != root.culture
								}
								culture = {
									change_cultural_acceptance = {
										target = scope:capital_county.culture
										value = low_positive_culture_acceptance
										desc = cultural_acceptance_built_magnificent_capital	
									}
								}
							}
							else = {
								scope:capital_county = {
									change_county_control = 20
								}	
							}
						}
					}
				}
			}
		}

		ai_chance = { #moderately ambitious, patient AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5 
				ai_greed = 0.5
				ai_sociability = 0.5
			}
		} 		
	}

	option = { #New fountains and aqueducts
		name = fp3_dynasty_decision.0004.c

		scope:chosen_architect = {
			duel = {
				skills = { stewardship learning }
				value = medium_skill_rating
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect		
	
							scope:capital_county = { change_development_progress = medium_development_progress_gain }
						}
					}	
				}
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect
						
							scope:capital_county = { change_development_progress = minor_development_progress_gain }
						}
					}
				}
			}
		}

		ai_chance = { #pragmatic or compassionate AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_rationality = 1 
				ai_compassion = 0.5
			}
		} 	
	}	
}

# Courtier
fp3_dynasty_decision.0005 = {
	type = character_event
	title = fp3_dynasty_decision.0005.t
	desc = fp3_dynasty_decision.0005.desc
	theme = realm
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:chosen_architect
		animation = happiness 
	}

	immediate = {
		scope:capital_county = {
			add_county_modifier = {
				modifier = fp3_architectural_splendor_county_modifier  
				years = 30
			}
		}
	}

	option = { #Magnificent bathhouse
		name = fp3_dynasty_decision.0005.a

		scope:chosen_architect = {
			#before the duel, we're checking for opinion gains
			if = {
				limit = { 
					OR = { 
						has_relation_lover = root
						has_relation_soulmate = root 
					}
				}
				add_opinion = {
					target = root
					modifier = happy_opinion
					opinion = 20 
				}
			}	
			else_if = {
				limit = { is_consort_of = root }	
				custom_tooltip = fp3_decisons_closer_to_love.tt
				hidden_effect = {
					root = {
						progress_towards_lover_effect = {
							CHARACTER = scope:chosen_architect
							REASON = lover_let_me_build_steamy_bath_house
							OPINION = 20 
						}
					}
				}
			}
			else = {
				add_opinion = {
					target = root
					modifier = grateful_opinion
					opinion = 20 
				}
			}	
			duel = {
				skill = stewardship
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect
				
							add_character_modifier = {
								modifier = fp3_luxurious_bathhouse_modifier
								years = 30 
							}
						}	
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect
						
							add_character_modifier = {
								modifier = fp3_less_luxurious_bathhouse_modifier
								years = 30
							} 
						}	
					}
				}
			}
		}

		ai_chance = { #decadent or compassionate AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.3 
				ai_greed = 0.8
				ai_sociability = 1
			}
		} 

		stress_impact = { #decadent characters loves this idea
			lazy = minor_stress_impact_loss 
			lustful = minor_stress_impact_loss
			gregarious = minor_stress_impact_loss
			gluttonous = minor_stress_impact_loss 
			shy = medium_stress_impact_gain 
		}	
	}

	option = { #A temple 
		name = fp3_dynasty_decision.0005.b

		scope:chosen_architect = {
			add_opinion = {
				target = root
				modifier = disappointed_opinion
				opinion = -20 
			}
			duel = {
				skills =  { stewardship learning }
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect	

							add_piety = major_piety_gain
							every_vassal = {
								custom = every_zealot_vassal
								vassal_stance = zealot
								add_opinion = {
									target = root
									modifier = approving_opinion
								}
							}
						}		
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect

							add_piety = medium_piety_gain	
						}					
					}
				}
			}
		}

		stress_impact = { 
			callous = minor_stress_impact_loss 
			zealous = minor_stress_impact_loss
		}

		ai_chance = { #zealous antisocial AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_zeal = 1
				ai_sociability = -1
			}
		} 		
	}

	option = { #A palace
		name = fp3_dynasty_decision.0005.c

		scope:chosen_architect = {
			add_opinion = {
				target = root
				modifier = disappointed_opinion
				opinion = -20 
			}
			duel = {
				skills = { stewardship diplomacy }
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:royal_architect

							add_prestige = major_prestige_gain
							every_vassal = {
								custom = every_courtly_vassal
								vassal_stance = courtly
								add_opinion = {
									target = root
									modifier = approving_opinion
								}
							}	
						}	
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:royal_architect
						
							add_prestige = medium_prestige_gain
						}
					}
				}
			}
		}

		stress_impact = { 
			arrogant = minor_stress_impact_loss 
			callous = minor_stress_impact_loss
		}

		ai_chance = { #rational AI, who kinda just wanna put the courtier down, picks this option
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_vengefulness = 0.7
				ai_sociability = -1
			}
		} 		
	}	
}

# Chaplain 
fp3_dynasty_decision.0007 = {
	type = character_event
	title = fp3_dynasty_decision.0007.t
	desc = {
		desc = { 
			desc = fp3_dynasty_decision.0007_desc_beginning
			first_valid = {
				triggered_desc = {
					trigger = {
						faith = { has_doctrine_parameter = sky_burials_active }
					}
					desc = fp3_dynasty_decision.0007_dakhma
				}
				triggered_desc = {
					trigger = {
						has_religion = religion:islam_religion
					}
					desc = fp3_dynasty_decision.0007_madrasa
				}	
			}
		}
		desc = fp3_dynasty_decision.0007_outro
	}
	theme = realm
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:chosen_architect
		animation = reading 
	}

	immediate = {
		scope:capital_county = {
			add_county_modifier = {
				modifier = fp3_spiritual_splendor_county_modifier  
				years = 30
			}
		}
	}

	option = { #A great temple  
		name = fp3_dynasty_decision.0007.a

		scope:chosen_architect = {
			duel = {
				skills = { stewardship learning }
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect

							add_piety = major_piety_gain
							every_vassal = {
								custom = every_zealot_vassal
								vassal_stance = zealot
								add_opinion = {
									target = root 
									modifier = approving_opinion
								}
							}
						}		
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect

							add_piety = medium_piety_gain
						}					
					}
				}
			}
		}

		ai_chance = { #zealous AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_zeal = 1 
			}
		} 	
	}

	option = { #A great dakhma 
		name = fp3_dynasty_decision.0007.b

		trigger = { 
			faith = { 
				has_doctrine_parameter = sky_burials_active 
			} 
			NOR = { #fallback for future content 
				has_character_modifier = fp3_great_tower_of_silence_modifier
				has_character_modifier = fp3_less_great_tower_of_silence_modifier
			}
		}

		scope:capital_county = {
			add_county_modifier = {
				modifier = fp3_spiritual_splendor_county_modifier  
				years = 30
			}
		}

		scope:chosen_architect = {
			duel = {
				skill = stewardship
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect
				
							add_character_modifier = {
								modifier = fp3_great_tower_of_silence_modifier 
								years = 30
							}
						}
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect

							add_character_modifier = {
								modifier = fp3_less_great_tower_of_silence_modifier 
								years = 30
							}
						}		
					}
				}
			}
		}

		ai_chance = { #zealous-hubris AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_zeal = 0.5
				ai_greed = 0.5 
			}
		}
	}

	option = { #A nice madrasa
		name = fp3_dynasty_decision.0007.c

		trigger = { has_religion = religion:islam_religion }

		scope:chosen_architect = {
			duel = {
				skill = learning
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect

							if = {
								limit = {
									scope:capital_county.culture != root.culture
								}
								culture = {
									change_cultural_acceptance = {
										target = scope:capital_county.culture
										value = medium_positive_culture_acceptance
										desc = cultural_acceptance_built_magnificent_capital
									}
								}
							}
							else = {
								scope:capital_county = {
									change_county_control = 20
								}	
							}
							every_vassal = {
								custom = every_minority_vassal
								vassal_stance = minority
								add_opinion = {
									target = root 
									modifier = approving_opinion
								}
							}
						}
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect

							if = {
								limit = {
									scope:capital_county.culture != root.culture
								}
								culture = {
									change_cultural_acceptance = {
										target = scope:capital_county.culture
										value = low_positive_culture_acceptance
										desc = cultural_acceptance_built_magnificent_capital	
									}
								}
							}
							else = {
								scope:capital_county = {
									change_county_control = 10
								}	
							}
						}
					}
				}
			}
		}

		ai_chance = { #rational-sociable AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_sociability = 0.5 
			}
		}
	}	

	option = { #A sweet fresco
		name = fp3_dynasty_decision.0007.d

		scope:chosen_architect = {
			duel = {
				skills = { stewardship diplomacy }
				value = medium_skill_rating
				50 = {
					desc = splurge_above_expectations_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_above_expectations_toast
							left_icon = scope:chosen_architect

							dynasty = { add_dynasty_prestige = major_dynasty_prestige_value }
							house = {
								every_house_member = {
									custom = every_house_member
									add_opinion = {
										target = root 
										modifier = approving_opinion
									}
								}
							}
						}		
					}	
				}
				50 = {
					desc = splurge_as_expected_toast
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
					}
					root = {
						send_interface_toast = {
							title = splurge_as_expected_toast
							left_icon = scope:chosen_architect

							dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value }	
						}					
					}
				}
			}
		}

		ai_chance = { #ambitious AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_sociability = 0.5 
			}
		}
	}
}

# Myself
fp3_dynasty_decision.0008 = {
	type = character_event
	title = fp3_dynasty_decision.0008.t
	desc = fp3_dynasty_decision.0008.desc
	theme = realm
	left_portrait = {
		character = root
		animation = reading
	}

	override_background = { reference = relaxing_room }

	option = { #Roads and public works (Development bonus)
		name = fp3_dynasty_decision.0008.a
		
		trigger = { has_lifestyle = stewardship_lifestyle }

		duel = {
			skill = stewardship
			value = medium_skill_rating
			50 = {
				desc = splurge_above_expectations_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_above_expectations_toast
						left_icon = root
				
						scope:capital_county = { change_development_progress = medium_development_progress_gain }
						add_stewardship_lifestyle_xp = massive_lifestyle_xp
					}
				}	
			}
			50 = {
				desc = splurge_as_expected_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_as_expected_toast
						left_icon = root

						scope:capital_county = { change_development_progress = minor_development_progress_gain }
						add_stewardship_lifestyle_xp = medium_lifestyle_xp	
					}
				}
			}
		}

		ai_chance = { #compassionate-energetic AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_energy = 0.5
			}
		} 
	}

	option = { #Local monuments (Acceptance or Control)
		name = fp3_dynasty_decision.0008.b

		trigger = { has_lifestyle = diplomacy_lifestyle }

		duel = {
			skills = { stewardship diplomacy }
			value = medium_skill_rating
			50 = {
				desc = splurge_above_expectations_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_above_expectations_toast
						left_icon = root
				
						if = {
							limit = {
								scope:capital_county.culture != root.culture
							}
							culture = {
								change_cultural_acceptance = {
									target = scope:capital_county.culture
									value = medium_positive_culture_acceptance
									desc = cultural_acceptance_built_magnificent_capital	
								}
							}
						}
						else = {
							scope:capital_county = {
								change_county_control = 20
							}	
						}
						add_diplomacy_lifestyle_xp = massive_lifestyle_xp
					}
				}
			}
			50 = {
				desc = splurge_as_expected_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_as_expected_toast
						left_icon = root

						if = {
							limit = {
								scope:capital_county.culture != root.culture
							}
							culture = {
								change_cultural_acceptance = {
									target = scope:capital_county.culture
									value = low_positive_culture_acceptance
									desc = cultural_acceptance_built_magnificent_capital	
								}
							}
						}
						else = {
							scope:capital_county = {
								change_county_control = 10
							}	
						}
						add_diplomacy_lifestyle_xp = medium_lifestyle_xp		
					}
				}
			}
		}

		ai_chance = { #rational AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_rationality = 1 
			}
		} 	
	}

	option = { #Mausoleum (Renown)
		name = fp3_dynasty_decision.0008.c

		trigger = { has_lifestyle = learning_lifestyle }

		duel = {
			skills = { stewardship learning }
			value = medium_skill_rating
			50 = {
				desc = splurge_above_expectations_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_above_expectations_toast
						left_icon = root
				
						dynasty = { add_dynasty_prestige = major_dynasty_prestige_value }
						add_learning_lifestyle_xp = massive_lifestyle_xp
					}
				}	
			}
			50 = {
				desc = splurge_as_expected_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_as_expected_toast
						left_icon = root

						dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value }
						add_learning_lifestyle_xp = medium_lifestyle_xp
					}
				}
			}
		}
		

		ai_chance = { #ambitious AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_greed = 1 
			}
		} 	
	}

	option = { #Hammam (Stress Loss)
		name = fp3_dynasty_decision.0008.d

		trigger = { has_lifestyle = intrigue_lifestyle }

		duel = {
			skills = { stewardship intrigue }
			value = medium_skill_rating
			50 = {
				desc = splurge_above_expectations_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_above_expectations_toast
						left_icon = root
				
						add_character_modifier = {
							modifier = fp3_luxurious_bathhouse_modifier
							years = 30 
						}
						add_intrigue_lifestyle_xp = massive_lifestyle_xp
					}
				}	
			}
			50 = {
				desc = splurge_as_expected_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_as_expected_toast
						left_icon = root

						add_character_modifier = {
							modifier = fp3_less_luxurious_bathhouse_modifier
							years = 30 
						}
						add_intrigue_lifestyle_xp = medium_lifestyle_xp
					}
				}
			}
		}
		

		ai_chance = { #social AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_sociability = 1 
			}
		} 
	}	

	option = { #Tower (Province improvement)
		name = fp3_dynasty_decision.0008.e

		trigger = { has_lifestyle = martial_lifestyle }

		duel = {
			skills = { stewardship martial }
			value = medium_skill_rating

			50 = {
				desc = splurge_above_expectations_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_above_expectations_toast
						left_icon = root
				
						add_character_modifier = {
							modifier = fp3_very_lofty_tower_modifier 
							years = 30	
						}
						add_martial_lifestyle_xp = massive_lifestyle_xp
					}
				}	
			}
			50 = {
				desc = splurge_as_expected_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_as_expected_toast
						left_icon = root

						add_character_modifier = {
							modifier = fp3_less_lofty_tower_modifier 
							years = 30	
						}
						add_martial_lifestyle_xp = medium_lifestyle_xp
					}
				}
			}
		}
		
		ai_chance = { #warlike AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_boldness = 1 
			}
		} 
	}	

	option = { #Palace (Prestige)
		name = fp3_dynasty_decision.0008.f

		duel = {
			skill = stewardship
			value = medium_skill_rating

			50 = {
				desc = splurge_above_expectations_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_above_expectations_toast
						left_icon = root
				
						add_prestige = major_prestige_gain
						every_vassal = {
							custom = every_courtly_vassal
							vassal_stance = courtly
							add_opinion = {
								target = root 
								modifier = approving_opinion
							}
						}
					}
				}	
			}
			50 = {
				desc = splurge_as_expected_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_as_expected_toast
						left_icon = root

						add_prestige = medium_prestige_gain		
					}
				}
			}
		}
		
		ai_chance = { #honor-focused AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_honor = 1 
			}
		} 
	}

	option = { #Temple (Piety)
		name = fp3_dynasty_decision.0008.g

		duel = {
			skills = { stewardship learning }
			value = medium_skill_rating

			50 = {
				desc = splurge_above_expectations_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_above_expectations_toast
						left_icon = root
				
						add_piety = major_piety_gain
						every_vassal = {
							custom = every_zealot_vassal
							vassal_stance = zealot
							add_opinion = {
								target = root 
								modifier = approving_opinion
							}
						}
					}
				}	
			}
			50 = {
				desc = splurge_as_expected_toast
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				root = {
					send_interface_toast = {
						title = splurge_as_expected_toast
						left_icon = root

						add_piety = medium_piety_gain	
					}
				}
			}
		}
		
		ai_chance = { #pious AI prefer this option
			base = 100
			ai_value_modifier = {
				ai_zeal = 1 
			}
		} 
	}

	after = {
		scope:capital_county = {
			add_county_modifier = {
				modifier = fp3_architectural_splendor_county_modifier  
				years = 30
			}
		}
	}
}


	
