﻿add_namespace = equestria
add_namespace = equestriachn
country_event = {
    id = equestria.1
    title = equestria.1.t
    desc = equestria.1.d
    picture = GFX_event_hearthswarming
 
    fire_only_once = yes
 
    trigger = {
    tag = EQS
    date > 1007.1.1
    }
 
    mean_time_to_happen = {
    days = 1
    }
    option = {
    name = equestria.1.a
    hidden_effect = {
        add_manpower = 55000
    }
}
 
}

country_event = {
         id = equestria.2
         title = equestria.2.t
         desc = equestria.2.d
         picture = GFX_event_buffalo_relations
 
         is_triggered_only = yes

         option = {
            name = equestria.2.a
            add_political_power = -35
            BUF = {
                country_event = { days = 1 id = bufstate.1 }
                }
            ai_chance = { factor = 100 }
            }
         option = {
            name = equestria.2.b
            add_political_power = -250
            add_national_unity = -0.15
            add_threat = 10
            declare_war_on = {
                target = BUF
                type = annex_everything
            }
            BUF = {
                country_event = { days = 1 id = bufstate.2 }
            }
            ai_chance = { factor = 0 }
         }
}

country_event = {
    id = equestria.3
    title = equestria.3.t
    desc = equestria.3.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.3.a
}
 
}
country_event = {
    id = equestria.4
    title = equestria.4.t
    desc = equestria.4.d
    picture = GFX_event_unicorn_academy
 
    is_triggered_only = yes

    option = {
    name = equestria.4.a
    add_ideas = unicorn_academy
    }
 
}
country_event = {
    id = equestria.5
    title = equestria.5.t
    desc = equestria.5.d
    picture = GFX_event_luna_nova
 
    is_triggered_only = yes

    option = {
    name = equestria.5.a
    custom_effect_tooltip = Unicorn_Academy
    hidden_effect = {
    swap_ideas = { remove_idea = unicorn_academy add_idea = unicorn_academy1 }
        }
    }
 
}
country_event = {
    id = equestria.6
    title = equestria.6.t
    desc = equestria.6.d
    picture = GFX_event_unicorn_academy
 
    is_triggered_only = yes

    option = {
    name = equestria.6.a
    custom_effect_tooltip = Unicorn_Academy
    hidden_effect = {
    swap_ideas = { remove_idea = unicorn_academy1 add_idea = unicorn_academy2 }
        }
    }
 
}
country_event = {
    id = equestria.7
    title = equestria.7.t
    desc = equestria.7.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.7.a
    }
 
}
country_event = {
    id = equestria.8
    title = equestria.8.t
    desc = equestria.8.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.8.a
    }
}
country_event = {
    id = equestria.9
    title = equestria.9.t
    desc = equestria.9.d
    picture = GFX_event_stg_pairlament2
 
    is_triggered_only = yes

    option = {
    name = equestria.9.a
    STG = {
        country_event = { days = 1 id = stalliongrad.1 }
        }
    }
    option = {
    name = equestria.9.b
    add_political_power = 150
    add_national_unity = -0.05
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = equestria.10
    title = equestria.10.t
    desc = equestria.10.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.10.a
    news_event = { days = 1 id = news.5 }
    ai_chance = { factor = 0 }
    }
}

country_event = {
    id = equestria.11
    title = equestria.11.t
    desc = equestria.11.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.11.a
    news_event = { days = 1 id = news.5 }
    OLE = {
        add_opinion_modifier = { target = EQS modifier = sheltered_velvet }
        }
    }
}
country_event = { ### BUF ANNEX
    id = equestria.12
    title = equestria.12.t
    desc = equestria.12.d
    picture = GFX_event_buffalo_relations
 
    is_triggered_only = yes

    option = {
    name = equestria.12.a
    annex_country = {
                target = BUF
                transfer_troops = yes }
    news_event = { days = 1 id = news.12 }
    }
 
}

country_event = { ## Reduce Stagnation
    id = equestria.13
    title = equestria.13.t
    desc = equestria.13.d
    picture = GFX_event_we_can_do_it
 
    is_triggered_only = yes

    option = {
    name = equestria.13.a
    swap_ideas = { remove_idea = harmonic_stagnation add_idea = harmonic_stagnation2 } 
    }
 
}

country_event = { # ## Equestrian Weapons of mass descruction
    id = equestria.14
    title = equestria.14.t
    desc = equestria.14.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.14.a
    add_tech_bonus = {
                name = secret_bonus
                bonus = 0.5
                uses = 1
                category = nuclear
            }
    }
}
country_event = { ### STG declines research
    id = equestria.15
    title = equestria.15.t
    desc = equestria.15.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.15.a
    }
}
country_event = {
    id = equestria.16
    title = equestria.16.t
    desc = equestria.16.d
    picture = GFX_event_we_can_do_it
 
    is_triggered_only = yes

    option = {
    name = equestria.16.a
    swap_ideas = { remove_idea = harmonic_stagnation2 add_idea = harmonic_stagnation3 }
    }
 
}

