CHI_default_plan = {
	name = "Nationalist China default plan"
	desc = "Default behavior for Nationalist China"

	allowed = {
		original_tag = CHI
	}
	enable = {

	}
	abort = {
		always = no
	}

	focus_factors = {
	
	}

	research = {

	}

	ideas = {

	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}
CHI_industrial_buildup = {
	name = "Nationalist China industrial buildup plan"
	desc = "Makes Nationalist China more likely to expand industry if not at war"

	allowed = {
		is_literally_china = yes
	}
	enable = {
		OR = {
			original_tag = CHI
			AND = {
				is_chinese_warlord = yes
				has_focus_tree = china_nationalist_focus
			}
		}
		has_war = no
	}
	abort = {
		has_war = yes
	}
	focus_factors = {
		CHI_unified_industrial_planning = 5
		CHI_expand_the_academica_sinica = 10 
		CHI_rural_reconstruction_movement = 5
		CHI_financial_policy = 5
		CHI_mining_commission = 5
		CHI_taiyuan_arsenal = 5
		CHI_develop_the_hanyan_arsenal = 5
	}

	research = {
		industry = 15.0
		electronics = 15.0
	}

	ideas = {
		#CHI_t_v_soong = 5
		CHI_h_h_kung = 5
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}

CHI_inflation_handling = {
	name = "Nationalist China Secret Plan to Fight Inflation"
	desc = "Teaches the AI to handle the inflation mechanic for China"

	allowed = {
		is_literally_china = yes
	}
	enable = {
		OR = {
			original_tag = CHI
			AND = {
				is_chinese_warlord = yes
				has_focus_tree = china_nationalist_focus
			}
		}
		OR = {
			has_idea = CHI_hyper_inflation_3
			has_idea = CHI_hyper_inflation_4
			has_idea = CHI_hyper_inflation_5
		}
	}
	abort = {
		OR = { #inflation under control
			has_idea = CHI_hyper_inflation_2
			has_idea = CHI_hyper_inflation_1
		}
	}
	focus_factors = {
		CHI_financial_policy = 50
		CHI_price_controls = 50
		CHI_reform_the_national_bank = 50
		CHI_forced_loans = 50
		CHI_land_tax_reform = 50
		CHI_develop_the_hanyan_arsenal = 0.0
		CHI_unemployment_assistance = 0.0
		CHI_taiyuan_arsenal = 0.0
		CHI_mining_commission = 0.0
		CHI_welfare = 0.0
		CHI_refugee_relief_agency = 0.0
		CHI_free_hospitals = 0.0
		CHI_rural_schooling = 0.0
	}

	research = {
	}

	ideas = {
		#CHI_t_v_soong = 10
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}

CHI_army_reform = {
	name = "Nationalist China Army Reform"
	desc = "Teaches the AI to reform the Army if at war"

	allowed = {
		original_tag = CHI
	}
	enable = {
		has_war = yes
		OR = {
			has_idea = CHI_army_corruption_1
			has_idea = CHI_army_corruption_2
			has_idea = CHI_army_corruption_3
		}
	}
	abort = {
		NOT = {
			OR = { 
				has_idea = CHI_army_corruption_1
				has_idea = CHI_army_corruption_2
				has_idea = CHI_army_corruption_3
			}
		}
	}
	focus_factors = {
		CHI_army_reform = 50
		CHI_military_affairs_commission = 50
	}

	research = {
	}

	ideas = {
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}
CHI_war_measures = {
	name = "Nationalist China War measures"
	desc = "Teaches the AI to fix issues if at war"

	allowed = {
		is_literally_china = yes
	}
	enable = {
		OR = {
			original_tag = CHI
			AND = {
				is_chinese_warlord = yes
				has_focus_tree = china_nationalist_focus
			}
		}
		has_war = yes
	}
	abort = {
		OR = {
			has_war = no
			has_completed_focus = CHI_war_of_national_liberation
			has_completed_focus = CHI_dare_to_die_corps
			controls_state = 527 #has successfully taken Manchuria
		}
	}
	focus_factors = {
		CHI_war_of_resistance = 20
		CHI_military_affairs_commission = 20
		CHI_industrial_evacuations = 30
		CHI_scorched_earth_tactics = 30
		CHI_democracy = 0 #can't have that nonsense right now
		CHI_war_of_national_liberation = 20
	}

	research = {
		infantry_weapons = 15.0
		artillery = 15.0
		air_equipment = 0
	}

	ideas = {
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}
CHI_befriend_britain = {
	name = "Befriend Britain"
	desc = "Teaches the AI to make friends with britain to progress further down the tree"

	allowed = {
		is_literally_china = yes
	}
	enable = {
		has_completed_focus = CHI_british_cooperation
		ENG = {
			has_opinion	= {
				target = ROOT
				value < 90
			}
		}
		OR = {
			has_war = no			
			AND = {
				NOT = { has_idea = civilian_economy }
				OR = {
					NOT = { has_idea = volunteer_only }
					has_manpower > 200000
				}
			}
		}
	}
	abort = {
		OR = {
			has_completed_focus = CHI_ledo_road #they have served their purpose
			ENG = {
				has_opinion	= {
					target = ROOT
					value > 90
				}
			}
			AND = {
				has_war = yes
				OR = {
					has_idea = civilian_economy
					AND = {
						has_idea = volunteer_only
						has_manpower < 200000
					}
				}
			}
		}
	}
	focus_factors = {
		CHI_burma_road = 20
		CHI_ledo_road = 20
		CHI_fighter_purchases = 20
	}

	research = {
	}

	ideas = {
	}
	ai_strategy = {
		type = befriend
		id = "ENG"			
		value = 200
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}
CHI_befriend_america = {
	name = "Befriend America"
	desc = "Teaches the AI to make friends with britain to progress further down the tree"

	allowed = {
		is_literally_china = yes
	}
	enable = {
		has_completed_focus = CHI_mission_to_the_us
		USA = {
			has_opinion	= {
				target = ROOT
				value < 90
			}
		}
		OR = {
			has_war = no			
			AND = {
				NOT = { has_idea = civilian_economy }
				OR = {
					NOT = { has_idea = volunteer_only }
					has_manpower > 200000
				}
			}
		}
	}
	abort = {
		OR = {
			has_completed_focus = CHI_the_hump #they have served their purpose
			USA = {
				has_opinion	= {
					target = ROOT
					value > 90
				}
			}
			AND = {
				has_war = yes
				OR = {
					has_idea = civilian_economy
					AND = {
						has_idea = volunteer_only
						has_manpower < 200000
					}
				}
			}
		}
	}
	focus_factors = {
		CHI_the_hump = 20
		CHI_hire_chennault = 20
		CHI_fighter_purchases = 20
		CHI_invite_the_flying_tigers = 20
	}

	research = {
	}

	ideas = {
	}
	ai_strategy = {
		type = befriend
		id = "USA"			
		value = 200
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}
CHI_befriend_France = {
	name = "Befriend France"
	desc = "Teaches the AI to make friends with britain to progress further down the tree"

	allowed = {
		is_literally_china = yes
	}
	enable = {
		has_completed_focus = CHI_reach_out_to_france
		FRA = {
			has_opinion	= {
				target = ROOT
				value < 90
			}
		}
		OR = {
			has_war = no
			AND = {
				NOT = { has_idea = civilian_economy }
				OR = {
					NOT = { has_idea = volunteer_only }
					has_manpower > 200000
				}
			}
		}
	}
	abort = {
		OR = {
			has_completed_focus = CHI_french_drill #they have served their purpose
			FRA = {
				has_opinion	= {
					target = ROOT
					value > 90
				}
			}
			AND = {
				has_war = yes
				OR = {
					has_idea = civilian_economy
					AND = {
						has_idea = volunteer_only
						has_manpower < 200000
					}
				}
			}
		}
	}
	focus_factors = {
		CHI_guarantee_the_hanoi_route = 30
		CHI_french_military_mission = 20
		CHI_french_drill = 20
		CHI_small_arms_expertise = 20
	}

	research = {
	}

	ideas = {
	}
	ai_strategy = {
		type = befriend
		id = "FRA"			
		value = 200
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}
CHI_befriend_Soviet = {
	name = "Befriend Soviet"
	desc = "Teaches the AI to make friends with Soviet to progress further down the tree"

	allowed = {
		is_literally_china = yes
	}
	enable = {
		has_completed_focus = CHI_mission_to_the_soviet_union
		SOV = {
			has_opinion	= {
				target = ROOT
				value < 90
			}
		}
		OR = {
			has_war = no
			AND = {
				NOT = { has_idea = civilian_economy }
				OR = {
					NOT = { has_idea = volunteer_only }
					has_manpower > 200000
				}
			}
		}
	}
	abort = {
		OR = {
			has_completed_focus = CHI_combined_arms_warfare #they have served their purpose
			
			SOV = {
				has_opinion	= {
					target = ROOT
					value > 90
				}
			}

			AND = {
				has_war = yes
				OR = {
					has_idea = civilian_economy
					AND = {
						has_idea = volunteer_only
						has_manpower < 200000
					}
				}
			}
		}
	}
	focus_factors = {
		CHI_the_soviet_volunteer_group = 20
		CHI_rapprochement_with_soviet_union = 20
		CHI_purchase_tanks = 20
		CHI_experimental_mechanised_unit = 20
		CHI_invite_soviet_advisers = 20
		CHI_heavy_weapons = 20
	}

	research = {
		motorized_equipment = 15.0 #needed to progress
	}

	ideas = {
	}
	ai_strategy = {
		type = befriend
		id = "SOV"			
		value = 200
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1
		modifier = {
			factor = 1.0
		}
	}
}

CHI_european_allies = { #used to make minor European nations like Axis more
	name = "Minor European Countries"

	allowed = {
		OR = {
			original_tag = ROM
			original_tag = HUN
			original_tag = BUL
			original_tag = YUG
			original_tag = ITA
			original_tag = CZE
			original_tag = DEN
			original_tag = NOR
			original_tag = SWE
			original_tag = FIN
			original_tag = SPR
			original_tag = POR
			original_tag = HOL
			original_tag = BEL
			original_tag = LUX
			original_tag = POL
			original_tag = LAT
			original_tag = LIT
			original_tag = EST
			original_tag = CRO
			original_tag = SLO
		}
	}
	enable = {
		has_war = yes
		OR = {
			is_in_faction = no
			is_faction_leader = yes
		}
		OR = {
			original_tag = ROM
			original_tag = HUN
			original_tag = BUL
			original_tag = YUG
			original_tag = ITA
			original_tag = CZE
			original_tag = DEN
			original_tag = NOR
			original_tag = SWE
			original_tag = FIN
			original_tag = SPR
			original_tag = POR
			original_tag = HOL
			original_tag = BEL
			original_tag = LUX
			original_tag = POL
			original_tag = LAT
			original_tag = LIT
			original_tag = EST
			original_tag = CRO
			original_tag = SLO
		}
	}
	abort = {
		OR = {
			has_war = no
			AND = {
				is_in_faction = yes
				is_faction_leader = no
			}
		}
	}

	ai_strategy = {
		type = alliance
		id = "CHI"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "PRC"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "GXC"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "YUN"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "XSM"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "SHX"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "HCH"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "SND"
		value = -500
	}
	ai_strategy = {
		type = alliance
		id = "SIK"
		value = -500
	}
}
