﻿add_namespace = civwar
 
country_event = {
    id = civwar.1
    title = civwar.1.t
    desc = civwar.1.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = SCS
    OR = {
    has_global_flag = equestrian_civil_war
    has_global_flag = equestrian_com_civil_war
        }
    }
 
    mean_time_to_happen = {
    days = 60
    }

    option = {
    name = civwar.1.a
    load_oob = "SCS_Civil_War"
    create_wargoal = {
        target = BUF type = annex_everything
        }
    }
}
country_event = {
    id = civwar.2
    title = civwar.2.t
    desc = civwar.2.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = SCS
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 15
    }

    option = {
    name = civwar.2.a
    hidden_effect = {
        every_state = {
                limit = {
                    is_owned_by = SCS
                }
                add_core_of = SCS
            }
        add_manpower = 10000
        load_oob = "SCS_Civil_War"
        }
    }
}
country_event = {
    id = civwar.3
    title = civwar.3.t
    desc = civwar.3.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = VAN
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 10
    }

    option = {
    name = civwar.3.a
    hidden_effect = {
        every_state = {
                limit = {
                    is_owned_by = VAN
                }
                add_core_of = VAN
            }
        add_manpower = 5000
        load_oob = "VAN_Civil_War"
        }
    }
}
country_event = {
    id = civwar.4
    title = civwar.4.t
    desc = civwar.4.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = CES
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 10
    }

    option = {
    name = civwar.4.a
    hidden_effect = {
        every_state = {
                limit = {
                AND = {
                    is_owned_by = CES
                    is_owned_by = NMS
                    is_owned_by = JUN
                }
                }
                add_core_of = CES
            }
        load_oob = "CES_Civil_War"
        EQS = { add_opinion_modifier = { target = CES modifier = besties } }
        NMS = { add_opinion_modifier = { target = CES modifier = enemies } }
        }
    }
}

country_event = {
    id = civwar.5
    title = civwar.5.t
    desc = civwar.5.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = NMS
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 10
    }

    option = {
    name = civwar.5.a
    hidden_effect = {
        every_state = {
                limit = {
                    AND = {
                    is_owned_by = NMS
                    is_owned_by = CES
                    is_owned_by = BAL
                    is_owned_by = JUN
                    }
                }
                add_core_of = NMS
            }
        load_oob = "NMS_Civil_War"
        add_manpower = 20000
        declare_war_on = {
            target = CES type = annex_everything
        }
        NLR = { add_opinion_modifier = { target = NMS modifier = besties } }
        CES = { add_opinion_modifier = { target = NMS modifier = enemies } }
        }
    }
}

country_event = {
    id = civwar.6
    title = civwar.6.t
    desc = civwar.6.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = JUN
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 10
    }

    option = {
    name = civwar.6.a
    hidden_effect = {
        every_state = {
                limit = {
                    AND = {
                    is_owned_by = CES
                    is_owned_by = NMS
                    is_owned_by = JUN
                    }
                }
                add_core_of = JUN
            }
        load_oob = "JUN_Civil_War"
        declare_war_on = {
            target = NMS type = annex_everything
        }
        declare_war_on = {
            target = CES type = annex_everything
        }
            }
        }
    }
country_event = {
    id = civwar.7
    title = civwar.7.t
    desc = civwar.7.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = BAL
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 10
    }

    option = {
    name = civwar.7.a
    hidden_effect = {
        every_state = {
                limit = {
                    is_owned_by = BAL
                }
                add_core_of = BAL
            }
        load_oob = "BAL_Civil_War"
        declare_war_on = {
            target = NMS type = annex_everything
        }
        STG = { add_opinion_modifier = { target = NMS modifier = besties } }
        NMS = { add_opinion_modifier = { target = NMS modifier = enemies } }
            }
        }
    }
country_event = { # 
    id = civwar.8
    title = civwar.8.t
    desc = civwar.8.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = BAL
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 10
    }

    option = {
    name = civwar.8.a
    hidden_effect = {
        every_state = {
                limit = {
                    is_owned_by = BAL
                }
                add_core_of = BAL
            }
        load_oob = "BAL_Civil_War"
        declare_war_on = {
            target = NMS type = annex_everything
        }
        STG = { add_opinion_modifier = { target = NMS modifier = besties } }
        NMS = { add_opinion_modifier = { target = NMS modifier = enemies } }
            }
        }
    }
country_event = { # IF EQS WINS
    id = civwar.9
    title = civwar.9.t
    desc = civwar.9.d
    picture = GFX_event_technical
 
    is_triggered_only = yes

    option = {
    name = civwar.9.a
    ai_chance = { factor = 100 }
    hidden_effect = {
        EQS = { puppet = JUN }
        }
    }
    option = {
    name = civwar.9.a
    hidden_effect = {
        EQS = { country_event = equestria.113 }
        }
    ai_chance = { factor = 0 }
    }
}
country_event = { # IF
    id = civwar.10
    title = civwar.10.t
    desc = civwar.10.d
    picture = GFX_event_technical

    is_triggered_only = yes

    option = {
    name = civwar.10.a
    ai_chance = { factor = 50 }
    hidden_effect = {
        NLR = { puppet = JUN }
        }
    }
    option = {
    name = civwar.10.a
    hidden_effect = {
        NLR = { country_event = lunas.8 }
        }
    ai_chance = { factor = 50 }
    }
}
country_event = { # NLR Support for NMS
    id = civwar.11
    title = civwar.11.t
    desc = civwar.11.d
    picture = GFX_event_technical
 
 
    is_triggered_only = yes

    option = {
    name = civwar.11.a
    add_equipment_to_stockpile = { amount = 3500 type = infantry_equipment producer = NLR }
    }
}

