add_namespace = rl

# v3.7.0: The setup events rl.0 / rl.2 / rl.4 / rl.6 / rl.7 / rl.8 were replaced by game rules (common/game_rules).

country_event = {
    id = rl.1
    title = rl.1.t
    desc = rl.1.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = {
        hidden_effect = {
            if = {
                limit = { NOT = { has_country_flag = rl_offers_ready } }
                rl_generate_three_offers = yes
            }
        }
    }
    # v3.8.0: picks only apply while the offers of this window are still valid (no double picks),
    # the AI prefers higher rarities and avoids cursed upgrades.
    option = {
        name = rl.1.a
        custom_effect_tooltip = rl.1.a.tt
        ai_chance = {
            factor = 1
            modifier = { factor = 2 check_variable = { rl_offer_1_rarity > 1 } }
            modifier = { factor = 2 check_variable = { rl_offer_1_rarity > 2 } }
            modifier = { factor = 2 check_variable = { rl_offer_1_rarity > 3 } }
            modifier = { factor = 2 check_variable = { rl_offer_1_rarity > 4 } }
            modifier = { factor = 0.2 rl_offer_1_is_cursed = yes }
        }
        hidden_effect = { rl_pick_offer_1 = yes }
    }
    option = {
        name = rl.1.b
        custom_effect_tooltip = rl.1.b.tt
        ai_chance = {
            factor = 1
            modifier = { factor = 2 check_variable = { rl_offer_2_rarity > 1 } }
            modifier = { factor = 2 check_variable = { rl_offer_2_rarity > 2 } }
            modifier = { factor = 2 check_variable = { rl_offer_2_rarity > 3 } }
            modifier = { factor = 2 check_variable = { rl_offer_2_rarity > 4 } }
            modifier = { factor = 0.2 rl_offer_2_is_cursed = yes }
        }
        hidden_effect = { rl_pick_offer_2 = yes }
    }
    option = {
        name = rl.1.c
        custom_effect_tooltip = rl.1.c.tt
        ai_chance = {
            factor = 1
            modifier = { factor = 2 check_variable = { rl_offer_3_rarity > 1 } }
            modifier = { factor = 2 check_variable = { rl_offer_3_rarity > 2 } }
            modifier = { factor = 2 check_variable = { rl_offer_3_rarity > 3 } }
            modifier = { factor = 2 check_variable = { rl_offer_3_rarity > 4 } }
            modifier = { factor = 0.2 rl_offer_3_is_cursed = yes }
        }
        hidden_effect = { rl_pick_offer_3 = yes }
    }
    option = {
        name = rl.1.d_opt
        custom_effect_tooltip = rl.1.d_opt.tt
        trigger = { is_ai = no }
        hidden_effect = { country_event = { id = rl.10 } }
    }
}

country_event = {
    id = rl.10
    title = rl.10.t
    desc = rl.10.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = {
        name = rl.10.a
        trigger = { check_variable = { rl_fate_shards > 4 } }
        hidden_effect = { rl_reroll_current_offers = yes country_event = { id = rl.1 } }
    }
    option = {
        name = rl.10.b
        trigger = { check_variable = { rl_fate_shards > 7 } }
        hidden_effect = { country_event = { id = rl.11 } }
    }
    option = {
        name = rl.10.c
        trigger = { check_variable = { rl_fate_shards > 11 } }
        hidden_effect = { country_event = { id = rl.12 } }
    }
    option = { name = rl.10.back hidden_effect = { country_event = { id = rl.1 } } }
}

country_event = {
    id = rl.11
    title = rl.11.t
    desc = rl.11.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.11.a hidden_effect = { rl_lock_offer_1 = yes country_event = { id = rl.1 } } }
    option = { name = rl.11.b hidden_effect = { rl_lock_offer_2 = yes country_event = { id = rl.1 } } }
    option = { name = rl.11.c hidden_effect = { rl_lock_offer_3 = yes country_event = { id = rl.1 } } }
    option = { name = rl.11.back hidden_effect = { country_event = { id = rl.1 } } }
}

