country_decisions = {

	plutocratic_administration_rep = {
		major = yes
		potential = {
			NOT = { government = merchant_republic }
			NOT = { government = plutocratic_republic }
			NOT = { government = tribal_democracy }
			NOT = { government = native_council }
			NOT = { government = siberian_native_council }
			NOT = { government = imperial_city }
			NOT = { government = ambrosian_republic }
			NOT = { government = dutch_republic }
			NOT = { government = colonial_government }
			government = republic
			NOT = { num_of_provinces_in_states = 21 }
		}
		allow =  {
			stability = 1	
			NOT = { num_of_provinces_in_states = 21 }
			trade_income_percentage = 0.3
			full_idea_group = trade_ideas
			full_idea_group = economic_ideas
			is_at_war = no 
			is_subject = false
			custom_trigger_tooltip = {
				tooltip = recently_changed_government_flag_tooltip
				OR = {
					NOT = { has_country_flag = recently_changed_government_flag }
					had_country_flag = { flag = recently_changed_government_flag days = 9125 }
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { adm_tech = 82 }
				}
				change_government = merchant_republic
			}
			if = {
				limit = {
					adm_tech = 82
				}
				change_government = plutocratic_republic
			}
			add_stability = -1
			set_country_flag = recently_changed_government_flag
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				num_of_cities = 5
			}
			modifier = {
				factor = 0
				has_country_modifier = european_union
			}
			modifier = {
				factor = 0
				OR = {
					technology_group = muslim
					technology_group = indian
					technology_group = chinese
					technology_group = sub_saharan
					technology_group = north_american
					technology_group = mesoamerican
					technology_group = south_american
					technology_group = andean
				}
			}
		}
	}
	
	plutocratic_administration = {
		major = yes
		potential = {
			NOT = { government = merchant_republic }
			NOT = { government = steppe_horde }
			NOT = { government = iqta }
			NOT = { government = tribal_despotism }
			NOT = { government = tribal_kingdom }
			NOT = { government = tribal_federation }
			NOT = { government = native_council }
			NOT = { government = siberian_native_council }
			NOT = { government = english_monarchy }
			NOT = { government = elective_monarchy }
			NOT = { government = celestial_empire }
			NOT = { government = daimyo }
			NOT = { government = shogunate }
			NOT = { government = revolutionary_empire }
			government = monarchy
			NOT = { num_of_provinces_in_states = 21 }
		}
		allow =  {
			stability = 1	
			NOT = { num_of_provinces_in_states = 21 }	
			trade_income_percentage = 0.4
			full_idea_group = trade_ideas
			full_idea_group = economic_ideas
			is_at_war = no 
			is_subject = false
			custom_trigger_tooltip = {
				tooltip = recently_changed_government_flag_tooltip
				OR = {
					NOT = { has_country_flag = recently_changed_government_flag }
					had_country_flag = { flag = recently_changed_government_flag days = 9125 }
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { adm_tech = 82 }
				}
				change_government = merchant_republic
			}
			if = {
				limit = {
					adm_tech = 82
				}
				change_government = plutocratic_republic
			}
			add_stability = -4
			set_country_flag = recently_changed_government_flag
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					adm = 2
					dip = 2
					mil = 2
				}
			}
			modifier = {
				factor = 0
				num_of_cities = 5
			}
			modifier = {
				factor = 0
				OR = {
					technology_group = muslim
					technology_group = indian
					technology_group = chinese
					technology_group = sub_saharan
					technology_group = north_american
					technology_group = mesoamerican
					technology_group = south_american
					technology_group = andean
				}
			}
			modifier = {
				factor = 0
				has_country_modifier = european_union
			}
		}
	}
	
	oligarchic_administration = {
		major = yes
		potential = {
			NOT = { government = steppe_horde }
			NOT = { government = iqta }
			NOT = { government = tribal_despotism }
			NOT = { government = tribal_kingdom }
			NOT = { government = tribal_federation }
			NOT = { government = native_council }
			NOT = { government = siberian_native_council }
			NOT = { government = english_monarchy }
			NOT = { government = elective_monarchy }
			NOT = { government = celestial_empire }
			NOT = { government = daimyo }
			NOT = { government = shogunate }
			NOT = { government = revolutionary_empire }
			OR = {
				government = monarchy
				government = merchant_republic
			}
		}
		allow =  {
			stability = 1
			OR = {
				full_idea_group = aristocracy_ideas
				full_idea_group = plutocracy_ideas
			}
			full_idea_group = influence_ideas
			is_at_war = no 
			is_subject = false
			custom_trigger_tooltip = {
				tooltip = recently_changed_government_flag_tooltip
				OR = {
					NOT = { has_country_flag = recently_changed_government_flag }
					had_country_flag = { flag = recently_changed_government_flag days = 9125 }
				}
			}
		}
		effect = {
			change_government = oligarchic_republic
			add_stability = -4
			set_country_flag = recently_changed_government_flag
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					adm = 2
					dip = 2
					mil = 2
				}
			}
			modifier = {
				factor = 0
				num_of_cities = 5
			}
			modifier = {
				factor = 0
				OR = {
					technology_group = muslim
					technology_group = indian
					technology_group = chinese
					technology_group = sub_saharan
					technology_group = north_american
					technology_group = mesoamerican
					technology_group = south_american
					technology_group = andean
				}
			}
			modifier = {
				factor = 0
				government = merchant_republic
			}
		}
	}
	
	theocratic_administration = {
		major = yes
		potential = {
			has_dlc = "Common Sense"
			NOT = { government = theocratic_government }
			NOT = { government = steppe_horde }
			NOT = { government = iqta }
			NOT = { government = tribal_despotism }
			NOT = { government = tribal_kingdom }
			NOT = { government = tribal_federation }
			NOT = { government = tribal_democracy }
			NOT = { government = native_council }
			NOT = { government = siberian_native_council }
			NOT = { government = english_monarchy }
			NOT = { government = elective_monarchy }
			NOT = { government = imperial_city }
			NOT = { government = ambrosian_republic }
			NOT = { government = dutch_republic }
			NOT = { government = celestial_empire }
			NOT = { government = daimyo }
			NOT = { government = shogunate }
			NOT = { government = colonial_government }
			NOT = { government = revolutionary_empire }
			NOT = { government = noble_republic }
			OR = {
				government = monarchy
				government = republic
			}
		}
		allow =  {
			stability = 1	
			full_idea_group = religious_ideas
			full_idea_group = diplomatic_ideas
			is_at_war = no
			religious_unity = 1
			is_subject = false
			custom_trigger_tooltip = {
				tooltip = recently_changed_government_flag_tooltip
				OR = {
					NOT = { has_country_flag = recently_changed_government_flag }
					had_country_flag = { flag = recently_changed_government_flag days = 9125 }
				}
			}
		}
		effect = {
			change_government = theocratic_government
			add_stability = -4
			set_country_flag = recently_changed_government_flag
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	formalize_separation_of_powers = {
		potential = {
			government = constitutional_monarchy
			NOT = {
				has_country_modifier = separation_of_powers
			}
		}
		allow = {
			stability = 2
			advisor = statesman
			is_at_war = no
		}
		effect = {
			add_country_modifier = {
				name = "separation_of_powers"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	go_cult_of_reason = {
		potential = {
			government = revolutionary_republic
			NOT = {
				has_country_modifier = cult_of_reason
			}
		}
		allow = {
			NOT = { stability = -1 }
		}
		effect = {
			add_country_modifier = {
				name = "cult_of_reason"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
		}
	}

	iqta_reform = {
		major = yes
		potential = {
			government = iqta
		}
		allow = {
			adm_tech = 57
			legitimacy = 90
			adm_power = 100
			has_institution = feudalism
		}
		effect = {
			change_government = administrative_monarchy
			add_adm_power = -100
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	elevate_bishopric = {
		major = yes
		potential = {
			government = theocratic_government
			is_part_of_hre = yes
			NOT = { government_rank = 2 }
		}
		allow = {
			is_subject = no
			is_elector = yes
			OR = {
				NOT = { religion = catholic }
				papal_influence = 25
			}
		}
		effect = {
			set_government_rank = 2
			add_papal_influence = -25
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	secularization_of_protestant_theocracy = {
		major = yes
		potential = {
			OR = {
				government = theocratic_government
				government = monastic_order_government
			}
			OR = {
				religion = protestant
				religion = reformed
			}
			NOT = {
				tag = TEU
				owns_core_province = 41 #Königsberg
			}
			NOT = {
				tag = LIV
				owns_core_province = 39 #Courland
				owns_core_province = 1935 #Semigallia
			}
		}
		allow = {
			stability = 2
			adm_tech = 57
			custom_trigger_tooltip = {
				tooltip = recently_changed_government_flag_tooltip
				OR = {
					NOT = { has_country_flag = recently_changed_government_flag }
					had_country_flag = { flag = recently_changed_government_flag days = 9125 }
				}
			}
		}
		effect = {
			if = {
				limit = { has_heir = yes }
				kill_heir = yes
			}
			every_neighbor_country = {
				limit = {
					government = monarchy
					ROOT = { government = monastic_order_government }
				}
				add_opinion = { who = ROOT modifier = secularized_monastic_order }
			}
			every_neighbor_country = {
				limit = {
					government = monarchy
					ROOT = { government = theocratic_government }
				}
				add_opinion = { who = ROOT modifier = secularized_bishopric }
			}
			if = {
				limit = {
					OR = {
						is_free_or_tributary_trigger = yes
						NOT = { total_development = 300 }
					}
				}
				set_government_rank = 1
			}
			change_government = administrative_monarchy
			add_stability = -1
			set_country_flag = recently_changed_government_flag
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	secularization_of_christian_theocracy = {
		major = yes
		potential = {
			OR = {
				government = theocratic_government
				government = monastic_order_government
			}
			religion_group = christian
			NOT = { religion = protestant }
			NOT = { religion = reformed }
		}
		allow = {
			stability = 2
			adm_tech = 65
			custom_trigger_tooltip = {
				tooltip = recently_changed_government_flag_tooltip
				OR = {
					NOT = { has_country_flag = recently_changed_government_flag }
					had_country_flag = { flag = recently_changed_government_flag days = 9125 }
				}
			}
		}
		effect = {
			every_neighbor_country = {
				limit = {
					government = monarchy
					ROOT = { government = monastic_order_government }
				}
				add_opinion = { who = ROOT modifier = secularized_monastic_order }
			}
			every_neighbor_country = {
				limit = {
					government = monarchy
					ROOT = { government = theocratic_government }
				}
				add_opinion = { who = ROOT modifier = secularized_bishopric }
			}
			if = {
				limit = {
					religion = catholic
				}
				PAP = {
					add_opinion = {
						who = ROOT
						modifier = opinion_displeased
					}
				}
			}
			if = {
				limit = {
					OR = {
						NOT = { total_development = 300 }
						is_subject_other_than_tributary_trigger = yes
					}
				}
				set_government_rank = 1
			}
			change_government = administrative_monarchy
			add_stability = -1
			if = {
				limit = { has_heir = yes }
				kill_heir = yes
			}
			set_country_flag = recently_changed_government_flag
		}
		ai_will_do = {
			factor = 0
		}
	}
	
}