country_event = { #### STG agrees research
    id = equestria.17
    title = equestria.17.t
    desc = equestria.17.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.17.a
    }
 
}
country_event = { #### DRG denies badlands right away
    id = equestria.18
    title = equestria.18.t
    desc = equestria.18.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.18.a
    }
}
country_event = { #### DRG accepts badlands right away
    id = equestria.19
    title = equestria.19.t
    desc = equestria.19.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.19.a
    }
}
country_event = { #### DRG accepts on second thought
    id = equestria.20
    title = equestria.20.t
    desc = equestria.20.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.20.a
    transfer_state = 17
    }
}
country_event = { #### DRG accepts on second thought
    id = equestria.21
    title = equestria.21.t
    desc = equestria.21.d
    picture = report_event_technical
 
    is_triggered_only = yes

    option = {
    name = equestria.21.a
        create_wargoal = { type = annex_everything target = DRG }
    }
}
country_event = { #### DRG accepts on second thought
    id = equestria.22
    title = equestria.22.t
    desc = equestria.22.d
    picture = GFX_event_we_can_do_it
 
    is_triggered_only = yes

    option = {
    name = equestria.22.a
create_corps_commander = {
  name = "Applejack"
   portrait_path = "gfx/leaders/EQS/Applejack.dds"
   traits = { trickster ranger }
   skill = 1
}
create_corps_commander = {
  name = "Surprise"
  portrait_path = "gfx/leaders/EQS/Surprise.dds"
   traits = {  }
  skill = 2
        }
create_corps_commander = {
  name = "Big Macintosh"
  portrait_path = "gfx/leaders/EQS/BigMac.tga"
   traits = {  }
  skill = 1
        }
create_corps_commander = {
  name = "Braeburn"
  portrait_path = "gfx/leaders/EQS/Braeburn.tga"
   traits = { urban_assault_specialist }
  skill = 2
        }
create_corps_commander = {
  name = "Flash Sentry"
  portrait_path = "gfx/leaders/EQS/FlashSentry.tga"
   traits = {  }
  skill = 2
        }
create_corps_commander = {
  name = "Caltrop Deekay"
  portrait_path = "gfx/leaders/EQS/Gamma.tga"
   traits = { panzer_leader }
  skill = 3
        }
    }
}
country_event = { #### AI PONYPOWER BUFF
    id = equestria.23
    title = equestria.23.t
    desc = equestria.23.d
    picture = report_event_technical
 
    trigger = {
        tag = EQS
        is_ai = yes
        has_war_with = CHN
        surrender_progress > 0.15
    }

    fire_only_once = yes

    option = {
    name = equestria.23.a
    add_manpower = 550000
    add_ideas = eqs_ai_buff
    }
}
country_event = { #### AI PONYPOWER BUFF 2
    id = equestria.28
    title = equestria.28.t
    desc = equestria.28.d
    picture = report_event_technical
 
    trigger = {
        tag = EQS
        is_ai = yes
        105 = { is_controlled_by = CHN }
        surrender_progress > 0.25
    }

    fire_only_once = yes

    option = {
    name = equestria.28.a
    add_manpower = 1000000
    swap_ideas = { remove_idea = eqs_ai_buff add_idea = eqs_ai_buff2 }
    }
}
country_event = { #### AI PONYPOWER BUFF
    id = equestria.24
    title = equestria.24.t
    desc = equestria.24.d
    picture = report_event_technical
 
    trigger = {
        tag = EQS
        is_ai = yes
        has_completed_focus = Ministry_of_defense
    }

    fire_only_once = yes

    option = {
    name = equestria.24.a
    add_manpower = 200000
    }
}
country_event = { #### Communist Equestria
    id = equestria.25
    title = equestria.25.t
    desc = equestria.25.d
    picture = report_event_technical
 
    trigger = {
        original_tag = EQS
        has_government = communism
        has_civil_war = yes
    }

    fire_only_once = yes

    option = {
    name = equestria.25.a
    hidden_effect = {
    remove_ideas = harmonic_stagnation
    remove_ideas = harmonic_stagnation2
    remove_ideas = harmonic_stagnation3
    remove_ideas = alicorn_sisters
    set_cosmetic_tag = EQS_COMWAR
    set_global_flag = equestria_is_com
        }
    }
}
country_event = { #### Communist Equestria
    id = equestria.26
    title = equestria.26.t
    desc = equestria.26.d
    picture = report_event_technical
 
    trigger = {
        tag = EQS
        has_government = communism
        has_defensive_war = yes
        has_idea = friendly_harmony
    }

    fire_only_once = yes

    option = {
    name = equestria.26.a
    remove_ideas = friendly_harmony
    }
}
country_event = { #### Stalliongrad invites traders ###  asks for help
    id = equestria.27
    title = equestria.27.t
    desc = equestria.27.d
    picture = GFX_event_unicorn_worker
 
    is_triggered_only = yes

    option = {
    name = equestria.27.a
    STG = {
        country_event = { id = stalliongrad.41 days = 1 }
        set_cosmetic_tag = STG_EQS
        }
    puppet = STG
        hidden_effect = {
        STG = {
            retire_country_leader = yes
            create_country_leader = {
            name = "Dark Wing"
            desc = "DARKWING_EQS_DESC"
            picture = "Darkwing.tga"
            expire = "1965.1.1"
            ideology = liberalism
            traits = {
                  }
            }
        }
    }
}
}
country_event = { #### Solar Equestria
    id = equestria.29
    title = equestria.29.t
    desc = equestria.29.d
    picture = report_event_technical
 
    trigger = {
        tag = EQS
        has_government = fascism
        is_puppet = no
    }

    fire_only_once = yes

    option = {
    name = equestria.29.a
    set_cosmetic_tag = EQS_SOL
    }
}
country_event = { #### Stalliongradian influence
    id = equestria.30
    title = equestria.30.t
    desc = equestria.30.d
    picture = GFX_event_autumn
 
    trigger = {
        tag = EQS
        NOT = { has_government = communism }
        has_country_flag = stalliongradian_influence
    }
    mean_time_to_happen = { days = 30 }
    fire_only_once = yes

    option = {
    name = equestria.30.a
    }
}
country_event = { #### Stalliongrad Influence
    id = equestria.31
    title = equestria.31.t
    desc = equestria.31.d
    picture = GFX_event_autumn
 
    trigger = {
        tag = EQS
        NOT = { has_government = communism }
        has_country_flag = stalliongradian_influence
        has_idea = stalliongrad_propaganda
    }
    mean_time_to_happen = { days = 250 }
    fire_only_once = yes

    option = {
    name = equestria.31.a
    add_political_power = -50
    remove_ideas = stalliongrad_propaganda
    STG = {
        add_opinion_modifier = { target = EQS modifier = eqs_banned_activists }
        }
    }
    option = {
    name = equestria.31.b
    add_political_power = 50
    STG = {
        add_opinion_modifier = { target = EQS modifier = friendly_government }
        }
    }
}
country_event = { #### Stalliongrad Influence
    id = equestria.32
    title = equestria.32.t
    desc = equestria.32.d
    picture = GFX_event_autumn
 
    trigger = {
        tag = EQS
        NOT = { has_government = communism }
        has_country_flag = stalliongradian_influence
        has_idea = communist_influence
    }
    mean_time_to_happen = { days = 250 }
    fire_only_once = yes

    option = {
    name = equestria.32.a
    add_political_power = -50
    remove_ideas = communist_influence
    STG = {
        add_opinion_modifier = { target = EQS modifier = hostility }
        }
    }
    option = {
    name = equestria.32.b
    add_political_power = 50
    STG = {
        add_opinion_modifier = { target = EQS modifier = friendly_government }
        }
    }
}
country_event = { #### Communist Civil War
    id = equestria.33
    title = equestria.33.t
    desc = equestria.33.d
    picture = GFX_event_eqs_communists
 
    trigger = {
        tag = EQS
        NOT = { has_government = communism
        has_war = yes }
        has_country_flag = equestrian_revolution
        communism > 0.5
    }
    mean_time_to_happen = { days = 33 }
    fire_only_once = yes

    option = {
    name = equestria.33.a
        trigger = { is_ai = no }
        hidden_effect = {
            set_capital = 75
            start_civil_war = {
                ruling_party = communism
                ideology = democratic
                size = 0.5
                capital = 3
            }
            random_other_country = {
                limit = {
                    original_tag = EQS
                    has_government = democratic
                }
                load_oob = "EQS_DEMCOM_Civil_War"
                set_equipment_fraction = 0.5
                set_national_unity = 0.6
                add_ideas = communist_civil_war
                add_popularity = {
                    ideology = democratic
                    popularity = 0.35
                }
            }
            news_event = { hours = 6 id = news.63 }
            set_global_flag = equestrian_com_civil_war
            
            load_oob = "EQSCOM_Civil_War"
            set_equipment_fraction = 0.5
            set_national_unity = 0.6
            release_puppet = CRY
            add_ideas = communist_civil_war
            add_ideas = celestial_resistance
            add_popularity = {
                ideology = communism
                popularity = 0.5
            }

            #country_event = { id = spain.2 days = 7 }
        }
        custom_effect_tooltip = communists_chosen
    }
     option = {
    name = equestria.33.b
        trigger = { is_ai = no }
        hidden_effect = {
            set_capital = 3
            start_civil_war = {
                ruling_party = democratic
                ideology = communism
                size = 0.5
                capital = 75
            }
            random_other_country = {
                limit = {
                    original_tag = EQS
                    has_government = communism
                }
                add_ideas = communist_civil_war
                load_oob = "EQSCOM_Civil_War"
                set_equipment_fraction = 0.5
                set_national_unity = 0.6
                add_popularity = {
                    ideology = communism
                    popularity = 0.4
                }
            }
            news_event = { hours = 6 id = news.63 }
            set_global_flag = equestrian_com_civil_war
            add_ideas = communist_civil_war
            load_oob = "EQS_DEMCOM_Civil_War"
            set_equipment_fraction = 0.5
            set_national_unity = 0.6
            release_puppet = CRY
            add_popularity = {
                ideology = democratic
                popularity = 0.4
            }

            #country_event = { id = spain.2 days = 7 }
        }
        custom_effect_tooltip = celestia_chosen
    }

}
country_event = { #### Communist Civil War Buildup Starts here
    id = equestria.34
    title = equestria.34.t
    desc = equestria.34.d
    picture = GFX_event_pony_march
 
    trigger = {
        tag = EQS
        date > 1007.4.30
    }

    fire_only_once = yes

    option = { ## Allow demonstrations
    name = equestria.34.a
    add_political_power = 25
    ai_chance = { factor = 100 }
    }
    option = { ## Crush demonstrations
    name = equestria.34.b
    ai_chance = { factor = 0 }
    hidden_effect = {
    set_country_flag = eqs_communist_support }
    custom_effect_tooltip = communist_focus_tlp
    }
}
country_event = { #### 1st Focus
    id = equestria.35
    title = equestria.35.t
    desc = equestria.35.d
    picture = GFX_event_eqs_communists
 
    is_triggered_only = yes

    option = { ##
    name = equestria.35.a
    add_popularity = { ideology = communism popularity = 0.07 }
    add_ideas = equestrian_communists
    ai_chance = { factor = 100 }
    }
}
country_event = { #### Civil War EQS Events: Confederates Break Free
        id = equestria.36
        title = equestria.36.t
        desc = equestria.36.d
        picture = report_event_technical
     
        trigger = {
            tag = EQS
            has_global_flag = equestrian_com_civil_war
        }
        mean_time_to_happen = { days = 30 }
        fire_only_once = yes

        option = {
        name = equestria.36.a
        hidden_effect = {
        news_event = { hours = 6 id = news.201 }
        SCS = {
            transfer_state = 19
            transfer_state = 20
            transfer_state = 21
            transfer_state = 22
            transfer_state = 23
            transfer_state = 85
            transfer_state = 42
            transfer_state = 71
            transfer_state = 44
            transfer_state = 47
            transfer_state = 51
            transfer_state = 92
            transfer_state = 43
            transfer_state = 91
            transfer_state = 49
        }
            SCS = {
            add_ideas = communist_civil_war
            }
        }
    }
        option = {
        name = equestria.36.b
        trigger = { is_ai = no }
        hidden_effect = {
        news_event = { hours = 6 id = news.201 }
        SCS = {
            change_tag_from = EQS
            add_ideas = communist_civil_war
        }
        SCS = {
            transfer_state = 19
            transfer_state = 20
            transfer_state = 21
            transfer_state = 22
            transfer_state = 23
            transfer_state = 85
            transfer_state = 42
            transfer_state = 71
            transfer_state = 44
            transfer_state = 47
            transfer_state = 51
            transfer_state = 92
            transfer_state = 43
            transfer_state = 91
            transfer_state = 49
            }
        }
    }
}
country_event = { #### 1st Focus
    id = equestria.37
    title = equestria.37.t
    desc = equestria.37.d
    picture = GFX_event_eqs_communists
 
    trigger = {
    OR = {
        tag = D01
        tag = D02
        tag = EQS 
        }
    has_global_flag = equestrian_com_civil_war
    NOT = {
        has_government = communism
        }
    controls_state = 13
    controls_state = 28
    }
    fire_only_once = yes
    option = { ##
    name = equestria.37.a
    BAL = {
        transfer_state = 13
        transfer_state = 28
        transfer_state = 27
        transfer_state = 82
        transfer_state = 90
        transfer_state = 84
        transfer_state = 37
        }
    }
}
country_event = { #### 1st Focus
    id = equestria.38
    title = equestria.38.t
    desc = equestria.38.d
    picture = GFX_event_celestia_poster
 
    trigger = {
    OR = {
        tag = D01
        tag = D02
        tag = EQS 
        }
    has_civil_war = yes
    has_global_flag = equestrian_com_civil_war
    NOT = {
        has_government = communism
        }
    controls_state = 14
    controls_state = 45
    controls_state = 72
    }
    fire_only_once = yes
    option = { ##
    name = equestria.38.a
    VAN = {
        transfer_state = 14
        transfer_state = 45
        transfer_state = 72
        }
    }
}
country_event = { #### Civil War EQS Events: Confederates Break Free
        id = equestria.39
        title = equestria.39.t
        desc = equestria.39.d
        picture = GFX_event_celestia_poster
     
        trigger = {
            tag = EQS
            has_global_flag = equestrian_com_civil_war
            has_global_flag = celestia_abdicated
            BUF = { exists = no }
            has_civil_war = yes
        }
        mean_time_to_happen = { days = 30 }
        fire_only_once = yes

        option = {
        name = equestria.39.a
        hidden_effect = {
        news_event = { hours = 6 id = news.201 }
        SCS = {
            transfer_state = 19
            transfer_state = 20
            transfer_state = 21
            transfer_state = 22
            transfer_state = 23
            transfer_state = 85
            transfer_state = 42
            transfer_state = 71
            transfer_state = 44
            transfer_state = 47
            transfer_state = 51
            transfer_state = 92
            transfer_state = 43
            transfer_state = 91
            transfer_state = 49
            transfer_state = 89
            transfer_state = 78
            transfer_state = 93
            transfer_state = 80
        }
            SCS = {
            add_ideas = eqs_civil_war
            }
        }
    }
        option = {
        name = equestria.39.b
        trigger = { is_ai = no }
        hidden_effect = {
        news_event = { hours = 6 id = news.201 }
        SCS = {
            change_tag_from = EQS
            add_ideas = eqs_civil_war
        }
        SCS = {
            transfer_state = 19
            transfer_state = 20
            transfer_state = 21
            transfer_state = 22
            transfer_state = 23
            transfer_state = 85
            transfer_state = 42
            transfer_state = 71
            transfer_state = 44
            transfer_state = 47
            transfer_state = 51
            transfer_state = 92
            transfer_state = 43
            transfer_state = 91
            transfer_state = 49
            transfer_state = 89
            transfer_state = 78
            transfer_state = 93
            transfer_state = 80
            }
        }
    }
}
country_event = { #### 1st Focus
    id = equestria.40
    title = equestria.40.t
    desc = equestria.40.d
    picture = GFX_event_celestia_poster
 
    is_triggered_only = yes
    option = { ##
    name = equestria.40.a
    STG = {
        transfer_state = 160
        transfer_state = 164
        transfer_state = 162
        transfer_state = 159
        transfer_state = 167
        transfer_state = 229
        transfer_state = 156
        transfer_state = 154
        transfer_state = 157
        transfer_state = 158
        transfer_state = 326
        }
    }
    option = { ##
    name = equestria.40.b
    STG = {
        country_event = { id = stalliongrad.71 days = 1 }
        }
    remove_from_faction = STG
    }
}
country_event = { #### Jungle nation pops up
    id = equestria.41
    title = equestria.41.t
    desc = equestria.41.d
    picture = GFX_event_celestia_poster
 
    trigger = {
        OR = {
            tag = EQS
            tag = D01
            tag = D02
        }
        has_global_flag = equestrian_com_civil_war
        has_civil_war = yes
    }
    mean_time_to_happen = { days = 15 }
    fire_only_once = yes 
    option = { ##
    name = equestria.41.a
    JUN = {
        transfer_state = 16
        }
    }
}
country_event = { #### Celestia Abdicates
    id = equestria.43
    title = equestria.43.t
    desc = equestria.43.d
    picture = GFX_event_celestia_theme
 
    trigger = {
        OR = {
            tag = EQS
            tag = D01
            tag = D02
        }
        has_global_flag = equestrian_com_civil_war
        has_civil_war = yes
        has_government = democratic
    }
    mean_time_to_happen = { days = 15 }
    fire_only_once = yes 
    option = { ##
    trigger = { NOT = { has_unit_leader = 9999 } }
    name = equestria.43.a
    retire_country_leader = yes
    add_national_unity = -0.1
    create_country_leader = {
            name = "Princess Luna"
            desc = "LUNA_DESC"
            picture = "Luna.tga"
            expire = "1965.1.1"
            ideology = conservatism
            traits = {
                  }
            }
    news_event = { id = news.32 days = 1 }
    }
    option = { ##
    name = equestria.43.a
    trigger = { has_unit_leader = 9999 }
    retire_country_leader = yes
    add_national_unity = -0.1
    create_country_leader = {
            name = "Princess Luna"
            desc = "LUNA_DESC"
            picture = "Luna.tga"
            expire = "1965.1.1"
            ideology = conservatism
            traits = {
                  }
            }
    news_event = { id = news.32 days = 1 }
    }
}
country_event = { #### STG wants to help against CHN
    id = equestria.42
    title = equestria.42.t
    desc = equestria.42.d
    picture = GFX_event_we_can_do_it
 
    is_triggered_only = yes
    option = { ##
    name = equestria.42.a
    create_faction = "All_ponies_front"
    add_to_faction = STG
    add_to_faction = CRY
    add_to_faction = STL
    }
}
country_event = { #### Royalist Victory in civil war
    id = equestria.44
    title = equestria.44.t
    desc = equestria.44.d
    picture = GFX_event_eqs_communists
 
    trigger = {
        original_tag = EQS
        has_government = democratic
        has_civil_war = no
        has_global_flag = equestrian_com_civil_war
    }
    mean_time_to_happen = { days = 15 }
    fire_only_once = yes
    option = { ##
    name = equestria.44.a
    add_political_power = 150
    hidden_effect = {
        news_event = { id = news.31 days = 1 }
        set_global_flag = equestrian_com_civil_war_ended
        }
    }
}