country_event = {
    id = rl.12
    title = rl.12.t
    desc = rl.12.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.12.a hidden_effect = { rl_banish_offer_1 = yes country_event = { id = rl.1 } } }
    option = { name = rl.12.b hidden_effect = { rl_banish_offer_2 = yes country_event = { id = rl.1 } } }
    option = { name = rl.12.c hidden_effect = { rl_banish_offer_3 = yes country_event = { id = rl.1 } } }
    option = { name = rl.12.back hidden_effect = { country_event = { id = rl.1 } } }
}

country_event = {
    id = rl.3
    title = rl.3.t
    desc = rl.3.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.3.a }
}

country_event = {
    id = rl.5
    title = rl.5.t
    desc = rl.5.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.5.a }
}

country_event = {
    id = rl.20
    title = rl.20.t
    desc = rl.20.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.20.a }
}

country_event = {
    id = rl.30
    title = rl.30.t
    desc = rl.30.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.30.a }
}


country_event = {
    id = rl.40
    title = rl.40.t
    desc = rl.40.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    trigger = { has_global_flag = rl_mode_player_only is_ai = no }
    option = { name = rl.40.a }
}



country_event = {
    id = rl.42
    title = rl.42.t
    desc = rl.42.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.42.a }
}

country_event = {
    id = rl.43
    title = rl.42.t
    desc = rl.43.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.42.a }
}

country_event = {
    id = rl.44
    title = rl.44.t
    desc = rl.44.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.44.a }
}

