﻿0s_immortal_guard_decision = {
	picture = { 
		reference = "gfx/interface/illustrations/decisions/0s_immortal_guard_decision.dds"
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = 0s_immortal_guard_decision_desc
	ai_goal = yes
	
	is_shown = {
		religion = religion:zoroastrianism_religion
		culture = { has_cultural_pillar = heritage_iranian }
		capital_province = { geographical_region = world_middle_east_persia }
		root.culture = {
			has_cultural_era_or_later = culture_era_early_medieval
		}
		NOT = { culture = { has_innovation = innovation_Immortal_guard } }
		highest_held_title_tier >= tier_empire
		NOT = {
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_0s_immortal_guard_formed
			}
		}
	}
	
	is_valid = {
		has_title = title:e_persia
		completely_controls = title:k_persia
		is_independent_ruler = yes
		has_trait = scholar
		custom_description = {
			text = "restore_high_priesthood_holy_sites"
			faith = {
				any_holy_site = {
					OR = {
						county.holder = root
						county.holder.top_liege = { this = root }
					}
					count >= 2
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		is_landed = yes
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}
	
	cost = {
		piety = 300
		gold = 300
		prestige = 300
	}
	
	effect = {
		show_as_tooltip = {
			custom_tooltip = 0s_immortal_guard_tt
			0s_immortal_guard_scripted_effect = yes
		}
		culture = { add_innovation = innovation_Immortal_guard }
		root = { 
			save_scope_as = persian_ruler
		}
		create_character = {
			culture = culture:persian
			religion = root.religion
			age = { 20 35 }
			gender = male
			trait = education_martial_3
			trait = just
			trait = honest
			trait = faith_warrior
			prowess = 18
        		employer = root
        		save_scope_as = immortal_guard_leader
		}
		hidden_effect = {
			add_to_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_0s_immortal_guard_formed
			}
		}
		trigger_event = 0s_immortal_guard_event.0001
	}
	
	ai_will_do = { base = 100 }
}

0s_cuman_georgian_decision = {
	picture = { 
		reference = "gfx/interface/illustrations/decisions/0s_cuman_georgian_decision.dds"
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = 0s_cuman_georgian_decision_desc
	ai_goal = yes
	
	is_shown = {
		OR = {
			culture = { has_cultural_pillar = heritage_caucasian }
		}
		root.culture = {
			has_cultural_era_or_later = culture_era_high_medieval
		}
		NOT = { culture = { has_innovation = innovation_cuman_service } }
		OR = {
			capital_province = { geographical_region = custom_slavia }
			capital_province = { geographical_region = world_asia_minor }
		}
		highest_held_title_tier >= tier_kingdom
	}
	
	is_valid = {
		legitimacy_level >= 3
		custom_description = {
			text = 0s_cuman_georgian_vassal_culture_tt
			trigger_if = {
				limit = {
					any_vassal = {
						is_powerful_vassal = yes
						NOT = { culture = { has_cultural_pillar = heritage_caucasian } }
					}
				}
				any_vassal = {
					count <= 1
					is_powerful_vassal = yes
					NOT = { culture = { has_cultural_pillar = heritage_caucasian } }
				}
			}
		}

		custom_description = {
			text = 0s_cuman_georgian_religious_approval_tt
			trigger_if = {
				limit = { exists = faith.religious_head }
				OR = {
					faith.religious_head = {
						opinion = {
							target = root
							value >= high_positive_opinion
						}
					}
					root = { has_strong_usable_hook = faith.religious_head }
					root = { has_weak_hook = faith.religious_head }
				}
			}
		}

		custom_description = {
			text = 0s_cuman_georgian_cultural_acceptance_tt
			culture = {
				cultural_acceptance = {
					target = culture:cuman
					value >= 40
				}
			}
		}

		capital_province.county = {
			development_level >= 20
		}
	}

	is_valid_showing_failures_only = {
		is_landed = yes
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}
	
	cost = {
		piety = 1000
		gold = 600
		prestige = 600
	}
	
	effect = {
		show_as_tooltip = {
			custom_tooltip = 0s_cuman_georgian_tt
			spawn_cuman_service_troops_effect = yes
		}
		add_character_modifier = {
			modifier = hoc_cuman_auxiliary_modifier
		}
		culture = { add_innovation = innovation_cuman_service }
		root = { 
			save_scope_as = georgian_reformer
		}
		trigger_event = 0s_cuman_georgian_event.0001
	}
	
	ai_will_do = { base = 100 }
}

0s_warhounds_decision = {
	picture = { 
		reference = "gfx/interface/illustrations/decisions/0s_warhounds_decision.dds"
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = 0s_warhounds_desc
	ai_goal = yes
	
	is_shown = {
		has_trait = eccentric
		has_trait = lifestyle_hunter
		NOT = { culture = { has_innovation = innovation_warhounds } }
		OR = {
			house = { has_house_unity_stage = antagonistic } 
			dread >= 80
		}
	}
	
	is_valid = {
		martial >= 12
		sub_realm_size >= 10
	}

	is_valid_showing_failures_only = {
		is_landed = yes
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}
	
	cost = {
		piety = 500
		gold = 300
		prestige = 300
	}
	
	effect = {
		show_as_tooltip = {
			custom_tooltip = 0s_warhounds_tt
		}
		culture = { add_innovation = innovation_warhounds }
		root = { 
			save_scope_as = warhounds_boss
		}
		create_character = {
			template = administrator_character
			culture = root.culture 
			faith = root.faith 
			age = { 25 45 }
			gender = male
			trait = education_martial_4 
			trait = sadistic
			trait = brave
			trait = lifestyle_hunter
			prowess = { 18 25 }
			employer = root 
			save_scope_as = 0s_master_of_hounds_character 
		}

		send_interface_message = {
			type = event_dynasty_good_with_text 
			title = 0s_warhounds_decision_character_msg_t
			desc = 0s_warhounds_decision_character_msg_desc
			left_icon = scope:0s_master_of_hounds_character 
		}

		trigger_event = 0s_warhounds_event.0001
	}
	ai_will_do = { base = 100 }
}