﻿namespace = aureliani

aureliani.0080 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani.0080.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { has_title = title:k_italy } desc = aureliani.0080.desc.crowned }
			triggered_desc = {
				trigger = { exists = scope:aureliani_crown_king target_is_liege_or_above = scope:aureliani_crown_king }
				desc = aureliani.0080.desc.subject
			}
			triggered_desc = { trigger = { exists = scope:aureliani_crown_king } desc = aureliani.0080.desc.outsider }
			desc = aureliani.0080.desc.vacant
		}
	}
	theme = diplomacy
	left_portrait = { character = root }
	right_portrait = { character = scope:aureliani_crown_king trigger = { exists = scope:aureliani_crown_king NOT = { has_title = title:k_italy } } }
	trigger = { aureliani_crown_mandate_trigger = yes house = { has_variable = aureliani_italian_ambition } }
	immediate = {
		clear_saved_scope = aureliani_crown_king
		title:k_italy.holder ?= { if = { limit = { is_alive = yes this != root } save_scope_as = aureliani_crown_king } }
	}
	option = {
		name = aureliani.0080.a
		trigger = { aureliani_crown_scheme_ready_trigger = yes }
		show_as_unavailable = { NOT = { has_title = title:k_italy } }
		if = {
			limit = { aureliani_crown_scheme_ready_trigger = yes }
			clear_saved_scope = new_scheme
			begin_scheme_with_agents_effect = {
				SCHEME_TYPE = claim_throne
				TARGET_TYPE = target_character
				TARGET_SCOPE = scope:aureliani_crown_king
				AGENT_1 = agent_diplomat
				AGENT_2 = agent_scribe
				AGENT_3 = agent_cleric
				AGENT_4 = agent_socialite
				AGENT_5 = agent_decoy
			}
			if = {
				limit = { exists = scope:new_scheme }
				stress_and_fulfillment_impact = { content = medium_stress_impact_gain just = medium_stress_impact_gain }
			}
		}
		ai_chance = { base = 0 }
	}
	option = { name = aureliani.0080.b ai_chance = { base = 100 } }
}

aureliani.0081 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani.0081.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { aureliani_civic_vision_trigger = yes } desc = aureliani.0081.desc.civic }
			triggered_desc = { trigger = { aureliani_sacred_vision_trigger = yes } desc = aureliani.0081.desc.sacred }
			desc = aureliani.0081.desc.imperial
		}
	}
	theme = dynasty
	left_portrait = { character = root }
	trigger = { is_alive = yes house = { has_variable = aureliani_italian_crown_secured } }
	option = { name = aureliani.0081.a ai_chance = { base = 100 } }
}