country_event = { #### Royal Family Imprisoned
    id = equestria.45
    title = equestria.45.t
    desc = equestria.45.d
    picture = GFX_event_eqs_communists
 
    is_triggered_only = yes
    fire_only_once = yes

    option = { ## Demmand their release
    name = equestria.45.a
    ai_chance = { factor = 100 }

    custom_effect_tooltip = equestria.45.a.tt
    add_ideas = princess_imporisoned
    hidden_effect = {
        CRY = {
                country_event = { days = 15 id = crystalemp.10 }
            }
        }
    }
    option = { ## Do nothing
    name = equestria.45.b
    add_ideas = princess_imporisoned
    }
}

country_event = { #### Crystal Empire accepts
    id = equestria.46
    title = equestria.46.t
    desc = equestria.46.d
    picture = GFX_event_eqs_communists
 
    is_triggered_only = yes
    fire_only_once = yes

    option = { ## Greet their return
    name = equestria.46.a
    ai_chance = { factor = 100 }
    }
}

country_event = { #### Crystal Empire rejects
    id = equestria.47
    title = equestria.47.t
    desc = equestria.47.d
    picture = GFX_event_eqs_communists
 
    is_triggered_only = yes
    fire_only_once = yes

    option = { ## Isolate the Empire
        name = equestria.47.a
        add_opinion_modifier  = { target = CRY modifier = cry_refused_demmands }
    }

    option = { ## Do nothing
    name = equestria.47.b
    }
}

