##Dismantlement for any country that is not in the list. Won't have any cores removed.
country_event = {
	id = 112955
	title = "EVTNAME102955"
	desc = "EVTDESC102955"
	picture = "constantinople_conference"
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA100008"
	any_owned = { limit = { owned_by = THIS }
			TRI = { all_core = { secede_province = TRI remove_core = THIS} }
			ALD = { all_core = { secede_province = ALD remove_core = THIS} }
			TUN = { all_core = { secede_province = TUN remove_core = THIS} }
			MOR = { all_core = { secede_province = MOR remove_core = THIS} }
			NAM = { all_core = { secede_province = NAM remove_core = THIS} }
			SAM = { all_core = { secede_province = SAM remove_core = THIS} }
			INM = { all_core = { secede_province = INM remove_core = THIS} }
			OCM = { all_core = { secede_province = OCM remove_core = THIS} }
			MAM = { all_core = { secede_province = MAM remove_core = THIS} }
			ICM = { all_core = { secede_province = ICM remove_core = THIS} }
			LNS = { all_core = { secede_province = LNS remove_core = THIS} }
			SIR = { all_core = { secede_province = SIR remove_core = THIS} }
			IRQ = { all_core = { secede_province = IRQ remove_core = THIS} }
			ELB = { all_core = { secede_province = ELB remove_core = THIS} }
			JRD = { all_core = { secede_province = JRD remove_core = THIS} }
			ISR = { all_core = { secede_province = ISR remove_core = THIS} }
			ETH = { all_core = { secede_province = ETH remove_core = THIS} }
			EGY = { all_core = { secede_province = EGY remove_core = THIS } }}        
		any_country = {
            limit = { vassal_of = THIS }
            leave_alliance = THIS
            country_event = 91307000
        }
        any_country = {
            limit = {
                OR = {
                    civilized = yes
                    tag = JAP
                }
                any_core = { owned_by = THIS }
                exists = no
                OR = {
                    is_cultural_union = no
                    tag = ROM
                }
                NOT = {
                    AND = {
                        is_primary_culture = THIS
                        culture_has_union_tag = yes
                    }
                }
                NOT = { has_country_flag = post_colonial_country }
            }
            all_core = {
                limit = {
                    is_core = THIS
                    state_scope = {
                        NOT = { any_owned_province = { is_capital = yes } }
                    }
                }
                remove_core = THIS
            }
            country_event = 96012
        }

        any_country = {
            limit = {
                any_core = { owned_by = THIS }
                exists = no
                is_cultural_union = no
                is_primary_culture = THIS
                culture_has_union_tag = yes
            }
            random = {
                chance = 50
                country_event = 96018
            }
        }
        any_country = {
            limit = {
                exists = yes
                any_core = { owned_by = THIS }
                NOT = { this_culture_union = THIS }
                OR = {
                    truce_with = THIS
                    AND = {
                        has_country_flag = coalition_member
                    }
					exists = yes
                }
            }
            all_core = {
                limit = {
                    is_core = THIS
                    state_scope = {
                        NOT = { any_owned_province = { is_capital = yes } }
                    }
                }
                remove_core = THIS
            }
            country_event = 96014
        }

		ai_chance = {
			factor = 100 }
	} 
}
# Countries gaining independence as a result of dismantling
country_event = {

    id = 96012
    title = "EVTNAME96012"
    desc = "EVTDESC96012"

    is_triggered_only = yes

    option = {
        name = "EVTOPTA96031" #Great
        FROM = {
            any_state = {
                limit = {
                    any_owned_province = { is_core = THIS }
                    NOT = { any_owned_province = { is_capital = yes } }
                }
                any_owned = {
                    limit = { is_core = THIS }
                    secede_province = THIS
                }
            }
        }
        random_owned = {
            owner = {
                any_neighbor_country = {
                    limit = {
                        any_core = { owned_by = THIS }
                        NOT = { tag = FROM }
                        NOT = { alliance_with = FROM }
                    }
                    country_event = 96022
                }
            }
            any_country = {
                limit = {
                    exists = no
                    is_cultural_union = no
                    NOT = { is_culture_group = FROM }
                    NOT = {
                        THIS = { is_cultural_union = yes }
                        is_culture_group = THIS
                    }
                    any_core = { owned_by = THIS }
                }
                country_event = 96012
            }
        }
        any_country = {
            limit = {
                OR = {
                    truce_with = FROM
                    AND = {
                        has_country_flag = coalition_member
                    }
                }
                is_greater_power = yes
            }
            diplomatic_influence = {
                who = THIS
                value = 100
            }
            relation = {
                who = THIS
                value = 100
            }
        }
        any_country = {
            limit = {
                OR = {
                    truce_with = FROM
                    AND = {
                        has_country_flag = coalition_member
                    }
                }
                is_greater_power = no
            }
            relation = {
                who = THIS
                value = 100
            }
        }
        FROM = {
            diplomatic_influence = {
                who = THIS
                value = -200
            }
            relation = {
                who = THIS
                value = -100
            }
        }
        set_country_flag = newly_released_nation
    }
}
# Any country involved in the Great War will automatically get all its cores returned
country_event = {

    id = 96014
    title = "EVTNAME96014" #The Breakup of $FROMCOUNTRY$
    desc = "EVTDESC96014"
    picture = "treaty"

    is_triggered_only = yes

    immediate = {
        FROM = {
            any_state = {
                limit = {
                    any_owned_province = { is_core = THIS }
                }
                any_owned = {
                    limit = {
                        is_core = THIS
                        is_capital = no
                    }
                    secede_province = THIS
                }
            }
        }
    }

    option = {
        name = "EVTOPTA96014" #We simply wish our lands back
    }
}
   country_event = {
    id = 96018
    title = "EVTNAME96018"
    desc = "EVTDESC96018"

    is_triggered_only = yes

    option = {
        name = "EVTOPTA96031" #Great
        FROM = {
            any_state = {
                limit = {
                    NOT = { any_owned_province = { is_capital = yes } }
                    any_owned_province = {
                        is_core = THIS
                        is_colonial = yes
                    }
                }
                any_owned = {
                    limit = { is_core = THIS }
                    secede_province = THIS
                }
            }
            any_state = {
                limit = {
                    NOT = { any_owned_province = { is_capital = yes } }
                    any_owned_province = {
                        is_core = THIS
                        is_colonial = no
                        OR = {
                            THIS = {
                                NOT = { primary_culture = FROM }
                            }
                            any_neighbor_province = {
                                NOT = { owned_by = FROM }
                            }
                        }
                    }
                }
                any_owned = {
                    limit = { is_core = THIS }
                    secede_province = THIS
                }
            }
        }
        random_owned = {
            limit = {
                owner = { num_of_cities = 20 }
            }
            any_country = {
                limit = {
                    neighbour = THIS
                    any_core = { owned_by = THIS }
                    NOT = { tag = FROM }
                    NOT = { alliance_with = FROM }
                }
                country_event = 96022
            }
            any_country = {
                limit = {
                    exists = no
                    is_cultural_union = no
                    NOT = { is_culture_group = FROM }
                    any_core = { owned_by = THIS }
                }
                country_event = 96012
            }
        }
        any_country = {
            limit = {
                OR = {
                    truce_with = FROM
                    AND = {
                        has_country_flag = coalition_member
                    }
                }
                is_greater_power = yes
            }
            diplomatic_influence = {
                who = THIS
                value = 100
            }
            relation = {
                who = THIS
                value = 100
            }
        }
        any_country = {
            limit = {
                OR = {
                    truce_with = FROM
                    AND = {
                        has_country_flag = coalition_member
                    }
                }
                is_greater_power = no
            }
            relation = {
                who = THIS
                value = 100
            }
        }
        FROM = {
            diplomatic_influence = {
                who = THIS
                value = -200
            }
            relation = {
                who = THIS
                value = -100
            }
        }
    }
}
country_event = {

    id = 96022
    title = "EVTNAME96013" #The Breakup of $FROMCOUNTRY$
    desc = "EVTDESC96022"
    picture = "treaty"

    is_triggered_only = yes

    option = {
        name = "EVTOPTA96031" #Wonderful!
        FROM = {
            random_state = {
                limit = {
                    NOT = { any_owned_province = { is_capital = yes } }
                    any_owned_province = {
                        is_core = THIS
                        any_neighbor_province = { owned_by = THIS }
                    }
                }
                any_owned = {
                    limit = { is_core = THIS }
                    secede_province = THIS
                }
            }
        }
    }
}