﻿### search_filters = {FOCUS_FILTER_POLITICAL}
### search_filters = {FOCUS_FILTER_RESEARCH}
### search_filters = {FOCUS_FILTER_INDUSTRY}
### search_filters = {FOCUS_FILTER_STABILITY}
### search_filters = {FOCUS_FILTER_WAR_SUPPORT}
### search_filters = {FOCUS_FILTER_MANPOWER}
### search_filters = {FOCUS_FILTER_ANNEXATION}
### search_filters = {FOCUS_FILTER_INTERNAL_AFFAIRS}
### search_filters = {FOCUS_FILTER_ARMY_XP}
### search_filters = {FOCUS_FILTER_NAVY_XP}
### search_filters = {FOCUS_FILTER_AIR_XP}
### search_filters = {FOCUS_FILTER_BALANCE_OF_POWER}
### search_filters = {FOCUS_FILTER_POLITICAL_CHARACTER}
### search_filters = {FOCUS_FILTER_MILITARY_CHARACTER}
### search_filters = {FOCUS_FILTER_INTERNATIONAL_TRADE}
### search_filters = {FOCUS_FILTER_HISTORICAL}

focus_tree = {
	id = china_nationalist_warlord_focus
	
	country = {
		factor = 0
		modifier = {
			add = 15
			tag = RNG
			has_dlc = "No Compromise, No Surrender"
		}
	}
	

	default = no

	continuous_focus_position = { x = 20 y = 1200 }

#	focus = {
#		id = CHI_
#		icon = GFX_
#		prerequisite = { focus = }
#		mutually_exclusive = { focus =  }
#		x = -3
#		y = 0
#		relative_position_id = 
#
#		cost = 10
#
#		ai_will_do = {
#			factor = 1
#		}
#
#		available = {
#
#		}
#		
#		bypass = {
#
#		}
#
#		cancel_if_invalid = yes
#		continue_if_invalid = no
#		available_if_capitulated = no
#
#		complete_tooltip = {
#
#		}
#
#		completion_reward = {
#
#		}
#	}

	shared_focus = CHI_sea_invite_foreign_investors

	focus = {
		id = CHI_tsr_repoen_the_natioal_assembly
		icon = GFX_focus_CHI_lay_the_foundation_for_a_united_china
		x = 10
		y = 0

		mutually_exclusive = {
			focus = CHI_tsr_form_a_preparatory_committee
		}

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
			OR = {
				is_ai = no
				date > 1936.1.1
			}
		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {
			add_political_power = 100
		}

	}

	focus = {
		id = CHI_sea_three_principles_of_the_people
		icon = GFX_focus_CHI_unify_as_the_china_democratic_league
		
		prerequisite = { focus = CHI_tsr_repoen_the_natioal_assembly }
		x = 0
		y = 1
		relative_position_id = CHI_tsr_repoen_the_natioal_assembly

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
		
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			add_stability = 0.05
		}
	}

	focus = {
		id = CHI_sea_welfare
		icon = GFX_focus_generic_welfare
		prerequisite = { focus = CHI_sea_three_principles_of_the_people }
		x = -4
		y = 1
		relative_position_id = CHI_sea_three_principles_of_the_people

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {

			add_war_support = 0.1

			custom_effect_tooltip = generic_skip_one_line_tt

			CHI_hyper_inflation_level_up = yes

		}
	}

	focus = {
		id = CHI_sea_refugee_relief_agency
		icon = GFX_focus_generic_self_management
		prerequisite = { focus = CHI_sea_welfare }
		x = -1
		y = 1
		relative_position_id = CHI_sea_welfare

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		completion_reward = {
			add_war_support = 0.1
			custom_effect_tooltip = generic_skip_one_line_tt
			CHI_hyper_inflation_level_up = yes
		}
	}

	focus = {
		id = CHI_sea_land_tax_reform
		icon = GFX_focus_generic_land_redistribution
		prerequisite = { focus = CHI_sea_welfare }
		x = 1
		y = 1
		relative_position_id = CHI_sea_welfare

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			has_hyper_inflation = yes
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_CHI_INFLATION }
		completion_reward = {
			CHI_hyper_inflation_level_down = yes 
		}
	}

	focus = {
		id = CHI_sea_new_life_movement
		icon = GFX_focus_CHI_enforce_virtues
		prerequisite = { focus = CHI_sea_refugee_relief_agency }
		x = -1
		y = 3
		relative_position_id = CHI_sea_welfare

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			add_stability = 0.1
		}
	}

	focus = {
		id = CHI_sea_unemployment_assistance
		icon = GFX_goal_generic_production
		prerequisite = { focus = CHI_sea_land_tax_reform }
		x = 1
		y = 3
		relative_position_id = CHI_sea_welfare

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		completion_reward = {			
			add_war_support = 0.1
			custom_effect_tooltip = generic_skip_one_line_tt
			CHI_hyper_inflation_level_up = yes
		}
	}

	focus = {
		id = CHI_sea_free_hospitals
		icon = GFX_goal_generic_improve_relations
		prerequisite = { focus = CHI_sea_new_life_movement }
		prerequisite = { focus = CHI_sea_unemployment_assistance }
		x = 0
		y = 4
		relative_position_id = CHI_sea_welfare

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		completion_reward = {
			add_war_support = 0.1
			custom_effect_tooltip = generic_skip_one_line_tt
			CHI_hyper_inflation_level_up = yes
		}
	}

	focus = {
		id = CHI_sea_rural_schooling
		icon = GFX_focus_CHI_students_to_the_countryside
		prerequisite = { focus = CHI_sea_free_hospitals }
		x = 0
		y = 5
		relative_position_id = CHI_sea_welfare

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			amount_research_slots < 5
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			add_research_slot = 1
			custom_effect_tooltip = generic_skip_one_line_tt
			CHI_hyper_inflation_level_up = yes
		}
	}

	focus = {
		id = CHI_sea_democracy
		icon = GFX_goal_support_democracy
		prerequisite = { focus = CHI_sea_three_principles_of_the_people }
		x = 0
		y = 1
		relative_position_id = CHI_sea_three_principles_of_the_people

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		completion_reward = {
			add_political_power = 120
		}
	}

	focus = {
		id = CHI_sea_constitutional_reform
		icon = GFX_goal_generic_forceful_treaty
		prerequisite = { focus = CHI_sea_democracy }
		x = -1
		y = 1
		relative_position_id = CHI_sea_democracy

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		completion_reward = {
			add_war_support = 0.1
		}
	}

	focus = {
		id = CHI_sea_republicanism
		icon = GFX_goal_generic_propaganda
		prerequisite = { focus = CHI_sea_constitutional_reform }
		x = -1
		y = 1
		relative_position_id = CHI_sea_constitutional_reform

		cost = 5

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no


		completion_reward = {
			every_country = {
				limit = {
					is_major = yes
					has_government = democratic
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = CHI_republicanism
				}
			}
		}
	}

	focus = {
		id = CHI_sea_inter_party_coordination_council
		icon = GFX_goal_generic_major_alliance
		prerequisite = { focus = CHI_sea_constitutional_reform }
		prerequisite = { focus = CHI_sea_executive_yuan }
		x = 1
		y = 1
		relative_position_id = CHI_sea_constitutional_reform

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			add_ideas = CHI_inter_party_coordination_council
		}
	}

	focus = {
		id = CHI_sea_judicial_yuan
		icon = GFX_goal_generic_defence
		prerequisite = { focus = CHI_sea_republicanism }
		prerequisite = { focus = CHI_sea_inter_party_coordination_council }
		x = 1
		y = 1
		relative_position_id = CHI_sea_republicanism

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			add_stability = 0.1
		}
	}

	focus = {
		id = CHI_sea_control_yuan
		icon = GFX_focus_AUS_lawmaking_leniency
		prerequisite = { focus = CHI_sea_judicial_yuan }
		prerequisite = { focus = CHI_sea_legislative_yuan }
		x = 1
		y = 1
		relative_position_id = CHI_sea_judicial_yuan

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			add_stability = 0.1
		}
	}

	focus = {
		id = CHI_sea_examination_yuan
		icon = GFX_focus_chi_examination_yuan
		prerequisite = { focus = CHI_sea_control_yuan }
		x = 0
		y = 1
		relative_position_id = CHI_sea_control_yuan

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_MANPOWER }
		completion_reward = {
			IF = {
				limit = {
					NOT = {
						OR = {
							has_idea = CHI_ineffective_bureaucracy
							has_idea = CHI_ineffective_bureaucracy_warlord
						}
					}
				}
				add_political_power = 150
				add_stability = 0.05 
				add_popularity = {
					ideology = democratic
					popularity = 0.05
				}
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy
				}
				remove_ideas = CHI_ineffective_bureaucracy
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy_warlord
				}
				remove_ideas = CHI_ineffective_bureaucracy_warlord
			}
		}
	}

	focus = {
		id = CHI_sea_executive_yuan
		icon = GFX_goal_generic_demand_territory
		prerequisite = { focus = CHI_sea_democracy }
		x = 1
		y = 1
		relative_position_id = CHI_sea_democracy

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_POLITICAL }
		completion_reward = {
			add_ideas = CHI_executive_yuan
		}
	}

	focus = {
		id = CHI_sea_legislative_yuan
		icon = GFX_focus_chi_legislative_yuan
		prerequisite = { focus = CHI_sea_executive_yuan }
		prerequisite = { focus = CHI_sea_inter_party_coordination_council }
		x = 0
		y = 2
		relative_position_id = CHI_sea_executive_yuan

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {

			swap_ideas = {
				remove_idea = CHI_executive_yuan
				add_idea = CHI_legislative_yuan
			}

			IF = {
				limit = {
					NOT = { has_character = CHI_kwong_jiang }
					CHI = {
						exists = no
						has_character = CHI_kwong_jiang
					}
				}
				CHI = {
					CHI_kwong_jiang = {
						set_nationality = ROOT
					}
				}
				custom_effect_tooltip = available_political_advisor
				CHI = { show_ideas_tooltip = CHI_kwong_jiang }
			}
			
		}
	}

	focus = {
		id = CHI_sea_nationalism
		icon = GFX_focus_generic_china1
		prerequisite = { focus = CHI_sea_three_principles_of_the_people }
		x = 4
		y = 1
		relative_position_id = CHI_sea_three_principles_of_the_people

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			add_stability = 0.1
		}
	}

	#focus = {
	#	id = CHI_sea_foreign_threats
	#	icon = GFX_goal_generic_territory_or_war
	#	prerequisite = { focus = CHI_sea_nationalism }
	#	mutually_exclusive = { focus = CHI_sea_prioritize_the_interior }
	#	x = -1
	#	y = 1
	#	relative_position_id = CHI_sea_nationalism