country_event = { #### Crystal Empire releases
    id = equestria.48
    title = equestria.48.t
    desc = equestria.48.d
    picture = GFX_event_eqs_communists
 
    is_triggered_only = yes

    option = { ## Greet their return
        name = equestria.46.a
        ai_chance = { factor = 100 }
        country_event = { days = 5 id = equestria.50 }
    }
}

country_event = { #### Princess Rescued
    id = equestria.49
    title = equestria.49.t
    desc = equestria.49.d
    picture = GFX_event_eqs_communists
 
    trigger = {
        tag = EQS
        has_war_with = CRY
        has_idea = princess_imprisoned
        controls_state = 489
    }

    fire_only_once = yes
    option = { ## Greet their return
    name = equestria.46.a
    ai_chance = { factor = 100 }
    country_event = { days = 5 id = equestria.50 }
    }
}

country_event = { #### Cadence Returned
    id = equestria.50
    title = equestria.50.t
    desc = equestria.50.d
    picture = GFX_event_eqs_communists
 
    is_triggered_only = yes

    option = { ## Greet their return
        name = equestria.50
        ai_chance = { factor = 100 }
        remove_ideas = princess_imprisoned
        CRY = { remove_ideas = royalfamily_imprisioned }
        set_country_flag = royal_family_returned
    }
}

