﻿0s_burgundy_decision = {		
	picture = { 
		reference = "gfx/interface/illustrations/decisions/0s_burgundy.dds" 
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = 0s_burgundy_decision_desc
	ai_goal = yes
	
	is_shown = {
		OR = {
			culture = { has_cultural_pillar = heritage_central_germanic }
			culture = { has_cultural_pillar = heritage_frankish }
		}
		highest_held_title_tier <= tier_duchy
		OR = {
			has_title = title:d_burgundy
			has_title = title:d_upper_burgundy
		}
		any_sub_realm_county = {
			OR = {
				title_province = { geographical_region = 0s_custom_burgundy }
				this = title:c_dijon
				this = title:c_besancon
			}
		}
		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
		}
		NOT = {  #Can only do it once.
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_0s_burgundy_created
			}
		}
	}
	
	is_valid = {
		root.culture = {
			has_innovation = innovation_burgundian_coutilier
		}
		highest_held_title_tier = tier_duchy
		prestige_level >= 4
		title:d_burgundy = { title_held_years >= 15 }
		completely_controls = title:d_flanders
		completely_controls = title:d_upper_burgundy
		completely_controls = title:d_burgundy
	}
	
	is_valid_showing_failures_only = {
		is_landed = yes
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}
	
	cost = {
		gold = 2500
		prestige = 5000
	}
	
	effect = {
		custom_tooltip = 0s_burgundy_discovery_tooltip
		root.culture = {
		add_innovation = innovation_ordonnances_royales
		}
		show_as_tooltip = {
			0s_burgundy_scripted_effect = yes
		}
		liege = { save_scope_as = former_liege }
		root = { save_scope_as = decision_taker }
		trigger_event = 0s_burgundy_decision_event.0001
		hidden_effect = {
			add_to_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_0s_burgundy_created
			}
			set_global_variable = {
				name = flag_0s_burgundy_created
				value = root
			}
		}
	}
	
	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}

0s_hre_armory_decision = {		
	picture = { 
		reference = "gfx/interface/illustrations/decisions/0s_hre_armory.dds" 
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = 0s_hre_armory_decision_desc
	ai_goal = yes
	
	is_shown = {
		OR = {
			culture = { has_cultural_pillar = heritage_central_germanic }
			culture = { has_cultural_pillar = heritage_frankish }
			culture = { has_cultural_pillar = heritage_latin }
		}
		highest_held_title_tier >= 4
		OR = {
			has_title = title:e_hre
			has_title = title:k_austria
			has_title = title:k_switzerland
			has_title = title:k_bohemia
		}
		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
		}
		NOT = {  #Can only do it once.
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_0s_hre_armory_created
			}
		}
	}
	
	is_valid = {
		root.culture = {
			has_innovation = innovation_plate_armor
		}
		legitimacy_level >= 4
		prestige_level >= 5
		NOT = { has_realm_law = crown_authority_0 }
	}
	
	is_valid_showing_failures_only = {
		is_landed = yes
		is_capable_adult = yes
		is_imprisoned = no
		is_at_war = no
	}
	
	cost = {
		gold = 2000
		prestige = 4000
	}
	
	effect = {
		custom_tooltip = 0s_hre_armory_discovery_tooltip
		show_as_tooltip = { 0s_hre_armory_scripted_effect = yes }
		create_character = {
			culture = culture:franconian
			religion = root.religion
			age = { 30 45 }
			gender = male
			trait = education_martial_3
			trait = diligent
			trait = shrewd
			prowess = 20
			learning = 15
			employer = root
			save_scope_as = armor_smith
		}
		scope:armor_smith = {
			create_inspiration = armor_inspiration
		}
		root.culture = {
		add_innovation = innovation_imperial_bulwark
		}
		trigger_event = {
			id = 0s_hre_armory_decision.0001
		}
		hidden_effect = {
			add_to_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_0s_hre_armory_created
			}
			set_global_variable = {
				name = flag_0s_hre_armory_created
				value = root
			}
		}
	}
	
	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}