namespace = subjects_expanded_native_reserve_events

country_event = {
	id = subjects_expanded_native_reserve_events.1
	title = subjects_expanded_native_reserve_events.EVTNAME1
	desc = subjects_expanded_native_reserve_events.EVTDESC1
	picture = BAD_WITH_MONARCH_eventPicture

	is_triggered_only = yes

	trigger = {
		has_subject_of_type = native_reserve
		NOT = { has_country_flag = release_invalid_native_reserves }
		NOT = {
			is_in_war = {
				defender_leader = ROOT
				casus_belli = cb_independence_war
			}
		}
		NOT = {
			is_in_war = {
				defender_leader = ROOT
				casus_belli = cb_colonial_independence_war
			}
		}
		OR = {
			AND = {
				is_former_colonial_nation = no
				capital_scope = {
					NOT = { continent = north_america }
					NOT = { continent = south_america }
					NOT = { continent = oceania }
					NOT = { continent = africa }
				}
				NOT = {
					any_subject_country = {
						OR = {
							is_colonial_subject_type = yes
							is_any_dominion_subject = yes
						}
					}
				}
			}
			any_subject_country = {
				is_subject_of_type = native_reserve
				OR = {
					capital_scope = {
						NOT = { continent = north_america }
						NOT = { continent = south_america }
						NOT = { continent = oceania }
						NOT = { continent = africa }
					}
					technology_group = western
				}
			}
		}
	}

	immediate = {
		hidden_effect = {
			set_country_flag = release_invalid_native_reserves
		}
	}

	option = {
		name = subjects_expanded_native_reserve_events1.EVTOPT1

		if = {
			limit = {
				is_former_colonial_nation = no
				capital_scope = {
					NOT = { continent = north_america }
					NOT = { continent = south_america }
					NOT = { continent = oceania }
					NOT = { continent = africa }
				}
				NOT = {
					any_subject_country = {
						OR = {
							is_colonial_subject_type = yes
							is_any_dominion_subject = yes
						}
					}
				}
			}
			every_subject_country = {
				limit = {
					is_subject_of_type = native_reserve
				}
				grant_independence = yes
			}
		}
		else = {
			every_subject_country = {
				limit = {
					is_subject_of_type = native_reserve
					OR = {
						capital_scope = {
							NOT = { continent = north_america }
							NOT = { continent = south_america }
							NOT = { continent = oceania }
							NOT = { continent = africa }
						}
						technology_group = western
					}
				}
				grant_independence = yes
			}
		}
		clr_country_flag = release_invalid_native_reserves
	}
}