woc_boh_first_branch = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_hungarian_succession = {
		icon = hungarian_union
		required_missions = { }
		position = 1
		
		trigger = {
			army_size = HUN
			custom_trigger_tooltip = {
				tooltip = hussite_regency_tt
				has_country_flag = hussite_regency_mission_flag
			}
			HUN = {
				custom_trigger_tooltip = {
					OR = {
						has_country_flag = hun_has_had_matthias_corvinus_event
						is_year = 1457
					}
					tooltip = emp_boh_hungarian_succession_tooltip
				}
			}
		}
		
		provinces_to_highlight = {
			owned_by = HUN
		}
		
		effect = {
			if = {
				limit = {
					exists = HUN
					valid_for_personal_unions_trigger = yes
					HUN = {
						valid_for_personal_unions_trigger = yes
					}
				}
				custom_tooltip = boh_hungary_exists_tt_yes
				tooltip = {
					add_casus_belli = {
						type = cb_restore_personal_union
						months = 300
						target = HUN
					}
				}
			}
			else = {
				custom_tooltip = boh_hungary_exists_tt_no
				tooltip = {
					add_casus_belli = {
						type = cb_restore_personal_union
						months = 300
						target = HUN
					}
				}
			}
			if = {
				limit = {
					OR = {
						NOT = {
							exists = HUN
						}
						NOT = {
							HUN = {
								valid_for_personal_unions_trigger = yes
							}
						}
					}
				}
				custom_tooltip = boh_hungary_doesnt_exist_tt_yes
				tooltip = {
					slovakia_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
					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
					}
				}
			}
			else = {
				custom_tooltip = boh_hungary_doesnt_exist_tt_no
				tooltip = {
					slovakia_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
					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
					}
				}
			}
			hidden_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 = {
					slovakia_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
					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
		}
	}
	
	boh_claim_the_holy_crown = {
		icon = mission_apostolic_kingdom
		required_missions = { boh_hungarian_succession }
		position = 3
		
		trigger = {
			OR = {
				HUN = {
					is_subject_of = ROOT
				}
				calc_true_if = {
					all_owned_province = {
						region = carpathia_region
					}
					amount = 12
				}
			}
			if = {
				limit = {
					HUN = {
						is_subject_of = ROOT
					}
					NOT = {
						HUN = {
							liberty_desire = 50
						}
					}
				}
			}
		}
		
		provinces_to_highlight = {
			owned_by = HUN
		}
		
		effect = {
			slavonia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			croatia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			carpathia_region = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					HUN = {
						is_subject_of = ROOT
					}
				}
				custom_tooltip = boh_hungary_subject_yes
				tooltip = {
					custom_tooltip = boh_ownership_of_nitra_tt
					HUN = {
						add_liberty_desire = -25
					}
				}
			}
			else = {
				custom_tooltip = boh_hungary_subject_no
				tooltip = {
					custom_tooltip = boh_ownership_of_nitra_tt
					HUN = {
						add_liberty_desire = -25
					}
				}
			}
			if = {
				limit = {
					calc_true_if = {
						all_owned_province = {
							region = carpathia_region
						}
						amount = 12
					}
				}
				custom_tooltip = boh_hungary_not_subject_yes
				tooltip = {
					add_country_modifier = {
						name = boh_carpathian_intervention
						duration = 7300
					}
				}
			}
			else = {
				custom_tooltip = boh_hungary_not_subject_no
				tooltip = {
					add_country_modifier = {
						name = boh_carpathian_intervention
						duration = 7300
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						HUN = {
							is_subject_of = ROOT
						}
					}
					set_country_flag = boh_ownership_nitra
					HUN = {
						add_liberty_desire = -25
					}
				}
				else_if = {
					limit = {
						calc_true_if = {
							all_owned_province = {
								region = carpathia_region
							}
							amount = 12
						}
					}
					add_country_modifier = {
						name = boh_carpathian_intervention
						duration = 7300
					}
				}
			}
		}
		
		ai_weight = {
			factor = 500
		}
	}
	
	boh_protect_against_the_turk = {
		icon = protect_against_the_turks
		required_missions = { boh_claim_the_holy_crown }
		position = 4
		
		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 = 20 # modified
			}
			is_subject = no
		}
		
		effect = {
			if = {
				limit = {
					has_dlc = "Golden Century"
				}
				custom_tooltip = boh_unlock_order_of_the_dragon
				set_country_flag = boh_unlocked_order_of_the_dragon
			}
			else = {
				add_mil_power = 100
			}
			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 = boh_protect_against_turk_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
				}
			}
		}
	}
	
	boh_revenge_for_nicopolis = {
		icon = revenge_for_nicopolis
		required_missions = { boh_protect_against_the_turk }
		position = 5
		
		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 = {
			custom_tooltip = boh_cb_balkan_tt
			balkan_region = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			hidden_effect = {
				every_country = {
					limit = {
						capital_scope = {
							region = balkan_region
						}
						is_free_or_tributary_trigger = yes
					}
					reverse_add_casus_belli = {
						type = cb_vassalize_mission
						months = 300
						target = ROOT
					}
				}
			}
		}
	}
	
	boh_liberate_the_balkans = {
		icon = mission_balkan_conquest
		required_missions = { boh_revenge_for_nicopolis }
		position = 6
		
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 15
				region = balkan_region
			}
		}
		
		provinces_to_highlight = {
			region = balkan_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		
		effect = {
			set_country_flag = enable_unite_balkans_cb_flag
			custom_tooltip = boh_enable_balkan_cb_tt
			add_country_modifier = {
				name = "boh_balkan_subjugation"
				duration = 3650
			}
			if = {
				limit = {
					any_subject_country = {
						capital_scope = {
							region = balkan_region
						}
					}
				}
				custom_tooltip = boh_balkan_subjects_tt_yes
				tooltip = {
					add_liberty_desire = -10
				}
			}
			else = {
				custom_tooltip = boh_balkan_subjects_tt_no
				tooltip = {
					add_liberty_desire = -10
				}
			}
			hidden_effect = {
				if = {
					limit = {
						any_subject_country = {
							capital_scope = {
								region = balkan_region
							}
						}
					}
					every_subject_country = {
						limit = {
							capital_scope = {
								region = balkan_region
							}
						}
						add_liberty_desire = -10
					}
				}
			}
		}
	}
	
	boh_hussite_regency = {
		icon = mission_crown_of_wenceslas
		required_missions = { }
		position = 7
		
		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 = {
			hidden_effect = {
				if = {
					limit = { ai = yes }
					country_event = {
						id = flavor_boh.14
					}
				}
			}
			if = {
				limit = {
					NOT = { religion = catholic }
				}
				custom_tooltip = boh_unlock_hussite_branching_tt_yes
				tooltip = {
					custom_tooltip = boh_unlock_hussite_branching_missions
					add_country_modifier = {
						name = "hussite_conversions"
						duration = 7300
					}
				}
			}
			else = {
				custom_tooltip = boh_unlock_hussite_branching_tt_no
				tooltip = {
					custom_tooltip = boh_unlock_hussite_branching_missions
					add_country_modifier = {
						name = "hussite_conversions"
						duration = 7300
					}
				}
			}
			if = {
				limit = {
					religion = catholic 
				}
				custom_tooltip = boh_unlock_catholic_branching_tt_yes
				tooltip = {
					custom_tooltip = boh_unlock_catholic_branching_missions
					add_country_modifier = {
						name = "boh_purge_hussites"
						duration = 7300
					}
				}
			}
			else = {
				custom_tooltip = boh_unlock_catholic_branching_tt_no
				tooltip = {
					custom_tooltip = boh_unlock_catholic_branching_missions
					add_country_modifier = {
						name = "boh_purge_hussites"
						duration = 7300
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						religion = catholic 
					}
					clr_country_flag = boh_hussite_missions
					clr_country_flag = boh_catholic_missions
					set_country_flag = boh_catholic_missions
					swap_non_generic_missions = yes
					select_current_missions = {
						key = BOH_RELIGION
					}
					add_country_modifier = {
						name = "boh_purge_hussites"
						duration = 7300
					}
				}
				else = {
					clr_country_flag = boh_hussite_missions
					clr_country_flag = boh_catholic_missions
					set_country_flag = boh_hussite_missions
					swap_non_generic_missions = yes
					select_current_missions = {
						key = BOH_RELIGION
					}
					add_country_modifier = {
						name = "hussite_conversions"
						duration = 7300
					}
				}
			}
		}
	}
	
}

