rl_roguelike_fate_market = {
    rl_buy_upgrade_100 = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        cost = 100
        complete_effect = { hidden_effect = { rl_purchase_upgrade_100 = yes } }
        ai_will_do = { factor = 0 }
    }
    rl_buy_upgrade_200 = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        cost = 200
        complete_effect = { hidden_effect = { rl_purchase_upgrade_200 = yes } }
        ai_will_do = { factor = 0 }
    }
    rl_buy_upgrade_500 = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        cost = 500
        complete_effect = { hidden_effect = { rl_purchase_upgrade_500 = yes } }
        ai_will_do = { factor = 0 }
    }
    rl_buy_upgrade_1000 = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        cost = 1000
        complete_effect = { hidden_effect = { rl_purchase_upgrade_1000 = yes } }
        ai_will_do = { factor = 0 }
    }
}

rl_roguelike_builds_fate = {
    rl_open_build_overview = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        cost = 0
        complete_effect = { hidden_effect = { country_event = { id = rl.20 } } }
        ai_will_do = { factor = 0 }
    }
    rl_manage_active_upgrades = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized has_global_flag = rl_ruleset_hardcore }
        available = { check_variable = { rl_hc_active_upgrade_count > 0 } }
        cost = 0
        complete_effect = {
            hidden_effect = {
                set_country_flag = rl_hc_management_mode
                clr_country_flag = rl_hc_replacement_mode
                country_event = { id = rl.51 }
            }
        }
        ai_will_do = { factor = 0 }
    }
    rl_fuse_common = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        available = { check_variable = { rl_fusion_common_cores > 2 } check_variable = { rl_fate_shards > 2 } }
        cost = 0
        complete_effect = { hidden_effect = { rl_fuse_common = yes } }
        ai_will_do = { factor = 0 }
    }
    rl_fuse_rare = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        available = { check_variable = { rl_fusion_rare_cores > 2 } check_variable = { rl_fate_shards > 5 } }
        cost = 0
        complete_effect = { hidden_effect = { rl_fuse_rare = yes } }
        ai_will_do = { factor = 0 }
    }
    rl_fuse_epic = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        available = { check_variable = { rl_fusion_epic_cores > 2 } check_variable = { rl_fate_shards > 11 } }
        cost = 0
        complete_effect = { hidden_effect = { rl_fuse_epic = yes } }
        ai_will_do = { factor = 0 }
    }
    rl_fuse_legendary = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        available = { check_variable = { rl_fusion_legendary_cores > 2 } check_variable = { rl_fate_shards > 23 } }
        cost = 0
        complete_effect = { hidden_effect = { rl_fuse_legendary = yes } }
        ai_will_do = { factor = 0 }
    }
    rl_enable_auto_weakest_replace = {
        icon = generic_political_reform
        visible = {
            is_ai = no
            has_country_flag = rl_initialized
            has_global_flag = rl_ruleset_hardcore
            has_global_flag = rl_hc_manual_replace
        }
        cost = 0
        complete_effect = {
            hidden_effect = {
                set_global_flag = rl_hc_auto_replace_weakest
                clr_global_flag = rl_hc_manual_replace
            }
        }
        ai_will_do = { factor = 0 }
    }
    rl_disable_auto_weakest_replace = {
        icon = generic_political_reform
        visible = {
            is_ai = no
            has_country_flag = rl_initialized
            has_global_flag = rl_ruleset_hardcore
            has_global_flag = rl_hc_auto_replace_weakest
        }
        cost = 0
        complete_effect = {
            hidden_effect = {
                set_global_flag = rl_hc_manual_replace
                clr_global_flag = rl_hc_auto_replace_weakest
            }
        }
        ai_will_do = { factor = 0 }
    }
    rl_reapply_counterpower = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized has_global_flag = rl_mode_player_only }
        cost = 0
        complete_effect = { hidden_effect = { rl_update_global_player_only_escalation = yes country_event = { id = rl.41 hours = 1 } } }
        ai_will_do = { factor = 0 }
    }
    rl_open_relic_archive = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        cost = 0
        complete_effect = { hidden_effect = { country_event = { id = rl.72 } } }
        ai_will_do = { factor = 0 }
    }
    rl_manage_relics = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        available = { check_variable = { rl_hc_relic_slots_used > 0 } }
        cost = 0
        complete_effect = { hidden_effect = { country_event = { id = rl.73 } } }
        ai_will_do = { factor = 0 }
    }
    rl_force_relic_discovery = {
        icon = generic_political_reform
        visible = { is_ai = no has_country_flag = rl_initialized }
        available = { check_variable = { rl_fate_shards > 39 } NOT = { has_country_flag = rl_relic_event_pending } }
        cost = 0
        complete_effect = { hidden_effect = { rl_force_relic_discovery = yes } }
        ai_will_do = { factor = 0 }
    }
}