##########################################################################################
############################################################################################
##############################################################################################
###############################################################################################
country_event = { #### Nightmare Moon Upbringing starts here.
    id = equestria.102
    title = equestria.102.t
    desc = equestria.102.d
    picture = GFX_event_luna
 
    trigger = {
        tag = EQS
        date > 1007.3.13
    }

    fire_only_once = yes

    option = { ## Calm Luna
    name = equestria.102.a
    add_political_power = 50
    ai_chance = { factor = 100 }
    }
    option = { ## Abandon Luna once again.
    name = equestria.102.b
    ai_chance = { factor = 0 }
    hidden_effect = {
    set_country_flag = nightmare_moon_focus }
    custom_effect_tooltip = luna_abandoned
    }
}

country_event = {
    id = equestria.100
    title = equestria.100.t
    desc = equestria.100.d
    picture = GFX_event_civil_war_eqs
    
    fire_only_once = yes
    
    trigger = {
        tag = EQS
        has_country_flag = nightmare_moon
    }

    mean_time_to_happen = {
        days = 100
    }
    
    option = { # Support Luna
        name = equestria.100.a
        trigger = { is_ai = no }
        hidden_effect = {
        news_event = { hours = 6 id = news.200 }
        EQS = {
                load_oob = "EQS_Civil_War"
                set_national_unity = 0.6
                add_ideas = eqs_civil_war
                remove_ideas = alicorn_sisters
                add_popularity = {
                    ideology = democratic
                    popularity = 0.10
                    ideology = communism
                    popularity = 0.08
                }
                declare_war_on = { target = NLR type = annex_everything }
            }
            NLR = {
                set_capital = 75
                change_tag_from = EQS
                }
            set_global_flag = equestrian_civil_war
            GRF = {
            transfer_state = 241
            }

            NLR = {
            transfer_state = 1
            transfer_state = 5
            transfer_state = 65
            transfer_state = 327
            transfer_state = 111
            transfer_state = 116
            transfer_state = 106
            transfer_state = 109
            transfer_state = 29
            transfer_state = 12
            transfer_state = 107
            transfer_state = 39
            transfer_state = 186
            transfer_state = 188
            transfer_state = 185
            transfer_state = 108
            transfer_state = 110
            transfer_state = 75
            transfer_state = 187
            transfer_state = 223
            transfer_state = 40
            transfer_state = 182
            transfer_state = 177
            transfer_state = 183
            transfer_state = 102
            transfer_state = 63
            transfer_state = 122
            transfer_state = 120
            transfer_state = 22
            transfer_state = 113
            transfer_state = 112
            transfer_state = 84
            transfer_state = 27
            transfer_state = 28
            transfer_state = 12
            transfer_state = 82
            transfer_state = 90
            transfer_state = 59
            transfer_state = 60
            transfer_state = 49
            transfer_state = 61
            transfer_state = 133
            transfer_state = 13
            transfer_state = 115
            transfer_state = 132
            transfer_state = 226
            transfer_state = 230
            transfer_state = 184
            transfer_state = 97
            transfer_state = 37
            transfer_state = 31
            transfer_state = 88
            transfer_state = 16
            transfer_state = 36
            transfer_state = 30
            transfer_state = 24
            transfer_state = 228
            transfer_state = 227
            transfer_state = 231
            transfer_state = 232
            transfer_state = 35
            transfer_state = 17
            transfer_state = 154
            transfer_state = 155
            transfer_state = 156
            transfer_state = 157
            transfer_state = 158
            transfer_state = 160
            transfer_state = 326
            transfer_state = 164
            transfer_state = 162
            transfer_state = 159
            transfer_state = 167
            transfer_state = 229
            transfer_state = 67
            }
            NLR = {
                load_oob = "NLR_Civil_War"
                set_national_unity = 0.6
                add_popularity = {
                        ideology = fascism
                        popularity = 0.1
            }
            add_ideas = eqs_civil_war
        }
        }
        custom_effect_tooltip = luna_chosen
    }
    option = { # Support Celestia
        name = equestria.100.b
        custom_effect_tooltip = celestia_chosen
        hidden_effect = {
            news_event = { hours = 6 id = news.200 }
            add_ideas = eqs_civil_war
            remove_ideas = alicorn_sisters
            set_global_flag = equestrian_civil_war
            GRF = {
            transfer_state = 241
            }
            add_popularity = {
                ideology = communism
                popularity = 0.1
            }
            add_popularity = {
                ideology = democratic
                popularity = 0.1
            }
            add_popularity = {
                ideology = fascism
                popularity = -1
            }
            declare_war_on = { target = NLR type = annex_everything }
            NLR = { transfer_state = 1
            transfer_state = 5
            transfer_state = 65
            transfer_state = 327
            transfer_state = 111
            transfer_state = 116
            transfer_state = 106
            transfer_state = 109
            transfer_state = 29
            transfer_state = 12
            transfer_state = 107
            transfer_state = 39
            transfer_state = 186
            transfer_state = 188
            transfer_state = 185
            transfer_state = 108
            transfer_state = 110
            transfer_state = 75
            transfer_state = 187
            transfer_state = 223
            transfer_state = 40
            transfer_state = 182
            transfer_state = 177
            transfer_state = 183
            transfer_state = 102
            transfer_state = 63
            transfer_state = 122
            transfer_state = 120
            transfer_state = 22
            transfer_state = 113
            transfer_state = 112
            transfer_state = 84
            transfer_state = 27
            transfer_state = 28
            transfer_state = 12
            transfer_state = 82
            transfer_state = 90
            transfer_state = 59
            transfer_state = 60
            transfer_state = 49
            transfer_state = 61
            transfer_state = 133
            transfer_state = 13
            transfer_state = 115
            transfer_state = 132
            transfer_state = 226
            transfer_state = 230
            transfer_state = 184
            transfer_state = 97
            transfer_state = 37
            transfer_state = 31
            transfer_state = 88
            transfer_state = 16
            transfer_state = 36
            transfer_state = 30
            transfer_state = 24
            transfer_state = 228
            transfer_state = 227
            transfer_state = 231
            transfer_state = 232
            transfer_state = 35
            transfer_state = 17
            transfer_state = 154
            transfer_state = 155
            transfer_state = 156
            transfer_state = 157
            transfer_state = 158
            transfer_state = 160
            transfer_state = 326
            transfer_state = 164
            transfer_state = 162
            transfer_state = 159
            transfer_state = 167
            transfer_state = 229
            transfer_state = 67
            load_oob = "NLR_Civil_War"
            add_ideas = eqs_civil_war
                }
            load_oob = "EQS_Civil_War"
            set_equipment_fraction = 0.8
            set_national_unity = 0.6
        }
    }
}
country_event = { #### Civil War NLR Events
    id = equestria.101
    title = equestria.101.t
    desc = equestria.101.d
    picture = GFX_event_luna_ready_for_war
 
    trigger = {
        tag = NLR
        has_global_flag = equestrian_civil_war
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes

    option = {
    name = equestria.101.a
    custom_effect_tooltip = luna_chosen1
    hidden_effect = {
        every_state = {
                limit = {
                    is_owned_by = NLR
                }
                add_core_of = NLR
            }
        add_manpower = 40000
        add_ideas = nightmare_moon
        add_ideas = NLR_fragile_rule
        }
    }
}
country_event = { #### Civil War EQS Events: Remove Luna
        id = equestria.104
        title = equestria.104.t
        desc = equestria.104.d
        picture = report_event_technical
     
        trigger = {
            tag = EQS
            has_global_flag = equestrian_civil_war
            has_unit_leader = 9999
        }
        mean_time_to_happen = { days = 1 }
        fire_only_once = yes

        option = {
        name = equestria.104.a
        remove_unit_leader = 9999
    }
}
country_event = { #### Prior NLR EVENT
    id = equestria.103
    title = equestria.103.t
    desc = equestria.103.d
    picture = GFX_event_lunar_republic
 
    is_triggered_only = yes

    option = {
    name = equestria.103.a
    custom_effect_tooltip = nlr_workers_tlt
    hidden_effect = {
    set_global_flag = nlr_workers
        }
    }
    option = {
    name = equestria.103.b
    custom_effect_tooltip = nlr_army_tlt
    hidden_effect = {
    set_global_flag = nlr_army
    }
    }
    option = {
    name = equestria.103.c
    custom_effect_tooltip = nlr_scientists_tlt
    hidden_effect = {
    set_global_flag = nlr_scientists
        }
    }
}
country_event = { #### Civil War EQS Events: Confederates Break Free
        id = equestria.105
        title = equestria.105.t
        desc = equestria.105.d
        picture = report_event_technical
     
        trigger = {
            tag = EQS
            has_global_flag = equestrian_civil_war
            BUF = { owns_state = 80 }
            OR = {
            2 = { is_controlled_by = NLR }
            3 = { is_controlled_by = NLR }
            }
        }
        mean_time_to_happen = { days = 30 }
        fire_only_once = yes

        option = {
        name = equestria.105.a
        hidden_effect = {
        news_event = { hours = 6 id = news.201 }
        SCS = {
            transfer_state = 19
            transfer_state = 20
            transfer_state = 21
            transfer_state = 22
            transfer_state = 23
            transfer_state = 85
            transfer_state = 42
            transfer_state = 71
            transfer_state = 44
            transfer_state = 47
            transfer_state = 51
            transfer_state = 92
            transfer_state = 43
            transfer_state = 91
            transfer_state = 49
        }
            SCS = {
            add_ideas = eqs_civil_war
            }
        }
    }
        option = {
        name = equestria.105.b
        trigger = { is_ai = no }
        hidden_effect = {
        news_event = { hours = 6 id = news.201 }
        SCS = {
            change_tag_from = EQS
            add_ideas = eqs_civil_war
        }
        SCS = {
            transfer_state = 19
            transfer_state = 20
            transfer_state = 21
            transfer_state = 22
            transfer_state = 23
            transfer_state = 85
            transfer_state = 42
            transfer_state = 71
            transfer_state = 44
            transfer_state = 47
            transfer_state = 51
            transfer_state = 92
            transfer_state = 43
            transfer_state = 91
            transfer_state = 49
            }
        }
    }
}
country_event = { #### Civil War EQS Events: Vanhoover Breaks Free
        id = equestria.106
        title = equestria.106.t
        desc = equestria.106.d
        picture = report_event_technical
     
        trigger = {
            tag = EQS
            NOT = {
                has_government = communism
            }
            has_global_flag = equestrian_civil_war
            STG = { owns_state = 67 }
            OR = {
            2 = { is_controlled_by = NLR }
            3 = { is_controlled_by = NLR }
            1 = { is_controlled_by = EQS }
            }
            country_exists = NLR
        }
        mean_time_to_happen = { days = 30 }
        fire_only_once = yes

        option = {
        name = equestria.106.a
        hidden_effect = {
        news_event = { id = news.202 hours = 6 }
        VAN = {
            transfer_state = 14
            transfer_state = 45
                }
            }
        }
        option = {
        name = equestria.106.b
        trigger = { is_ai = no }
        news_event = { id = news.202 hours = 6 }
        hidden_effect = {
        VAN = {
            change_tag_from = EQS
        }
        VAN = {
            transfer_state = 14
            transfer_state = 45
            }
        }
    }
}
country_event = { #### Civil War EQS Events: Tall Tales Counterrevolt
        id = equestria.107
        title = equestria.107.t
        desc = equestria.107.d
        picture = report_event_technical
     
        trigger = {
            tag = EQS
            has_global_flag = equestrian_civil_war
        }
        mean_time_to_happen = { days = 50 }
        fire_only_once = yes

        option = {
        name = equestria.107.a
        EQS = {
            transfer_state = 132
            transfer_state = 133
            transfer_state = 61
            transfer_state = 60
            transfer_state = 59
            }
        NLR = { country_event = { id = lunas.3 days = 1 } }
        }
}
country_event = { #### Civil War EQS Events: Request Stalliongrad Help
        id = equestria.108
        title = equestria.108.t
        desc = equestria.108.d
        picture = report_event_technical
     
        trigger = {
            tag = EQS
            has_global_flag = equestrian_civil_war
            has_war_with = NLR
            surrender_progress > 0.50
        }
        mean_time_to_happen = { days = 12 }
        fire_only_once = yes

        option = {
        name = equestria.108.a
        STG = {
            country_event = stalliongrad.6
            }
        }
}
country_event = {
    id = equestria.109
    title = equestria.109.t
    desc = equestria.109.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        NLR = { is_puppet_of = EQS }
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = { 
    name = equestria.109.a 
    annex_country = { target = NLR }
    ai_chance = { factor = 100 }
    }
    option = { 
    name = equestria.109.b
    ai_chance = { factor = 0 }
    }
}
country_event = {
    id = equestria.110
    title = equestria.110.t
    desc = equestria.110.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        country_exists = NMS
        has_global_flag = equestrian_civil_war_ended
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = { 
    name = equestria.110.a 
    declare_war_on = { target = NMS type = annex_everything }
    give_military_access = CES
    CES = { give_military_access = EQS }
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = equestria.111
    title = equestria.111.t
    desc = equestria.111.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        country_exists = CES
        has_global_flag = equestrian_civil_war_ended
        NOT = { country_exists = NMS }
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = { 
    name = equestria.111.a 
    annex_country = { target = CES transfer_troops = yes }
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = equestria.112
    title = equestria.112.t
    desc = equestria.112.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        country_exists = JUN
        has_global_flag = equestrian_civil_war_ended
        NOT = { country_exists = NMS }
    }
    mean_time_to_happen = { days = 30 }
    fire_only_once = yes
    option = { 
    name = equestria.112.a 
    create_wargoal = { target = JUN type = annex_everything }
    ai_chance = { factor = 0 }
    }
    option = { 
    name = equestria.112.b
    JUN = { country_event = { id = civwar.9 days = 1} 
        }
    ai_chance = { factor = 100 }
    }
}

country_event = {
    id = equestria.113
    title = equestria.113.t
    desc = equestria.113.d
    picture = GFX_event_celestia_poster
    
    is_triggered_only = yes

    option = { 
    name = equestria.113.a 
    create_wargoal = { target = JUN type = annex_everything }
    }
}

country_event = {
    id = equestria.114
    title = equestria.114.t
    desc = equestria.114.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        country_exists = CES
        has_global_flag = equestrian_civil_war_ended
        NMS = { is_puppet_of = CES }
    }
    mean_time_to_happen = { days = 30 }
    fire_only_once = yes
    option = { 
    name = equestria.114.a 
    annex_country = { target = CES }
    annex_country = { target = NMS }
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = equestria.115
    title = equestria.115.t
    desc = equestria.115.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        country_exists = NLR
        is_puppet = no
        has_global_flag = equestrian_civil_war_ended
    }
    mean_time_to_happen = { days = 30 }
    fire_only_once = yes
    option = { 
    name = equestria.115.a 
    annex_country = { target = NLR }
    }
}
country_event = {
    id = equestria.116
    title = equestria.116.t
    desc = equestria.116.d
    picture = GFX_event_celestia_poster
    
    is_triggered_only = yes

    option = { 
    name = equestria.116.a 
    set_country_flag = eqs_claim_land_civil_war
    }
}
country_event = { ## SCS question
    id = equestria.117
    title = equestria.117.t
    desc = equestria.117.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        has_country_flag = eqs_claim_land_civil_war
        country_exists = SCS
    }
    fire_only_once = yes 
    mean_time_to_happen = { days = 10 }

    option = {
    name = equestria.117.a 
    create_wargoal = { target = SCS type = annex_everything }
    ai_chance = { factor = 10 }
    }
    option = {
    name = equestria.117.b
    SCS = { country_event = { id = civwar.20 days = 1} }
    ai_chance = { factor = 90 }
    }
}
country_event = { ## VAN question
    id = equestria.118
    title = equestria.118.t
    desc = equestria.118.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        has_country_flag = eqs_claim_land_civil_war
        country_exists = VAN
    }
    fire_only_once = yes 
    mean_time_to_happen = { days = 20 }

    option = { 
    name = equestria.118.a 
    create_wargoal = { target = VAN type = annex_everything }
    ai_chance = { factor = 0 }
    }
    option = { 
    name = equestria.118.b 
    VAN = { country_event = { id = civwar.13 days = 1 } }
    ai_chance = { factor = 100 }
    }
}
country_event = { ## BAL question
    id = equestria.119
    title = equestria.119.t
    desc = equestria.119.d
    picture = GFX_event_mare_republic
    
    trigger = {
        tag = EQS
        has_country_flag = eqs_claim_land_civil_war
        country_exists = BAL
    }
    fire_only_once = yes 
    mean_time_to_happen = { days = 30 }

    option = { 
    name = equestria.119.a
    ai_chance = { factor = 20 }
    create_wargoal = { target = BAL type = annex_everything }
    hidden_effect = {
    STG = { country_event = { id = stalliongrad.8 days = 1 } 
            }
        }
    }
    option = { 
    name = equestria.119.b 
    ai_chance = { factor = 80 }
    hidden_effect = {
    BAL = { country_event = { id = civwar.12 days = 1 }
                 } 
            }
        }
    }
