﻿0s_alemannic_guard_decision = {
	picture = { 
		reference = "gfx/interface/illustrations/decisions/0s_alemannic_guard.dds" 
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = 0s_alemannic_guard_decision_desc
	ai_goal = yes
	
	is_shown = {
		is_lowborn = no	
		OR = {
			culture = { has_cultural_pillar = heritage_south_slavic }
		}
		highest_held_title_tier >= tier_duchy
		faith.religion = religion:christianity_religion
		any_sub_realm_county = {
		capital_province = { geographical_region = 0s_balkans }
		}
		root.culture = {
			has_cultural_era_or_later = culture_era_high_medieval
		}
		NOR = {
			government_has_flag = government_is_theocracy
			government_has_flag = government_is_clan
			government_has_flag = government_is_tribal
		}
		root.culture = {
		    NOT = { 
		has_innovation = innovation_alemannic_guard
			}
		}
	}
	
	is_valid = {
		exists = title:e_hre.holder
		custom_description = {
			text = 0s_alemannic_guard_range_tooltip
			title:e_hre.holder = {
			in_diplomatic_range = root
			}
		}
		highest_held_title_tier >= tier_kingdom
		is_independent_ruler = yes
		root.culture = { has_cultural_pillar = heritage_south_slavic }
		capital_province = { geographical_region = 0s_balkans }
	}
	
	is_valid_showing_failures_only = {
		is_landed = yes
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}
	
	cost = {
		gold = 1500
		prestige = 1000
	}
	
	effect = {
		custom_tooltip = 0s_alemannic_guard_decision_effect_tooltip
		show_as_tooltip = { 0s_alemannic_guard_decision_effect = yes }
		if = {
			limit = {
				root.culture = {
					NOT = { has_innovation = innovation_alemannic_guard }
				}
			}
			root.culture = {
				add_innovation = innovation_alemannic_guard
			}
		}
		add_character_modifier = {
		modifier = hoc_alemannic_guard_modifier
		}
		create_character = {
			culture = culture:saxon
			religion = root.religion
			age = { 20 35 }
			gender = male
			trait = education_martial_5
			trait = loyal
			trait = brave
			prowess = 26
        		employer = root
        		save_scope_as = alemannic_knight_leader
		}
		custom_tooltip = 0s_alemannic_guard_arrival_tooltip
		trigger_event = {
			id = 0s_alemannic_guard_decision.0001
		}
	}
	
	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 50
	}
}

0s_garde_ecossaise_decision = {
	picture = { 
		reference = "gfx/interface/illustrations/decisions/0s_garde_ecossaise.dds" 
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = 0s_garde_ecossaise_decision_desc
	ai_goal = yes
	
	is_shown = {
		is_lowborn = no	
		highest_held_title_tier >= tier_kingdom
		faith.religion = religion:christianity_religion
		any_sub_realm_county = {
		capital_province = { geographical_region = hoc_ile_de_france }
		}
		root.culture = {
			has_cultural_era_or_later = culture_era_late_medieval
		}
		has_title = title:k_france
		NOR = {
			government_has_flag = government_is_theocracy
			government_has_flag = government_is_clan
			government_has_flag = government_is_tribal
		}
		root.culture = {
			NOT = { 
				has_innovation = innovation_garde_ecossaise
			}
		}
	}
	
	is_valid = {
		has_title = title:k_france
		is_independent_ruler = yes
		capital_province = { geographical_region = hoc_ile_de_france }
		legitimacy_level >= 3
		exists = title:k_scotland.holder
		custom_description = {
			text = 0s_requires_alliance_tooltip
			subject = title:k_scotland.holder
			title:k_scotland.holder = {
				is_allied_to = root
			}
		}
		OR = {
			custom_description = {
				text = 0s_scot_in_court_tooltip
				any_courtier_or_guest = { culture = culture:scottish }
        		}
			custom_description = {
				text = 0s_scot_king_friend_tooltip
				title:k_scotland.holder = {
					has_relation_friend = root
				}
			}
		}
		culture = { has_innovation = innovation_divine_right }
	}
	
	is_valid_showing_failures_only = {
		is_landed = yes
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}
	
	cost = {
		gold = 500
		prestige = 500
	}
	
	effect = {
		custom_tooltip = 0s_garde_ecossaise_decision_effect_tooltip
		show_as_tooltip = { 0s_garde_ecossaise_decision_effect = yes }
		root = { save_scope_as = french_king }
		if = {
			limit = {
				root.culture = {
					NOT = { has_innovation = innovation_garde_ecossaise }
				}
			}
			root.culture = {
				add_innovation = innovation_garde_ecossaise
			}
		}
		add_character_modifier = {
			modifier = hoc_garde_ecossaise_modifier
		}
		create_character = {
			culture = culture:scottish
			religion = root.religion
			age = { 25 35 }
			gender = male
			trait = education_martial_4
			trait = brave
			prowess = 22
			employer = root
			save_scope_as = garde_captain
		}
		title:k_scotland = {
			holder = {
				save_scope_as = scottish_king
			}
		}
		trigger_event = { id = 0s_garde_ecossaise_decision.0001 }
	}
	
	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}