#
	#	cost = 10
#
	#	ai_will_do = {
	#		factor = 4
	#	}
#
	#	available = {
#
	#	}
#
	#	bypass = {
#
	#	}
#
	#	cancel_if_invalid = yes
	#	continue_if_invalid = no
	#	available_if_capitulated = no
#
	#	search_filters = { FOCUS_FILTER_WAR_SUPPORT }
	#	completion_reward = {
	#		add_war_support = 0.1
	#	}
	#}

	focus = {
		id = CHI_sea_prioritize_the_interior
		icon = GFX_focus_CHI_dang_guo
		prerequisite = { focus = CHI_sea_nationalism }
		#mutually_exclusive = { focus = CHI_sea_foreign_threats }
		x = 0
		y = 1
		relative_position_id = CHI_sea_nationalism

		cost = 10

		ai_will_do = {
			factor = 1
			modifier = {
				AND = {
					MAN = {	exists = no }
					PRC = { exists = no }
				}
				factor = 0
			}
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			add_stability = 0.05
		}
	}

	#focus = {
	#	id = CHI_sea_united_front
	#	icon = GFX_focus_chi_united_front
	#	prerequisite = { focus = CHI_sea_foreign_threats }
	#	x = 0
	#	y = 1
	#	relative_position_id = CHI_sea_foreign_threats
#
	#	cost = 10
#
	#	ai_will_do = {
	#		factor = 1
	#	}
#
	#	available = {
	#		is_subject = no
	#		is_in_faction = no
	#	}
#
	#	bypass = {
	#		is_in_faction_with = PRC
	#	}
#
	#	cancel_if_invalid = yes
	#	continue_if_invalid = no
	#	available_if_capitulated = no
#
	#	complete_tooltip = {
#
	#	}