country_event = { # BALTIMARE GETS OFFER
    id = civwar.12
    title = civwar.12.t
    desc = civwar.12.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    is_triggered_only = yes

    option = {
    name = civwar.12.a
    EQS = { country_event = { id = equestria.121 days = 1 }
        }
    ai_chance = { factor = 85 }
    }
    option = {
    name = civwar.12.b
    EQS = { country_event = { id = equestria.122 days = 1 }
        }
    EQS = { puppet = BAL }
    ai_chance = { factor = 15 }
    }
}
country_event = { # VAN BACK TO EQS
    id = civwar.13
    title = civwar.13.t
    desc = civwar.13.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    is_triggered_only = yes

    option = {
    name = civwar.13.a
    EQS = { country_event = { id = equestria.124 days = 1 } }
    ai_chance = { factor = 100 }
    }
    option = {
    name = civwar.13.b
    EQS = { country_event = { id = equestria.125 days = 1 } }
    ai_chance = { factor = 0 }
    }
}
country_event = { # BALTIMARE GETS OFFER
    id = civwar.14
    title = civwar.14.t
    desc = civwar.14.d
    picture = GFX_event_technical
 
    trigger = {
        tag = BAL
        has_war_with = EQS
        country_exists = STG
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = {
    name = civwar.14.a
    STG = { country_event = { id = stalliongrad.10 days = 1 } }
    ai_chance = { factor = 100 }
    }
    option = {
    name = civwar.14.b
    add_political_power = 200
    ai_chance = { factor = 0 }
    }
}
country_event = { # BALTIMARE GETS OFFER
    id = civwar.15
    title = civwar.15.t
    desc = civwar.15.d
    picture = GFX_event_technical
 
    trigger = {
        tag = BAL
        has_war_with = NLR
        country_exists = STG
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = {
    name = civwar.15.a
    STG = { country_event = { id = stalliongrad.11 days = 1 } }
    ai_chance = { factor = 100 }
    }
    option = {
    name = civwar.15.b
    add_political_power = 200
    ai_chance = { factor = 0 }
    }
}
country_event = { # SCS GETS OFFER
    id = civwar.16
    title = civwar.16.t
    desc = civwar.16.d
    picture = GFX_event_technical
 
    is_triggered_only = yes

    option = {
    name = civwar.16.a
    hidden_effect = {
    EQS = { country_event = { id = equestria.122 days = 1 } }
    declare_war_on = { target = EQS type = annex_everything }
    add_political_power = 500
    remove_ideas = eqs_civil_war
    load_oob = "SCS_Civil_War"
        }
    ai_chance = { factor = 75 }
    }
    option = {
    name = civwar.16.b
    load_oob = "SCS_Civil_War"
    EQS = { country_event = { id = equestria.123 days = 1 } }
    ai_chance = { factor = 25 }
    }
}
country_event = {
    id = civwar.17
    title = civwar.17.t
    desc = civwar.17.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = SCS
    ROC = { exists = yes }
    }
 
    mean_time_to_happen = {
    days = 15
    }

    option = {
    name = civwar.17.a
    trigger = {
        has_global_flag = equestrian_com_civil_war
    }
    declare_war_on = { target = ROC type = annex_everything }
    declare_war_on = { target = EQS type = annex_everything }
    }
    option = {
    name = civwar.17.b
    trigger = {
        has_global_flag = equestrian_civil_war
    }
    declare_war_on = { target = ROC type = annex_everything }
    }
}
country_event = {
    id = civwar.18
    title = civwar.18.t
    desc = civwar.18.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = ROC
    has_government = communism
    EQS = {
        has_government = communism
        has_civil_war = no
    }
    SCS = { exists = no }
    }
 
    mean_time_to_happen = {
    days = 2
    }
    option = {
    name = civwar.18.a
    ai_chance = { factor = 100 }
    EQS = {
        country_event = { id = eqscom.14 days = 1 }
        }
    }
    option = {
    name = civwar.18.b
    ai_chance = { factor = 0 }
    add_political_power = 500
    }
}
country_event = {
    id = civwar.19
    title = civwar.19.t
    desc = civwar.19.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = BAL
    has_government = communism
    has_global_flag = equestrian_com_civil_war
    }
 
    mean_time_to_happen = {
    days = 2
    }
    option = {
    name = civwar.19.a
    ai_chance = { factor = 100 }
    declare_war_on = { target = D01 type = annex_everything }
    }
}
country_event = {
    id = civwar.20
    title = civwar.20.t
    desc = civwar.20.d
    picture = GFX_event_technical
 
    fire_only_once = yes
 
    trigger = {
    tag = ROC
    has_government = communism
    has_global_flag = equestrian_com_civil_war
    }
 
    mean_time_to_happen = {
    days = 1
    }
    option = {
    name = civwar.20.a
    ai_chance = { factor = 100 }
    add_manpower = 11000
    add_ideas = war_communism
    every_state = {
        limit = {
            is_owned_by = ROC
        }
        add_core_of = ROC
    }
    }
}