﻿# Append a hook rather than replacing vanilla title-gain behavior.
on_title_gain = {
	on_actions = { aureliani_resume_vision_followup aureliani_observe_roman_title_gain aureliani_resume_revival_on_title_gain aureliani_senate_on_title_gain }
}

# If the first recipient died before the delayed event fired, continue on
# the next Aureliani holder of Florence instead of permanently locking the archive.
aureliani_resume_vision_followup = {
	trigger = {
		house = house:house_aureliani
		scope:title = title:c_firenze
		NOT = { aureliani_vision_followup_completed_trigger = yes }
	}
	effect = {
		if = {
			limit = { aureliani_civic_vision_trigger = yes }
			trigger_event = { id = aureliani.0021 days = 30 }
		}
		else_if = {
			limit = { aureliani_sacred_vision_trigger = yes }
			trigger_event = { id = aureliani.0022 days = 30 }
		}
		else_if = {
			limit = { aureliani_imperial_vision_trigger = yes }
			trigger_event = { id = aureliani.0023 days = 30 }
		}
	}
}