#
	#	completion_reward = {
	#		ROOT = {
	#			set_rule = { can_create_factions = yes }
	#			create_faction = chinese_united_front
	#		}
	#		PRC = {
	#			country_event = generic.5
	#		}
	#	}
	#}

	focus = {
		id = CHI_sea_anti_communism
		icon = GFX_goal_generic_war_with_comintern
		prerequisite = { focus = CHI_sea_prioritize_the_interior }
		x = 0
		y = 1
		relative_position_id = CHI_sea_prioritize_the_interior

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
			NOT = { has_government = communism }
			any_country = {
				OR = {
					tag = YUN
					tag = SIK
					tag = GXC
					tag = SHX
					tag = XSM
					tag = TIB
					tag = PRC
					tag = SND
					tag = GDC
					tag = SIC
					tag = XIC
					tag = NXM
					tag = GSM
					tag = KHM
					tag = HBC
				}
				has_government = communism
			}
		}

		bypass = {
			OR = {
				is_in_faction_with = PRC
				NOT = { 
					any_country = {
						OR = {
							tag = YUN
							tag = SIK
							tag = GXC
							tag = SHX
							tag = XSM
							tag = TIB
							tag = PRC
							tag = SND
							tag = GDC
							tag = SIC
							tag = XIC
							tag = NXM
							tag = GSM
							tag = KHM
							tag = HBC
						}
						has_government = communism
					}
				}
			}
		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		completion_reward = {
			if = {		
				limit = {
					SIK = {
						has_government = communism
					}
				}
				create_wargoal = {
					type = annex_everything
					target = SIK
					expire = 0
				}
			}
			if = {		
				limit = {
					TIB = {
						has_government = communism
					}
				}
				create_wargoal = {
					type = annex_everything
					target = TIB
					expire = 0
				}
			}
			if = {
				limit = {
					PRC = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = PRC
						expire = 0
					}
				}
			}
			if = {
				limit = {
					YUN = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = YUN
						expire = 0
					}
				}
			}
			if = {
				limit = {
					SHX = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = SHX
						expire = 0
					}
				}
			}
			if = {
				limit = {
					HBC = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = HBC
						expire = 0
					}
				}
			}
			if = {
				limit = {
					GXC = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = GXC
						expire = 0
					}
				}
			}
			if = {
				limit = {
					XSM = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = XSM
						expire = 0
					}
				}
			}
			if = {
				limit = {
					SND = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = SND
						expire = 0
					}
				}
			}
			if = {
				limit = {
					GDC = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = GDC
						expire = 0
					}
				}
			}
			if = {
				limit = {
					SIC = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = SIC
						expire = 0
					}
				}
			}
			if = {
				limit = {
					XIC = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = XIC
						expire = 0
					}
				}
			}
			if = {
				limit = {
					NXM = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = NXM
						expire = 0
					}
				}
			}
			if = {
				limit = {
					GSM = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = GSM
						expire = 0
					}
				}
			}
			if = {
				limit = {
					KHM = {
						has_government = communism
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = KHM
						expire = 0
					}
				}
			}
		}
	}

	focus = {
		id = CHI_sea_pick_a_fight_with_japan
		icon = GFX_focus_AST_war_japan
		prerequisite = { focus = CHI_sea_anti_communism }
		x = 0
		y = 1
		relative_position_id = CHI_sea_anti_communism

		cost = 10

		ai_will_do = {
			factor = 1
			modifier = {
				JAP = {
					has_government = democratic
				}
				factor = 0
			}
		}

		available = {
			NOT = { is_in_faction_with = JAP }
			JAP = {
				exists = yes
			}
			is_subject = no
		}

		bypass = {
			OR = {
				has_war_with = JAP
				has_war_with = MAN
				JAP = {
					exists = no
				}
			}
		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		completion_reward = {
			if = {
				limit = {
					MAN = {
						OR = {
							is_in_faction_with = JAP
							is_puppet_of = JAP
						}
					}
				}
				create_wargoal = {
					type = annex_everything
					target = MAN
					expire = 0
				}
				else = {
					create_wargoal = {
						type = annex_everything
						target = JAP
						expire = 0
					}	
				}
			}
			hidden_effect = {
				news_event = { id = wtt_news.35 days = 1}
			}
		}
	}

	focus = {
		id = CHI_sea_subjugate_the_warlords
		icon = GFX_goal_generic_political_pressure
		prerequisite = { focus = CHI_sea_prioritize_the_interior }
		x = 2
		y = 2
		relative_position_id = CHI_sea_prioritize_the_interior

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			is_subject = no
		}

		bypass = {
			GXC = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			HBC = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			GDC = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			SND = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			SIC = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			XIC = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			NXM = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			GSM = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			KHM = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			YUN = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			SHX = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			XSM = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
			SIK = {
				OR = {
					exists = no
					is_subject_of = ROOT
					has_war_with = ROOT
				}
			}
		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_ANNEXATION }
		completion_reward = {
			every_other_country = {
				limit = {
					OR = {
						tag = GXC
						tag = YUN
						tag = SHX
						tag = XSM
						tag = SIK
						tag = GDC
						tag = SND
						tag = SIC
						tag = XIC
						tag = NXM
						tag = GSM
						tag = KHM
						tag = HBC
					}
				}
				country_event = { id = wtt_china.1 }
			}
			unlock_decision_category_tooltip = CHI_integrate_the_warlords
		}
	}

	focus = {
		id = CHI_sea_war_of_resistance
		icon = GFX_focus_CHI_demonstrate_our_resolve
		prerequisite = { focus = CHI_sea_pick_a_fight_with_japan }
		x = 0
		y = 1
		relative_position_id = CHI_sea_pick_a_fight_with_japan

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			NOT = {
				has_idea = CHI_army_corruption_1
			}		
		}

		bypass = {
			has_offensive_war_with = JAP
		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			add_ideas = CHI_war_of_resistance
		}
	}

	focus = {
		id = CHI_sea_industrial_evacuations
		icon = GFX_goal_generic_construct_infrastructure
		prerequisite = { focus = CHI_sea_war_of_resistance }
		x = -2
		y = 1
		relative_position_id = CHI_sea_war_of_resistance

		cost = 5

		ai_will_do = {
			factor = 1
		}

		available = {
			has_war = yes
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			unlock_decision_category_tooltip = CHI_industrial_evacuations			
			set_variable = { var = CHI_industrial_evacuations_amount_factor value = 0.75 } #Ratio for how many building are moved. Change CHI_industrial_evacuations_add_AF and CHI_industrial_evacuations_add_IC if you change the value
		}
	}

	focus = {
		id = CHI_sea_war_of_national_liberation
		icon = GFX_focus_CHI_victory_over_the_invaders
		prerequisite = { focus = CHI_sea_war_of_resistance }
		x = 0
		y = 1
		relative_position_id = CHI_sea_war_of_resistance

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			NOT = {
				has_idea = CHI_army_corruption_2
			}
			has_defensive_war = yes
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			if = {
				limit = {
					has_idea = CHI_war_of_resistance
				}
				swap_ideas = {
					remove_idea = CHI_war_of_resistance
					add_idea = CHI_war_of_resistance_2
				}
				else = {
					add_ideas = CHI_war_of_national_liberation
				}
			}
		}
	}

	focus = {
		id = CHI_sea_scorched_earth_tactics
		icon = GFX_focus_generic_strike_at_democracy1
		prerequisite = { focus = CHI_sea_war_of_resistance }
		x = 2
		y = 1
		relative_position_id = CHI_sea_war_of_resistance

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			has_war = yes
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			unlock_decision_tooltip = CHI_scorched_earth_tactics
		}
	}

	focus = {
		id = CHI_sea_war_of_anti_imperialism
		icon = GFX_focus_CHI_clear_out_sycophants
		prerequisite = { focus = CHI_sea_war_of_national_liberation }
		x = 0
		y = 1
		relative_position_id = CHI_sea_war_of_national_liberation

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			OR = {
				has_war_with = JAP
				has_war_with = MAN
			}
			has_country_flag = CHI_lessons_of_war_completed
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			add_ideas = CHI_war_of_anti_imperialism
		}
	}

	focus = {
		id = CHI_sea_forced_conscription
		icon = GFX_focus_CHI_baojia_system
		prerequisite = { focus = CHI_sea_scorched_earth_tactics }
		x = 0
		y = 1
		relative_position_id = CHI_sea_scorched_earth_tactics

		cost = 10

		ai_will_do = {
			factor = 4
			modifier = {
				has_manpower > 1000000
				factor = 0
			}
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_MANPOWER }
		completion_reward = {
			add_ideas = CHI_forced_conscription
		}
	}

	focus = {
		id = CHI_sea_dare_to_die_corps
		icon = GFX_focus_generic_total_war
		prerequisite = { focus = CHI_sea_forced_conscription }
		x = 0
		y = 2
		relative_position_id = CHI_sea_scorched_earth_tactics

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			custom_effect_tooltip = CHI_50_cheaper_force_attack
		}
	}


	### THE EMPIRE 

	focus = {
		id = CHI_tsr_form_a_preparatory_committee
		icon = GFX_focus_generic_self_management
		x = 11
		y = 0

		relative_position_id = CHI_tsr_repoen_the_natioal_assembly

		mutually_exclusive = {
			focus = CHI_tsr_repoen_the_natioal_assembly
		}

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {

			add_political_power = 50

			custom_effect_tooltip = generic_skip_one_line_tt
			
			add_popularity = {
				ideology = neutrality
				popularity = 0.05
			}	
			add_popularity = {
				ideology = fascism
				popularity = 0.05
			}	

		}

	}

	focus = {
		id = CHI_tsr_legacy_of_the_hongxian_emperor
		icon = GFX_focus_generic_monarchist_sentiment
		x = -2
		y = 1

		relative_position_id = CHI_tsr_form_a_preparatory_committee

		prerequisite = { focus = CHI_tsr_form_a_preparatory_committee }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_RESEARCH }

		completion_reward = {
			
			add_ideas = CHI_tsr_a_new_empire_idea 

		}

	}

	focus = {
		id = CHI_tsr_coronation_at_the_temple_of_heaven
		icon = GFX_focus_CHI_a_new_middle_kingdom
		x = 0
		y = 1

		relative_position_id = CHI_tsr_form_a_preparatory_committee

		prerequisite = { focus = CHI_tsr_form_a_preparatory_committee }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
			608 = {
				is_controlled_by = ROOT
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY }

		completion_reward = {
			
			add_country_leader_trait = CHI_tsr_son_of_heaven

		}

	}

	focus = {
		id = CHI_tsr_outlaw_the_kmt_and_cpc
		icon = GFX_focus_generic_treaty
		x = 2
		y = 1

		relative_position_id = CHI_tsr_form_a_preparatory_committee

		prerequisite = { focus = CHI_tsr_form_a_preparatory_committee }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {

			add_political_power = 50

			custom_effect_tooltip = generic_skip_one_line_tt
			
			# Left-KMT 
			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@democratic
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = democratic
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}
				set_country_flag = banned_democratic_flag				
			}
			remove_democratic_spirits_effect = yes 
			custom_effect_tooltip = ban_democratic_party_tt
			add_stability = ban_ideology_var

			custom_effect_tooltip = generic_skip_one_line_tt

			# CPC 
			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@communism
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = communism
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}
				set_country_flag = banned_communism_flag
				if = {#NSB -> If country has Trotskyist Revolutionary Uprisings NS, swap it with the weakened version
					limit = {
						has_idea = SOV_trotskyist_revolutionary_agitation
					}
					swap_ideas = {
						remove_idea = SOV_trotskyist_revolutionary_agitation
						add_idea = SOV_trotskyist_revolutionary_agitation_weakened
					}
				}
			}
			remove_communist_spirits_effect = yes
			custom_effect_tooltip = ban_communist_party_tt
			add_stability = ban_ideology_var

		}

	}

	focus = {
		id = CHI_tsr_restoration_of_the_chinese_empire
		icon = GFX_focus_CHI_a_second_empire_of_china
		x = -2
		y = 2

		relative_position_id = CHI_tsr_outlaw_the_kmt_and_cpc

		prerequisite = { focus = CHI_tsr_outlaw_the_kmt_and_cpc }
		prerequisite = { focus = CHI_tsr_coronation_at_the_temple_of_heaven }
		prerequisite = { focus = CHI_tsr_legacy_of_the_hongxian_emperor }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
			608 = {
				is_controlled_by = ROOT
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {
			
			IF = {
				limit = {
					OR = {
						has_government = democratic
						has_government = communism
					}
				}
				set_politics = {
					ruling_party = neutrality
					elections_allowed = no
				}	
				custom_effect_tooltip = generic_skip_one_line_tt
			}

			add_popularity = {
				ideology = neutrality
				popularity = 0.15
			}	

			set_party_name = {
				ideology = neutrality
				long_name = warlord_monarchy_neutrality_party_long
				name = warlord_monarchy_neutrality_party
			}	
			set_party_name = {
				ideology = fascism
				long_name = warlord_monarchy_fascism_party_long
				name = warlord_monarchy_fascism_party
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			set_cosmetic_tag = TSR_empire_of_china

			custom_effect_tooltip = generic_skip_one_line_tt

			add_ideas = CHI_tsr_low_legitimacy

			custom_effect_tooltip = generic_skip_one_line_tt

			set_capital = {
				state = 608
				remember_old_capital = no
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			set_province_name = { id = 9843 name = PRC_beijing_capital_name }
			608 = {
				set_state_name = PRC_beijing_capital_name
			}

		}

	}

	focus = {
		id = CHI_tsr_adopt_the_twelve_symbols
		icon = GFX_goal_generic_political_pressure
		x = -2
		y = 1

		relative_position_id = CHI_tsr_restoration_of_the_chinese_empire

		prerequisite = { focus = CHI_tsr_restoration_of_the_chinese_empire }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER }

		completion_reward = {
			
			swap_ideas = {
				remove_idea = CHI_tsr_a_new_empire_idea
				add_idea = CHI_tsr_a_new_empire_idea_2
			}	

		}

	}

	focus = {
		id = CHI_tsr_reinstate_the_new_imperial_code 
		icon = GFX_focus_generic_monarchy_1
		x = 0
		y = 1

		relative_position_id = CHI_tsr_restoration_of_the_chinese_empire

		prerequisite = { focus = CHI_tsr_restoration_of_the_chinese_empire }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {

			swap_ideas = {
				remove_idea = CHI_tsr_low_legitimacy
				add_idea = CHI_tsr_low_legitimacy_2
			}	
			
		}

	}

	focus = {
		id = CHI_tsr_reestablish_xinhua_palace
		icon = GFX_focus_CHI_an_alternative_rooted_in_tradition
		x = 2
		y = 1

		relative_position_id = CHI_tsr_restoration_of_the_chinese_empire

		prerequisite = { focus = CHI_tsr_restoration_of_the_chinese_empire }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
			608 = {
				is_controlled_by = ROOT
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = {  }

		completion_reward = {

			608 = {
				add_extra_state_shared_building_slots = 5
				IF = {
					limit = {
						infrastructure < 4
					}
					add_building_construction = {
						type = infrastructure
						level = 2
						instant_build = yes
					}	
				}
				ELSE_IF = {
					limit = {
						infrastructure < 5
					}
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}	
				}
			}
			
		}

	}

	focus = {
		id = CHI_tsr_reclaim_the_mandate_of_heaven
		icon = GFX_focus_man_claim_the_mandate_of_heaven
		x = -2
		y = 2

		relative_position_id = CHI_tsr_reestablish_xinhua_palace

		prerequisite = { focus = CHI_tsr_reestablish_xinhua_palace }
		prerequisite = { focus = CHI_tsr_reinstate_the_new_imperial_code }
		prerequisite = { focus = CHI_tsr_adopt_the_twelve_symbols }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
			608 = {
				is_controlled_by = ROOT
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {

			set_rule = { 
				can_create_factions = yes 
			}

			custom_effect_tooltip = generic_skip_one_line_tt
			
			swap_ideas = {
				remove_idea = CHI_tsr_low_legitimacy_2
				add_idea = CHI_tsr_low_legitimacy_3
			}	

		}

	}

	focus = {
		id = CHI_tsr_five_races_under_one_union
		icon = GFX_focus_CHI_restore_the_old_republic
		x = -2
		y = 1

		relative_position_id = CHI_tsr_reclaim_the_mandate_of_heaven

		prerequisite = { focus = CHI_tsr_reclaim_the_mandate_of_heaven }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL FOCUS_FILTER_RESEARCH }

		completion_reward = {
			
			swap_ideas = {
				remove_idea = CHI_tsr_a_new_empire_idea_2
				add_idea = CHI_tsr_a_new_empire_idea_3
			}	

		}

	}

	focus = {
		id = CHI_tsr_zhonghua_minzu
		icon = GFX_focus_CHI_utmost_loyalty
		x = 0
		y = 1

		relative_position_id = CHI_tsr_five_races_under_one_union

		prerequisite = { focus = CHI_tsr_five_races_under_one_union }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {
			
			swap_ideas = {
				remove_idea = CHI_tsr_low_legitimacy_3
				add_idea = CHI_tsr_low_legitimacy_4
			}	

		}

	}

	focus = {
		id = CHI_tsr_reestablish_the_beiyang_army
		icon = GFX_focus_MAN_restore_the_beiyang_army
		x = 2
		y = 1

		relative_position_id = CHI_tsr_reclaim_the_mandate_of_heaven

		prerequisite = { focus = CHI_tsr_reclaim_the_mandate_of_heaven }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_MANPOWER }

		completion_reward = {
			
			add_ideas = MAN_beiyang_army

		}

	}

	focus = {
		id = CHI_tsr_reestablish_the_wuwei_corps 
		icon = GFX_focus_MAN_the_new_fengtian_army
		x = 0
		y = 1

		relative_position_id = CHI_tsr_reestablish_the_beiyang_army

		prerequisite = { focus = CHI_tsr_reestablish_the_beiyang_army }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_MANPOWER }

		completion_reward = {
			
			swap_ideas = {
				remove_idea = MAN_beiyang_army
				add_idea = MAN_beiyang_army_2
			}	

		}

	}

	focus = {
		id = CHI_tsr_never_another_national_protection_war
		icon = GFX_focus_JAP_put_an_end_to_chinese_feudalism

		x = 0
		y = 1

		relative_position_id = CHI_tsr_reclaim_the_mandate_of_heaven

		prerequisite = { focus = CHI_tsr_reclaim_the_mandate_of_heaven }

		cost = 10

		enable_automatic_bypass = no

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = PRC_towards_one_china_bypass_tt
					CHI = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					GXC = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					YUN = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					SHX = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					XSM = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					SIK = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					GDC = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					HBC = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					SND = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					SIC = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					NXM = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					GSM = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					XIC = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					KHM = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					KUM = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
					RNG = {
						OR = {
							exists = no
							has_war_with = ROOT
							is_ally_with = ROOT
							ROOT = { has_wargoal_against = PREV }
						}
					}
				}
			}
		}

		will_lead_to_war_with = CHI
		will_lead_to_war_with = PRC
		will_lead_to_war_with = GXC
		will_lead_to_war_with = YUN
		will_lead_to_war_with = SHX
		will_lead_to_war_with = XSM
		will_lead_to_war_with = SIK
		will_lead_to_war_with = GDC
		will_lead_to_war_with = SND
		will_lead_to_war_with = SIC
		will_lead_to_war_with = NXM
		will_lead_to_war_with = GSM
		will_lead_to_war_with = XIC
		will_lead_to_war_with = KHM
		will_lead_to_war_with = KUM
		will_lead_to_war_with = RNG
		will_lead_to_war_with = HBC

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_ANNEXATION }

		completion_reward = {
			
			hidden_effect = {
				news_event = { id = wtt_news.46 days = 3 }
			}
			custom_effect_tooltip = PRC_towards_one_china_tt
			every_other_country = {
				limit = {
					is_literally_china_tooltip = yes
					NOT = { is_ally_with = ROOT}
					NOT = { has_war_with = ROOT }
					NOT = { ROOT = { has_wargoal_against = PREV } }
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = PREV
						expire = 0
					}
				}
			}

		}

	}

	focus = {
		id = CHI_tsr_tianxia 
		icon = GFX_focus_CHI_cradle_of_civilization
		x = 0
		y = 2

		relative_position_id = CHI_tsr_never_another_national_protection_war

		prerequisite = { focus = CHI_tsr_never_another_national_protection_war }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject = no
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = {  }

		completion_reward = {
			
			swap_ruler_traits = { remove = CHI_tsr_son_of_heaven add = CHI_tsr_the_celestial_emperor }

			custom_effect_tooltip = generic_skip_one_line_tt

			IF = {
				limit = {
					NOT = {
						OR = {
							has_idea = CHI_ineffective_bureaucracy
							has_idea = CHI_ineffective_bureaucracy_warlord
						}
					}
				}
				add_political_power = 150
				add_stability = 0.05 
				add_popularity = {
					ideology = democratic
					popularity = 0.05
				}
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy
				}
				remove_ideas = CHI_ineffective_bureaucracy
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy_warlord
				}
				remove_ideas = CHI_ineffective_bureaucracy_warlord
			}

		}

	}

	### THE REORGANIZED GOVERNMENT

	focus = {
		id = CHI_tsr_the_reorganied_government
		icon = GFX_focus_JAP_reorganized_national_government
		x = -9
		y = 0

		relative_position_id = CHI_tsr_repoen_the_natioal_assembly

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL }

		completion_reward = {
			
			add_political_power = 75
			
			custom_effect_tooltip = generic_skip_one_line_tt

			add_ideas = CHI_tsr_reorganized_government_idea 

			custom_effect_tooltip = generic_skip_one_line_tt

			custom_effect_tooltip = JAP_unlock_senbu_occupation_law_tt
			show_ideas_tooltip = senbu_occupation_law_fake_idea

		}

	}

	focus = {
		id = CHI_tsr_military_industrial_collaboration
		icon = GFX_focus_JAP_army_weapons_administration_hq
		x = -1
		y = 1

		relative_position_id = CHI_tsr_the_reorganied_government

		prerequisite = { focus = CHI_tsr_the_reorganied_government }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_INDUSTRY }

		completion_reward = {

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					NOT = {
						has_state_category = small_island
						has_state_category = tiny_island
					}
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}	
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			
		}
	}

	focus = {
		id = CHI_tsr_industrial_expansion_cooperation
		icon = GFX_focus_JAP_the_five_great_cities

		x = 1
		y = 1

		relative_position_id = CHI_tsr_the_reorganied_government

		prerequisite = { focus = CHI_tsr_the_reorganied_government }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_INDUSTRY }

		completion_reward = {

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					NOT = {
						has_state_category = small_island
						has_state_category = tiny_island
					}
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
				}	
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			
		}
	}

	focus = {
		id = CHI_tsr_expand_the_nanjing_army
		icon = GFX_focus_CHI_popular_army

		x = -1
		y = 1

		relative_position_id = CHI_tsr_industrial_expansion_cooperation

		prerequisite = { focus = CHI_tsr_industrial_expansion_cooperation }
		prerequisite = { focus = CHI_tsr_military_industrial_collaboration }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_MANPOWER }

		completion_reward = {

			army_experience = 25

			custom_effect_tooltip = generic_skip_one_line_tt

			swap_ideas = {
				remove_idea = CHI_tsr_reorganized_government_idea
				add_idea = CHI_tsr_reorganized_government_idea_2
			}	
			
		}

	}

	focus = {
		id = CHI_tsr_promote_tridemism
		icon = GFX_focus_CHI_revise_the_national_curriculum
		x = 0
		y = 1

		relative_position_id = CHI_tsr_expand_the_nanjing_army

		prerequisite = { focus = CHI_tsr_expand_the_nanjing_army }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL }

		completion_reward = {
			
			swap_ideas = {
				remove_idea = CHI_tsr_reorganized_government_idea_2
				add_idea = CHI_tsr_reorganized_government_idea_3
			}	

		}

	}

	focus = {
		id = CHI_tsr_peace
		icon = GFX_focus_hol_war_on_pacifism
		x = -2
		y = 1

		relative_position_id = CHI_tsr_promote_tridemism

		prerequisite = { focus = CHI_tsr_promote_tridemism }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_STABILITY }

		completion_reward = {

			IF = {
				limit = {
					NOT = {
						has_idea = CHI_three_princpals_a_c_idea
						has_idea = CHI_three_princpals_a_idea
						has_idea = CHI_three_princpals_c_idea
					}
				}
				add_ideas = CHI_three_princpals_p_idea
			}
			ELSE_IF = {
				limit = {
					has_idea = CHI_three_princpals_c_idea
				}
				swap_ideas = {
					remove_idea = CHI_three_princpals_c_idea
					add_idea = CHI_three_princpals_p_c_idea
				}	
			}
			ELSE_IF = {
				limit = {
					has_idea = CHI_three_princpals_a_idea
				}
				swap_ideas = {
					remove_idea = CHI_three_princpals_a_idea
					add_idea = CHI_three_princpals_p_a_idea
				}	
			}
			ELSE = {
				swap_ideas = {
					remove_idea = CHI_three_princpals_a_c_idea
					add_idea = CHI_three_princpals_p_a_c_idea
				}	
			}
			
		}

	}

	focus = {
		id = CHI_tsr_anti_communism
		icon = GFX_focus_ger_bulwark_against_bolshevism
		x = 0
		y = 1

		relative_position_id = CHI_tsr_promote_tridemism

		prerequisite = { focus = CHI_tsr_promote_tridemism }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {

			IF = {
				limit = {
					NOT = {
						has_idea = CHI_three_princpals_p_c_idea
						has_idea = CHI_three_princpals_w_idea
						has_idea = CHI_three_princpals_d_idea
					}
				}
				add_ideas = CHI_three_princpals_a_idea
			}
			ELSE_IF = {
				limit = {
					has_idea = CHI_three_princpals_c_idea
				}
				swap_ideas = {
					remove_idea = CHI_three_princpals_c_idea
					add_idea = CHI_three_princpals_a_c_idea
				}	
			}
			ELSE_IF = {
				limit = {
					has_idea = CHI_three_princpals_p_idea
				}
				swap_ideas = {
					remove_idea = CHI_three_princpals_p_idea
					add_idea = CHI_three_princpals_p_a_idea
				}	
			}
			ELSE = {
				swap_ideas = {
					remove_idea = CHI_three_princpals_p_c_idea
					add_idea = CHI_three_princpals_p_a_c_idea
				}	
			}
			
		}

	}

	focus = {
		id = CHI_tsr_national_construction 
		icon = GFX_focus_JAP_foreign_exchange_allocation_policy

		x = 2
		y = 1

		relative_position_id = CHI_tsr_promote_tridemism

		prerequisite = { focus = CHI_tsr_promote_tridemism }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {

			IF = {
				limit = {
					NOT = {
						has_idea = CHI_three_princpals_p_a_idea
						has_idea = CHI_three_princpals_p_idea
						has_idea = CHI_three_princpals_a_idea
					}
				}
				add_ideas = CHI_three_princpals_c_idea
			}
			ELSE_IF = {
				limit = {
					has_idea = CHI_three_princpals_a_idea
				}
				swap_ideas = {
					remove_idea = CHI_three_princpals_a_idea
					add_idea = CHI_three_princpals_a_c_idea
				}	
			}
			ELSE_IF = {
				limit = {
					has_idea = CHI_three_princpals_p_idea
				}
				swap_ideas = {
					remove_idea = CHI_three_princpals_p_idea
					add_idea = CHI_three_princpals_p_c_idea
				}	
			}
			ELSE = {
				swap_ideas = {
					remove_idea = CHI_three_princpals_p_a_idea
					add_idea = CHI_three_princpals_p_a_c_idea
				}	
			}
			
		}
	}

	focus = {
		id = CHI_tsr_pan_asianism
		icon = GFX_focus_JAP_promote_pan_asianism
		x = -2
		y = 1

		relative_position_id = CHI_tsr_national_construction

		prerequisite = { focus = CHI_tsr_national_construction }
		prerequisite = { focus = CHI_tsr_anti_communism }
		prerequisite = { focus = CHI_tsr_peace }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {
			
			swap_ideas = {
				remove_idea = CHI_tsr_reorganized_government_idea_3
				add_idea = CHI_tsr_reorganized_government_idea_4
			}	


		}

	}

	focus = {
		id = CHI_tsr_establish_the_tewu
		icon = GFX_goal_generic_intelligence_exchange
		x = 0
		y = 1

		relative_position_id = CHI_tsr_pan_asianism

		prerequisite = { focus = CHI_tsr_pan_asianism }

		cost = 5

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		completion_reward = {

			IF = {
				limit = {
					has_dlc = "La Resistance"
				}
				IF = {
					limit = {
						has_intelligence_agency = no
					}
					create_intelligence_agency = yes
				}
				add_ideas = { CHI_tewu_idea }
			}
			ELSE = {
				add_ideas = { CHI_tewu_idea_compat }
			}
			
		}
	}

	focus = {
		id = CHI_tsr_embrace_japanese_cultural_institutions
		icon = GFX_focus_jap_spiritual_mobilization
		x = -1
		y = 1

		relative_position_id = CHI_tsr_establish_the_tewu

		prerequisite = { focus = CHI_tsr_establish_the_tewu }

		mutually_exclusive = {
			focus = CHI_tsr_a_new_chinese_identity
		}

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_TFV_AUTONOMY }

		completion_reward = {

			add_autonomy_score = { 
				value = -100 
				localization = CHI_tsr_embrace_japanese_cultural_institutions
			}	

			custom_effect_tooltip = generic_skip_one_line_tt
			
			add_dynamic_modifier = {
			 	modifier = RNG_state_shintoism_dm
			}
			add_to_variable = { 
				ROOT.RNG_state_shintoism_political_power_gain = 0.1 
				tooltip = political_power_gain_tt
			} 
			add_to_variable = { 
				ROOT.RNG_state_shintoism_stability_factor = -0.1 
				tooltip = stability_factor_tt
			} 
			add_to_variable = { 
				ROOT.RNG_state_shintoism_pocket_penalty = -0.05 
				tooltip = pocket_penalty_tt
			} 

			custom_effect_tooltip = generic_skip_one_line_tt

			custom_effect_tooltip = CHI_tsr_embrace_japanese_cultural_institutions_tt

		}

	}

	focus = {
		id = CHI_tsr_deepen_our_collaboration
		icon = GFX_focus_JAP_promote_japanese_settlement

		x = 0
		y = 1

		relative_position_id = CHI_tsr_embrace_japanese_cultural_institutions

		prerequisite = { focus = CHI_tsr_embrace_japanese_cultural_institutions }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_TFV_AUTONOMY }

		completion_reward = {

			add_autonomy_score = { 
				value = -250 
				localization = CHI_tsr_deepen_our_collaboration
			}	

			custom_effect_tooltip = generic_skip_one_line_tt

			every_state = {
				limit = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 1
			}

			custom_effect_tooltip = generic_skip_one_line_tt
			
			IF = {
				limit = {
					NOT = {
						OR = {
							has_idea = CHI_ineffective_bureaucracy
							has_idea = CHI_ineffective_bureaucracy_warlord
						}
					}
				}
				add_political_power = 150
				add_stability = 0.05 
				add_popularity = {
					ideology = democratic
					popularity = 0.05
				}
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy
				}
				remove_ideas = CHI_ineffective_bureaucracy
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy_warlord
				}
				remove_ideas = CHI_ineffective_bureaucracy_warlord
			}	

		}

	}

	focus = {
		id = CHI_tsr_a_new_chinese_identity
		icon = GFX_focus_CHI_strengthening_our_resolve
		x = 1
		y = 1

		relative_position_id = CHI_tsr_establish_the_tewu

		prerequisite = { focus = CHI_tsr_establish_the_tewu }

		mutually_exclusive = {
			focus = CHI_tsr_embrace_japanese_cultural_institutions
		}

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_TFV_AUTONOMY FOCUS_FILTER_WAR_SUPPORT }

		completion_reward = {

			add_political_power = 75

			add_war_support = 0.1
			
			add_autonomy_score = { 
				value = 1000 
				localization = CHI_tsr_a_new_chinese_identity
			}	

		}

	}

	focus = {
		id = CHI_tsr_our_place_in_the_sphere
		icon = GFX_focus_JAP_greater_east_asian_co_properity_sphere
		x = 0
		y = 1

		relative_position_id = CHI_tsr_a_new_chinese_identity

		prerequisite = { focus = CHI_tsr_a_new_chinese_identity }

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			is_subject_of = JAP
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER FOCUS_FILTER_TFV_AUTONOMY }

		completion_reward = {

			add_political_power = 50
			
			add_autonomy_score = { 
				value = 500 
				localization = CHI_tsr_our_place_in_the_sphere
			}	

			custom_effect_tooltip = generic_skip_one_line_tt
			
			IF = {
				limit = {
					NOT = {
						OR = {
							has_idea = CHI_ineffective_bureaucracy
							has_idea = CHI_ineffective_bureaucracy_warlord
						}
					}
				}
				add_political_power = 150
				add_stability = 0.05 
				add_popularity = {
					ideology = democratic
					popularity = 0.05
				}
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy
				}
				remove_ideas = CHI_ineffective_bureaucracy
			} 
			IF = {
				limit = {
					has_idea = CHI_ineffective_bureaucracy_warlord
				}
				remove_ideas = CHI_ineffective_bureaucracy_warlord
			}	

		}

	}



	focus = {
		id = CHI_sea_military_affairs_commission
		icon = GFX_focus_CHI_military_affairs_commission
		x = 18
		y = 0
		relative_position_id = CHI_tsr_repoen_the_natioal_assembly

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			add_ideas = CHI_military_affairs_commission
		}
	}

	focus = {
		id = CHI_sea_fortify_shanghai
		icon = GFX_goal_generic_fortify_city
		prerequisite = { focus = CHI_sea_military_affairs_commission }
		x = -2
		y = 1
		relative_position_id = CHI_sea_military_affairs_commission

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			 613 = {
			 	is_fully_controlled_by = ROOT
			 }
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		completion_reward = {
			if = {
				limit = { has_full_control_of_state = 613 }
				613 = { # Shanghai
					set_building_level = {
						type = bunker
						province = {
							id = 11913 #Nanjing
							id = 11982 #Nothing
							id = 10076 #Airbase
							id = 12052
							id = 7014 #Shanghai
						}
						level = 2
						instant_build = yes
					}

					if = {
						limit = {
							any_province_building_level = {
								province = {
									id = 7014 #Shanghai
								}
								level < 3
								building = bunker
							}
						}
						set_building_level = {
							type = bunker
							province = {
								id = 7014 #Shanghai
							}
							level = 3
							instant_build = yes
						}
					}

					if = {
						limit = {
							any_province_building_level = {
								province = {
									id = 7014 #Shanghai
								}
								level < 2
								building = coastal_bunker
							}
						}
						set_building_level = {
							type = coastal_bunker
							province = {
								id = 7014 #Shanghai
							}
							level = 2
							instant_build = yes
						}
					}					
				}

				#If not full control, only add forts in provinces bordering the enemy
				#Only time to throw up some emergency stuff
				else = {
					613 = {
						add_building_construction = {
							type = bunker
							province = {
								all_provinces = yes
								limit_to_border = yes
							}
							level = 1
							instant_build = yes
						}
					}

				}
			}
		}
	}

	focus = {
		id = CHI_sea_the_chinese_hindenburg_line
		icon = GFX_goal_generic_construct_military
		prerequisite = { focus = CHI_sea_fortify_shanghai }
		x = -2
		y = 2
		relative_position_id = CHI_sea_military_affairs_commission

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			NOT = {
				any_enemy_country = {
					has_full_control_of_state = 613
				}
			}
			NOT = {
				any_enemy_country = {
					has_full_control_of_state = 606
				}
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {

		}

		completion_reward = {
			if = {
				limit = { has_full_control_of_state = 613 }
				613 = { # Shanghai
					set_building_level = {
						type = bunker
						province = {
							id = 11913 #Nanjing
							id = 11982 #Nothing
							id = 10076 #Airbase
							id = 12052
							id = 7014 #Shanghai
						}
						level = 3
						instant_build = yes
					}

					if = {
						limit = {
							any_province_building_level = {
								province = {
									id = 7014 #Shanghai
								}
								level < 4
								building = bunker
							}
						}
						set_building_level = {
							type = bunker
							province = {
								id = 7014 #Shanghai
							}
							level = 4
							instant_build = yes
						}
					}

					if = {
						limit = {
							any_province_building_level = {
								province = {
									id = 7014 #Shanghai
								}
								level < 3
								building = coastal_bunker
							}
						}
						set_building_level = {
							type = coastal_bunker
							province = {
								id = 7014 #Shanghai
							}
							level = 3
							instant_build = yes
						}
					}					
				}

				#If not full control, only add forts in provinces bordering the enemy
				#Only time to throw up some emergency stuff
				else = {
					613 = {
						add_building_construction = {
							type = bunker
							province = {
								all_provinces = yes
								limit_to_border = yes
							}
							level = 1
							instant_build = yes
						}
					}
				}
			}

			if = {
				limit = { has_full_control_of_state = 606 }
				606 = { # Anhui
					set_building_level = {
						type = bunker
						province = {
							id = 1099
							id = 1171
							id = 11937
							id = 10044
						}
						level = 2
						instant_build = yes
					}								
				}

				#If not full control, only add forts in provinces bordering the enemy
				#Only time to throw up some emergency stuff
				else = {
					606 = {
						add_building_construction = {
							type = bunker
							province = {
								all_provinces = yes
								limit_to_border = yes
							}
							level = 1
							instant_build = yes
						}
					}
				}
			}

			if = {
				limit = { has_full_control_of_state = 600 }
				600 = { # Jiangxi
					set_building_level = {
						type = bunker
						province = {
							id = 1153
						}
						level = 2
						instant_build = yes
					}								
				}
			}
		}
	}

	focus = {
		id = CHI_sea_army_reform
		icon = GFX_focus_chi_army_reform
		prerequisite = { focus = CHI_sea_military_affairs_commission }
		x = 0
		y = 1
		relative_position_id = CHI_sea_military_affairs_commission

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {

		}

		bypass = {
			NOT = {
				has_idea = CHI_army_corruption_1
			}
		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			unlock_decision_category_tooltip = CHI_army_reform
		}
	}

	focus = {
		id = CHI_sea_bureau_of_investigation_and_statistics
		icon = GFX_goal_generic_intelligence_exchange
		prerequisite = { focus = CHI_sea_military_affairs_commission }
		x = 2
		y = 1
		relative_position_id = CHI_sea_military_affairs_commission

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_STABILITY }
		completion_reward = {
			add_stability = 0.1
			IF = {
				limit = {
					NOT = { has_character = CHI_dai_li }
					CHI = {
						exists = no
					}
				}
				CHI = {
					CHI_dai_li = {
						set_nationality = ROOT
					}
				}
				custom_effect_tooltip = available_political_advisor
				CHI = { show_ideas_tooltip = CHI_dai_li }
			}
		}
	}

	focus = {
		id = CHI_sea_60_divisions_plan
		icon = GFX_goal_generic_axis_build_infantry
		prerequisite = { focus = CHI_sea_army_reform }
		x = 0
		y = 2
		relative_position_id = CHI_sea_military_affairs_commission

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_MANPOWER }
		completion_reward = {
			unlock_decision_tooltip = CHI_60_divisions_plan
		}
	}

	focus = {
		id = CHI_sea_whampoa_military_academy
		icon = GFX_focus_chi_whampoa_military_academy
		prerequisite = { focus = CHI_sea_bureau_of_investigation_and_statistics }
		x = 2
		y = 2
		relative_position_id = CHI_sea_military_affairs_commission

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		completion_reward = {
			every_army_leader = {
				add_planning = 1
			}
			custom_effect_tooltip = generic_skip_one_line_tt
			add_ideas = CHI_whampoa_military_academy
		}
	}

	focus = {
		id = CHI_sea_unified_industrial_planning
		icon = GFX_goal_generic_construction
		x = 7
		y = 0
		relative_position_id =  CHI_sea_military_affairs_commission

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			add_tech_bonus = {
				name = CHI_unified_industrial_planning
				bonus = 1.0
				uses = 2
				category = industry
			}
		}
	}

	focus = {
		id = CHI_sea_expand_the_academica_sinica
		icon = GFX_focus_research
		prerequisite = { focus = CHI_sea_unified_industrial_planning }
		x = -2
		y = 1
		relative_position_id = CHI_sea_unified_industrial_planning

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			OR = {			
				has_war = no
				has_stability > 0.7
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = CHI_sea_chemical_research_institute
		icon = GFX_focus_research
		prerequisite = { focus = CHI_sea_expand_the_academica_sinica }
		x = 0
		y = 1
		relative_position_id = CHI_sea_expand_the_academica_sinica

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			num_of_factories > 74
			amount_research_slots < 5
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {			
			add_research_slot = 1
		}
	}

	focus = {
		id = CHI_sea_rural_reconstruction_movement
		icon = GFX_goal_generic_construct_infrastructure
		prerequisite = { focus = CHI_sea_unified_industrial_planning }
		x = 0
		y = 1
		relative_position_id = CHI_sea_unified_industrial_planning

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			has_full_control_of_state = 607
			has_full_control_of_state = 602
			has_full_control_of_state = 605
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			607 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			602 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			605 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}

		}
	}

	focus = {
		id = CHI_sea_mining_commission
		icon = GFX_goal_generic_construction2
		prerequisite = { focus = CHI_sea_rural_reconstruction_movement }
		x = 0
		y = 1
		relative_position_id = CHI_sea_rural_reconstruction_movement

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			CHI_hyper_inflation_level_up = yes
			custom_effect_tooltip = generic_skip_one_line_tt
			custom_effect_tooltip = available_industrial_concern
			show_ideas_tooltip = CHI_mining_commission			
		}
	}

	focus = {
		id = CHI_sea_taiyuan_arsenal
		icon = GFX_goal_generic_construct_mil_factory
		prerequisite = { focus = CHI_sea_mining_commission }
		x = -2
		y = 1
		relative_position_id = CHI_sea_mining_commission

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			controls_state = 615
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			CHI_hyper_inflation_level_up = yes
			custom_effect_tooltip = generic_skip_one_line_tt
			615 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = arms_factory
					level = 3
					instant_build = yes
				}			
			}
		}
	}

	focus = {
		id = CHI_sea_develop_the_hanyan_arsenal
		icon = GFX_goal_generic_construct_mil_factory
		prerequisite = { focus = CHI_sea_mining_commission }
		x = 0
		y = 1
		relative_position_id = CHI_sea_mining_commission

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			NOT = {
				has_idea = CHI_hyper_inflation_5
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		complete_tooltip = {
			CHI_hyper_inflation_level_up = yes
			custom_effect_tooltip = generic_skip_one_line_tt
			random_state = {
				limit = {
					has_state_flag = CHI_develop_the_hanyan_arsenal_AF
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = arms_factory
					level = 3
					instant_build = yes
				}
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {
			CHI_hyper_inflation_level_up = yes
			random_owned_controlled_state = {
				prioritize = { 620 }
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = arms_factory
					level = 3
					instant_build = yes
				}
				set_state_flag = CHI_develop_the_hanyan_arsenal_AF
			}
		}
	}

	focus = {
		id = CHI_sea_financial_policy
		icon = GFX_goal_generic_positive_trade_relations
		prerequisite = { focus = CHI_sea_unified_industrial_planning }
		x = 2
		y = 1
		relative_position_id = CHI_sea_unified_industrial_planning

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		
		search_filters = { FOCUS_FILTER_INDUSTRY }
		completion_reward = {

			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}	
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}	
			}	
		}
	}

	focus = {
		id = CHI_sea_price_controls
		icon = GFX_goal_generic_neutrality_focus
		prerequisite = { focus = CHI_sea_financial_policy }
		x = 0
		y = 1
		relative_position_id = CHI_sea_financial_policy

		cost = 10

		ai_will_do = {
			factor = 4
		}

		available = {
			has_hyper_inflation = yes
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_CHI_INFLATION }
		completion_reward = {
			CHI_hyper_inflation_level_down = yes
		}
	}

	focus = {
		id = CHI_sea_grain_tax
		icon = GFX_goal_generic_trade
		prerequisite = { focus = CHI_sea_price_controls }
		x = 2
		y = 1
		relative_position_id = CHI_sea_price_controls

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {

		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		completion_reward = {
			add_ideas = CHI_grain_tax
		}
	}

	focus = {
		id = CHI_sea_reform_the_national_bank
		icon = GFX_goal_generic_improve_relations
		prerequisite = { focus = CHI_sea_price_controls }
		x = 0
		y = 1
		relative_position_id = CHI_sea_price_controls

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			has_hyper_inflation = yes
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_CHI_INFLATION }
		completion_reward = {
			CHI_hyper_inflation_level_down = yes
		}
	}

	focus = {
		id = CHI_sea_forced_loans
		icon = GFX_goal_generic_forceful_treaty
		prerequisite = { focus = CHI_sea_reform_the_national_bank }
		x = 0
		y = 1
		relative_position_id = CHI_sea_reform_the_national_bank

		cost = 10

		ai_will_do = {
			factor = 1
		}

		available = {
			has_hyper_inflation = yes
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_CHI_INFLATION }
		completion_reward = {
			unlock_decision_tooltip = CHI_forced_loans
		}
	}

}
