﻿add_namespace = lunas

country_event = { #### Bonus things
    id = lunas.1
    title = lunas.1.t
    desc = lunas.1.d
    picture = report_event_technical
 
    trigger = {
        tag = NLR
        has_global_flag = equestrian_civil_war
    }
    mean_time_to_happen = { days = 150 }
    fire_only_once = yes

    option = {
    name = lunas.1.a
    trigger = {
    has_global_flag = nlr_workers
     }
    add_tech_bonus = {
                name = industrial_bonus
                bonus = 0.4
                uses = 2
                category = industry
            }
random_owned_controlled_state = {
                limit = {
                    free_building_slots = {
                        building = industrial_complex
                        size > 0
                        include_locked = yes
                    }
                    OR = {
                        is_in_home_area = yes
                        NOT = {
                            owner = {
                                any_owned_state = {
                                    free_building_slots = {
                                        building = arms_factory
                                        size > 0
                                        include_locked = yes
                                    }
                                    is_in_home_area = yes
                                }
                            }
                        }
                    }
                }
                add_extra_state_shared_building_slots = 4
                add_building_construction = {
                    type = arms_factory
                    level = 4
                    instant_build = yes
                }
            }
    }
    option = {
    name = lunas.1.b
    trigger = {
    has_global_flag = nlr_army
    }
    custom_effect_tooltip = nlr_volunteers
    hidden_effect = {
    load_oob = "NLR_CW_volunteers" }
    add_tech_bonus = {
                name = land_doc_bonus
                bonus = 0.65
                uses = 1
                category = land_doctrine
            }
    }
    option = {
    name = lunas.1.c
    trigger = {
    has_global_flag = nlr_scientists
    }
    add_tech_bonus = {
                name = secret_bonus
                bonus = 0.5
                uses = 1
                category = electronics
            }
    add_tech_bonus = {
                name = secret_bonus
                bonus = 0.2
                uses = 1
                category = nuclear
            }
    add_tech_bonus = {
                name = armor_bonus
                bonus = 0.4
                uses = 1
                category = armor
            }
    add_tech_bonus = {
                name = infantry_weapons_bonus
                bonus = 0.5
                uses = 1
                category = infantry_weapons
            }
    }
}

country_event = {
    id = lunas.2
    title = lunas.2.t
    desc = lunas.2.d
    picture = GFX_event_baltimare
 
    fire_only_once = yes
 
    trigger = {
    tag = NLR
    has_global_flag = equestrian_civil_war
    }
 
    mean_time_to_happen = {
    days = 25
    }
    option = {
    name = lunas.2.a
    hidden_effect = {
    news_event = {
        id = news.205
        days = 1
    }
    CES = {
        transfer_state = 50
        transfer_state = 88
        transfer_state = 32
        transfer_state = 86
        transfer_state = 25
        transfer_state = 15
        transfer_state = 26
        transfer_state = 34
        transfer_state = 35
        }
    BAL = {
        transfer_state = 13
        transfer_state = 28
        transfer_state = 27
        transfer_state = 82
        transfer_state = 90
        transfer_state = 81
        }
    JUN = {
        transfer_state = 16
        transfer_state = 52
        transfer_state = 79
        transfer_state = 83
        }
    NMS = {
        transfer_state = 31
        transfer_state = 37
        transfer_state = 17
        transfer_state = 36
        transfer_state = 24
        transfer_state = 33
        transfer_state = 81
        transfer_state = 30
            }
        }
    }
}

