﻿namespace = aureliani_minor

aureliani_minor.1001 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani_minor.1001.t
	desc = aureliani_minor.1001.desc
	theme = stewardship
	left_portrait = { character = root }
	trigger = { aureliani_minor_ruins_event_trigger = yes }
	after = {
		if = {
			limit = { var:aureliani_minor_ruins_serial = scope:aureliani_minor_ruins_attempt }
			remove_character_flag = aureliani_minor_ruins_pending
		}
	}
	option = {
		name = aureliani_minor.1001.a
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_ruins_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_ruins_event_trigger = yes } add_character_modifier = { modifier = aureliani_minor_ruins_study years = 5 } }
	}
	option = {
		name = aureliani_minor.1001.b
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_ruins_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_ruins_event_trigger = yes } add_prestige = 100 add_character_modifier = { modifier = aureliani_minor_inscription_collection years = 5 } }
	}
	option = {
		name = aureliani_minor.1001.c
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_ruins_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_ruins_event_trigger = yes } add_stress = -15 }
	}
	option = {
		name = aureliani_minor.dismiss
		trigger = { NOT = { aureliani_minor_ruins_event_trigger = yes } }
	}
}

aureliani_minor.1002 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani_minor.1002.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:aureliani_minor_spouse scope:aureliani_minor_spouse = { is_spouse_of = root is_alive = yes is_capable_adult = yes is_imprisoned = no } }
				desc = aureliani_minor.1002.desc.spouse
			}
			desc = aureliani_minor.1002.desc.alone
		}
	}
	theme = learning
	left_portrait = { character = root }
	right_portrait = {
		character = scope:aureliani_minor_spouse
		trigger = { exists = scope:aureliani_minor_spouse scope:aureliani_minor_spouse = { is_spouse_of = root is_alive = yes is_capable_adult = yes is_imprisoned = no } }
	}
	trigger = { aureliani_minor_manuscript_event_trigger = yes }
	after = {
		if = {
			limit = { var:aureliani_minor_manuscript_serial = scope:aureliani_minor_manuscript_attempt }
			remove_character_flag = aureliani_minor_manuscript_pending
		}
	}
	option = {
		name = aureliani_minor.1002.a
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_manuscript_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_manuscript_event_trigger = yes } add_character_modifier = { modifier = aureliani_minor_latin_manual years = 10 } }
	}
	option = {
		name = aureliani_minor.1002.b
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_manuscript_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_manuscript_event_trigger = yes } add_piety = 100 add_character_modifier = { modifier = aureliani_minor_devotional_volume years = 10 } }
	}
	option = {
		name = aureliani_minor.1002.c
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_manuscript_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = {
			limit = { aureliani_minor_manuscript_event_trigger = yes }
			if = {
				limit = { exists = scope:aureliani_minor_spouse scope:aureliani_minor_spouse = { is_spouse_of = root is_alive = yes is_capable_adult = yes is_imprisoned = no } }
				scope:aureliani_minor_spouse = { add_opinion = { target = root modifier = aureliani_minor_household_tale_opinion } }
				add_prestige = 100
			}
			else = { add_prestige = 100 }
		}
	}
	option = {
		name = aureliani_minor.dismiss
		trigger = { NOT = { aureliani_minor_manuscript_event_trigger = yes } }
	}
}

aureliani_minor.1003 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani_minor.1003.t
	desc = aureliani_minor.1003.desc
	theme = diplomacy
	left_portrait = { character = root }
	trigger = { aureliani_minor_fair_event_trigger = yes }
	after = {
		if = {
			limit = { var:aureliani_minor_fair_serial = scope:aureliani_minor_fair_attempt }
			remove_character_flag = aureliani_minor_fair_pending
		}
	}
	option = {
		name = aureliani_minor.1003.a
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_fair_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_fair_event_trigger = yes } scope:aureliani_minor_fair_county = { add_county_modifier = { modifier = aureliani_minor_fair_development years = 5 } } }
	}
	option = {
		name = aureliani_minor.1003.b
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_fair_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_fair_event_trigger = yes } scope:aureliani_minor_fair_county = { add_county_modifier = { modifier = aureliani_minor_fair_opinion years = 5 } } }
	}
	option = {
		name = aureliani_minor.1003.c
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_fair_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_fair_event_trigger = yes } add_stress = -20 }
	}
	option = {
		name = aureliani_minor.dismiss
		trigger = { NOT = { aureliani_minor_fair_event_trigger = yes } }
	}
}

aureliani_minor.1004 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani_minor.1004.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:aureliani_minor_ancestor }
				desc = aureliani_minor.1004.desc.kin
			}
			desc = aureliani_minor.1004.desc.archive
		}
	}
	theme = learning
	left_portrait = {
		character = scope:aureliani_minor_ancestor
		trigger = { exists = scope:aureliani_minor_ancestor }
	}
	right_portrait = { character = root }
	trigger = { aureliani_minor_memorial_event_trigger = yes }
	after = {
		if = {
			limit = { var:aureliani_minor_memorial_serial = scope:aureliani_minor_memorial_attempt }
			remove_character_flag = aureliani_minor_memorial_pending
		}
	}
	option = {
		name = aureliani_minor.1004.a
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_memorial_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_memorial_event_trigger = yes } add_piety = 100 }
	}
	option = {
		name = aureliani_minor.1004.b
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_memorial_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = {
			limit = { aureliani_minor_memorial_event_trigger = yes }
			add_prestige = 100
			dynasty = { add_dynasty_prestige = 15 }
		}
	}
	option = {
		name = aureliani_minor.1004.c
		trigger = { custom_description = { text = aureliani_minor_current_petition_tt aureliani_minor_memorial_event_trigger = yes } }
		show_as_unavailable = { always = yes }
		if = { limit = { aureliani_minor_memorial_event_trigger = yes } add_stress = -15 }
	}
	option = {
		name = aureliani_minor.dismiss
		trigger = { NOT = { aureliani_minor_memorial_event_trigger = yes } }
	}
}
