﻿add_namespace = lunas

country_event = { #### Bonus things
    id = lunas.1
    title = lunas.1.t
    desc = lunas.1.d
    picture = GFX_event_night_riders

    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
    hidden = 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 = 86
        transfer_state = 33
        transfer_state = 25
        transfer_state = 15
        transfer_state = 26
        transfer_state = 34
        transfer_state = 35
        transfer_state = 352
        country_event = {id = civwar.110 }
        }
    BAL = {
        transfer_state = 13
        transfer_state = 28
        transfer_state = 27
        transfer_state = 82
        transfer_state = 90
        transfer_state = 81
        country_event = {id = civwar.110 }
        }
    JUN = {
        transfer_state = 16
        transfer_state = 83
        transfer_state = 348
        country_event = {id = civwar.110 }
        }
    NMS = {
        transfer_state = 31
        transfer_state = 37
        transfer_state = 17
        transfer_state = 36
        transfer_state = 24
        transfer_state = 81
        transfer_state = 30
        transfer_state = 350
        transfer_state = 351
        transfer_state = 353
        transfer_state = 79
        transfer_state = 52
        transfer_state = 32
        country_event = {id = civwar.110 }
            }
        }
    }
}

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_subject_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.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_event_night_riders

    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_event_night_riders

    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_event_night_riders

    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_subject_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_subject_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 }
    }
}
country_event = {
    id = lunas.17
    title = lunas.17.t
    desc = lunas.17.d
    picture = GFX_event_luna_poster
    trigger = {
        tag = NLR
        date > 1008.07.25
    }
    fire_only_once = yes

	option = {
	ai_chance = { factor = 40 }
    name = lunas.17.a
    load_oob = "NLR_plan_spe"
	add_manpower = -50000
	set_country_flag = NLR_plan_spec
    }

	option = {
	ai_chance = { factor = 40 }
    name = lunas.17.b
    load_oob = "NLR_plan_mid"
	add_manpower = -50000
	set_country_flag = NLR_plan_midn
    }

	option = {
	ai_chance = { factor = 20 }
    name = lunas.17.c
	set_country_flag = NLR_plan_spec
	set_country_flag = NLR_plan_midn
    }
}
country_event = {
    id = lunas.19
    title = lunas.19.t
    desc = lunas.19.d
    picture = GFX_event_luna_poster
    is_triggered_only = yes
    fire_only_once = yes

	option = {
    name = lunas.19.a
	add_political_power = 50
	hidden_effect = {
		NLR = { country_event = { id = lunas.20 days = 15 } }
		}
    }
}
country_event = {
    id = lunas.20
    title = lunas.20.t
    desc = lunas.20.d
    picture = GFX_event_luna_poster
    is_triggered_only = yes
    fire_only_once = yes

	option = {
	ai_chance = { factor = 40 }
    name = lunas.20.a
	add_political_power = -25
	NLR = { add_national_unity = 0.05 }
	hidden_effect = {
		NLR = { country_event = { id = lunas.21 days = 15 } }
		}
    }
	option = {
	ai_chance = { factor = 60 }
    name = lunas.20.b
	add_political_power = -50
		create_corps_commander = {
				name = "Fastclip"
				portrait_path = "gfx/leaders/EQS/FastClip.tga"
				traits = { }
				skill = 2
			}
	hidden_effect = {
		NLR = { country_event = { id = lunas.21 days = 15 } }
		}
    }
}
country_event = {
    id = lunas.21
    title = lunas.21.t
    desc = lunas.21.d
    picture = GFX_event_luna_poster
    is_triggered_only = yes
    fire_only_once = yes

	option = {
	ai_chance = { factor = 80 }
    name = lunas.21.a
	NLR = { add_national_unity = 0.05 }
	add_political_power = -25
	hidden_effect = {
		NLR = { country_event = { id = lunas.22 days = 15 } }
		}
    }
	option = {
    name = lunas.21.b
	ai_chance = { factor = 20 }
	NLR = { add_national_unity = 0.025 }
    add_political_power = 25
	hidden_effect = {
		NLR = { country_event = { id = lunas.22 days = 15 } }
		}
    }
}
country_event = {
    id = lunas.22
    title = lunas.22.t
    desc = lunas.22.d
    picture = GFX_event_luna_poster
    is_triggered_only = yes
    fire_only_once = yes

	option = {
	ai_chance = { factor = 25 }
    name = lunas.22.a
	NLR = { add_national_unity = 0.10 }
	add_political_power = -100
	hidden_effect = {
		NLR = { country_event = { id = lunas.23 days = 15 } }
		}
    }
	option = {
	ai_chance = { factor = 25 }
    name = lunas.22.b
	NLR = { add_national_unity = 0.05 }
    add_political_power = -50
	hidden_effect = {
		NLR = { country_event = { id = lunas.23 days = 15 } }
		}
    }
	option = {
	ai_chance = { factor = 50 }
    name = lunas.22.c
	NLR = { add_national_unity = 0.025 }
    add_political_power = -25
	hidden_effect = {
		NLR = { country_event = { id = lunas.23 days = 15 } }
		}
    }
}
country_event = {
    id = lunas.23
    title = lunas.23.t
    desc = lunas.23.d
    picture = GFX_event_luna_poster
    is_triggered_only = yes
    fire_only_once = yes

	option = {
	ai_chance = { factor = 90 }
    name = lunas.23.a
	NLR = { add_national_unity = -0.05 }
	add_political_power = -50
	hidden_effect = {
		NLR = { country_event = { id = lunas.24 days = 5 } }
		}
    }
	option = {
    name = lunas.23.b
	ai_chance = { factor = 10 }
	NLR = { add_national_unity = -0.10 }
    add_political_power = -100
	hidden_effect = {
		NLR = { country_event = { id = lunas.24 days = 5 } }
		}
    }
}
country_event = {
    id = lunas.24
    title = lunas.24.t
    desc = lunas.24.d
    picture = GFX_event_luna_poster
    is_triggered_only = yes
    fire_only_once = yes

	option = {
    name = lunas.24.a
	set_country_flag = NLR_trials_over
		}
    }
