country_decisions = {

	the_greatest_chin = {
		major = yes
		potential = {
			tag = HAB #Habsburgs
			dynasty = "von Habsburg"
			NOT = { exists = QIN }
			normal_or_historical_nations = yes
			NOT = { has_country_flag = formed_chin_flag }
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			NOT = { exists = YUA }
			NOT = { tag = MUG }
			NOT = { tag = QNG }
			NOT = { tag = MNG }
			NOT = { tag = MCH }
			OR = {
				ai = no
				AND = {
					ai = yes
					num_of_cities = 8
				}
			}
			is_colonial_nation = no
			OR = {
				is_former_colonial_nation = no
				AND = {
					is_former_colonial_nation = yes
					ai = no
				}
			}
			OR = {
				owns = 1816
				is_emperor_of_china = yes
			}
		}
		provinces_to_highlight = {
			OR = {
				province_id = 2180 #Tianshui
				province_id = 700 #Xianyang
				province_id = 1816 #Beijing
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { is_core = ROOT }
			}
		}
		allow = {
			is_free_or_tributary_trigger = yes
			is_at_war = no
			stability = 3
			owns_core_province = 1816 #Beijing, well, yeah.
			owns_core_province = 2180 #Tianshui, ancient capital of Qin 
			owns_core_province = 700 #Xianyang
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				is_emperor_of_china = yes
				else = {
					government_rank = 3
				}
			}
		}
		effect = {
			1816 = {
				add_base_tax = 1
				add_base_production = 1
				add_base_manpower = 1
				change_province_name = Qinjing
				rename_capital = Qinjing
				move_capital_effect = yes
			}
			change_tag = QIN
			#remove_non_electors_emperors_from_empire_effect = yes
			china_superregion = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = QIN
			}
			add_prestige = 20
			set_country_flag = formed_chin_flag
			# if = {
				# limit = { has_custom_ideas = no }
				# country_event = { id = ideagroups.1 } #Swap Ideas
			# }
		}
		ai_will_do = {
			factor = 1
		}
		ai_importance = 400
	}

	bt_winds_from_beyond_the_pale = {
		major = yes
		potential = {
			normal_or_historical_nations = yes
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			NOT = { has_global_flag = bt_storms_a_brewin }
			NOT = { has_global_flag = bt_april_storms_passed }
			started_in = 1444.1.1
		}
		allow = {
			NOT = { is_year = 1445 }
		}
		effect = {
			set_global_flag = bt_storms_a_brewin
			#set_global_flag = bt_april_storms_passed
			country_event = { id = winds_from_btp.1 }
		}
	}
}