﻿add_namespace = changelings
 

country_event = {   ######### Talk about Olenian Territories ######
         id = changelings.1
         title = changelings.1.t
         desc = changelings.1.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.1.a
            OLE = { 
                country_event = { days = 1 id=olenia.1 }
                }
            ai_chance = { factor = 100 }
            }
}
country_event = { ####### Offer Puppet Rights #########
         id = changelings.2
         title = changelings.2.t
         desc = changelings.2.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.2.a
            add_political_power = 50
            OLE = { 
                country_event = { days = 1 id=olenia.2 }
                }
            news_event = { days = 1 id = news.18 }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ Conquest ############
         id = changelings.3
         title = changelings.3.t
         desc = changelings.3.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.3.a
            add_political_power = 50
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ states ceded ############
         id = changelings.4
         title = changelings.4.t
         desc = changelings.4.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.4.a
            add_political_power = 50
            CHN = { transfer_state = 300
            transfer_state = 292 }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ states Denied ############
         id = changelings.5
         title = changelings.5.t
         desc = changelings.5.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.5.a
            add_political_power = 150
            add_national_unity = 0.05
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ Puppet success ############
         id = changelings.6
         title = changelings.6.t
         desc = changelings.6.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.6.a
            add_political_power = -250
            puppet = OLE
            CHN = { transfer_state = 300
            transfer_state = 292 }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ Puppet Denied ############
         id = changelings.7
         title = changelings.7.t
         desc = changelings.7.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.7.a
            add_political_power = 40
            add_national_unity = 0.03
            create_wargoal = { type = annex_everything target = OLE }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ Ole surrenderrs ############
         id = changelings.8
         title = changelings.8.t
         desc = changelings.8.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.8.a
            add_political_power = 40
            add_national_unity = 0.03
            annex_country = { target = OLE }
            news_event = { days = 2 id = news.15 }
            add_threat = 15
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ OLE agrees on puppet ############
         id = changelings.9
         title = changelings.9.t
         desc = changelings.9.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.9.a
            CHN = { transfer_state = 300
            transfer_state = 292 }
            puppet = OLE
            add_political_power = 40
            add_national_unity = 0.03
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ OLE agrees on puppet ############
         id = changelings.10
         title = changelings.10.t
         desc = changelings.10.d
         picture = GFX_event_swarm
 
         trigger = {
            tag = CHN
            country_exists = VAN
            has_global_flag = equestrian_civil_war_ended
            has_completed_focus = demand_equestria
         }
         fire_only_once = yes
         mean_time_to_happen = { days = 1 }

         option = {
            name = changelings.10.a
            create_wargoal = {
               target = VAN type = annex_everything
            }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ OLE agrees on puppet ############
         id = changelings.11
         title = changelings.11.t
         desc = changelings.11.d
         picture = GFX_event_swarm
 
         trigger = {
            tag = CHN
            country_exists = SCS
            has_global_flag = equestrian_civil_war_ended
            has_completed_focus = demand_equestria
         }
         fire_only_once = yes
         mean_time_to_happen = { days = 1 }

         option = {
            name = changelings.11.a
            create_wargoal = {
               target = SCS type = annex_everything
            }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ OLE agrees on puppet ############
         id = changelings.12
         title = changelings.12.t
         desc = changelings.12.d
         picture = GFX_event_swarm
 
         trigger = {
            tag = CHN
            country_exists = BAL
            has_global_flag = equestrian_civil_war_ended
            has_completed_focus = demand_equestria
         }
         fire_only_once = yes
         mean_time_to_happen = { days = 1 }

         option = {
            name = changelings.12.a
            create_wargoal = {
               target = BAL type = annex_everything
            }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ OLE agrees on puppet ############
         id = changelings.13
         title = changelings.13.t
         desc = changelings.13.d
         picture = GFX_event_swarm
 
         trigger = {
            tag = CHN
            country_exists = NLR
            has_completed_focus = demand_equestria
            has_global_flag = equestrian_civil_war_ended
         }
         fire_only_once = yes
         mean_time_to_happen = { days = 1 }

         option = {
            name = changelings.13.a
            create_wargoal = {
               target = NLR type = annex_everything
            }
            ai_chance = { factor = 100 }
            }
}
country_event = { ################ OLE agrees on puppet ############
         id = changelings.14
         title = changelings.14.t
         desc = changelings.14.d
         picture = GFX_event_swarm
 
         trigger = {
            tag = CHN
            OR = {
            NLR = { exists = no }
            NLR = { is_puppet = yes }
            }
            country_exists = STG
            has_completed_focus = demand_equestria
            has_global_flag = equestrian_civil_war_ended
         }
         fire_only_once = yes
         mean_time_to_happen = { days = 1 }

         option = {
            name = changelings.14.a
            create_wargoal = {
               target = STG type = annex_everything
            }
            ai_chance = { factor = 100 }
            }
}
country_event = { 
         id = changelings.15
         title = changelings.15.t
         desc = changelings.15.d
         picture = GFX_event_swarm
 
         trigger = {
            tag = CHN
            NLR = { is_puppet_of = CHN }
         }
         fire_only_once = yes
         mean_time_to_happen = { days = 1 }

         option = {
            name = changelings.15.a
            annex_country = {
               target = NLR
            }
            ai_chance = { factor = 100 }
            }
}
country_event = { 
         id = changelings.16
         title = changelings.16.t
         desc = changelings.16.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.16.a
            custom_effect_tooltip = spies_equestria
            hidden_effect = {
               EQS = {
               add_ideas = changeling_spies
               country_event = {
                  id = equestriachn.1 days = 25
                  }
               }
            }
            ai_chance = { factor = 100 }
            }
}
country_event = {  ## spy network destroyed
         id = changelings.17
         title = changelings.17.t
         desc = changelings.17.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = {
            name = changelings.17.a
            add_political_power = -50
            ai_chance = { factor = 100 }
            }
}
country_event = {  ## Sombra offers puppeting
         id = changelings.18
         title = changelings.18.t
         desc = changelings.18.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = { # NEVER
            name = changelings.18.a
            add_political_power = -20
            CRY = {
               country_event = { id = crysom.233 days = 1}
            }
            ai_chance = { factor = 70 }
            }
         option = { # ALRIGHT
            name = changelings.18.a
            add_political_power = -20
            CRY = {
               country_event = { id = crysom.24 days = 1}
            }
            ai_chance = { factor = 30  }
            }
}
country_event = {  ## Sombra offers alliance
         id = changelings.19
         title = changelings.19.t
         desc = changelings.19.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = { # NEVER
            name = changelings.19.a
            CRY = {
               country_event = { id = crysom.26 days = 1}
            }
            ai_chance = { base = 30
            modifier = {
               factor = 100
               has_war_with = CRY
                  }
               }
            }
         option = { # ALRIGHT
            name = changelings.19.b
            CRY = {
               country_event = { id = crysom.27 days = 1}
            }
            ai_chance = { base = 70
            modifier = {
               factor = 0
               has_war_with = CRY
                  }
               }
            }
   }
country_event = {  ## War on Equestria HERE
         id = changelings.20
         title = changelings.20.t
         desc = changelings.20.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = { # NEVER
            name = changelings.20.a
            trigger = {
            NOT = { has_global_flag = CHN_for_gray_pact }
            }
            create_wargoal = {
         type = annex_everything
         target = EQS
         } 
         create_wargoal = {
         type = annex_everything
         target = CRY
         }
            }
         option = { # ALRIGHT
            name = changelings.20.a
            trigger = {
               has_global_flag = CHN_for_gray_pact
            }
            create_wargoal = {
         type = annex_everything
         target = EQS
         } 
   }
}
country_event = {  ## Sombra offers marriage
         id = changelings.21
         title = changelings.21.t
         desc = changelings.21.d
         picture = GFX_event_swarm
 
         is_triggered_only = yes

         option = { # ALRIGHT
            name = changelings.21.a
            CRY = {
               country_event = { id = crysom.38 days = 1}
            }
            set_global_flag = Chrysalis_for_marriage
            ai_chance = { factor = 65 }
            }
         option = { # Nyo
            name = changelings.21.a
            CRY = {
               country_event = { id = crysom.38 days = 1}
            }
            news_event = {
               id = news.47 days = 1
            }
            ai_chance = { factor = 35  }
            }
}