country_event = {
        id = lunas.3
        title = lunas.3.t
        desc = lunas.3.d
        picture = GFX_event_baltimare

        is_triggered_only = yes
        
        option = {
            name = lunas.3.a
            add_political_power = -20
        }            
}
country_event = {
    id = lunas.4
    title = lunas.4.t
    desc = lunas.4.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        EQS = { is_puppet_of = NLR }
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = { 
    name = lunas.4.a 
    annex_country = { target = EQS }
    ai_chance = { factor = 100 }
    }
    option = { 
    name = lunas.4.b
    ai_chance = { factor = 0 }
    }
}
country_event = {
    id = lunas.5
    title = lunas.5.t
    desc = lunas.5.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        country_exists = NMS
        has_global_flag = equestrian_civil_war_ended
        NOT = {
            country_exists = CES
        }
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = { 
    name = lunas.5.a 
    annex_country = { target = NMS transfer_troops = yes }
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = lunas.6
    title = lunas.6.t
    desc = lunas.6.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        country_exists = CES
        has_global_flag = equestrian_civil_war_ended
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    option = { 
    name = lunas.6.a 
    declare_war_on = { target = CES }
    give_military_access = NMS
    NMS = { give_military_access = NLR }
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = lunas.7
    title = lunas.7.t
    desc = lunas.7.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        country_exists = JUN
        has_global_flag = equestrian_civil_war_ended
        NOT = { country_exists = CES }
    }
    mean_time_to_happen = { days = 30 }
    fire_only_once = yes
    option = { 
    name = lunas.7.a 
    create_wargoal = { target = JUN type = annex_everything }
    ai_chance = { factor = 100 }
    }
    option = { 
    name = lunas.7.b 
    JUN = { country_event = { id = civwar.10 days = 1 } 
        }
    ai_chance = { factor = 0 }
    }
}

country_event = {
    id = lunas.8
    title = lunas.8.t
    desc = lunas.8.d
    picture = GFX_event_luna_poster
    
    is_triggered_only = yes

    option = { 
    name = lunas.8.a 
    create_wargoal = { target = JUN type = annex_everything }
    }
}

country_event = {
    id = lunas.9
    title = lunas.9.t
    desc = lunas.9.d
    picture = GFX_event_luna_poster
    
    is_triggered_only = yes

    option = { 
    name = lunas.9.a 
    load_oob = "NLR_CW_volunteers"
    }
}
country_event = {
    id = lunas.10
    title = lunas.10.t
    desc = lunas.10.d
    picture = GFX_report_event_technical
    
    is_triggered_only = yes

    option = { 
    name = lunas.10.a 
    NMS = { country_event = { id = civwar.11 days = 1 } }
    }
}
country_event = {
    id = lunas.11
    title = lunas.11.t
    desc = lunas.11.d
    picture = GFX_report_event_technical
    
    is_triggered_only = yes

    option = { 
    name = lunas.11.a 
    set_capital = 3
    3 ={
        add_extra_state_shared_building_slots = 5
        add_building_construction = { type = industrial_complex
                    level = 2
                    instant_build = yes }
        }
    }
    option = {
    name = lunas.11.b
    set_capital = 75
    75 ={
        add_extra_state_shared_building_slots = 5
        add_building_construction = { type = arms_factory
                    level = 4
                    instant_build = yes }
        }
    }
}
country_event = {
    id = lunas.12
    title = lunas.12.t
    desc = lunas.12.d
    picture = GFX_report_event_technical
    
    is_triggered_only = yes

    option = { 
    name = lunas.12.a 
    every_state = {
                limit = {
                    is_owned_by = CRY
                }
                add_core_of = NLR
            }
    }
}
country_event = {
    id = lunas.13
    title = lunas.13.t
    desc = lunas.13.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        has_global_flag = equestrian_civil_war_ended
    }
    mean_time_to_happen = { days = 30 }
    fire_only_once = yes
    option = { 
    name = lunas.13.a
    hidden_effect = {
        swap_ideas = { remove_idea = NLR_fight_to_death add_idea = NLR_army }
        set_rule = { can_create_factions = yes } 
    }
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = lunas.14
    title = lunas.14.t
    desc = lunas.14.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        has_global_flag = equestrian_civil_war
        has_war_with = EQS
        is_ai = yes
        surrender_progress > 0.50
    }
    mean_time_to_happen = { days = 30 }
    fire_only_once = yes
    option = { 
    name = lunas.14.a
    add_manpower = 20000
    load_oob = "NLR_Civil_War_extra"
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = lunas.15
    title = lunas.15.t
    desc = lunas.15.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        OR = {
            CHN = { is_puppet_of = NLR }
            CHN = { exists = no }
        }
    }
    mean_time_to_happen = { days = 10 }
    fire_only_once = yes
    option = { 
    name = lunas.15.a
    add_political_power = 200
    hidden_effect = {
    remove_ideas = NLR_war_plan }
    ai_chance = { factor = 100 }
    }
}
country_event = {
    id = lunas.16
    title = lunas.16.t
    desc = lunas.16.d
    picture = GFX_event_luna_poster
    
    trigger = {
        tag = NLR
        JUN = { is_puppet_of = NLR }
    }
    mean_time_to_happen = { days = 10 }
    fire_only_once = yes
    option = { 
    name = lunas.16.a
    annex_country = { target = JUN transfer_troops = yes }
    ai_chance = { factor = 100 }
    }
    option = { 
    name = lunas.16.b
    add_political_power = 300
    ai_chance = { factor = 0 }
    }
}