boh_first_locked = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		NOT = {
			OR = {
				has_country_flag = boh_hussite_missions
				has_country_flag = boh_catholic_missions
			}
		}
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_branching1 = {
		icon = mission_unknown_mission
		required_missions = { boh_hussite_regency }
		position = 8
		
		trigger = { custom_trigger_tooltip = { tooltip = BOH_RELIGION_BRANCHING always = no } }
		
		effect = {
			custom_tooltip = BOH_RELIGION_BRANCHING
		}
	}
	
	boh_branching2 = {
		icon = mission_unknown_mission
		required_missions = { boh_branching1 }
		position = 9
		
		trigger = { custom_trigger_tooltip = { tooltip = BOH_RELIGION_BRANCHING always = no } }
		
		effect = {
			custom_tooltip = BOH_RELIGION_BRANCHING
		}
	}
	
	boh_branching3 = {
		icon = mission_unknown_mission
		required_missions = { boh_branching2 }
		position = 10
		
		trigger = { custom_trigger_tooltip = { tooltip = BOH_RELIGION_BRANCHING always = no } }
		
		effect = {
			custom_tooltip = BOH_RELIGION_BRANCHING
		}
	}
	
}

boh_first_unlocked_catholic = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		has_country_flag = boh_catholic_missions
		NOT = {
			has_country_flag = boh_hussite_missions
		}
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_purge_hussite_heresy = {
		icon = hussite_regency
		required_missions = { boh_hussite_regency }
		position = 8
		
		trigger = {
			not_in_mission_preview_mode = { key = BOH_RELIGION }
			bohemia_area = {
				type = all
				owned_by = ROOT
			}
			custom_trigger_tooltip = {
				tooltip = boh_bohemia_area_religion_tt
				bohemia_area = {
					type = all
					religion = ROOT
				}
			}
			moravia_area = {
				type = all
				owned_by = ROOT
			}
			custom_trigger_tooltip = {
				tooltip = boh_moravia_area_religion_tt
				moravia_area = {
					type = all
					religion = ROOT
				}
			}
			erzgebirge_area = {
				type = all
				owned_by = ROOT
			}
			custom_trigger_tooltip = {
				tooltip = boh_erzgebirge_area_religion_tt
				erzgebirge_area = {
					type = all
					religion = ROOT
				}
			}
		}
		
		provinces_to_highlight = {
			OR = {
				area = bohemia_area
				area = moravia_area
				area = erzgebirge_area
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { religion = hussite }
			}
		}
		
		effect = {
			if = {
				limit = {
					religion = catholic
				}
				custom_tooltip = boh_unlock_catholic_branching_tt_yes
				tooltip = {
					add_reform_desire = -0.02
					add_papal_influence = 20
					define_advisor = {
						type = theologian
						skill = 2
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
			else = {
				custom_tooltip = boh_unlock_catholic_branching_tt_no
				tooltip = {
					add_reform_desire = -0.02
					add_papal_influence = 20
					define_advisor = {
						type = theologian
						skill = 2
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
			if = { #fallback reward
				limit = {
					NOT = {
						religion = catholic
					}
				}
				custom_tooltip = boh_empty
				custom_tooltip = boh_not_catholic_tt_yes
				tooltip = {
					add_dip_power = 50
					define_advisor = {
						type = theologian
						skill = 2
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
			else = {
				custom_tooltip = boh_empty
				custom_tooltip = boh_not_catholic_tt_no
				tooltip = {
					add_dip_power = 50
					define_advisor = {
						type = theologian
						skill = 2
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						religion = catholic
					}
					add_reform_desire = -0.02
					add_papal_influence = 20
					define_advisor = {
						type = theologian
						skill = 2
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
				else = {
					add_dip_power = 50
					define_advisor = {
						type = theologian
						skill = 2
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
		}
	}
	
	boh_shield_of_the_true_faith = {
		icon = the_holy_league
		required_missions = { boh_purge_hussite_heresy }
		position = 9
		
		trigger = {
			not_in_mission_preview_mode = { key = BOH_RELIGION }
			is_defender_of_faith = yes
			custom_trigger_tooltip = {
				tooltip = boh_has_won_20_battles_against_heretic_heathen
				check_variable = { which = bohemia_num_of_won_battles_against_heretic_heathen value = 20 }
			}
			custom_trigger_tooltip = {
				tooltip = obj_convert_10_provinces_tooltip
				check_variable = { which = num_converted_religion value = 10 }
			}
		}
		
		provinces_to_highlight = {
			owned_by = ROOT
			NOT = {
				religion = ROOT
			}
		}
		
		effect = {
			if = {
				limit = {
					religion = catholic
				}
				custom_tooltip = boh_unlock_catholic_branching_tt_yes
				tooltip = {
					custom_tooltip = hun_empower_religious_diplomats_tt
					add_country_modifier = {
						name = boh_shield_of_true_faith
						duration = -1
					}
				}
			}
			else = {
				custom_tooltip = boh_unlock_catholic_branching_tt_no
				tooltip = {
					custom_tooltip = hun_empower_religious_diplomats_tt
					add_country_modifier = {
						name = boh_shield_of_true_faith
						duration = -1
					}
				}
			}
			if = { #fallback reward
				limit = {
					NOT = {
						religion = catholic
					}
				}
				custom_tooltip = boh_not_catholic_tt_yes
				tooltip = {
					add_country_modifier = {
						name = boh_shield_of_true_faith
						duration = -1
					}
				}
			}
			else = {
				custom_tooltip = boh_not_catholic_tt_no
				tooltip = {
					add_country_modifier = {
						name = boh_shield_of_true_faith
						duration = -1
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						religion = catholic
					}
					set_country_flag = hun_empower_religious_diplomats
					add_country_modifier = {
						name = boh_shield_of_true_faith
						duration = -1
					}
				}
				else = {
					add_country_modifier = {
						name = boh_shield_of_true_faith
						duration = -1
					}
				}
			}
		}
	}
	
	boh_catholic_empire = { 
		icon = holy_state
		required_missions = { boh_shield_of_the_true_faith }
		position = 10
		
		provinces_to_highlight = {
			OR = {
				AND = {
					owner = { is_emperor = yes }
					root = { is_emperor = no }
				}
				AND = {
					owner = {
						is_part_of_hre = yes
						NOT = { religion = root }
					}
					hre_religion_locked = no
				}
			}
		}
		
		trigger = {
			is_emperor = yes
			if = {
				limit = {
					has_dlc = "Art of War"
				}
				OR = {
					hre_religion_locked = yes
					AND = {
						custom_trigger_tooltip = {
							tooltip = boh_50_years_reformation
							had_global_flag = {
								flag = reformation_started
								days = 18250
							}
						}
						custom_trigger_tooltip = {
							tooltip = boh_empire_united_in_religion_trigger_tooltip
							NOT = {
								any_country = {
									is_part_of_hre = yes
									NOT = { religion = root }
								}
							}
						}
					}
				}
			}
			else = {
				custom_trigger_tooltip = {
					tooltip = boh_50_years_reformation
					had_global_flag = {
						flag = reformation_started
						days = 18250
					}
				}
				custom_trigger_tooltip = {
					tooltip = boh_empire_united_in_religion_trigger_tooltip
					NOT = {
						any_country = {
							is_part_of_hre = yes
							NOT = { religion = root }
						}
					}
				}
			}
		}
		
		effect = {
			if = {
				limit = {
					religion = catholic
				}
				custom_tooltip = boh_unlock_catholic_branching_tt_yes
				tooltip = {
					custom_tooltip = boh_empower_diplo_advisors_tt
					add_country_modifier = {
						name = boh_triumph_of_the_cross
						duration = 7300
					}
				}
			}
			else = {
				custom_tooltip = boh_unlock_catholic_branching_tt_no
				tooltip = {
					custom_tooltip = boh_empower_diplo_advisors_tt
					add_country_modifier = {
						name = boh_triumph_of_the_cross
						duration = 7300
					}
				}
			}
			if = { #fallback reward
				limit = {
					NOT = {
						religion = catholic
					}
				}
				custom_tooltip = boh_not_catholic_tt_yes
				tooltip = {
					add_prestige_or_monarch_power = {
						amount = 50
					}
				}
			}
			else = {
				custom_tooltip = boh_not_catholic_tt_no
				tooltip = {
					add_prestige_or_monarch_power = {
						amount = 50
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						religion = catholic
					}
					set_country_flag = boh_empower_diplo_advisors
					add_country_modifier = {
						name = boh_triumph_of_the_cross
						duration = 7300
					}
				}
				else = {
					add_prestige_or_monarch_power = {
						amount = 50
					}
				}
			}
		}
	}
	
}
	
boh_first_unlocked_hussite = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		has_country_flag = boh_hussite_missions
		NOT = {
			has_country_flag = boh_catholic_missions
		}
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_hussite_resurgence = {
		icon = hussite_regency
		required_missions = { boh_hussite_regency }
		position = 8
		
		trigger = {
			not_in_mission_preview_mode = { key = BOH_RELIGION }
			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
			}
		}
		
		provinces_to_highlight = {
			OR = {
				area = bohemia_area
				area = moravia_area
				area = erzgebirge_area
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { religion = hussite }
			}
		}
		
		effect = {
			if = {
				limit = {
					religion = hussite
				}
				custom_tooltip = boh_hussite_tt_yes
				tooltip = {
					custom_tooltip = boh_hussite_reform_center_tt
					add_country_modifier = {
						name = "boh_spread_word_of_hus"
						duration = 7300
					}
				}
			}
			else = {
				custom_tooltip = boh_hussite_tt_no
				tooltip = {
					custom_tooltip = boh_hussite_reform_center_tt
					add_country_modifier = {
						name = "boh_spread_word_of_hus"
						duration = 7300
					}
				}
			}
			if = { #fallback reward
				limit = {
					NOT = {
						religion = hussite
					}
				}
				custom_tooltip = boh_not_hussite_tt_yes
				tooltip = {
					add_country_modifier = {
						name = "boh_hussite_revolt"
						duration = 7300
					}
				}
			}
			else = {
				custom_tooltip = boh_not_hussite_tt_no
				tooltip = {
					add_country_modifier = {
						name = "boh_hussite_revolt"
						duration = 7300
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						religion = hussite
					}
					266 = {
						add_reform_center = hussite
					}
					hidden_effect = {
						266 = {
							province_event = {
								id = flavor_boh.13
								days = 36500
							}
						}
					}
					add_country_modifier = {
						name = "boh_spread_word_of_hus"
						duration = 7300
					}
				}
				else = {
					add_country_modifier = {
						name = "boh_hussite_revolt"
						duration = 7300
					}
				}
			}
		}
	}
	
	boh_defenestrate_the_heretics = {
		icon = defenestrate_the_heretics
		required_missions = { boh_hussite_resurgence }
		position = 9
		
		trigger = {
			not_in_mission_preview_mode = { key = BOH_RELIGION }
			OR = {
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					value = 30
					religion = ROOT
				}
				calc_true_if = {
					all_country = {
						religion = ROOT
					}
					amount = 10
				}
			}
		}
		
		provinces_to_highlight = {
			owned_by = ROOT
			NOT = {
				religion = ROOT
			}
		}
		
		effect = {
			if = {
				limit = {
					religion = hussite
				}
				custom_tooltip = boh_hussite_tt_yes
				tooltip = {
					custom_tooltip = boh_rekindle_hussite_wars_tt
					add_country_modifier = {
						name = "defenestrations_of_prague"
						duration = -1
					}
				}
			}
			else = {
				custom_tooltip = boh_hussite_tt_no
				tooltip = {
					custom_tooltip = boh_rekindle_hussite_wars_tt
					add_country_modifier = {
						name = "defenestrations_of_prague"
						duration = -1
					}
				}
			}
			if = { #fallback reward
				limit = {
					NOT = {
						religion = hussite
					}
				}
				custom_tooltip = boh_not_hussite_tt_yes
				tooltip = {
					add_country_modifier = {
						name = "defenestrations_of_prague"
						duration = -1
					}
				}
			}
			else = {
				custom_tooltip = boh_not_hussite_tt_no
				tooltip = {
					add_country_modifier = {
						name = "defenestrations_of_prague"
						duration = -1
					}
				}
			}
			hidden_effect = {
				add_country_modifier = {
					name = "defenestrations_of_prague"
					duration = -1
				}
			}
		}
	}
	
	boh_hussite_empire = {
		icon = mission_hussite_empire
		required_missions = { boh_defenestrate_the_heretics }
		position = 10
		
		trigger = {
			not_in_mission_preview_mode = { key = BOH_RELIGION }
			is_subject = no
			if = {
				limit = {
					has_dlc = "Art of War"
					hre_size = 1
					OR = {
						religion = catholic
						religion = protestant
						religion = hussite
					}
				}
				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 = {
			if = {
				limit = {
					religion = hussite
				}
				custom_tooltip = boh_hussite_tt_yes
				tooltip = {
					custom_tooltip = boh_hussite_refund_aspect_tt
					add_country_modifier = {
						name = "boh_pravda_vitezi"
						duration = 7300
					}
				}
			}
			else = {
				custom_tooltip = boh_hussite_tt_no
				tooltip = {
					custom_tooltip = boh_hussite_refund_aspect_tt
					add_country_modifier = {
						name = "boh_pravda_vitezi"
						duration = 7300
					}
				}
			}
			if = { #fallback reward
				limit = { 
					NOT = {
						religion = hussite
					}
				}
				custom_tooltip = boh_not_hussite_tt_yes
				tooltip = {
					add_prestige_or_monarch_power = {
						amount = 50
					}
				}
			}
			else = {
				custom_tooltip = boh_not_hussite_tt_no
				tooltip = {
					add_prestige_or_monarch_power = {
						amount = 50
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						religion = hussite
					}
					set_country_flag = boh_aspect_refund_chance
					add_country_modifier = {
						name = "boh_pravda_vitezi"
						duration = 7300
					}
				}
				else = {
					add_prestige_or_monarch_power = {
						amount = 50
					}
				}
			}
		}
	}
}

woc_boh_second_branch = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_recover_nitrava = {
		icon = mission_recover_nitrava 
		required_missions = { boh_hungarian_succession }
		position = 2
		
		trigger = {
			slovakia_area = {
				type = all
				owned_by = ROOT
			}
		}
		
		provinces_to_highlight = {
			area = slovakia_area
			NOT = {
				owned_by = ROOT
			}
		}
		
		effect = {
			add_accepted_culture_or_dip_power = { culture = slovak free = yes }
			set_country_flag = boh_czechoslovak_brotherhood_flag
			custom_tooltip = boh_every_province_slovakia
			hidden_effect = {
				slovakia_area = {
					limit = { owned_by = ROOT }
					add_random_development = 1
				}
			}
		}
		
		ai_weight = {
			factor = 500
		}
	}
	
	boh_electorate_of_saxony = {
		icon = electorate_of_saxony
		required_missions = { boh_lion_of_the_empire }
		position = 5
		
		provinces_to_highlight = {
			area = south_saxony_area
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		
		trigger = {
			south_saxony_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			is_subject = no
		}
		
		effect = {
			add_adm_power = 100
			if = {
				limit = {
					exists = SAX
					SAX = {
						is_elector = yes
						is_subject_of = ROOT 
					}
				}
				tooltip = {
					custom_tooltip = boh_saxony_elector_subject_tt_yes
					tooltip = {
						country_event = { id = emp_mission_events.9 }
						custom_tooltip = boh_saxony_event_tooltip
					}
				}
			}
			else = {
				tooltip = {
					custom_tooltip = boh_saxony_elector_subject_tt_no
					tooltip = {
						country_event = { id = emp_mission_events.9 }
						custom_tooltip = boh_saxony_event_tooltip
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						exists = SAX
						SAX = {
							is_elector = yes
							is_subject_of = ROOT 
						}
					}
					country_event = { id = emp_mission_events.9 }
				}
			}
		}
	}
	
	boh_bohemian_crystal = {
		icon = bohemian_crystal
		required_missions = { }
		position = 7
		
		provinces_to_highlight = {
			OR = {
				province_id = 1771
				province_id = 4238
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { has_production_building_trigger = yes }
				NOT = { num_of_times_improved = 5 }
			}
		}
		
		trigger = {
			1771 = {
				owned_by = ROOT
				num_of_times_improved = 5
				has_production_building_trigger = yes
			}
			4238 = {
				owned_by = ROOT
				num_of_times_improved = 5
				has_production_building_trigger = yes
			}
		}
		
		effect = {
			set_country_flag = bohemian_crystal_flag
			country_event = { id = prices.43 }
			custom_tooltip = boh_crystal_event_insight_tt
			if = {
				limit = {
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						trade_goods = glass
						value = 3
					}
				}
				custom_tooltip = boh_3_glass_province_yes
				tooltip = {
					1771 = {
						add_or_upgrade_production_building = yes
					}
				}
			}
			else = {
				custom_tooltip = boh_3_glass_province_no
				tooltip = {
					1771 = {
						add_or_upgrade_production_building = yes
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
							trade_goods = glass
							value = 3
						}
					}
					1771 = {
						add_or_upgrade_production_building = yes
					}
				}
			}
		}
	}
	
	boh_vladislav_hall = {
		icon = mission_lit_jesuit_academy
		required_missions = { boh_the_golden_city }
		position = 9
		
		trigger = {
			owns = 266
			266 = {
				development = 45
			}
			266 = {
				has_courthouse_building_trigger = yes
			}
			OR = {
				crown_land_share = 60
				monthly_dip = 10
				DIP = 5
			}
		}
		
		provinces_to_highlight = {
			province_id = 266
		}
		
		effect = {
			266 = {
				add_or_upgrade_courthouse_building = yes
			}
			custom_tooltip = boh_building_courthouses_bonus
			hidden_effect = {
				set_country_flag = fra_courthouse_bonus_flag
				every_owned_province = {
					limit = {
						has_courthouse_building_trigger = yes
					}
					add_province_modifier = {
						name = fra_improved_court_houses_modifier
						duration = -1
					}
				}
			}
		}
	}
	
}

woc_boh_third_branch = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_humiliate_austria = {
		icon = humiliate_austria
		required_missions = { }
		position = 1
		
		provinces_to_highlight = {
			owned_by = HAB
		}
		
		trigger = {
			is_subject = no
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				OR = {
					HAB = { humiliated_by = ROOT }
					NOT = { exists = HAB }
					AND = {
						is_great_power = yes
						HAB = { is_great_power = no }
					}
				}
			}
			else = {
				OR = {
					HAB = { humiliated_by = ROOT }
					NOT = { exists = HAB }
				}
			}
		}
		
		effect = {
			add_dip_power = 100
			add_country_modifier = {
				name = boh_humiliated_habsburgs
				duration = 9125
			}
			inner_austria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			austria_proper_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					HAB = { humiliated_by = ROOT }
				}
				custom_tooltip = boh_humiliated_hab_tt_yes
				tooltip = {
					add_prestige_or_monarch_power = {
						amount = 25
					}
				}
			}
			else = {
				custom_tooltip = boh_humiliated_hab_tt_no
				tooltip = {
					add_prestige_or_monarch_power = {
						amount = 25
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						HAB = { humiliated_by = ROOT }
					}
					add_prestige_or_monarch_power = {
						amount = 25
					}
				}
			}
		}
		
		ai_weight = {
			factor = 500
		}
	}
	
	boh_otakars_legacy = {
		icon = mission_the_renaissance_king
		required_missions = { boh_humiliate_austria }
		position = 2
		
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					area = inner_austria_area
					area = austria_proper_area
				}
				value = 6
			}
		}
		
		provinces_to_highlight = {
			OR = {
				area = inner_austria_area
				area = austria_proper_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		effect = {
			add_power_projection = {
				type = mission_rewards_power_projection
				amount = 25
			}
			add_country_modifier = {
				name = boh_otakars_legacy
				duration = 7300
			}
			carinthia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			tirol_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			lower_bavaria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			east_bavaria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			upper_bavaria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					has_country_modifier = boh_humiliated_habsburgs
				}
				custom_tooltip = boh_humiliated_permanent_yes
			}
			else = {
				custom_tooltip = boh_humiliated_permanent_no
			}
			hidden_effect = {
				if = {
					limit = {
						has_country_modifier = boh_humiliated_habsburgs
					}
					remove_country_modifier = boh_humiliated_habsburgs
					add_country_modifier = {
						name = boh_humiliated_habsburgs
						duration = -1
					}
				}
			}
		}
		
		ai_weight = {
			factor = 500
		}
	}
	
	boh_reforge_great_moravia = {
		icon = restore_great_moravia
		required_missions = { boh_otakars_legacy boh_recover_nitrava boh_vistula_land }
		position = 3
		
		trigger = {
			stability = 3
			prestige = 90
			legitimacy = 90
			total_development = 500
		}
		
		effect = {
			country_event = { id = flavor_boh.16 }
			custom_tooltip = boh_great_moravia_insight_tt
			tooltip = {
				add_ruler_modifier = {
					name = boh_svatopluks_heir
					duration = -1
				}
			}
		}
	}
	
	boh_lion_of_the_empire = {
		icon = the_imperial_border
		required_missions = { }
		position = 4
		
		trigger = {
			army_size = 10 # modified
			prestige = 40
			custom_trigger_tooltip = {
				tooltip = boh_most_army_hre
				NOT = {
					any_country = {
						is_part_of_hre = yes
						army_size = ROOT
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = boh_most_development_hre
				NOT = {
					any_country = {
						is_part_of_hre = yes
						total_development = ROOT
					}
				}
			}
		}
		
		provinces_to_highlight = {
			NOT = { 
				owned_by = ROOT
			}
			owner = {
				is_part_of_hre = yes
				OR = {
					total_development = ROOT
					army_size = ROOT
				}
			}
		}
		
		effect = {
			add_country_modifier = {
				name = boh_lion_of_the_empire
				duration = 5475
			}
			if = {
				limit = {
					exists = SAX
				}
				custom_tooltip = boh_saxony_exists_tt_yes
				tooltip = {
					add_casus_belli = {
						type = cb_vassalize_mission
						months = 360
						target = SAX
					}
				}
			}
			else = {
				custom_tooltip = boh_saxony_exists_tt_no
				tooltip = {
					add_casus_belli = {
						type = cb_vassalize_mission
						months = 360
						target = SAX
					}
				}
			}
			if = {
				limit = {
					NOT = {
						exists = SAX
					}
				}
				custom_tooltip = boh_saxony_doesnt_exist_tt_yes
				tooltip = {
					south_saxony_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
			else = {
				custom_tooltip = boh_saxony_doesnt_exist_tt_no
				tooltip = {
					south_saxony_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
			if = {
				limit = {
					exists = BRA
				}
				custom_tooltip = boh_brandenburg_exists_tt_yes
				tooltip = {
					add_casus_belli = {
						type = cb_vassalize_mission
						months = 360
						target = BRA
					}
				}
			}
			else = {
				custom_tooltip = boh_brandenburg_exists_tt_no
				tooltip = {
					add_casus_belli = {
						type = cb_vassalize_mission
						months = 360
						target = BRA
					}
				}
			}
			if = {
				limit = {
					NOT = {
						exists = BRA
					}
				}
				custom_tooltip = boh_brandenburg_doesnt_exist_tt_yes
				tooltip = {
					mittelmark_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
			else = {
				custom_tooltip = boh_brandenburg_doesnt_exist_tt_no
				tooltip = {
					mittelmark_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						exists = SAX
					}
					add_casus_belli = {
						type = cb_vassalize_mission
						months = 360
						target = SAX
					}
				}
				else = {
					south_saxony_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
				if = {
					limit = {
						exists = BRA
					}
					add_casus_belli = {
						type = cb_vassalize_mission
						months = 360
						target = BRA
					}
				}
				else = {
					mittelmark_area = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
		}
	}
	
	boh_bozi_bojovnici = {
		icon = mission_bozi_bojovnici
		required_missions = { boh_lion_of_the_empire }
		position = 5
		
		trigger = {
			army_tradition = 60
			has_mil_advisor_2 = yes
			custom_trigger_tooltip = {
				tooltip = boh_has_won_20_battles
				check_variable = { which = bohemia_num_of_won_battles value = 20 }
			}
		}
		
		effect = {
			unlock_government_reform = {
				government_reform = vozove_hradby_reform
			}
		}
	}
	
	boh_bohemian_commonwealth = {
		icon = bohemian_commonwealth
		required_missions = { boh_electorate_of_saxony boh_revenge_for_nicopolis boh_electorate_of_brandenburg boh_pomerelian_reconquest }
		position = 6
		
		provinces_to_highlight = {
			OR = {
				AND = {
					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 }
				}
				AND = {
					region = balkan_region
					owner = {
						religion_group = muslim
					}
				}
			}
		}
		
		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
			}
			balkan_region = {
				type = all
				owner = {
					NOT = { religion_group = muslim }
				}
			}
		}
		
		effect = {
			override_country_name = BOH_COMMONWEALTH
			set_country_flag = is_BOH_COMMONWEALTH_flag
			set_country_flag = has_overriden_name_flag
			add_power_projection = {
				type = mission_rewards_power_projection
				amount = 50
			}
			custom_tooltip = boh_bohemian_commonwealth_tt
			hidden_effect = {
				if = {
					limit = {
						has_country_modifier = boh_premyslid_heritage_2
					}
					remove_country_modifier = boh_premyslid_heritage_2
					add_country_modifier = {
						name = boh_premyslid_heritage_3
						duration = -1
					}
				}
			}
		}
	}
	
	boh_recover_from_hussite_wars = {
		icon = mission_devastate_christianity
		required_missions = { }
		position = 7
		
		trigger = {
			OR = {
				stability = 1
				manpower_percentage = 0.9
			}
			bohemia_area = {
				type = all
				NOT = {
					devastation = 10
				}
				owned_by = ROOT
			}
			moravia_area = {
				type = all
				NOT = {
					devastation = 10
				}
				owned_by = ROOT
			}
			erzgebirge_area = {
				type = all
				NOT = {
					devastation = 10
				}
				owned_by = ROOT
			}
		}
		
		provinces_to_highlight = {
			OR = {
				area = erzgebirge_area
				area = moravia_area
				area = bohemia_area
			}
			OR = {
				devastation = 10
				NOT = {
					owned_by = ROOT
				}
			}
		}
		
		effect = {
			custom_tooltip = boh_remove_all_devastation
			add_country_modifier = {
				name = boh_recovered_from_hussite_wars
				duration = 9125
			}
			if = {
				limit = {
					has_country_modifier = boh_hussite_destruction
				}
				remove_country_modifier = boh_hussite_destruction
			}
			hidden_effect = {
				every_owned_province = {
					limit = {
						OR = {
							area = bohemia_area
							area = moravia_area
							area = erzgebirge_area
						}
					}
					add_devastation = -100
				}
			}
		}
	}
	
	boh_the_golden_city = {
		icon = mission_the_golden_city
		required_missions = { boh_municipal_works boh_bohemian_crystal boh_recover_from_hussite_wars }
		position = 8
		
		trigger = {
			owns = 266
			266 = {
				development = 30
			}
			266 = {
				num_of_buildings_in_province = 3
			}
		}
		
		provinces_to_highlight = {
			province_id = 266
		}
		
		effect = {
			if = {
				limit = {
					has_dlc = "Leviathan"
				}
				custom_tooltip = boh_expand_infrastructure_prague
				set_country_flag = boh_expand_infrastructure_prague_flag
			}
			else = {
				266 = {
					add_base_tax = 1
					add_base_production = 1
					add_base_manpower = 1
				}
			}
			266 = {
				add_province_modifier = {
					name = "boh_golden_city"
					duration = -1
				}
			}
			if = {
				limit = {
					NOT = {
						any_province = {
							continent = europe
							higher_development_than = 266
						}
					}
				}
				custom_tooltip = boh_prague_most_developed_yes
				tooltip = {
					if = {
						limit = {
							has_dlc = "Mandate of Heaven"
						}
						add_splendor = 200
					}
					else = {
						change_government_reform_progress = 100
					}
				}
			}
			else = {
				custom_tooltip = boh_prague_most_developed_no
				tooltip = {
					if = {
						limit = {
							has_dlc = "Mandate of Heaven"
						}
						add_splendor = 200
					}
					else = {
						change_government_reform_progress = 100
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						NOT = {
							any_province = {
								continent = europe
								higher_development_than = 266
							}
						}
					}
					if = {
						limit = {
							has_dlc = "Mandate of Heaven"
						}
						add_splendor = 200
					}
					else = {
						change_government_reform_progress = 100
					}
				}
			}
		}
	}
	
	boh_reform_the_bergordnung = {
		icon = reform_bergordnung
		required_missions = { boh_the_golden_city }
		position = 9
		
		provinces_to_highlight = {
			owned_by = ROOT 
			NOT = { has_manufactory_trigger = yes }
		}
		
		trigger = {
			num_of_owned_provinces_with = {
				has_manufactory_trigger = yes
				value = 20
			}
		}
		
		effect = {
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				add_ruler_personality = industrious_personality
			}
			else = {
				add_mercantilism = 5
			}
			unlock_government_reform = {
				government_reform = bergordnung_reforms_reform
			}
		}
	}
	
	boh_czech_heavy_industry = {
		icon = mission_rb_build_furnaces
		required_missions = { boh_reform_the_bergordnung }
		position = 9
		
		trigger = {
			development_in_provinces = {
				has_manufactory_trigger = yes
				value = 300
			}
			custom_trigger_tooltip = {
				tooltip = boh_most_income_europe
				NOT = {
					any_country = {
						capital_scope = {
							continent = europe
						}
						monthly_income = ROOT
					}
				}
			}
		}
		
		provinces_to_highlight = {
			OR = {
				AND = {
					owned_by = ROOT
					has_manufactory_trigger = yes
				}
				AND = {
					owner = {
						capital_scope = {
							continent = europe
						}
						monthly_income = ROOT
					}
					is_capital = yes
				}
			}
		}
		
		effect = {
			custom_tooltip = boh_manufactories_development_tt
			custom_tooltip = boh_province_industrial_bonus_tt
			tooltip = {
				add_province_modifier = {
					name = boh_workshop_of_the_world
					duration = -1
				}
			}
			hidden_effect = {		
                for = {
                    amount = 10
                    effect = "
                        random_owned_province = {
							limit = {
								has_manufactory_trigger = yes
							}
							add_base_production = 1
                        }
                    "
                }
			}
			if = {
				limit = {
					monthly_income = 500
				}
				custom_tooltip = boh_500_income_tt_yes
			}
			else = {
				custom_tooltip = boh_500_income_tt_no
			}
			hidden_effect = {
				every_owned_province = {
					limit = {
						OR = {
							area = bohemia_area 
							area = erzgebirge_area
							area = moravia_area
						}
					}
					add_province_modifier = {
						name = boh_workshop_of_the_world
						duration = -1
					}
				}
				if = {
					limit = {
						monthly_income = 500
					}
					every_owned_province = {
						limit = {
							has_province_modifier = boh_workshop_of_the_world
						}
						remove_province_modifier = boh_workshop_of_the_world
					}
					every_owned_province = {
						limit = {
							OR = {
								area = bohemia_area 
								area = erzgebirge_area
								area = moravia_area
							}
						}
						add_province_modifier = {
							name = boh_workshop_of_the_world2
							duration = -1
						}
					}
				}
			}
		}
	}
}

woc_boh_fourth_branch = {
	slot = 4
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_vistula_land = {
		icon = jageillonian_union
		required_missions = { boh_consolidate_silesia }
		position = 2
		
		trigger = {
			262 = {
				country_or_non_sovereign_subject_holds = ROOT 
			}
			2960 = {
				country_or_non_sovereign_subject_holds = ROOT 
			}
			262 = {
				num_of_times_improved = 3
			}
			262 = {
				has_trade_building_trigger = yes
			}
			262 = {
				trade_share = {
					country = ROOT
					share = 20
				}
			}
		}
		
		provinces_to_highlight = {
			OR = {
				AND = {
					OR = {
						province_id = 262
						province_id = 2960
					}
					NOT = {
						country_or_non_sovereign_subject_holds = ROOT 
					}
				}
				province_id = 262
			}
		}
		
		effect = {
			262 = {
				add_or_upgrade_trade_building = yes
			}
			262 = {
				add_center_of_trade_level = 1
			}
			custom_tooltip = boh_empty
			sandomierz_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			red_ruthenia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					262 = {
						trade_share = {
							country = ROOT
							share = 30
						}
					}
				}
				custom_tooltip = boh_30_trade_krakow_tt_yes
				tooltip = {
					define_advisor = {
						type = trader
						skill = 3
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
			else = {
				custom_tooltip = boh_30_trade_krakow_tt_no
				tooltip = {
					define_advisor = {
						type = trader
						skill = 3
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						262 = {
							trade_share = {
								country = ROOT
								share = 30
							}
						}
					}
					define_advisor = {
						type = trader
						skill = 3
						culture = ROOT
						religion = ROOT
						cost_multiplier = 0.25
					}
				}
			}
		}
	}
	
	boh_electorate_of_brandenburg = {
		icon = electorate_of_brandenburg
		required_missions =  { boh_lion_of_the_empire }
		position = 5
		
		provinces_to_highlight = {
			area = mittelmark_area
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		
		trigger = {
			mittelmark_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			is_subject = no
		}
		
		effect = {
			custom_tooltip = boh_10_ae_hre_tt
			if = {
				limit = {
					exists = BRA
					BRA = {
						is_elector = yes
						is_subject_of = ROOT 
					}
				}
				tooltip = {
					custom_tooltip = boh_brandenburg_elector_subject_tt_yes
					tooltip = {
						country_event = { id = emp_mission_events.8 }
						custom_tooltip = boh_brandenburg_event_tooltip
					}
				}
			}
			else = {
				tooltip = {
					custom_tooltip = boh_brandenburg_elector_subject_tt_no
					tooltip = {
						country_event = { id = emp_mission_events.8 }
						custom_tooltip = boh_brandenburg_event_tooltip
					}
				}
			}
			hidden_effect = {
				every_country = {
					limit = {
						is_part_of_hre = yes
					}
					add_aggressive_expansion = {
						who = ROOT
						value = -10
						apply_calc = no
					}
				}
				if = {
					limit = {
						exists = BRA
						BRA = {
							is_elector = yes
							is_subject_of = ROOT 
						}
					}
					country_event = { id = emp_mission_events.8 }
				}
			}
		}
	}
	
	boh_municipal_works = {
		icon = mission_have_manufactories
		required_missions =  { }
		position = 7
		
		trigger = {
			OR = {
				monthly_income = 20
				production_income_percentage = 0.25
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 10
				has_production_building_trigger = yes
			}
		}
		
		provinces_to_highlight = {
			country_or_non_sovereign_subject_holds = ROOT
			NOT = {
				has_production_building_trigger = yes
			}
		}
		
		effect = {
			add_years_of_owned_provinces_production_income = {
				years = 2
				trigger = {
					always = yes
				}
				custom_tooltip = boh_from_2_years_of_prod_income
			}
			add_country_modifier = {
				name = boh_early_industrialization
				duration = 5475
			}
			custom_tooltip = boh_developing_bonus_tt
		}
	}
	
	boh_univerzita_karlova = {
		icon = mission_early_modern_university
		required_missions =  { boh_the_golden_city }
		position = 9
		
		trigger = {
			owns = 266
			266 = {
				has_building = university
			}
			has_adm_advisor_3 = yes
			has_dip_advisor_3 = yes
			has_mil_advisor_3 = yes
		}
		
		provinces_to_highlight = {
			province_id = 266
			OR = {
				NOT = {
					owned_by = ROOT
				}
				NOT = {
					has_building = university
				}
			}
		}
		
		effect = {
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				custom_tooltip = boh_prevent_negative_traits
				set_country_flag = boh_prevent_negative_traits
			}
			else = {
				change_government_reform_progress = 100
			}
			if = {
				limit = {
					tag = BOH
				}
				custom_tooltip = boh_empower_ni_yes
			}
			else = {
				custom_tooltip = boh_empower_ni_no
			}
			if = {
				limit = {
					NOT = {
						tag = BOH
					}
				}
				custom_tooltip = boh_not_empower_ni_yes
				tooltip = {
					add_country_modifier = {
						name = czech_nationalism
						duration = -1
					}
				}
			}
			else = {
				custom_tooltip = boh_not_empower_ni_no
				tooltip = {
					add_country_modifier = {
						name = czech_nationalism
						duration = -1
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						tag = BOH
					}
					set_country_flag = boh_empowered_ni
					swap_free_idea_group = yes
				}
				else = {
					add_country_modifier = {
						name = czech_nationalism
						duration = -1
					}
				}
			}
		}
	}
	
}

woc_boh_fifth_branch = {
	slot = 5
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		has_dlc = "Winds of Change"
		tag = BOH
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	boh_consolidate_silesia = {
		icon = take_silesia
		required_missions = { }
		position = 1
		
		trigger = {
			OR = {
				AND = {
					GLG = {
						has_opinion = {
							who = ROOT
							value = 200
						}
						NOT = {
							liberty_desire = 1
						}
					}
					OPL = {
						has_opinion = {
							who = ROOT
							value = 200
						}
						NOT = {
							liberty_desire = 1
						}
					}
					NOT = {
						exists = SIL
					}
				}
				AND = {
					NOT = {
						exists = GLG
					}
					NOT = {
						exists = OPL
					}
					silesia_area = {
						type = all
						owned_by = ROOT
					}
					silesia_area = {
						type = all
						NOT = {
							local_autonomy = 10
						}
					}
				}
			}
		}
		
		provinces_to_highlight = {
			area = silesia_area
			OR = {
				NOT = {
					owned_by = ROOT
				}
				local_autonomy = 10
			}
		}
		
		effect = {
			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
			}
			malopolska_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT }
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					GLG = {
						has_opinion = {
							who = ROOT
							value = 200
						}
						NOT = {
							liberty_desire = 1
						}
					}
					OPL = {
						has_opinion = {
							who = ROOT
							value = 200
						}
						NOT = {
							liberty_desire = 1
						}
					}
					NOT = {
						exists = SIL
					}
				}
				custom_tooltip = boh_silesia_diplomatic_tt_yes
				tooltip = {
					custom_tooltip = boh_create_silesia_vassal_tt
				}
			}
			else = {
				custom_tooltip = boh_silesia_diplomatic_tt_no
				tooltip = {
					custom_tooltip = boh_create_silesia_vassal_tt
				}
			}
			if = {
				limit = {
					NOT = {
						exists = GLG
					}
					NOT = {
						exists = OPL
					}
					silesia_area = {
						type = all
						owned_by = ROOT
					}
					silesia_area = {
						type = all
						NOT = {
							local_autonomy = 10
						}
					}
				}
				custom_tooltip = boh_silesia_conquer_tt_yes
				tooltip = {
					silesia_area = {
						add_base_tax = 1
					}
					silesia_area = {
						add_nationalism = -10
					}
				}
			}
			else = {
				custom_tooltip = boh_silesia_conquer_tt_no
				tooltip = {
					silesia_area = {
						add_base_tax = 1
					}
					silesia_area = {
						add_nationalism = -10
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						NOT = {
							exists = GLG
						}
						NOT = {
							exists = OPL
						}
						silesia_area = {
							type = all
							owned_by = ROOT
						}
						silesia_area = {
							type = all
							NOT = {
								local_autonomy = 10
							}
						}
					}
					silesia_area = {
						add_base_tax = 1
					}
					silesia_area = {
						add_nationalism = -10
					}
				}
				else_if = {
					limit = {
						if = {
							limit = {
								GLG = {
									has_opinion = {
										who = ROOT
										value = 200
									}
									NOT = {
										liberty_desire = 1
									}
								}
								OPL = {
									has_opinion = {
										who = ROOT
										value = 200
									}
									NOT = {
										liberty_desire = 1
									}
								}
								NOT = {
									exists = SIL
								}
							}
						}
					}
					if = {
						limit = {
							GLG = {
								ai = yes
							}
						}
						OPL = {
							inherit = GLG
							change_tag = SIL
						}
						create_subject = {
							subject_type = incorporated_vassal
							subject = SIL
							keep_liberty_desire = yes
						}
						SIL = {
							set_country_flag = free_incorporated_vassal
							custom_tooltip = WoC_free_integrated_vassal_str
						}
					}
					else_if = {
						limit = {
							OPL = {
								ai = yes
							}
						}
						GLG = {
							inherit = OPL
							change_tag = SIL
						}
						create_subject = {
							subject_type = incorporated_vassal
							subject = SIL
							keep_liberty_desire = yes
						}
						SIL = {
							set_country_flag = free_incorporated_vassal
							custom_tooltip = WoC_free_integrated_vassal_str
						}
					}
				}
			}
		}
	
		ai_weight = {
			factor = 500
		}
	}
	
	boh_polish_diplomacy = {
		icon = polish_diplomacy
		required_missions = { boh_consolidate_silesia }
		position = 3
		
		trigger = {
			if = {
				limit = { exists = POL }
				OR = {
					army_size = POL 
					prestige = POL 
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						value = 10
						region = poland_region
					}
				}
			}
			else_if = { 
				limit = { exists = PLC }
				OR = {
					army_size = PLC 
					prestige = PLC  
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						value = 10
						region = poland_region
					}
				}
			}
			else = {
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					value = 12
					region = poland_region
				}
			}
		}
		
		provinces_to_highlight = {
			if = {
				limit = {
					exists = POL
				}
				owned_by = POL
			}
			else_if = {
				limit = {
					exists = PLC
				}
				owned_by = PLC
			}
			else = {
				region = poland_region
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
			}
		}
		
		effect = {
			add_country_modifier = {
				name = "boh_premyslid_heritage_1"
				duration = -1
			}
			if = {
				limit = {
					exists = POL
				}
				if = {
					limit = {
						valid_for_personal_unions_trigger = yes
						exists = POL
						POL = {
							valid_for_personal_unions_trigger = yes
						}
					}
					custom_tooltip = boh_cb_poland_tt_yes
					tooltip = {
						add_casus_belli = {
							type = cb_restore_personal_union
							months = 300
							target = POL
						}
					}
				}
				else = {
					custom_tooltip = boh_cb_poland_tt_no
					tooltip = {
						add_casus_belli = {
							type = cb_restore_personal_union
							months = 300
							target = POL
						}
					}
				}
			}
			else_if = {
				limit = {
					exists = PLC
				}
				if = {
					limit = {
						valid_for_personal_unions_trigger = yes
						exists = PLC
						PLC = {
							valid_for_personal_unions_trigger = yes
						}
					}
					custom_tooltip = boh_cb_plc_tt_yes
					tooltip = {
						add_casus_belli = {
							type = cb_restore_personal_union
							months = 300
							target = PLC
						}
					}
				}
				else = {
					custom_tooltip = boh_cb_plc_tt_no
					tooltip = {
						add_casus_belli = {
							type = cb_restore_personal_union
							months = 300
							target = PLC
						}
					}
				}
			}
			if = {
				limit = {
					NOT = {
						OR = {
							exists = POL
							exists = PLC
						}
					}
				}
				custom_tooltip = boh_neither_pol_nor_plc_tt_yes
				tooltip = {
					poland_region = {
						limit = {
							NOT = { is_permanent_claim = ROOT }
							NOT = { is_core = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
			else = {
				custom_tooltip = boh_neither_pol_nor_plc_tt_no
				tooltip = {
					poland_region = {
						limit = {
							NOT = { is_permanent_claim = ROOT }
							NOT = { is_core = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						valid_for_personal_unions_trigger = yes
						exists = PLC
						PLC = {
							valid_for_personal_unions_trigger = yes
						}
					}
					add_casus_belli = {
						type = cb_restore_personal_union
						months = 300
						target = PLC
					}
				}
				else_if = {
					limit = {
						valid_for_personal_unions_trigger = yes
						exists = POL
						POL = {
							valid_for_personal_unions_trigger = yes
						}
					}
					add_casus_belli = {
						type = cb_restore_personal_union
						months = 300
						target = POL
					}
				}
				else = {
					poland_region = {
						limit = {
							NOT = { is_permanent_claim = ROOT }
							NOT = { is_core = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
		}
		
		ai_weight = {
			factor = 500
		}
	}
	
	boh_premyslid_heritage = {
		icon = mission_premyslid_heritage
		required_missions = { boh_polish_diplomacy }
		position = 4
		
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 20
				region = poland_region
			}
		}
		
		provinces_to_highlight = {
			region = poland_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		
		effect = {
			custom_tooltip = boh_upgrade_premyslid_heritage_tt
			east_prussia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			west_prussia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					OR = {
						POL = {
							is_subject_of = ROOT
						}
						PLC = {
							is_subject_of = ROOT
						}
					}
				}
				custom_tooltip = boh_pol_subject_tt_yes
			}
			else = {
				custom_tooltip = boh_pol_subject_tt_no
			}
			hidden_effect = {
				if = {
					limit = {
						has_country_modifier = boh_premyslid_heritage_1
					}
					remove_country_modifier = boh_premyslid_heritage_1
					add_country_modifier = {
						name = "boh_premyslid_heritage_2"
						duration = -1
					}
				}
				if = {
					limit = {
						OR = {
							POL = {
								is_subject_of = ROOT
							}
							PLC = {
								is_subject_of = ROOT
							}
						}
					}
					if = {
						limit = {
							POL = {
								is_subject_of = ROOT
							}
						}
						POL = {
							add_historical_friend = ROOT
						}
						ROOT = {
							add_historical_friend = POL
						}
					}
					else_if = {
						limit = {
							PLC = {
								is_subject_of = ROOT
							}
						}
						PLC = {
							add_historical_friend = ROOT
						}
						ROOT = {
							add_historical_friend = PLC
						}
					}
				}
			}
		}
	}
	
	boh_pomerelian_reconquest = {
		icon = mission_king_of_eastern_europe
		required_missions = { boh_premyslid_heritage }
		position = 5
		
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 6
				OR = {
					area = east_prussia_area
					area = west_prussia_area
				}
			}
		}
		
		provinces_to_highlight = {
			OR = {
				area = east_prussia_area
				area = west_prussia_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		
		effect = {
			set_country_flag = boh_can_release_prussia
			add_army_tradition_or_mil_power = { amount = 20 }
			custom_tooltip = boh_release_prussia_vassal_tt
		}
	}
	
	boh_restore_kralovec = {
		icon = develop_konigsberg
		required_missions = { boh_pomerelian_reconquest }
		position = 6
		
		trigger = {
			41 = {
				country_or_non_sovereign_subject_holds = ROOT 
			}
			41 = {
				development = 25
			}
			41 = {
				religion = ROOT
			}
			41 = {
				NOT = {
					num_free_building_slots = 1
				}
			}
			custom_trigger_tooltip = {
				tooltip = boh_baltic_dev_tt
				NOT = {
					any_province = {
						has_port = yes
						sea_zone = {
							area = baltic_area
						}
						higher_development_than = 41
					}
				}
			}
		}
		
		provinces_to_highlight = {
			OR = {
				province_id = 41
				AND = {
					has_port = yes
					sea_zone = {
						area = baltic_area
					}
					higher_development_than = 41
				}
			}
		}
		
		effect = {
			41 = {
				add_base_production = 3
			}
			41 = {
				add_province_modifier = {
					name = "boh_pearl_of_the_baltics"
					duration = -1
				}
			}
			41 = {
				add_trade_modifier = {
					who = ROOT
					duration = -1
					power = 50
					key = BOH_AMBER_ROAD
				}
			}
		}
	}
	
	boh_control_the_electors = {
		icon = influence_the_princes
		required_missions = { }
		position = 7
		
		trigger = {
			if = {
				limit = {
					hre_size = 1
				}
				calc_true_if = {
					all_elector = {
						preferred_emperor = ROOT
					}
					amount = 4
				}
			}
			else = {
				num_of_allies = 3
			}
		}
		
		provinces_to_highlight = {
			owner = {
				is_elector = yes
				NOT = {
					preferred_emperor = ROOT
				}
			}
		}
		
		effect = {
			add_country_modifier = {
				name = "gen_hre_diplomacy_mod"
				duration = 5475
			}
			if = {
				limit = {
					has_dlc = "The Cossacks"
				}
				custom_tooltip = boh_trust_electors_tt
				hidden_effect = {
					every_elector = {
						limit = {
							preferred_emperor = ROOT
						}
						add_trust = {
							who = ROOT
							value = 10
							mutual = yes
						}
					}
				}
			}
			else = {
				define_advisor = {
					type = statesman
					skill = 2
					culture = ROOT
					religion = ROOT
					cost_multiplier = 0.5
				}
			}
		}
	}
	
	boh_karels_claims = {
		icon = mission_karels_heritage
		required_missions = { boh_control_the_electors }
		position = 8
		
		trigger = {
			if = {
				limit = {
					hre_size = 1
				}
				is_emperor = yes
			}
			else = {
				government_rank = 3
			}
		}
		
		effect = {
			custom_tooltip = boh_dip_for_reform_votes_tt
			add_country_modifier = {
				name = "boh_luxembourg_legacy"
				duration = 7300
			}
			94 = {
				if = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
			custom_tooltip = boh_perma_claim_hre_provinces_tt
			hidden_effect = {
				every_country = {
					limit = {
						is_part_of_hre = yes 
					}
					ROOT = {
						add_dip_power = 1
					}
				}
				every_province = {
					limit = {
						is_part_of_hre = yes
						owner = {
							NOT = {
								is_part_of_hre = yes
							}
						}
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	boh_reformatio_sigismundi = {
		icon = reformatio_sigismundi
		required_missions = { boh_karels_claims }
		position = 9
		
		trigger = {
			if = {
				limit = {
					hre_size = 1
				}
				is_emperor = yes
				if = {
					limit = {
						has_dlc = "Emperor"
					}
					hre_reform_passed = emperor_perpetual_diet
				}
				else = {
					hre_reform_passed = gemeinerpfennig
				}
			}
			else = {
				reform_level = 7
			}
		}
		
		effect = {
			country_event = { id = flavor_boh.17 }
			custom_tooltip = boh_reformatio_sigismundi_insight_tt
		}
	}
	
	boh_peace_in_europe = {
		icon = peace_in_europe
		required_missions = { boh_reformatio_sigismundi }
		position = 10
		
		provinces_to_highlight = {
			NOT = {
				owned_by = ROOT
			}
			owner = {
				capital_scope = {
					continent = europe
				}
				OR = {
					army_size = ROOT
					total_development = ROOT
				}
			}
		}
		
		trigger = {
			is_at_war = no
			if = {
				limit = {
					hre_size = 1
				}
				calc_true_if = {
					all_province = {
						is_part_of_hre = yes
					}
					amount = 300
				}
				is_emperor = yes
			}
			else = {
				total_development = 2000
			}
			custom_trigger_tooltip = {
				tooltip = boh_biggest_eu_army
				NOT = {
					any_country = {
						capital_scope = {
							continent = europe
						}
						army_size = ROOT
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = boh_biggest_eu_dev
				NOT = {
					any_country = {
						capital_scope = {
							continent = europe
						}
						total_development = ROOT
					}
				}
			}
		}
		
		effect = {
			add_absolutism = 10
			add_revolutionary_zeal = 10
			add_country_modifier = {
				name = "boh_peace_in_europe"
				duration = -1
			}
			if = {
				limit = {
					NOT = {
						any_country = {
							army_size = ROOT
						}
					}
					NOT = {
						any_country = {
							total_development = ROOT
						}
					}
				}
				custom_tooltip = boh_global_hegemon_tt_yes
				tooltip = {
					if = {
						limit = {
							OR = {
								has_dlc = "Res Publica"
								has_dlc = "Common Sense"
							}
						}
						add_country_modifier = {
							name = "boh_hegemon"
							desc = "boh_until_lose_war"
							duration = -1
						}
					}
					else = {
						add_country_modifier = {
							name = "boh_hegemon_dlcless"
							duration = -1
						}
					}
				}
			}
			else = {
				custom_tooltip = boh_global_hegemon_tt_no
				tooltip = {
					if = {
						limit = {
							OR = {
								has_dlc = "Res Publica"
								has_dlc = "Common Sense"
							}
						}
						add_country_modifier = {
							name = "boh_hegemon"
							desc = "boh_until_lose_war"
							duration = -1
						}
					}
					else = {
						add_country_modifier = {
							name = "boh_hegemon_dlcless"
							duration = -1
						}
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						NOT = {
							any_country = {
								army_size = ROOT
							}
						}
						NOT = {
							any_country = {
								total_development = ROOT
							}
						}
					}
					if = {
						limit = {
							OR = {
								has_dlc = "Res Publica"
								has_dlc = "Common Sense"
							}
						}
						add_country_modifier = {
							name = "boh_hegemon"
							duration = -1
						}
					}
					else = {
						add_country_modifier = {
							name = "boh_hegemon_dlcless"
							duration = -1
						}
					}
				}
			}
		}
	}
	
}