CHI_1872_reuniting_china = {
	eoanb_decision_CHI_unite_china_force = {
		icon = generic_political_discourse
		
		allowed = {
			OR = {
				tag = SHU
				tag = NIE
				tag = SIC
				tag = SIK
				tag = XSM
				tag = ZHI
				tag = SHX
				tag = TIB
				tag = FEG
				tag = MON
				tag = QNG
				tag = MAN
				tag = ANH
			}
		}
		
		visible = {
			has_completed_focus = CHI_rse_expanding_mandate_over_china
		}
		
		target_root_trigger = {
			has_completed_focus = CHI_rse_expanding_mandate_over_china
		}
		
		target_trigger = {
			FROM = {
				is_neighbor_of = ROOT
				is_subject = no
				
				OR = {
					AND = { tag = SHU ROOT = { has_completed_focus = CHI_rse_dealing_with_shuntian } }
					AND = { tag = NIE ROOT = { has_completed_focus = CHI_rse_taking_nian } }
					AND = { tag = SIC ROOT = { has_completed_focus = CHI_rse_crush_miao } }
					AND = { tag = SIK ROOT = { has_completed_focus = CHI_rse_crush_dungan } }
					AND = { tag = XSM ROOT = { has_completed_focus = CHI_rse_crush_ma } }
					AND = { tag = ZHI ROOT = { has_completed_focus = CHI_rse_crush_hui } }
					AND = { tag = SHX ROOT = { has_completed_focus = CHI_rse_dealing_with_galaohui } }
					AND = { tag = FEG ROOT = { has_completed_focus = CHI_rse_crushing_bai_linga } }
					AND = { tag = MON ROOT = { has_completed_focus = CHI_rse_get_mongolia } }
					AND = { tag = QNG ROOT = { has_completed_focus = CHI_rse_bring_the_final_blow } }
					AND = { tag = MAN ROOT = { has_completed_focus = CHI_rse_crushing_ma_zhenlong } }
					AND = { tag = ANH ROOT = { has_completed_focus = CHI_rse_dealing_with_tianshun } }
				}
			}
		}
		
		fire_only_once = yes
		cost = 25
		days_remove = 10
		
		war_with_target_on_remove = yes
		
		remove_effect = {
			declare_war_on = {
				target = FROM
				type = annex_everything
			}
			increase_ps_by_one = yes
		}
		
		ai_will_do = {
			base = 100
			
			modifier = {
				factor = 0
				OR = {
					has_war = yes
					num_of_military_factories < 5
				}
			}
			
			modifier = {
				factor = 2
				FROM = {
					surrender_progress > 0.3
				}
			}
		}
	}
	
	eoanb_decision_CHI_unite_china_diplo = {
		icon = generic_political_discourse
		
		allowed = {
			OR = {
				tag = QNG
				tag = ROC
				tag = PRC
				tag = TAI
				tag = GXC
				tag = TAW
				tag = PTH
				tag = SIC
				tag = YAL
				tag = NIE
				tag = ANH
			}
		}
		
		visible = {
			has_completed_focus = CHI_rse_expanding_mandate_over_china
		}
		
		target_root_trigger = {
			has_completed_focus = CHI_rse_expanding_mandate_over_china
		}
		
		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				
				OR = {
					AND = { tag = SHU ROOT = { has_completed_focus = CHI_rse_dealing_with_shuntian } }
					AND = { tag = NIE ROOT = { has_completed_focus = CHI_rse_taking_nian } }
					AND = { tag = SIC ROOT = { has_completed_focus = CHI_rse_crush_miao } }
					AND = { tag = SIK ROOT = { has_completed_focus = CHI_rse_crush_dungan } }
					AND = { tag = XSM ROOT = { has_completed_focus = CHI_rse_crush_ma } }
					AND = { tag = ZHI ROOT = { has_completed_focus = CHI_rse_crush_hui } }
					AND = { tag = SHX ROOT = { has_completed_focus = CHI_rse_dealing_with_galaohui } }
					AND = { tag = FEG ROOT = { has_completed_focus = CHI_rse_crushing_bai_linga } }
					AND = { tag = MON ROOT = { has_completed_focus = CHI_rse_get_mongolia } }
					AND = { tag = QNG ROOT = { has_completed_focus = CHI_rse_bring_the_final_blow } }
					AND = { tag = MAN ROOT = { has_completed_focus = CHI_rse_crushing_ma_zhenlong } }
					AND = { tag = ANH ROOT = { has_completed_focus = CHI_rse_dealing_with_tianshun } }
				}
			}
		}
		
		fire_only_once = yes
		cost = 25
		days_remove = 120
		
		war_with_target_on_timeout = yes
		
		remove_effect = {
			annex_country = {
				target = FROM
				transfer_troops = yes
			}
		}
		
		ai_will_do = {
			base = 200
			
			modifier = {
				factor = 0
				FROM = {
					has_army_manpower = { size > 100000 }
				}
			}
			
			modifier = {
				factor = 5
				FROM = {
					OR = {
						has_capitulated = yes
						surrender_progress > 0.5
					}
				}
			}
		}
	}
}

eoanb_category_economic = {
	CHI_develop_military_industry_successor = {
		icon = generic_construction
		
		allowed = {
			tag = QNG
		}
		
		available = {
			has_tech = factory_industry_1
			num_of_civilian_factories_available_for_projects > 1
		}
		
		visible = {
			has_completed_focus = CHI_rse_military_buildup
		}
		
		fire_only_once = yes
		cost = 25
		days_remove = 120
		
		modifier = {
			civilian_factory_use = 2
		}
		
		remove_effect = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
					OR = {
						is_in_home_area = yes
						NOT = {
							owner = {
								any_owned_state = {
									free_building_slots = {
										building = arms_factory
										size > 0
										include_locked = yes
									}
									is_in_home_area = yes
								}
							}
						}
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
		
		ai_will_do = {
			base = 10
			
			modifier = {
				factor = 0
				num_of_military_factories > 15
			}
			
			modifier = {
				factor = 2
				has_war = yes
			}
			
			modifier = {
				factor = 3
				num_of_military_factories < 5
			}
		}
	}
	
	CHI_develop_naval_industry_successor = {
		icon = generic_construction
		
		allowed = {
			tag = QNG
		}
		
		available = {
			has_tech = construction_1
			num_of_civilian_factories_available_for_projects > 1
		}
		
		visible = {
			has_completed_focus = CHI_rse_commissioning_dockyards
		}
		
		fire_only_once = yes
		cost = 25
		days_remove = 120
		
		modifier = {
			civilian_factory_use = 2
		}
		
		remove_effect = {
			random_owned_controlled_state = {
				limit = {
					is_coastal = yes
					free_building_slots = {
						building = dockyard
						size > 0
						include_locked = yes
					}
					OR = {
						is_in_home_area = yes
						NOT = {
							owner = {
								any_owned_state = {
									is_coastal = yes
									free_building_slots = {
										building = dockyard
										size > 0
										include_locked = yes
									}
									is_in_home_area = yes
								}
							}
						}
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}
		
		ai_will_do = {
			base = 5
			
			modifier = {
				factor = 0
				OR = {
					num_of_naval_factories > 10
					NOT = { any_owned_state = { is_coastal = yes } }
				}
			}
			
			modifier = {
				factor = 2
				any_enemy_country = {
					has_navy_size = { size > 50 }
				}
			}
			
			modifier = {
				factor = 3
				num_of_naval_factories < 3
			}
		}
	}
}