country_event = { ## STALLIONGRAD WARNING
    id = equestria.120
    title = equestria.120.t
    desc = equestria.120.d
    picture = GFX_event_stalliongrad
    
    is_triggered_only = yes

    option = { 
    name = equestria.120.a
    ai_chance = { factor = 75 }
    hidden_effect = {
    STG = { country_event = { id = stalliongrad.9 } 
            }
        }
    }
    option = {
    ai_chance = { factor = 25 }
    name = equestria.120.a
    hidden_effect = {
        STG = { add_opinion_modifier = { target = EQS modifier = hostility } }
    }
    }
}
country_event = { ## BAL REFUSES
    id = equestria.121
    title = equestria.121.t
    desc = equestria.121.d
    picture = GFX_event_mare_republic
    
    is_triggered_only = yes

    option = { 
    name = equestria.121.a 
    create_wargoal = { target = BAL type = annex_everything }
    ai_chance = { factor = 20 }
    }
    option = { 
    name = equestria.121.b
    add_political_power = 450
    ai_chance = { factor = 80 }
    }
}

country_event = { ## BAL Agrees
    id = equestria.122
    title = equestria.122.t
    desc = equestria.122.d
    picture = GFX_event_celestia_poster
    
    is_triggered_only = yes

    option = { 
    name = equestria.122.a
    add_political_power = 100
    }
}
country_event = { ## SCS agrees
    id = equestria.123
    title = equestria.123.t
    desc = equestria.123.d
    picture = GFX_event_celestia_poster
    
    is_triggered_only = yes

    option = { 
    name = equestria.123.a 
    add_political_power = 100
    ai_chance = { factor = 0 }
    puppet = SCS
    }
    option = { 
    name = equestria.123.b 
    add_political_power = 100
    annex_country = { target = SCS transfer_troops = yes }
    ai_chance = { factor = 100 }
    }
}
country_event = { ## VAN agrees
    id = equestria.124
    title = equestria.124.t
    desc = equestria.124.d
    picture = GFX_event_celestia_poster
    
    is_triggered_only = yes

    option = { 
    name = equestria.124.a 
    add_political_power = 50
    ai_chance = { factor = 0 }
    puppet = VAN
    }
    option = { 
    name = equestria.124.b 
    add_political_power = 50
    annex_country = { target = VAN transfer_troops = yes }
    ai_chance = { factor = 100 }
    }
}
country_event = { ## VAN agrees
    id = equestria.125
    title = equestria.125.t
    desc = equestria.125.d
    picture = GFX_event_celestia_poster
    
    is_triggered_only = yes

    option = { 
    name = equestria.125.a
    create_wargoal = { target = VAN type = annex_everything }
    ai_chance = { factor = 50 }
    }
    option = { 
    name = equestria.125.b 
    add_political_power = 400
    ai_chance = { factor = 50 }
    }
}
country_event = { ## Annex Jun
    id = equestria.126
    title = equestria.126.t
    desc = equestria.126.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        JUN = { is_puppet_of = EQS }
        has_country_flag = eqs_claim_land_civil_war
    }
    mean_time_to_happen = { days = 40 }
    fire_only_once = yes
    option = { 
    name = equestria.126.b 
    annex_country = { target = JUN transfer_troops = yes }
    ai_chance = { factor = 90 }
    }
    option = { 
    name = equestria.126.a  # leave them
    add_political_power = 100
    ai_chance = { factor = 10 }
    }
}
country_event = { ## Annex STG after Darkwing
    id = equestria.127
    title = equestria.127.t
    desc = equestria.127.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        tag = EQS
        STG = { is_puppet_of = EQS }
        OR = {
             CHN = { exists = no }
             CHN = { has_government = democratic }
        }
    }
    mean_time_to_happen = { days = 40 }
    fire_only_once = yes
    option = { 
    name = equestria.127.b 
    annex_country = { target = STG transfer_troops = yes }
    ai_chance = { factor = 100 }
    }
    option = { 
    name = equestria.127.a  # leave them
    add_political_power = 100
    ai_chance = { factor = 0 }
    }
}
country_event = { ## NLR Peace
    id = equestria.128
    title = equestria.128.t
    desc = equestria.128.d
    picture = GFX_event_celestia_poster
    
    trigger = {
        OR = {
            tag = EQS
            tag = NLR
        }
        has_global_flag = equestrian_civil_war
        NOT = { EQS = { has_war_with = NLR } }
    }
    mean_time_to_happen = { days = 5 }
    fire_only_once = yes
    option = {
    name = equestria.128.a
    ai_chance = { factor = 100 }
    remove_ideas = eqs_civil_war
    }
}
#######################################
country_event = { #### Changeling Spies
    id = equestriachn.1
    title = equestriachn.1.t
    desc = equestriachn.1.d
    picture = GFX_event_changeling_spies
 
    is_triggered_only = yes

    fire_only_once = yes
    option = { ## Find them all
    name = equestriachn.1.a
    add_political_power = -500
    custom_effect_tooltip = finding_spies1
    hidden_effect = {
        country_event = { id = equestriachn.2 days = 150 }
        }
    ai_chance = { factor = 50 }
    }
    option = { ## Find them all but not really
    name = equestriachn.1.b
    add_political_power = -300
    ai_chance = { factor = 30 }
    custom_effect_tooltip = finding_spies2
    hidden_effect = {
        country_event = { id = equestriachn.2 days = 210 }
        }
    }
    option = { ## Don't have enough resources for that
    name = equestriachn.1.c
    add_political_power = -150
    ai_chance = { factor = 10 }
    custom_effect_tooltip = finding_spies3
    hidden_effect = {
        country_event = { id = equestriachn.2 days = 560 }
        }
    }
    option = { ## Do nothing
    name = equestriachn.1.e
    add_political_power = -10
    ai_chance = { factor = 10 }
    custom_effect_tooltip = finding_spies4
    }
}
country_event = { #### Changeling Spies
    id = equestriachn.2
    title = equestriachn.2.t
    desc = equestriachn.2.d
    picture = GFX_event_changeling_spies
 
    is_triggered_only = yes

    fire_only_once = yes
    option = { ## Find them all
    name = equestriachn.2.a
    trigger = { CHN = { has_idea = covert_agents } }
    add_political_power = 20
    hidden_effect = {
        remove_ideas = changeling_spies
        CHN = {
            remove_ideas = covert_agents
            country_event = { id = changelings.17 days = 5 }
            }
        }
    }
    option = { ## Find them all
    name = equestriachn.2.a
    trigger = { NOT = { CHN = { has_idea = covert_agents } } }
    add_political_power = 20
    hidden_effect = {
        remove_ideas = changeling_spies
        }
    }
}