﻿# All campaign milestones use the current house head, not the founder.
aureliani_crown_mandate_trigger = {
	house = house:house_aureliani
	is_house_head = yes
	is_alive = yes
	is_capable_adult = yes
	is_imprisoned = no
	is_at_war = no
	has_title = title:c_firenze
	has_title = title:d_toscana
	completely_controls = title:d_toscana
	custom_description = { text = aureliani_tooltip_req_compact house = { has_variable = aureliani_italian_compact } }
}

aureliani_crown_three_duchies_trigger = {
	title:k_italy = {
		any_in_de_jure_hierarchy = {
			count >= 3
			tier = tier_duchy
			house:house_aureliani.house_head = { completely_controls = prev }
		}
	}
}

aureliani_crown_route_ready_trigger = {
	trigger_if = {
		limit = { aureliani_civic_vision_trigger = yes }
		title:c_firenze = { development_level >= 15 county_control >= 90 }
		title:k_italy = {
			any_in_de_jure_hierarchy = {
				tier = tier_county
				NOT = { target_is_de_jure_liege_or_above = title:d_toscana }
				development_level >= 10
				county_control >= 80
				house:house_aureliani.house_head = { completely_controls = prev }
			}
		}
	}
	trigger_else_if = {
		limit = { aureliani_sacred_vision_trigger = yes }
		piety_level >= 4
		has_trait = pilgrim
		exists = cp:councillor_court_chaplain
		cp:councillor_court_chaplain = {
			is_alive = yes
			opinion = { target = house:house_aureliani.house_head value >= 60 }
		}
	}
	trigger_else_if = {
		limit = { aureliani_imperial_vision_trigger = yes }
		prestige_level >= 4
		number_of_maa_regiments >= 5
		monthly_character_income_minus_expenses > 0
	}
	trigger_else = { always = no }
}

aureliani_crown_securement_ready_trigger = {
	aureliani_crown_mandate_trigger = yes
	has_title = title:k_italy
	aureliani_crown_three_duchies_trigger = yes
	aureliani_crown_route_ready_trigger = yes
}

# Claim Throne claims the target's primary title. Never launch this against
# an emperor merely because that emperor also holds Italy.
aureliani_crown_scheme_ready_trigger = {
	aureliani_crown_mandate_trigger = yes
	is_physically_able_adult = yes
	exists = scope:aureliani_crown_king
	scope:aureliani_crown_king = title:k_italy.holder
	liege = scope:aureliani_crown_king
	scope:aureliani_crown_king = { is_alive = yes primary_title = title:k_italy }
	has_access_to_claim_throne_scheme_trigger = { TARGET = scope:aureliani_crown_king }
	can_start_scheme = { target_character = scope:aureliani_crown_king type = claim_throne }
	NOT = { any_scheme = { scheme_type = claim_throne } }
}
