﻿namespace = aureliani_civic

aureliani_civic.0001 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani_civic.0001.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { capital_county = title:c_roma } desc = aureliani_civic.0001.desc.acknowledge }
			triggered_desc = { trigger = { exists = scope:aureliani_civic_scholar } desc = aureliani_civic.0001.desc.scholar }
			desc = aureliani_civic.0001.desc.alone
		}
	}
	theme = stewardship
	left_portrait = { character = root }
	right_portrait = { character = scope:aureliani_civic_scholar trigger = { exists = scope:aureliani_civic_scholar } }
	trigger = { aureliani_civic_capital_pending_trigger = yes }
	on_trigger_fail = { aureliani_civic_close_capital_choice_effect = yes }
	immediate = {
		clear_saved_scope = aureliani_civic_scholar
		random_courtier = { limit = { is_alive = yes is_adult = yes } save_scope_as = aureliani_civic_scholar }
	}
	option = {
		name = aureliani_civic.0001.a
		trigger = {
			aureliani_civic_capital_pending_trigger = yes
			NOT = { capital_county = title:c_roma }
			gold >= 300
			prestige >= 500
		}
		show_as_unavailable = { always = yes }
		aureliani_civic_apply_rome_move_effect = yes
		ai_chance = { base = 70 }
	}
	option = {
		name = aureliani_civic.0001.b
		trigger = { aureliani_civic_capital_pending_trigger = yes capital_county = title:c_roma }
		show_as_unavailable = { always = yes }
		aureliani_civic_acknowledge_rome_effect = yes
		ai_chance = { base = 30 }
	}
	option = {
		name = aureliani_civic.0001.c
		custom_tooltip = aureliani_civic_defer_capital_tt
		aureliani_civic_close_capital_choice_effect = yes
		ai_chance = { base = 0 }
	}
	after = { clear_saved_scope = aureliani_civic_scholar }
}

aureliani_civic.0002 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani_civic.0002.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { exists = scope:aureliani_civic_scholar } desc = aureliani_civic.0002.desc.scholar }
			desc = aureliani_civic.0002.desc.alone
		}
	}
	theme = stewardship
	left_portrait = { character = root }
	right_portrait = { character = scope:aureliani_civic_scholar trigger = { exists = scope:aureliani_civic_scholar } }
	trigger = { aureliani_civic_culture_pending_trigger = yes }
	on_trigger_fail = { aureliani_civic_close_culture_choice_effect = yes }
	option = {
		name = aureliani_civic.0002.a
		trigger = {
			aureliani_civic_culture_pending_trigger = yes
			NOT = { culture = culture:roman }
			title:c_roma = { NOT = { culture = culture:roman } }
			gold >= 100
			prestige >= 200
		}
		show_as_unavailable = { always = yes }
		aureliani_civic_adopt_roman_culture_effect = yes
		ai_chance = { base = 50 }
	}
	option = {
		name = aureliani_civic.0002.b
		trigger = { aureliani_civic_culture_pending_trigger = yes NOT = { culture = culture:roman } gold >= 75 prestige >= 150 }
		show_as_unavailable = { always = yes }
		aureliani_civic_adopt_roman_self_effect = yes
		ai_chance = { base = 30 }
	}
	option = {
		name = aureliani_civic.0002.c
		trigger = { aureliani_civic_culture_pending_trigger = yes culture = culture:roman title:c_roma = { NOT = { culture = culture:roman } } gold >= 75 }
		show_as_unavailable = { always = yes }
		aureliani_civic_adopt_roman_county_effect = yes
		ai_chance = { base = 10 }
	}
	option = {
		name = aureliani_civic.0002.d
		custom_tooltip = aureliani_civic_defer_culture_tt
		aureliani_civic_close_culture_choice_effect = yes
		ai_chance = { base = 10 }
	}
	after = { clear_saved_scope = aureliani_civic_scholar }
}

aureliani_civic.0003 = {
	content_source = dlc_aureliani
	type = character_event
	title = aureliani_civic.0003.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { house = { var:aureliani_civic_customs_method = 1 } } desc = aureliani_civic.0003.desc.both }
			triggered_desc = { trigger = { house = { var:aureliani_civic_customs_method = 2 } } desc = aureliani_civic.0003.desc.ruler }
			triggered_desc = { trigger = { house = { var:aureliani_civic_customs_method = 3 } } desc = aureliani_civic.0003.desc.county }
			desc = aureliani_civic.0003.desc
		}
	}
	theme = stewardship
	left_portrait = { character = root }
	option = { name = aureliani_civic.0003.a ai_chance = { base = 100 } }
}

aureliani_civic.0098 = {
	type = character_event
	hidden = yes
	trigger = { has_character_flag = aureliani_civic_rome_choice_pending var:aureliani_civic_choice_serial = scope:aureliani_civic_choice_attempt }
	immediate = { aureliani_civic_close_capital_choice_effect = yes }
}

aureliani_civic.0099 = {
	type = character_event
	hidden = yes
	trigger = { has_character_flag = aureliani_civic_culture_choice_pending var:aureliani_civic_choice_serial = scope:aureliani_civic_choice_attempt }
	immediate = { aureliani_civic_close_culture_choice_effect = yes clear_saved_scope = aureliani_civic_scholar }
}
