﻿cn_unify_01 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_indonesia
					region = sr:region_oceania
					region = sr:region_indochina
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SIS
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_01_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SIS
				}
				capital = {
					OR = {
						region = sr:region_indonesia
						region = sr:region_oceania
						region = sr:region_indochina
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SIS = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SIS
					}
					capital = {
						OR = {
							region = sr:region_indonesia
							region = sr:region_oceania
							region = sr:region_indochina
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SIS = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_01_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_02 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_north_china
					region = sr:region_south_china
					region = sr:region_japan
					region = sr:region_manchuria
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SCI
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_02_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SCI
				}
				capital = {
					OR = {
						region = sr:region_north_china
						region = sr:region_south_china
						region = sr:region_japan
						region = sr:region_manchuria
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SCI = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SCI
					}
					capital = {
						OR = {
							region = sr:region_north_china
							region = sr:region_south_china
							region = sr:region_japan
							region = sr:region_manchuria
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SCI = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_02_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_03 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_east_siberia
					region = sr:region_west_siberia
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SSB
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_03_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SSB
				}
				capital = {
					OR = {
						region = sr:region_east_siberia
						region = sr:region_west_siberia
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SSB = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SSB
					}
					capital = {
						OR = {
							region = sr:region_east_siberia
							region = sr:region_west_siberia
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SSB = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_03_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_04 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_anatolia
					region = sr:region_arabic
					region = sr:region_persia
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SAB
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_04_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SAB
				}
				capital = {
					OR = {
						region = sr:region_anatolia
						region = sr:region_arabic
						region = sr:region_persia
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SAB = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SAB
					}
					capital = {
						OR = {
							region = sr:region_anatolia
							region = sr:region_arabic
							region = sr:region_persia
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SAB = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_04_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_05 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_madras
					region = sr:region_bengal
					region = sr:region_bombay
					region = sr:region_punjab
					region = sr:region_central_india
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SID
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_05_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SID
				}
				capital = {
					OR = {
						region = sr:region_madras
						region = sr:region_bengal
						region = sr:region_bombay
						region = sr:region_punjab
						region = sr:region_central_india		
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SID = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SID
					}
					capital = {
						OR = {
							region = sr:region_madras
							region = sr:region_bengal
							region = sr:region_bombay
							region = sr:region_punjab
							region = sr:region_central_india	
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SID = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_05_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_06 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_senegal
					region = sr:region_niger
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SWF
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_06_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SWF
				}
				capital = {
					OR = {
						region = sr:region_senegal
						region = sr:region_niger
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SWF = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SWF
					}
					capital = {
						OR = {
							region = sr:region_senegal
							region = sr:region_niger
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SWF = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_06_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_07 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_congo
					region = sr:region_southern_africa
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SSF
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_07_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SSF
				}
				capital = {
					OR = {
						region = sr:region_congo
						region = sr:region_southern_africa
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SSF = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SSF
					}
					capital = {
						OR = {
							region = sr:region_congo
							region = sr:region_southern_africa
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SSF = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_07_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_08 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_zanj
					region = sr:region_ethiopia
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SEF
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_08_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SEF
				}
				capital = {
					OR = {
						region = sr:region_zanj
						region = sr:region_ethiopia
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SEF = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SEF
					}
					capital = {
						OR = {
							region = sr:region_zanj
							region = sr:region_ethiopia
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SEF = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_08_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_09 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_nile_basin
					region = sr:region_north_africa
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SNF
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_09_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SNF
				}
				capital = {
					OR = {
						region = sr:region_nile_basin
						region = sr:region_north_africa
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SNF = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SNF
					}
					capital = {
						OR = {
							region = sr:region_nile_basin
							region = sr:region_north_africa
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}

				c:SNF = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_09_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_10 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_north_germany
					region = sr:region_south_germany
					region = sr:region_england
					region = sr:region_iberia
					region = sr:region_france
					region = sr:region_occitania
					region = sr:region_rhine
					region = sr:region_italy	
					region = sr:region_poland
					region = sr:region_danubia
					region = sr:region_balkans
					region = sr:region_baltic	
					region = sr:region_russia
					region = sr:region_dnieper
					region = sr:region_north_sea_coast
					region = sr:region_caucasus
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SRP
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_10_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SRP
				}
				capital = {
					OR = {
						region = sr:region_north_germany
						region = sr:region_south_germany
						region = sr:region_england
						region = sr:region_iberia
						region = sr:region_france
						region = sr:region_occitania
						region = sr:region_rhine
						region = sr:region_italy	
						region = sr:region_poland
						region = sr:region_danubia
						region = sr:region_balkans
						region = sr:region_baltic	
						region = sr:region_russia
						region = sr:region_dnieper
						region = sr:region_north_sea_coast
						region = sr:region_caucasus
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SRP = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SRP
					}
					capital = {
						OR = {
							region = sr:region_north_germany
							region = sr:region_south_germany
							region = sr:region_england
							region = sr:region_iberia
							region = sr:region_france
							region = sr:region_occitania
							region = sr:region_rhine
							region = sr:region_italy	
							region = sr:region_poland
							region = sr:region_danubia
							region = sr:region_balkans
							region = sr:region_baltic	
							region = sr:region_russia
							region = sr:region_dnieper
							region = sr:region_north_sea_coast
							region = sr:region_caucasus
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}
				c:SRP = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_10_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_11 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_canada
					region = sr:region_new_england
					region = sr:region_pacific_coast
					region = sr:region_great_plains
					region = sr:region_the_midwest
					region = sr:region_dixie
					region = sr:region_mexico
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SNM
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_11_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SNM
				}
				capital = {
					OR = {
						region = sr:region_canada
						region = sr:region_new_england
						region = sr:region_pacific_coast
						region = sr:region_great_plains
						region = sr:region_the_midwest
						region = sr:region_dixie
						region = sr:region_mexico
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SNM = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SNM
					}
					capital = {
						OR = {
							region = sr:region_canada
							region = sr:region_new_england
							region = sr:region_pacific_coast
							region = sr:region_great_plains
							region = sr:region_the_midwest
							region = sr:region_dixie
							region = sr:region_mexico
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}

				c:SNM = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_11_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_12 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
					region = sr:region_brazil	
					region = sr:region_la_plata
					region = sr:region_andes	
					region = sr:region_gran_colombia	
					region = sr:region_central_america
					region = sr:region_caribbean
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SSM
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_12_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SSM
				}
				capital = {
					OR = {
						region = sr:region_brazil	
						region = sr:region_la_plata
						region = sr:region_andes	
						region = sr:region_gran_colombia	
						region = sr:region_central_america
						region = sr:region_caribbean
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SSM = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SSM
					}
					capital = {
						OR = {
							region = sr:region_brazil	
							region = sr:region_la_plata
							region = sr:region_andes	
							region = sr:region_gran_colombia	
							region = sr:region_central_america
							region = sr:region_caribbean
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}

				c:SSM = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_12_modifier
			months = short_modifier_time
		}
	}
}

cn_unify_13 = {
	is_shown = {
		any_subject_or_below = {
			capital = {
				OR = {
						region = sr:region_central_asia
						region = sr:region_himalayas
				}
			}
			is_direct_subject_of = root
			is_ai = yes
			count >= 2
		}
		exists = c:SCE
	}
	possible = {
		is_at_war = no
		has_technology_researched = colonization
		NOT = { has_modifier = cn_unify_13_modifier }
		custom_tooltip = {
			text = cn_unify_relations_tt
			any_subject_or_below = {
				NOT = {
					THIS = c:SCE
				}
				capital = {
					OR = {
						region = sr:region_central_asia
						region = sr:region_himalayas
					}
				}
				is_direct_subject_of = root
				is_ai = yes
				relations:root >= relations_threshold:amicable
			}
			c:SCE = {
				relations:root >= relations_threshold:amicable
			}
		}
	}
	when_taken = {
		custom_tooltip = cn_unify_tt
		hidden_effect = {
			random_country = {
				limit = {
					NOT = {
						THIS = c:SCE
					}
					capital = {
						OR = {
						region = sr:region_central_asia
						region = sr:region_himalayas
						}
					}
					is_direct_subject_of = root
					is_ai = yes
					relations:root >= relations_threshold:amicable
				}

				c:SCE = {
					annex = prev
				}
			}
			trigger_event = { id = colonial_nation_cn.89 }
		}
		add_modifier = {
			name = cn_unify_13_modifier
			months = short_modifier_time
		}
	}
}