emp_bohemia_1 = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	potential = {
		tag = BOH
		NOT = { map_setup = map_setup_random }
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	has_country_shield = yes
	emp_boh_hussite_start = {
		icon = hussite_regency
		required_missions = {  }
		trigger = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = hussite_regency_tt
					has_country_flag = hussite_regency_mission_flag
				}
				is_year = 1500
			}
			has_regency = no
			if = {
				limit = {
					government = monarchy
				}
				legitimacy = 75
			}
		}
		effect = {
			if = {
				limit = {
					religion = hussite
				}
				add_country_modifier = { # misionary maintenance cost
					name = "hussite_conversions"
					duration = 7300
				}
			}
			else_if = {
				limit = {
					religion = catholic
				}
				add_reform_desire = -0.02
				add_papal_influence = 20
			}
			else = {
				add_dip_power = 50
			}
		}
	}
	emp_boh_hussite_one = {
		icon = mission_luther_theses
		required_missions = { emp_boh_hussite_start }
		completed_by = 1457.1.1
		
		provinces_to_highlight = {
			OR = {
				area = bohemia_area
				area = moravia_area
				area = erzgebirge_area
			}
			OR = {
				NOT = { owned_by = ROOT }
				AND = {
					BOH = {
						religion = hussite
					}
					NOT = { religion = hussite }
				}
			}
		}
		
		trigger = {
			if = {
				limit = {
					religion = hussite
				}
				religious_unity = 1
				bohemia_area = {
					type = all
					religion = hussite
					owned_by = ROOT
				}
				moravia_area = {
					type = all
					religion = hussite
					owned_by = ROOT
				}
				erzgebirge_area = {
					type = all
					religion = hussite
					owned_by = ROOT
				}
			}
			else = {
				religious_unity = 1
				bohemia_area = {
					type = all
					owned_by = ROOT
				}
				moravia_area = {
					type = all
					owned_by = ROOT
				}
				erzgebirge_area = {
					type = all
					owned_by = ROOT
				}
			}
		}
		
		effect = {
			if = {
				limit = {
					NOT = {
						religion = hussite
					}
				}
				add_country_modifier = {
					name = "boh_hussite_revolt"
					duration = 7300
				}
			}
			else = {
				custom_tooltip = hussite_reform_center_tt
				266 = {
					add_reform_center = hussite
				}
				hidden_effect = {
					266 = {
						province_event = {
							id = flavor_boh.13
							days = 36500
						}
					}
				}
			}
		}
	}
	emp_boh_defenestrate_the_heretics = {
		icon = defenestrate_the_heretics
		required_missions = { emp_boh_hussite_one }
		trigger = {
			is_subject = no
			if = {
				limit = {
					has_dlc = "Art of War"
					hre_size = 1
					OR = {
						religion = catholic
						religion = protestant
					}
				}
				OR = {
					custom_trigger_tooltip = {
						tooltip = obj_religious_league_war_on_winning_side_tooltip
						has_country_flag = religious_league_war_on_winning_side
					}
					AND = {
						is_emperor = yes
						OR = {
							hre_religion_locked = yes
							hre_religion_treaty = yes
						}
					}
				}
			}
			else_if = {
				limit = {
					hre_size = 1
					OR = {
						religion = catholic
						religion = protestant
					}
				}
				is_religion_enabled = reformed
				is_emperor = yes
			}
			else = {
				is_religion_enabled = reformed
				religious_unity = 1
			}
		}
		effect = {
			add_country_modifier = {
				name = "defenestrations_of_prague"
				duration = -1
			}
		}
	}
	emp_boh_bohemian_crystal = {
		icon = bohemian_crystal
		required_missions = { }
		provinces_to_highlight = {
			province_id = 1771
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { development = 20 }
				has_production_building_trigger = no
			}
		}
		trigger = {
			1771 = {
				owned_by = ROOT
				development = 20
				has_production_building_trigger = yes
			}
		}
		effect = {
			set_country_flag = bohemian_crystal_flag
			if = {
				limit = {
					NOT = {
						has_global_flag = bohemian_glass_flag
					}
				}
				country_event = { id = prices.43 }
			}
			add_prestige = 20
		}
		ai_weight = {
			factor = 500	#Tall
		}
	}
	emp_boh_development_one = {
		icon = mission_have_manufactories
		required_missions = { emp_boh_bohemian_crystal }
		completed_by = 1720.1.1
		provinces_to_highlight = {
			owned_by = ROOT
			is_capital = yes
			OR = {
				NOT = { has_building = cathedral }
				NOT = { has_building = university }
			}
		}
		trigger = {
			capital_scope = {
				has_building = cathedral
				has_building = university
			}
		}
		
		effect = {
			if = {
				limit = {
					263 = {
						owned_by = ROOT
					}
				}
				263 = {
					add_base_tax = 3
					add_base_production = 3
					add_base_manpower = 3
				}
			}
			if = {
				limit = {
					4237 = {
						owned_by = ROOT
					}
				}
				4237 = {
					add_base_tax = 3
					add_base_production = 3
					add_base_manpower = 3
				}
				else = {
					capital_scope = {
						add_base_tax = 3
						add_base_production = 3
						add_base_manpower = 3
					}
				}
			}
		}
		ai_weight = {
			factor = 500	#Tall
		}
	}
	emp_boh_bergordnung_reforms = {
		icon = reform_bergordnung
		required_missions = { emp_boh_development_one }
		provinces_to_highlight = {
			OR = {
				province_id = 4237
				province_id = 263
			}
			OR = {
				NOT = { owned_by = ROOT }
				development = 20
				NOT = { enlightenment = 100 }
				has_manufactory_trigger = no
			}
		}
		trigger = {
			4237 = {
				owned_by = ROOT
				development = 20
				enlightenment = 100
				has_manufactory_trigger = yes
			}
			263 = {
				owned_by = ROOT
				development = 20
				enlightenment = 100
				has_manufactory_trigger = yes
			}
		}
		effect = {
			add_country_modifier = {
				name = "bergordnung_reforms"
				duration = -1
			}
		}
		ai_weight = {
			factor = 500	#Tall
		}
	}
}