country_event = {
    id = rl.50
    title = rl.50.t
    desc = rl.50.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = {
        set_variable = { rl_offer_1_id = rl_hc_pending_id }
        set_variable = { rl_offer_1_rarity = rl_hc_pending_rarity }
    }
    option = { name = rl.50.a hidden_effect = { set_country_flag = rl_hc_replacement_mode country_event = { id = rl.51 } } }
    option = { name = rl.50.b hidden_effect = { rl_hc_reject_pending_upgrade = yes } }
}
country_event = {
    id = rl.51
    title = rl.hc.inventory.t
    desc = rl.hc.inventory.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = { set_variable = { rl_hc_current_page = 1 } rl_hc_prepare_page_1 = yes }
    option = {
        name = rl.hc.slot_01
        custom_effect_tooltip = rl.1.a.tt
        trigger = { check_variable = { rl_hc_slot_01_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 1 }
            set_variable = { rl_hc_return_page = 51 }
            set_variable = { rl_offer_1_id = rl_hc_slot_01_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_01_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_02
        custom_effect_tooltip = rl.1.b.tt
        trigger = { check_variable = { rl_hc_slot_02_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 2 }
            set_variable = { rl_hc_return_page = 51 }
            set_variable = { rl_offer_1_id = rl_hc_slot_02_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_02_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_03
        custom_effect_tooltip = rl.1.c.tt
        trigger = { check_variable = { rl_hc_slot_03_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 3 }
            set_variable = { rl_hc_return_page = 51 }
            set_variable = { rl_offer_1_id = rl_hc_slot_03_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_03_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = { name = rl.hc.page_menu hidden_effect = { country_event = { id = rl.59 } } }
}
country_event = {
    id = rl.52
    title = rl.hc.inventory.t
    desc = rl.hc.inventory.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = { set_variable = { rl_hc_current_page = 2 } rl_hc_prepare_page_2 = yes }
    option = {
        name = rl.hc.slot_04
        custom_effect_tooltip = rl.1.a.tt
        trigger = { check_variable = { rl_hc_slot_04_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 4 }
            set_variable = { rl_hc_return_page = 52 }
            set_variable = { rl_offer_1_id = rl_hc_slot_04_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_04_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_05
        custom_effect_tooltip = rl.1.b.tt
        trigger = { check_variable = { rl_hc_slot_05_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 5 }
            set_variable = { rl_hc_return_page = 52 }
            set_variable = { rl_offer_1_id = rl_hc_slot_05_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_05_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_06
        custom_effect_tooltip = rl.1.c.tt
        trigger = { check_variable = { rl_hc_slot_06_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 6 }
            set_variable = { rl_hc_return_page = 52 }
            set_variable = { rl_offer_1_id = rl_hc_slot_06_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_06_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = { name = rl.hc.page_menu hidden_effect = { country_event = { id = rl.59 } } }
}
country_event = {
    id = rl.53
    title = rl.hc.inventory.t
    desc = rl.hc.inventory.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = { set_variable = { rl_hc_current_page = 3 } rl_hc_prepare_page_3 = yes }
    option = {
        name = rl.hc.slot_07
        custom_effect_tooltip = rl.1.a.tt
        trigger = { check_variable = { rl_hc_slot_07_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 7 }
            set_variable = { rl_hc_return_page = 53 }
            set_variable = { rl_offer_1_id = rl_hc_slot_07_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_07_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_08
        custom_effect_tooltip = rl.1.b.tt
        trigger = { check_variable = { rl_hc_slot_08_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 8 }
            set_variable = { rl_hc_return_page = 53 }
            set_variable = { rl_offer_1_id = rl_hc_slot_08_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_08_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_09
        custom_effect_tooltip = rl.1.c.tt
        trigger = { check_variable = { rl_hc_slot_09_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 9 }
            set_variable = { rl_hc_return_page = 53 }
            set_variable = { rl_offer_1_id = rl_hc_slot_09_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_09_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = { name = rl.hc.page_menu hidden_effect = { country_event = { id = rl.59 } } }
}
country_event = {
    id = rl.54
    title = rl.hc.inventory.t
    desc = rl.hc.inventory.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = { set_variable = { rl_hc_current_page = 4 } rl_hc_prepare_page_4 = yes }
    option = {
        name = rl.hc.slot_10
        custom_effect_tooltip = rl.1.a.tt
        trigger = { check_variable = { rl_hc_slot_10_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 10 }
            set_variable = { rl_hc_return_page = 54 }
            set_variable = { rl_offer_1_id = rl_hc_slot_10_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_10_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_11
        custom_effect_tooltip = rl.1.b.tt
        trigger = { check_variable = { rl_hc_slot_11_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 11 }
            set_variable = { rl_hc_return_page = 54 }
            set_variable = { rl_offer_1_id = rl_hc_slot_11_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_11_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_12
        custom_effect_tooltip = rl.1.c.tt
        trigger = { check_variable = { rl_hc_slot_12_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 12 }
            set_variable = { rl_hc_return_page = 54 }
            set_variable = { rl_offer_1_id = rl_hc_slot_12_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_12_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = { name = rl.hc.page_menu hidden_effect = { country_event = { id = rl.59 } } }
}
country_event = {
    id = rl.55
    title = rl.hc.inventory.t
    desc = rl.hc.inventory.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = { set_variable = { rl_hc_current_page = 5 } rl_hc_prepare_page_5 = yes }
    option = {
        name = rl.hc.slot_13
        custom_effect_tooltip = rl.1.a.tt
        trigger = { check_variable = { rl_hc_slot_13_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 13 }
            set_variable = { rl_hc_return_page = 55 }
            set_variable = { rl_offer_1_id = rl_hc_slot_13_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_13_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_14
        custom_effect_tooltip = rl.1.b.tt
        trigger = { check_variable = { rl_hc_slot_14_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 14 }
            set_variable = { rl_hc_return_page = 55 }
            set_variable = { rl_offer_1_id = rl_hc_slot_14_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_14_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_15
        custom_effect_tooltip = rl.1.c.tt
        trigger = { check_variable = { rl_hc_slot_15_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 15 }
            set_variable = { rl_hc_return_page = 55 }
            set_variable = { rl_offer_1_id = rl_hc_slot_15_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_15_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = { name = rl.hc.page_menu hidden_effect = { country_event = { id = rl.59 } } }
}
country_event = {
    id = rl.56
    title = rl.hc.inventory.t
    desc = rl.hc.inventory.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = { set_variable = { rl_hc_current_page = 6 } rl_hc_prepare_page_6 = yes }
    option = {
        name = rl.hc.slot_16
        custom_effect_tooltip = rl.1.a.tt
        trigger = { check_variable = { rl_hc_slot_16_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 16 }
            set_variable = { rl_hc_return_page = 56 }
            set_variable = { rl_offer_1_id = rl_hc_slot_16_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_16_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_17
        custom_effect_tooltip = rl.1.b.tt
        trigger = { check_variable = { rl_hc_slot_17_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 17 }
            set_variable = { rl_hc_return_page = 56 }
            set_variable = { rl_offer_1_id = rl_hc_slot_17_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_17_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_18
        custom_effect_tooltip = rl.1.c.tt
        trigger = { check_variable = { rl_hc_slot_18_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 18 }
            set_variable = { rl_hc_return_page = 56 }
            set_variable = { rl_offer_1_id = rl_hc_slot_18_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_18_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = { name = rl.hc.page_menu hidden_effect = { country_event = { id = rl.59 } } }
}
country_event = {
    id = rl.57
    title = rl.hc.inventory.t
    desc = rl.hc.inventory.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = { set_variable = { rl_hc_current_page = 7 } rl_hc_prepare_page_7 = yes }
    option = {
        name = rl.hc.slot_19
        custom_effect_tooltip = rl.1.a.tt
        trigger = { check_variable = { rl_hc_slot_19_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 19 }
            set_variable = { rl_hc_return_page = 57 }
            set_variable = { rl_offer_1_id = rl_hc_slot_19_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_19_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = {
        name = rl.hc.slot_20
        custom_effect_tooltip = rl.1.b.tt
        trigger = { check_variable = { rl_hc_slot_20_id > 0 } }
        hidden_effect = {
            set_variable = { rl_hc_target_slot = 20 }
            set_variable = { rl_hc_return_page = 57 }
            set_variable = { rl_offer_1_id = rl_hc_slot_20_id }
            set_variable = { rl_offer_1_rarity = rl_hc_slot_20_rarity }
            country_event = { id = rl.58 }
        }
    }
    option = { name = rl.hc.page_menu hidden_effect = { country_event = { id = rl.59 } } }
}
country_event = {
    id = rl.58
    title = rl.58.t
    desc = rl.58.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    # v3.8.0: "cancel" is the first option, so an event timeout never removes an upgrade
    option = { name = rl.58.b hidden_effect = { rl_hc_return_to_inventory_page = yes } }
    option = {
        name = rl.58.a
        hidden_effect = {
            rl_hc_remove_target_slot = yes
            if = {
                limit = { has_country_flag = rl_hc_replacement_mode }
                rl_hc_resolve_pending_after_removal = yes
            }
            else = { rl_hc_return_to_inventory_page = yes }
        }
    }
}


country_event = {
    id = rl.59
    title = rl.59.t
    desc = rl.59.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes

    option = {
        name = rl.59.a
        trigger = { check_variable = { rl_hc_current_page > 1 } }
        hidden_effect = {
            if = { limit = { check_variable = { rl_hc_current_page = 2 } } country_event = { id = rl.51 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 3 } } country_event = { id = rl.52 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 4 } } country_event = { id = rl.53 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 5 } } country_event = { id = rl.54 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 6 } } country_event = { id = rl.55 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 7 } } country_event = { id = rl.56 } }
        }
    }
    option = {
        name = rl.59.b
        trigger = { check_variable = { rl_hc_current_page < 7 } }
        hidden_effect = {
            if = { limit = { check_variable = { rl_hc_current_page = 1 } } country_event = { id = rl.52 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 2 } } country_event = { id = rl.53 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 3 } } country_event = { id = rl.54 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 4 } } country_event = { id = rl.55 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 5 } } country_event = { id = rl.56 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 6 } } country_event = { id = rl.57 } }
        }
    }
    option = {
        name = rl.59.c
        hidden_effect = {
            if = { limit = { check_variable = { rl_hc_current_page = 1 } } country_event = { id = rl.51 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 2 } } country_event = { id = rl.52 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 3 } } country_event = { id = rl.53 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 4 } } country_event = { id = rl.54 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 5 } } country_event = { id = rl.55 } }
            else_if = { limit = { check_variable = { rl_hc_current_page = 6 } } country_event = { id = rl.56 } }
            else = { country_event = { id = rl.57 } }
        }
    }
    option = {
        name = rl.59.d_opt
        hidden_effect = {
            clr_country_flag = rl_hc_management_mode
            if = {
                limit = { has_country_flag = rl_hc_replacement_mode }
                country_event = { id = rl.50 }
            }
            else = { clr_country_flag = rl_hc_replacement_mode }
            rl_offer_queue_pump = yes
        }
    }
}


country_event = {
    id = rl.70
    title = rl.70.t
    desc = rl.70.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    immediate = {
        hidden_effect = {
            if = {
                limit = { NOT = { has_country_flag = rl_relic_offers_ready } }
                rl_generate_relic_offers = yes
            }
        }
    }
    option = {
        name = rl.70.a
        custom_effect_tooltip = rl.70.a.tt
        ai_chance = { factor = 1 modifier = { factor = 4 check_variable = { rl_relic_offer_1_power = 3 } } modifier = { factor = 2 check_variable = { rl_relic_offer_1_power = 2 } } }
        hidden_effect = { rl_relic_select_offer_1 = yes }
    }
    option = {
        name = rl.70.b
        custom_effect_tooltip = rl.70.b.tt
        ai_chance = { factor = 1 modifier = { factor = 4 check_variable = { rl_relic_offer_2_power = 3 } } modifier = { factor = 2 check_variable = { rl_relic_offer_2_power = 2 } } }
        hidden_effect = { rl_relic_select_offer_2 = yes }
    }
    option = {
        name = rl.70.c
        custom_effect_tooltip = rl.70.c.tt
        ai_chance = { factor = 1 modifier = { factor = 4 check_variable = { rl_relic_offer_3_power = 3 } } modifier = { factor = 2 check_variable = { rl_relic_offer_3_power = 2 } } }
        hidden_effect = { rl_relic_select_offer_3 = yes }
    }
    option = {
        name = rl.70.d_opt
        trigger = { is_ai = no }
        ai_chance = { factor = 0 }
        hidden_effect = { rl_relic_shatter_discovery = yes }
    }
}

country_event = {
    id = rl.71
    title = rl.71.t
    desc = rl.71.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = {
        name = rl.71.a
        custom_effect_tooltip = rl.71.a.tt
        trigger = { check_variable = { rl_relic_slot_1_id > 0 } }
        hidden_effect = { rl_relic_replace_slot_1 = yes }
    }
    option = {
        name = rl.71.b
        custom_effect_tooltip = rl.71.b.tt
        trigger = { check_variable = { rl_relic_slot_2_id > 0 } }
        hidden_effect = { rl_relic_replace_slot_2 = yes }
    }
    option = {
        name = rl.71.c
        custom_effect_tooltip = rl.71.c.tt
        trigger = { check_variable = { rl_relic_slot_3_id > 0 } }
        hidden_effect = { rl_relic_replace_slot_3 = yes }
    }
    option = { name = rl.71.d_opt hidden_effect = { rl_relic_shatter_pending = yes } }
}

country_event = {
    id = rl.72
    title = rl.72.t
    desc = rl.72.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.72.a }
}

country_event = {
    id = rl.73
    title = rl.73.t
    desc = rl.73.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.73.a custom_effect_tooltip = rl.73.a.tt trigger = { check_variable = { rl_relic_slot_1_id > 0 } } hidden_effect = { rl_relic_prepare_remove_slot_1 = yes } }
    option = { name = rl.73.b custom_effect_tooltip = rl.73.b.tt trigger = { check_variable = { rl_relic_slot_2_id > 0 } } hidden_effect = { rl_relic_prepare_remove_slot_2 = yes } }
    option = { name = rl.73.c custom_effect_tooltip = rl.73.c.tt trigger = { check_variable = { rl_relic_slot_3_id > 0 } } hidden_effect = { rl_relic_prepare_remove_slot_3 = yes } }
    option = { name = rl.73.d_opt }
}

country_event = {
    id = rl.74
    title = rl.74.t
    desc = rl.74.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.74.b hidden_effect = { set_variable = { rl_relic_target_slot = 0 } set_variable = { rl_relic_target_id = 0 } } }
    option = { name = rl.74.a hidden_effect = { rl_relic_confirm_remove_target = yes } }
}


country_event = {
    id = rl.41
    title = rl.41.t
    desc = rl.41.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.41.a }
}

country_event = {
    id = rl.75
    title = rl.75.t
    desc = rl.75.d
    picture = GFX_report_event_generic_factory
    is_triggered_only = yes
    option = { name = rl.75.a }
}