country_event = {
	id = lunas.25
	title = lunas.25.t
	desc = lunas.25.d
	picture = GFX_event_luna_poster

	trigger = {
		tag = NLR
        has_global_flag = equestrian_civil_war
        has_war_with = EQS
	}

	mean_time_to_happen = {
		days = 160
	}

	option = {
		name = lunas.25.a
		add_political_power = -25
		add_manpower = -500
	}
}
country_event = {  ## Sombra offers alliance
    id = lunas.26
    title = lunas.26.t
    desc = lunas.26.d
    picture = GFX_event_luna_poster

    is_triggered_only = yes
    option = { # refuse
        name = lunas.26.a
        add_political_power = 20
        set_global_flag = NLR_for_gray_pact
        country_event = {
            id = crysom.32 days = 1
        }
        ai_chance = { factor = 85 }
    }
    option = {
        name = lunas.26.b
        country_event = {
            id = crysom.32 days = 1
        }
        create_wargoal = {
            target = CRY type = annex_everything
        }
        ai_chance = { factor = 15 }
    }
}
country_event = {  ## Sombra offers alliance
    id = lunas.27
    title = lunas.27.t
    desc = lunas.27.d
    picture = GFX_event_crystal_city

    is_triggered_only = yes
    option = { # refuse
        name = lunas.27.a
        add_political_power = 20
        set_global_flag = Luna_for_marriage
        country_event = {
            id = crysom.36 days = 1
        }
        ai_chance = { factor = 70 }
    }
    option = {
        name = lunas.27.b
        country_event = {
            id = crysom.36 days = 1
        }
        ai_chance = { factor = 30 }
    }
}
country_event = {
    id = lunas.28
    title = lunas.28.t
    desc = lunas.28.d
    picture = GFX_event_luna_poster
    is_triggered_only = yes
    fire_only_once = yes

	option = {
	ai_chance = { factor = 80 }
    name = lunas.28.a
    puppet = NMS
    }
	option = {
	ai_chance = { factor = 20 }
    name = lunas.28.b
	annex_country = { target = NMS transfer_troops = yes }
    }
}
country_event = { ### EVENT FOR NMS CAPITAL SWITCH
    id = lunas.29
    title = lunas.29.t
    desc = lunas.29.d
    picture = GFX_event_night_riders

    trigger = {
        tag = NMS
        3 = { is_controlled_by = NMS }
        75 = { is_controlled_by = NMS }
        12 = { is_controlled_by = NMS }
        13 = { is_controlled_by = NMS }
        15 = { is_controlled_by = NMS }
    }
    mean_time_to_happen = { days = 3 }
    fire_only_once = yes
    option = {
    name = lunas.29.a
    set_capital = 3
    }
    option = {
    name = lunas.29.b
    set_capital = 75
    }
    option = {
    name = lunas.29.c
    set_capital = 12
    }
    option = {
    name = lunas.29.e
    set_capital = 13
    }
    option = {
    name = lunas.29.f
    set_capital = 15
    }
}
country_event = {
    id = lunas.30
    title = lunas.30.t
    desc = lunas.30.d
    picture = GFX_event_luna_poster
    trigger = {
        tag = NLR
        has_global_flag = equestrian_civil_war_ended
        EQS = { has_government = democratic }
    }
    mean_time_to_happen = { days = 1 }
    fire_only_once = yes
    hidden = yes
    option = {
    ai_chance = { factor = 100 }
    name = lunas.30.a
    create_wargoal = { target = EQS type = annex_everything }
    }
}