emp_bohemia_2 = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	potential = {
		tag = BOH
		NOT = { map_setup = map_setup_random }
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	has_country_shield = yes
	emp_boh_integrate_silesia = {
		icon = mission_have_two_subjects
		required_missions = { }
		completed_by = 1457.1.1
		
		provinces_to_highlight = {
			area = silesia_area
			NOT = { owned_by = ROOT }
		}
		
		trigger = {
			silesia_area = {
				type = all
				owned_by = ROOT
			}
		}
		
		effect = {
			if = {
				limit = {
					has_country_modifier = annexers_legacy
				}
				remove_country_modifier = annexers_legacy
			}
			add_country_modifier = {
				name = "boh_integrated_silesia"
				duration = 7300
			}
			slovakia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
		ai_weight = {
			factor = 500	#Historical
		}
	}
	emp_boh_great_moravia = {
		icon = restore_great_moravia
		required_missions = { emp_boh_integrate_silesia }
		provinces_to_highlight = {
			area = slovakia_area
			NOT = { owned_by = ROOT }
		}
		trigger = {
			slovakia_area = {
				type = all
				owned_by = ROOT
			}
			is_subject = no
		}
		effect = {
			if = {
				limit = {
					exists = HUN
					valid_for_personal_unions_trigger = yes
					HUN = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = HUN
				}
			}
			else = {
				transdanubia_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				alfold_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
		ai_weight = {
			factor = 500	#Reasonable conquest
		}
	}
	emp_boh_hungarian_union = {
		icon = hungarian_union
		required_missions = { emp_boh_great_moravia }
		provinces_to_highlight = {
			OR = {
				area = transdanubia_area
				area = alfold_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		position = 4
		trigger = {
			transdanubia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			alfold_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			is_subject = no
		}
		effect = {
			add_country_modifier = {
				name = "boh_fortification_effort"
				duration = 7300
			}
			austria_proper_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
		ai_weight = {
			factor = 500	#Reasonable conquest
		}
	}
	emp_boh_protect_against_turks = {
		icon = protect_against_the_turks
		required_missions = { emp_boh_hungarian_union }
		provinces_to_highlight = {
			province_has_current_tech_fort_trigger = no
			region = carpathia_region
			country_or_non_sovereign_subject_holds = ROOT
		}
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 5
				province_has_current_tech_fort_trigger = yes
				region = carpathia_region
			}
			if = {
				limit = {
					exists = TUR
				}
				army_strength = {
					who = TUR
					value = 0.5
				}
			}
			else = {
				army_size = 18 # modified
			}
			is_subject = no
		}
		effect = {
			bulgaria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			silistria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			custom_tooltip = poland_varna_tt
			hidden_effect = {
				carpathia_region = {
					limit = {
						NOT = { is_permanent_claim = ROOT	}
						NOT = { is_core = ROOT	}
						owned_by = TUR
					}
					add_claim = ROOT
				}
				balkan_region = {
					limit = {
						NOT = { is_permanent_claim = ROOT	}
						NOT = { is_core = ROOT	}
						owned_by = TUR
					}
					add_claim = ROOT
				}
			}
		}
	}
	emp_boh_revenge_for_nicopolis = {
		icon = revenge_for_nicopolis
		required_missions = { emp_boh_protect_against_turks }
		provinces_to_highlight = {
			OR = {
				AND = {
					region = balkan_region
					owned_by = TUR
				}
				AND = {
					OR = {
						area = bulgaria_area
						area = silistria_area
						province_id = 150
					}
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
			}
		}
		trigger = {
			150 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 6
				OR = {
					area = bulgaria_area
					area = silistria_area
				}
			}
			NOT = {
				TUR = {
					any_owned_province = {
						region = balkan_region
					}
				}
			}
			is_subject = no
		}
		effect = {
			add_power_projection = {
				type = mission_rewards_power_projection
				amount = 50
			}
		}
		ai_weight = {
			factor = 75	#Too ambitious
		}
	}
}

emp_bohemia_3 = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	potential = {
		tag = BOH
		NOT = { map_setup = map_setup_random }
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	has_country_shield = yes	
	emp_boh_polish_diplomacy = {
		icon = polish_diplomacy
		required_missions = { emp_boh_integrate_silesia }
		position = 2
		provinces_to_highlight = {
			OR = {
				owned_by = POL
				owned_by = PLC
				province_id = 262
			}
		}
		trigger = {
			if = {
				limit = {
					exists = POL
					NOT = { exists = PLC }
					government = monarchy
				}
				has_regency = no
				OR = {
					POL = { dynasty = ROOT }
					is_rival = POL
				}
			}
			else_if = {
				limit = {
					exists = PLC
					government = monarchy
				}
				has_regency = no
				OR = {
					PLC = { dynasty = ROOT }
					is_rival = PLC
				}
			}
			else = {
				262 = {
					country_or_non_sovereign_subject_holds = ROOT
				}
			}
			is_subject = no
		}
		effect = {
			if = {
				limit = {
					exists = PLC
					valid_for_personal_unions_trigger = yes
					PLC = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = PLC
				}
			}
			else_if ={
				limit = {
					exists = POL
					valid_for_personal_unions_trigger = yes
					POL = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = POL
				}
			}
			else = {
				malopolska_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				wielkopolska_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				central_poland_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
			}
		}
		ai_weight = {
			factor = 100	#Little bit too ambitious?
		}
	}
	emp_boh_prem_conquest = {
		icon = mission_noble_council
		required_missions = { emp_boh_polish_diplomacy }
		
		provinces_to_highlight = {
			OR = {
				area = wielkopolska_area
				area = malopolska_area
				area = central_poland_area
			}
			NOT = { owned_by = ROOT }
		}
		
		trigger = {
			wielkopolska_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			malopolska_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			central_poland_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			is_subject = no
		}
		
		effect = {
			add_mil_power = 50
			2963 = {
				add_permanent_claim = ROOT
			}
			2997 = {
				add_permanent_claim = ROOT
			}
			2995 = { 
				add_permanent_claim = ROOT
			}
			43 = { 
				add_permanent_claim = ROOT 
			}
		}
		ai_weight = {
			factor = 100	#Little bit too ambitious?
		}
	}
	
	emp_boh_prem_conquest_two = {
		icon = mission_teutonic_knights
		required_missions = { emp_boh_prem_conquest }
		
		provinces_to_highlight = {
			OR = {
				province_id = 2963
				province_id = 2997
				province_id = 2995
				province_id = 43
			}
			NOT = { owned_by = ROOT }
		}
		
		trigger = {
			2963 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			2997 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			2995 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			43 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		effect = {
			add_adm_power = 100
			add_country_modifier = {
				name = "boh_premysl_mod"
				duration = 7300
			}
		}
		ai_weight = {
			factor = 50	#Little bit too ambitious?
		}
	}
	emp_boh_bohemian_commonwealth = {
		icon = bohemian_commonwealth
		required_missions = { emp_boh_prem_conquest_two emp_boh_hungarian_union emp_boh_electorate_of_saxony  }
		position = 5
		provinces_to_highlight = {
			OR = {
				province_id = 266
				province_id = 262
				province_id = 50
				province_id = 61
				province_id = 134
				province_id = 153
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			266 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			262 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			50 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			61 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			153 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			134 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "bohemian_commonwealth"
				duration = -1
			}
		}
		ai_weight = {
			factor = 50	#Little bit too ambitious?
		}
	}
}

emp_bohemia_4 = {
	slot = 4
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	potential = {
		tag = BOH
		NOT = { map_setup = map_setup_random }
		has_dlc = "Emperor"
		NOT = {
			has_dlc = "Winds of Change"
		}
	}
	has_country_shield = yes
	emp_boh_humiliate_austria = {
		icon = boh_humiliate_austria
		required_missions = {  }
		provinces_to_highlight = {
			owned_by = HAB
		}
		trigger = {
			is_subject = no
			OR = {
				HAB = { humiliated_by = ROOT }
				AND = {
					is_great_power = yes
					HAB = { is_great_power = no }
				}
				NOT = { exists = HAB }
			}
		}
		effect = {
			if = {
				limit = {
					exists = BRA
					
				}
				add_casus_belli = {
					target = BRA
					type = cb_vassalize_mission
					months = 120
				}
			}
			else = {
				mittelmark_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = {  is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	emp_boh_electorate_of_brandenburg = {
		icon = electorate_of_brandenburg
		required_missions = { emp_boh_humiliate_austria }
		provinces_to_highlight = {
			OR = {
				owner = {
					tag = BRA
					NOT = { is_subject_of = ROOT }
				}
				AND = {
					area = mittelmark_area
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
			}
		}
		trigger = {
			if = {
				limit = {
					exists = BRA
				}
				BRA = { is_subject_of = ROOT }
			}
			else = {
				50 = {
					owned_by = ROOT
				}
			}
			mittelmark_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			is_subject = no
		}
		effect = {
			if = {	
				limit = {
					exists = BRA
					BRA = { 
						is_elector = yes
						is_revolutionary = no
					}
				}
				country_event = { id = emp_mission_events.8 }
			}
			else = {
				add_prestige = 25
			}
			if = {
				limit = {
					exists = SAX
					
				}
				add_casus_belli = {
					target = SAX
					type = cb_vassalize_mission
					months = 120
				}
			}
			else = {
				south_saxony_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = {  is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
		ai_weight = {
			factor = 75	#Not too high or else Austria will never get their vote
		}
	}
	emp_boh_electorate_of_saxony = {
		icon = electorate_of_saxony
		required_missions = { emp_boh_electorate_of_brandenburg }
		position = 4
		provinces_to_highlight = {
			OR = {
				owner = {
					tag = SAX
					NOT = { is_subject_of = ROOT }
				}
				AND = {
					area = south_saxony_area
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
			}
		}
		trigger = {
			if = {
				limit = {
					exists = SAX
				}
				SAX = { is_subject_of = ROOT }
			}
			else = {
				61 = {
					owned_by = ROOT
				}
			}
			south_saxony_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			is_subject = no
		}
		effect = {
			if = {	
				limit = {
					exists = SAX
					SAX = {
						is_elector = yes
						is_revolutionary = no
					}
				}
				country_event = { id = emp_mission_events.9 }
			}
			else = {
				add_prestige = 25
			}
		}
		ai_weight = {
			factor = 75	#Not too high or else Saxony will never get their vote
		}
	}
	emp_boh_reformatio_sigismundi = {
		icon = reformatio_sigismundi
		required_missions = { emp_boh_electorate_of_saxony gen_hre_emperor }
		trigger = {
			if = {
				limit = {
					hre_size = 1
				}
				is_emperor = yes
				hre_reform_passed = emperor_perpetual_diet
			}
			else = {
				reform_level = 7
			}
		}
		effect = {
			if = {
				limit = {
					hre_size = 1
				}
				add_country_modifier = {
					name = "boh_sigismund_reforms"
					duration = 7300
				}
			}
			else = {
				add_adm_power = 100
			}
		}
	}
	emp_boh_peace_in_europe = {
		icon = peace_in_europe
		required_missions = { emp_boh_reformatio_sigismundi }
		trigger = {
			is_at_war = no
			if = {
				limit = {
					hre_size = 1
				}
				calc_true_if = {
					all_province = {
						is_part_of_hre = yes
					}
					amount = 250
				}
				is_emperor = yes
			}
			else = {
				total_development = 2000
			}
		}
		effect = {
			change_dip = 1
			add_country_modifier = {
				name = "boh_peace_in_europe"
				duration = -1
			}
		}
	}
}