rl_initialize_country = {
    if = {
        limit = { NOT = { has_country_flag = rl_initialized } }
        set_country_flag = rl_initialized
        set_variable = { rl_total_upgrades = 0 }
        set_variable = { rl_common_count = 0 }
        set_variable = { rl_rare_count = 0 }
        set_variable = { rl_epic_count = 0 }
        set_variable = { rl_legendary_count = 0 }
        set_variable = { rl_divine_count = 0 }
        set_variable = { rl_core_forge_chance = 0 }
        set_variable = { rl_random_techs_granted = 0 }
        set_variable = { rl_research_slots_granted = 0 }
        set_variable = { rl_divisions_spawned = 0 }
        set_variable = { rl_manpower_granted = 0 }
        set_variable = { rl_equipment_granted = 0 }
        set_variable = { rl_factories_added = 0 }
        set_variable = { rl_resources_added = 0 }
        set_variable = { rl_mod_recruitable_population_factor = 0 }
        set_variable = { rl_mod_non_core_manpower = 0 }
        set_variable = { rl_offer_month_counter = 0 }
        set_variable = { rl_offer_week_counter = 0 }
        set_variable = { rl_chaos_profile = 0 }
        set_variable = { rl_chance_common = 70 }
        set_variable = { rl_chance_rare = 15 }
        set_variable = { rl_chance_epic = 10 }
        set_variable = { rl_chance_legendary = 4 }
        set_variable = { rl_chance_divine = 1 }
        division_template = {
            name = "Roguelike Legion"
            is_locked = yes
            regiments = {
                infantry = { x = 0 y = 0 }
                infantry = { x = 0 y = 1 }
                infantry = { x = 0 y = 2 }
                infantry = { x = 1 y = 0 }
                infantry = { x = 1 y = 1 }
                infantry = { x = 1 y = 2 }
                infantry = { x = 2 y = 0 }
                infantry = { x = 2 y = 1 }
                infantry = { x = 2 y = 2 }
            }
        }
    }
    if = {
        limit = { NOT = { has_country_flag = rl_v30_initialized } }
        set_country_flag = rl_v30_initialized
        set_variable = { rl_fate_shards = 0 }
        set_variable = { rl_cursed_count = 0 }
        set_variable = { rl_reroll_count = 0 }
        set_variable = { rl_lock_count = 0 }
        set_variable = { rl_banish_count = 0 }
        set_variable = { rl_fusion_common_cores = 0 }
        set_variable = { rl_fusion_rare_cores = 0 }
        set_variable = { rl_fusion_epic_cores = 0 }
        set_variable = { rl_fusion_legendary_cores = 0 }
        set_variable = { rl_cat_industry = 0 }
        set_variable = { rl_cat_army = 0 }
        set_variable = { rl_cat_armor = 0 }
        set_variable = { rl_cat_air = 0 }
        set_variable = { rl_cat_navy = 0 }
        set_variable = { rl_cat_research = 0 }
        set_variable = { rl_cat_occupation = 0 }
        set_variable = { rl_cat_fate = 0 }
        set_variable = { rl_locked_offer_id = 0 }
        set_variable = { rl_locked_offer_rarity = 0 }
        set_variable = { rl_last_set_category = 0 }
        set_variable = { rl_last_set_tier = 0 }
    }
    if = {
        limit = { NOT = { has_country_flag = rl_v33_initialized } }
        set_country_flag = rl_v33_initialized
        set_variable = { rl_hc_slots_max = 20 }
        set_variable = { rl_hc_slots_used = 0 }
        set_variable = { rl_hc_active_upgrade_count = 0 }
        set_variable = { rl_hc_active_cursed_count = 0 }
        set_variable = { rl_hc_relic_slots_max = 3 }
        set_variable = { rl_hc_relic_slots_used = 0 }
        set_variable = { rl_hc_replaced_count = 0 }
        set_variable = { rl_hc_removed_count = 0 }
        set_variable = { rl_hc_pending_id = 0 }
        set_variable = { rl_hc_pending_rarity = 0 }
        set_variable = { rl_hc_pending_cost = 0 }
        set_variable = { rl_hc_target_slot = 0 }
        set_variable = { rl_hc_return_page = 51 }
        set_variable = { rl_hc_slot_01_id = 0 }
        set_variable = { rl_hc_slot_01_rarity = 0 }
        set_variable = { rl_hc_slot_01_cost = 0 }
        set_variable = { rl_hc_slot_02_id = 0 }
        set_variable = { rl_hc_slot_02_rarity = 0 }
        set_variable = { rl_hc_slot_02_cost = 0 }
        set_variable = { rl_hc_slot_03_id = 0 }
        set_variable = { rl_hc_slot_03_rarity = 0 }
        set_variable = { rl_hc_slot_03_cost = 0 }
        set_variable = { rl_hc_slot_04_id = 0 }
        set_variable = { rl_hc_slot_04_rarity = 0 }
        set_variable = { rl_hc_slot_04_cost = 0 }
        set_variable = { rl_hc_slot_05_id = 0 }
        set_variable = { rl_hc_slot_05_rarity = 0 }
        set_variable = { rl_hc_slot_05_cost = 0 }
        set_variable = { rl_hc_slot_06_id = 0 }
        set_variable = { rl_hc_slot_06_rarity = 0 }
        set_variable = { rl_hc_slot_06_cost = 0 }
        set_variable = { rl_hc_slot_07_id = 0 }
        set_variable = { rl_hc_slot_07_rarity = 0 }
        set_variable = { rl_hc_slot_07_cost = 0 }
        set_variable = { rl_hc_slot_08_id = 0 }
        set_variable = { rl_hc_slot_08_rarity = 0 }
        set_variable = { rl_hc_slot_08_cost = 0 }
        set_variable = { rl_hc_slot_09_id = 0 }
        set_variable = { rl_hc_slot_09_rarity = 0 }
        set_variable = { rl_hc_slot_09_cost = 0 }
        set_variable = { rl_hc_slot_10_id = 0 }
        set_variable = { rl_hc_slot_10_rarity = 0 }
        set_variable = { rl_hc_slot_10_cost = 0 }
        set_variable = { rl_hc_slot_11_id = 0 }
        set_variable = { rl_hc_slot_11_rarity = 0 }
        set_variable = { rl_hc_slot_11_cost = 0 }
        set_variable = { rl_hc_slot_12_id = 0 }
        set_variable = { rl_hc_slot_12_rarity = 0 }
        set_variable = { rl_hc_slot_12_cost = 0 }
        set_variable = { rl_hc_slot_13_id = 0 }
        set_variable = { rl_hc_slot_13_rarity = 0 }
        set_variable = { rl_hc_slot_13_cost = 0 }
        set_variable = { rl_hc_slot_14_id = 0 }
        set_variable = { rl_hc_slot_14_rarity = 0 }
        set_variable = { rl_hc_slot_14_cost = 0 }
        set_variable = { rl_hc_slot_15_id = 0 }
        set_variable = { rl_hc_slot_15_rarity = 0 }
        set_variable = { rl_hc_slot_15_cost = 0 }
        set_variable = { rl_hc_slot_16_id = 0 }
        set_variable = { rl_hc_slot_16_rarity = 0 }
        set_variable = { rl_hc_slot_16_cost = 0 }
        set_variable = { rl_hc_slot_17_id = 0 }
        set_variable = { rl_hc_slot_17_rarity = 0 }
        set_variable = { rl_hc_slot_17_cost = 0 }
        set_variable = { rl_hc_slot_18_id = 0 }
        set_variable = { rl_hc_slot_18_rarity = 0 }
        set_variable = { rl_hc_slot_18_cost = 0 }
        set_variable = { rl_hc_slot_19_id = 0 }
        set_variable = { rl_hc_slot_19_rarity = 0 }
        set_variable = { rl_hc_slot_19_cost = 0 }
        set_variable = { rl_hc_slot_20_id = 0 }
        set_variable = { rl_hc_slot_20_rarity = 0 }
        set_variable = { rl_hc_slot_20_cost = 0 }
    }
    if = {
        limit = { NOT = { has_country_flag = rl_v34_relics_initialized } }
        set_country_flag = rl_v34_relics_initialized
        set_variable = { rl_relic_resonance = 35 }
        set_variable = { rl_relics_found_total = 0 }
        set_variable = { rl_relics_shattered_total = 0 }
        set_variable = { rl_relic_offer_1_id = 0 }
        set_variable = { rl_relic_offer_2_id = 0 }
        set_variable = { rl_relic_offer_3_id = 0 }
        set_variable = { rl_relic_offer_1_power = 0 }
        set_variable = { rl_relic_offer_2_power = 0 }
        set_variable = { rl_relic_offer_3_power = 0 }
        set_variable = { rl_relic_pending_id = 0 }
        set_variable = { rl_relic_pending_power = 0 }
        set_variable = { rl_relic_target_slot = 0 }
        set_variable = { rl_relic_target_id = 0 }
        set_variable = { rl_relic_slot_1_id = 0 }
        set_variable = { rl_relic_slot_2_id = 0 }
        set_variable = { rl_relic_slot_3_id = 0 }
        set_variable = { rl_relic_slot_1_power = 0 }
        set_variable = { rl_relic_slot_2_power = 0 }
        set_variable = { rl_relic_slot_3_power = 0 }
        set_variable = { rl_hc_relic_slots_max = 3 }
    }
    if = { limit = { NOT = { has_dynamic_modifier = rl_roguelike_arsenal } } add_dynamic_modifier = { modifier = rl_roguelike_arsenal } }
    if = {
        limit = { NOT = { has_country_flag = rl_v35_initialized } }
        set_country_flag = rl_v35_initialized
        set_variable = { rl_hc_auto_replaced_count = 0 }
        set_variable = { rl_hc_auto_rejected_count = 0 }
        set_variable = { rl_hc_lower_rarity_count = 0 }
        set_variable = { rl_hc_auto_can_replace = 0 }
        set_variable = { rl_hc_auto_remove_count = 0 }
        set_variable = { rl_hc_auto_new_id = 0 }
        set_variable = { rl_hc_auto_new_rarity = 0 }
        set_variable = { rl_hc_auto_removed_1_id = 0 }
        set_variable = { rl_hc_auto_removed_1_rarity = 0 }
        set_variable = { rl_hc_auto_removed_2_id = 0 }
        set_variable = { rl_hc_auto_removed_2_rarity = 0 }
        set_variable = { rl_hc_auto_candidate_id = 0 }
        set_variable = { rl_hc_auto_candidate_rarity = 0 }
        set_variable = { rl_relic_mod_air_agility_factor = 0 }
        set_variable = { rl_relic_mod_air_attack_factor = 0 }
        set_variable = { rl_relic_mod_air_defence_factor = 0 }
        set_variable = { rl_relic_mod_air_mission_efficiency = 0 }
        set_variable = { rl_relic_mod_air_range_factor = 0 }
        set_variable = { rl_relic_mod_air_superiority_efficiency = 0 }
        set_variable = { rl_relic_mod_armor_factor = 0 }
        set_variable = { rl_relic_mod_army_armor_attack_factor = 0 }
        set_variable = { rl_relic_mod_army_attack_factor = 0 }
        set_variable = { rl_relic_mod_army_defence_factor = 0 }
        set_variable = { rl_relic_mod_army_fuel_consumption_factor = 0 }
        set_variable = { rl_relic_mod_army_org_factor = 0 }
        set_variable = { rl_relic_mod_army_org_regain = 0 }
        set_variable = { rl_relic_mod_army_speed_factor = 0 }
        set_variable = { rl_relic_mod_compliance_gain = 0 }
        set_variable = { rl_relic_mod_consumer_goods_factor = 0 }
        set_variable = { rl_relic_mod_decryption = 0 }
        set_variable = { rl_relic_mod_encryption = 0 }
        set_variable = { rl_relic_mod_equipment_conversion_speed = 0 }
        set_variable = { rl_relic_mod_equipment_upgrade_xp_cost = 0 }
        set_variable = { rl_relic_mod_experience_loss_factor = 0 }
        set_variable = { rl_relic_mod_fuel_gain_factor = 0 }
        set_variable = { rl_relic_mod_industrial_capacity_dockyard = 0 }
        set_variable = { rl_relic_mod_industrial_capacity_factory = 0 }
        set_variable = { rl_relic_mod_industry_free_repair_factor = 0 }
        set_variable = { rl_relic_mod_intel_from_operatives_factor = 0 }
        set_variable = { rl_relic_mod_land_reinforce_rate = 0 }
        set_variable = { rl_relic_mod_local_resources_factor = 0 }
        set_variable = { rl_relic_mod_max_dig_in_factor = 0 }
        set_variable = { rl_relic_mod_max_fuel_factor = 0 }
        set_variable = { rl_relic_mod_mechanized_attack_factor = 0 }
        set_variable = { rl_relic_mod_min_export = 0 }
        set_variable = { rl_relic_mod_naval_damage_factor = 0 }
        set_variable = { rl_relic_mod_naval_defense_factor = 0 }
        set_variable = { rl_relic_mod_navy_max_range_factor = 0 }
        set_variable = { rl_relic_mod_navy_org_factor = 0 }
        set_variable = { rl_relic_mod_out_of_supply_factor = 0 }
        set_variable = { rl_relic_mod_planning_speed = 0 }
        set_variable = { rl_relic_mod_political_power_factor = 0 }
        set_variable = { rl_relic_mod_positioning = 0 }
        set_variable = { rl_relic_mod_production_factory_efficiency_gain_factor = 0 }
        set_variable = { rl_relic_mod_production_lack_of_resource_penalty_factor = 0 }
        set_variable = { rl_relic_mod_production_speed_buildings_factor = 0 }
        set_variable = { rl_relic_mod_repair_speed_factor = 0 }
        set_variable = { rl_relic_mod_research_speed_factor = 0 }
        set_variable = { rl_relic_mod_resistance_target = 0 }
        set_variable = { rl_relic_mod_screening_efficiency = 0 }
        set_variable = { rl_relic_mod_special_project_speed_factor = 0 }
        set_variable = { rl_relic_mod_spotting_chance = 0 }
        set_variable = { rl_relic_mod_stability_factor = 0 }
        set_variable = { rl_relic_mod_supply_consumption_factor = 0 }
        set_variable = { rl_relic_mod_war_support_factor = 0 }
    }
    if = { limit = { NOT = { has_dynamic_modifier = rl_relic_collection } } add_dynamic_modifier = { modifier = rl_relic_collection } }
    if = {
        limit = { NOT = { has_country_flag = rl_v35_relic_collection_migrated } }
        rl_relic_rebuild_collection = yes
        set_country_flag = rl_v35_relic_collection_migrated
    }
    if = { limit = { NOT = { has_idea = rl_roguelike_chronicle } } add_ideas = rl_roguelike_chronicle }
    set_division_template_lock = { division_template = "Roguelike Legion" is_locked = yes }
    set_division_force_allow_recruiting = { division_template = "Roguelike Legion" force_allow_recruiting = no }
    if = {
        limit = {
            NOT = { has_country_flag = rl_v25_population_migrated }
            check_variable = { rl_mod_recruitable_population_factor > 0 }
        }
        rl_refresh_recruitable_population_bonus = yes
    }
    set_country_flag = rl_v25_population_migrated
    if = {
        limit = {
            has_global_flag = rl_ruleset_hardcore
            NOT = { has_country_flag = rl_v342_curse_migrated }
        }
        rl_hc_migrate_existing_curses_v342 = yes
        set_country_flag = rl_v342_curse_migrated
    }
    else_if = {
        limit = { NOT = { has_country_flag = rl_v342_curse_migrated } }
        set_country_flag = rl_v342_curse_migrated
    }
    rl_sync_rarity_distribution = yes
}

rl_clear_offer_variables = {
    set_variable = { rl_offer_1_id = 0 }
    set_variable = { rl_offer_2_id = 0 }
    set_variable = { rl_offer_3_id = 0 }
    set_variable = { rl_offer_1_rarity = 0 }
    set_variable = { rl_offer_2_rarity = 0 }
    set_variable = { rl_offer_3_rarity = 0 }
}

rl_clear_global_chaos_profiles = {
    clr_global_flag = rl_chaos_profile_1
    clr_global_flag = rl_chaos_profile_2
    clr_global_flag = rl_chaos_profile_3
    clr_global_flag = rl_chaos_profile_4
    clr_global_flag = rl_chaos_profile_5
    clr_global_flag = rl_chaos_profile_6
    clr_global_flag = rl_chaos_profile_7
    clr_global_flag = rl_chaos_profile_8
    clr_global_flag = rl_chaos_profile_9
    clr_global_flag = rl_chaos_profile_10
    clr_global_flag = rl_chaos_profile_11
    clr_global_flag = rl_chaos_profile_12
    clr_global_flag = rl_chaos_profile_13
    clr_global_flag = rl_chaos_profile_14
    clr_global_flag = rl_chaos_profile_15
    clr_global_flag = rl_chaos_profile_16
    clr_global_flag = rl_chaos_profile_17
    clr_global_flag = rl_chaos_profile_18
    clr_global_flag = rl_chaos_profile_19
    clr_global_flag = rl_chaos_profile_20
    clr_global_flag = rl_chaos_profile_21
    clr_global_flag = rl_chaos_profile_22
    clr_global_flag = rl_chaos_profile_23
    clr_global_flag = rl_chaos_profile_24
    clr_global_flag = rl_chaos_profile_25
    clr_global_flag = rl_chaos_profile_26
    clr_global_flag = rl_chaos_profile_27
    clr_global_flag = rl_chaos_profile_28
    clr_global_flag = rl_chaos_profile_29
    clr_global_flag = rl_chaos_profile_30
    clr_global_flag = rl_chaos_profile_31
    clr_global_flag = rl_chaos_profile_32
    clr_global_flag = rl_chaos_profile_33
    clr_global_flag = rl_chaos_profile_34
    clr_global_flag = rl_chaos_profile_35
    clr_global_flag = rl_chaos_profile_36
    clr_global_flag = rl_chaos_profile_37
    clr_global_flag = rl_chaos_profile_38
    clr_global_flag = rl_chaos_profile_39
    clr_global_flag = rl_chaos_profile_40
    clr_global_flag = rl_chaos_profile_41
    clr_global_flag = rl_chaos_profile_42
    clr_global_flag = rl_chaos_profile_43
    clr_global_flag = rl_chaos_profile_44
    clr_global_flag = rl_chaos_profile_45
    clr_global_flag = rl_chaos_profile_46
    clr_global_flag = rl_chaos_profile_47
    clr_global_flag = rl_chaos_profile_48
    clr_global_flag = rl_chaos_profile_49
    clr_global_flag = rl_chaos_profile_50
    clr_global_flag = rl_chaos_profile_51
    clr_global_flag = rl_chaos_profile_52
    clr_global_flag = rl_chaos_profile_53
    clr_global_flag = rl_chaos_profile_54
    clr_global_flag = rl_chaos_profile_55
    clr_global_flag = rl_chaos_profile_56
    clr_global_flag = rl_chaos_profile_57
    clr_global_flag = rl_chaos_profile_58
    clr_global_flag = rl_chaos_profile_59
    clr_global_flag = rl_chaos_profile_60
    clr_global_flag = rl_chaos_profile_61
    clr_global_flag = rl_chaos_profile_62
    clr_global_flag = rl_chaos_profile_63
    clr_global_flag = rl_chaos_profile_64
    clr_global_flag = rl_chaos_profile_65
    clr_global_flag = rl_chaos_profile_66
    clr_global_flag = rl_chaos_profile_67
    clr_global_flag = rl_chaos_profile_68
    clr_global_flag = rl_chaos_profile_69
    clr_global_flag = rl_chaos_profile_70
    clr_global_flag = rl_chaos_profile_71
    clr_global_flag = rl_chaos_profile_72
    clr_global_flag = rl_chaos_profile_73
    clr_global_flag = rl_chaos_profile_74
    clr_global_flag = rl_chaos_profile_75
    clr_global_flag = rl_chaos_profile_76
    clr_global_flag = rl_chaos_profile_77
    clr_global_flag = rl_chaos_profile_78
    clr_global_flag = rl_chaos_profile_79
    clr_global_flag = rl_chaos_profile_80
    clr_global_flag = rl_chaos_profile_81
    clr_global_flag = rl_chaos_profile_82
    clr_global_flag = rl_chaos_profile_83
    clr_global_flag = rl_chaos_profile_84
    clr_global_flag = rl_chaos_profile_85
    clr_global_flag = rl_chaos_profile_86
    clr_global_flag = rl_chaos_profile_87
    clr_global_flag = rl_chaos_profile_88
    clr_global_flag = rl_chaos_profile_89
    clr_global_flag = rl_chaos_profile_90
    clr_global_flag = rl_chaos_profile_91
    clr_global_flag = rl_chaos_profile_92
    clr_global_flag = rl_chaos_profile_93
    clr_global_flag = rl_chaos_profile_94
    clr_global_flag = rl_chaos_profile_95
    clr_global_flag = rl_chaos_profile_96
    clr_global_flag = rl_chaos_profile_97
    clr_global_flag = rl_chaos_profile_98
    clr_global_flag = rl_chaos_profile_99
    clr_global_flag = rl_chaos_profile_100
}

rl_select_global_chaos_distribution = {
    random_list = {
        1 = { set_global_flag = rl_chaos_profile_1 }
        1 = { set_global_flag = rl_chaos_profile_2 }
        1 = { set_global_flag = rl_chaos_profile_3 }
        1 = { set_global_flag = rl_chaos_profile_4 }
        1 = { set_global_flag = rl_chaos_profile_5 }
        1 = { set_global_flag = rl_chaos_profile_6 }
        1 = { set_global_flag = rl_chaos_profile_7 }
        1 = { set_global_flag = rl_chaos_profile_8 }
        1 = { set_global_flag = rl_chaos_profile_9 }
        1 = { set_global_flag = rl_chaos_profile_10 }
        1 = { set_global_flag = rl_chaos_profile_11 }
        1 = { set_global_flag = rl_chaos_profile_12 }
        1 = { set_global_flag = rl_chaos_profile_13 }
        1 = { set_global_flag = rl_chaos_profile_14 }
        1 = { set_global_flag = rl_chaos_profile_15 }
        1 = { set_global_flag = rl_chaos_profile_16 }
        1 = { set_global_flag = rl_chaos_profile_17 }
        1 = { set_global_flag = rl_chaos_profile_18 }
        1 = { set_global_flag = rl_chaos_profile_19 }
        1 = { set_global_flag = rl_chaos_profile_20 }
        1 = { set_global_flag = rl_chaos_profile_21 }
        1 = { set_global_flag = rl_chaos_profile_22 }
        1 = { set_global_flag = rl_chaos_profile_23 }
        1 = { set_global_flag = rl_chaos_profile_24 }
        1 = { set_global_flag = rl_chaos_profile_25 }
        1 = { set_global_flag = rl_chaos_profile_26 }
        1 = { set_global_flag = rl_chaos_profile_27 }
        1 = { set_global_flag = rl_chaos_profile_28 }
        1 = { set_global_flag = rl_chaos_profile_29 }
        1 = { set_global_flag = rl_chaos_profile_30 }
        1 = { set_global_flag = rl_chaos_profile_31 }
        1 = { set_global_flag = rl_chaos_profile_32 }
        1 = { set_global_flag = rl_chaos_profile_33 }
        1 = { set_global_flag = rl_chaos_profile_34 }
        1 = { set_global_flag = rl_chaos_profile_35 }
        1 = { set_global_flag = rl_chaos_profile_36 }
        1 = { set_global_flag = rl_chaos_profile_37 }
        1 = { set_global_flag = rl_chaos_profile_38 }
        1 = { set_global_flag = rl_chaos_profile_39 }
        1 = { set_global_flag = rl_chaos_profile_40 }
        1 = { set_global_flag = rl_chaos_profile_41 }
        1 = { set_global_flag = rl_chaos_profile_42 }
        1 = { set_global_flag = rl_chaos_profile_43 }
        1 = { set_global_flag = rl_chaos_profile_44 }
        1 = { set_global_flag = rl_chaos_profile_45 }
        1 = { set_global_flag = rl_chaos_profile_46 }
        1 = { set_global_flag = rl_chaos_profile_47 }
        1 = { set_global_flag = rl_chaos_profile_48 }
        1 = { set_global_flag = rl_chaos_profile_49 }
        1 = { set_global_flag = rl_chaos_profile_50 }
        1 = { set_global_flag = rl_chaos_profile_51 }
        1 = { set_global_flag = rl_chaos_profile_52 }
        1 = { set_global_flag = rl_chaos_profile_53 }
        1 = { set_global_flag = rl_chaos_profile_54 }
        1 = { set_global_flag = rl_chaos_profile_55 }
        1 = { set_global_flag = rl_chaos_profile_56 }
        1 = { set_global_flag = rl_chaos_profile_57 }
        1 = { set_global_flag = rl_chaos_profile_58 }
        1 = { set_global_flag = rl_chaos_profile_59 }
        1 = { set_global_flag = rl_chaos_profile_60 }
        1 = { set_global_flag = rl_chaos_profile_61 }
        1 = { set_global_flag = rl_chaos_profile_62 }
        1 = { set_global_flag = rl_chaos_profile_63 }
        1 = { set_global_flag = rl_chaos_profile_64 }
        1 = { set_global_flag = rl_chaos_profile_65 }
        1 = { set_global_flag = rl_chaos_profile_66 }
        1 = { set_global_flag = rl_chaos_profile_67 }
        1 = { set_global_flag = rl_chaos_profile_68 }
        1 = { set_global_flag = rl_chaos_profile_69 }
        1 = { set_global_flag = rl_chaos_profile_70 }
        1 = { set_global_flag = rl_chaos_profile_71 }
        1 = { set_global_flag = rl_chaos_profile_72 }
        1 = { set_global_flag = rl_chaos_profile_73 }
        1 = { set_global_flag = rl_chaos_profile_74 }
        1 = { set_global_flag = rl_chaos_profile_75 }
        1 = { set_global_flag = rl_chaos_profile_76 }
        1 = { set_global_flag = rl_chaos_profile_77 }
        1 = { set_global_flag = rl_chaos_profile_78 }
        1 = { set_global_flag = rl_chaos_profile_79 }
        1 = { set_global_flag = rl_chaos_profile_80 }
        1 = { set_global_flag = rl_chaos_profile_81 }
        1 = { set_global_flag = rl_chaos_profile_82 }
        1 = { set_global_flag = rl_chaos_profile_83 }
        1 = { set_global_flag = rl_chaos_profile_84 }
        1 = { set_global_flag = rl_chaos_profile_85 }
        1 = { set_global_flag = rl_chaos_profile_86 }
        1 = { set_global_flag = rl_chaos_profile_87 }
        1 = { set_global_flag = rl_chaos_profile_88 }
        1 = { set_global_flag = rl_chaos_profile_89 }
        1 = { set_global_flag = rl_chaos_profile_90 }
        1 = { set_global_flag = rl_chaos_profile_91 }
        1 = { set_global_flag = rl_chaos_profile_92 }
        1 = { set_global_flag = rl_chaos_profile_93 }
        1 = { set_global_flag = rl_chaos_profile_94 }
        1 = { set_global_flag = rl_chaos_profile_95 }
        1 = { set_global_flag = rl_chaos_profile_96 }
        1 = { set_global_flag = rl_chaos_profile_97 }
        1 = { set_global_flag = rl_chaos_profile_98 }
        1 = { set_global_flag = rl_chaos_profile_99 }
        1 = { set_global_flag = rl_chaos_profile_100 }
    }
    rl_sync_rarity_distribution = yes
}

rl_sync_rarity_distribution = {
    if = {
        limit = { has_global_flag = rl_rarity_chaos }
        if = {
            limit = { has_global_flag = rl_chaos_profile_1 }
            set_variable = { rl_chaos_profile = 1 }
            set_variable = { rl_chance_common = 5 }
            set_variable = { rl_chance_rare = 5 }
            set_variable = { rl_chance_epic = 5 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 80 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_2 }
            set_variable = { rl_chaos_profile = 2 }
            set_variable = { rl_chance_common = 80 }
            set_variable = { rl_chance_rare = 5 }
            set_variable = { rl_chance_epic = 5 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 5 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_3 }
            set_variable = { rl_chaos_profile = 3 }
            set_variable = { rl_chance_common = 5 }
            set_variable = { rl_chance_rare = 80 }
            set_variable = { rl_chance_epic = 5 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 5 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_4 }
            set_variable = { rl_chaos_profile = 4 }
            set_variable = { rl_chance_common = 5 }
            set_variable = { rl_chance_rare = 5 }
            set_variable = { rl_chance_epic = 80 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 5 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_5 }
            set_variable = { rl_chaos_profile = 5 }
            set_variable = { rl_chance_common = 5 }
            set_variable = { rl_chance_rare = 5 }
            set_variable = { rl_chance_epic = 5 }
            set_variable = { rl_chance_legendary = 80 }
            set_variable = { rl_chance_divine = 5 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_6 }
            set_variable = { rl_chaos_profile = 6 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 96 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_7 }
            set_variable = { rl_chaos_profile = 7 }
            set_variable = { rl_chance_common = 96 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_8 }
            set_variable = { rl_chaos_profile = 8 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 96 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_9 }
            set_variable = { rl_chaos_profile = 9 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 96 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_10 }
            set_variable = { rl_chaos_profile = 10 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 96 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_11 }
            set_variable = { rl_chaos_profile = 11 }
            set_variable = { rl_chance_common = 20 }
            set_variable = { rl_chance_rare = 20 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 20 }
            set_variable = { rl_chance_divine = 20 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_12 }
            set_variable = { rl_chaos_profile = 12 }
            set_variable = { rl_chance_common = 10 }
            set_variable = { rl_chance_rare = 15 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 25 }
            set_variable = { rl_chance_divine = 30 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_13 }
            set_variable = { rl_chaos_profile = 13 }
            set_variable = { rl_chance_common = 30 }
            set_variable = { rl_chance_rare = 25 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 15 }
            set_variable = { rl_chance_divine = 10 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_14 }
            set_variable = { rl_chaos_profile = 14 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 9 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 30 }
            set_variable = { rl_chance_divine = 40 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_15 }
            set_variable = { rl_chaos_profile = 15 }
            set_variable = { rl_chance_common = 40 }
            set_variable = { rl_chance_rare = 30 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 9 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_16 }
            set_variable = { rl_chaos_profile = 16 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 34 }
            set_variable = { rl_chance_epic = 8 }
            set_variable = { rl_chance_legendary = 53 }
            set_variable = { rl_chance_divine = 4 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_17 }
            set_variable = { rl_chaos_profile = 17 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 39 }
            set_variable = { rl_chance_epic = 45 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 12 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_18 }
            set_variable = { rl_chaos_profile = 18 }
            set_variable = { rl_chance_common = 11 }
            set_variable = { rl_chance_rare = 57 }
            set_variable = { rl_chance_epic = 4 }
            set_variable = { rl_chance_legendary = 19 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_19 }
            set_variable = { rl_chaos_profile = 19 }
            set_variable = { rl_chance_common = 45 }
            set_variable = { rl_chance_rare = 8 }
            set_variable = { rl_chance_epic = 8 }
            set_variable = { rl_chance_legendary = 2 }
            set_variable = { rl_chance_divine = 37 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_20 }
            set_variable = { rl_chaos_profile = 20 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 53 }
            set_variable = { rl_chance_epic = 13 }
            set_variable = { rl_chance_legendary = 24 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_21 }
            set_variable = { rl_chaos_profile = 21 }
            set_variable = { rl_chance_common = 2 }
            set_variable = { rl_chance_rare = 12 }
            set_variable = { rl_chance_epic = 67 }
            set_variable = { rl_chance_legendary = 7 }
            set_variable = { rl_chance_divine = 12 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_22 }
            set_variable = { rl_chaos_profile = 22 }
            set_variable = { rl_chance_common = 55 }
            set_variable = { rl_chance_rare = 7 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 31 }
            set_variable = { rl_chance_divine = 6 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_23 }
            set_variable = { rl_chaos_profile = 23 }
            set_variable = { rl_chance_common = 17 }
            set_variable = { rl_chance_rare = 21 }
            set_variable = { rl_chance_epic = 23 }
            set_variable = { rl_chance_legendary = 17 }
            set_variable = { rl_chance_divine = 22 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_24 }
            set_variable = { rl_chaos_profile = 24 }
            set_variable = { rl_chance_common = 30 }
            set_variable = { rl_chance_rare = 23 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 44 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_25 }
            set_variable = { rl_chaos_profile = 25 }
            set_variable = { rl_chance_common = 61 }
            set_variable = { rl_chance_rare = 5 }
            set_variable = { rl_chance_epic = 10 }
            set_variable = { rl_chance_legendary = 3 }
            set_variable = { rl_chance_divine = 21 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_26 }
            set_variable = { rl_chaos_profile = 26 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 34 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 16 }
            set_variable = { rl_chance_divine = 29 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_27 }
            set_variable = { rl_chaos_profile = 27 }
            set_variable = { rl_chance_common = 9 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 4 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 85 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_28 }
            set_variable = { rl_chaos_profile = 28 }
            set_variable = { rl_chance_common = 40 }
            set_variable = { rl_chance_rare = 39 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 11 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_29 }
            set_variable = { rl_chaos_profile = 29 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 9 }
            set_variable = { rl_chance_epic = 72 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 15 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_30 }
            set_variable = { rl_chaos_profile = 30 }
            set_variable = { rl_chance_common = 35 }
            set_variable = { rl_chance_rare = 3 }
            set_variable = { rl_chance_epic = 33 }
            set_variable = { rl_chance_legendary = 7 }
            set_variable = { rl_chance_divine = 22 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_31 }
            set_variable = { rl_chaos_profile = 31 }
            set_variable = { rl_chance_common = 6 }
            set_variable = { rl_chance_rare = 12 }
            set_variable = { rl_chance_epic = 10 }
            set_variable = { rl_chance_legendary = 50 }
            set_variable = { rl_chance_divine = 22 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_32 }
            set_variable = { rl_chaos_profile = 32 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 50 }
            set_variable = { rl_chance_epic = 38 }
            set_variable = { rl_chance_legendary = 2 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_33 }
            set_variable = { rl_chaos_profile = 33 }
            set_variable = { rl_chance_common = 5 }
            set_variable = { rl_chance_rare = 65 }
            set_variable = { rl_chance_epic = 23 }
            set_variable = { rl_chance_legendary = 2 }
            set_variable = { rl_chance_divine = 5 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_34 }
            set_variable = { rl_chaos_profile = 34 }
            set_variable = { rl_chance_common = 2 }
            set_variable = { rl_chance_rare = 74 }
            set_variable = { rl_chance_epic = 8 }
            set_variable = { rl_chance_legendary = 3 }
            set_variable = { rl_chance_divine = 13 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_35 }
            set_variable = { rl_chaos_profile = 35 }
            set_variable = { rl_chance_common = 16 }
            set_variable = { rl_chance_rare = 12 }
            set_variable = { rl_chance_epic = 14 }
            set_variable = { rl_chance_legendary = 42 }
            set_variable = { rl_chance_divine = 16 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_36 }
            set_variable = { rl_chaos_profile = 36 }
            set_variable = { rl_chance_common = 20 }
            set_variable = { rl_chance_rare = 45 }
            set_variable = { rl_chance_epic = 8 }
            set_variable = { rl_chance_legendary = 11 }
            set_variable = { rl_chance_divine = 16 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_37 }
            set_variable = { rl_chaos_profile = 37 }
            set_variable = { rl_chance_common = 2 }
            set_variable = { rl_chance_rare = 5 }
            set_variable = { rl_chance_epic = 14 }
            set_variable = { rl_chance_legendary = 76 }
            set_variable = { rl_chance_divine = 3 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_38 }
            set_variable = { rl_chaos_profile = 38 }
            set_variable = { rl_chance_common = 46 }
            set_variable = { rl_chance_rare = 29 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 23 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_39 }
            set_variable = { rl_chaos_profile = 39 }
            set_variable = { rl_chance_common = 17 }
            set_variable = { rl_chance_rare = 2 }
            set_variable = { rl_chance_epic = 40 }
            set_variable = { rl_chance_legendary = 39 }
            set_variable = { rl_chance_divine = 2 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_40 }
            set_variable = { rl_chaos_profile = 40 }
            set_variable = { rl_chance_common = 7 }
            set_variable = { rl_chance_rare = 19 }
            set_variable = { rl_chance_epic = 41 }
            set_variable = { rl_chance_legendary = 3 }
            set_variable = { rl_chance_divine = 30 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_41 }
            set_variable = { rl_chaos_profile = 41 }
            set_variable = { rl_chance_common = 60 }
            set_variable = { rl_chance_rare = 6 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 12 }
            set_variable = { rl_chance_divine = 2 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_42 }
            set_variable = { rl_chaos_profile = 42 }
            set_variable = { rl_chance_common = 66 }
            set_variable = { rl_chance_rare = 6 }
            set_variable = { rl_chance_epic = 20 }
            set_variable = { rl_chance_legendary = 2 }
            set_variable = { rl_chance_divine = 6 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_43 }
            set_variable = { rl_chaos_profile = 43 }
            set_variable = { rl_chance_common = 16 }
            set_variable = { rl_chance_rare = 26 }
            set_variable = { rl_chance_epic = 11 }
            set_variable = { rl_chance_legendary = 9 }
            set_variable = { rl_chance_divine = 38 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_44 }
            set_variable = { rl_chaos_profile = 44 }
            set_variable = { rl_chance_common = 4 }
            set_variable = { rl_chance_rare = 44 }
            set_variable = { rl_chance_epic = 44 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 3 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_45 }
            set_variable = { rl_chaos_profile = 45 }
            set_variable = { rl_chance_common = 61 }
            set_variable = { rl_chance_rare = 13 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 19 }
            set_variable = { rl_chance_divine = 5 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_46 }
            set_variable = { rl_chaos_profile = 46 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 2 }
            set_variable = { rl_chance_epic = 46 }
            set_variable = { rl_chance_legendary = 36 }
            set_variable = { rl_chance_divine = 15 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_47 }
            set_variable = { rl_chaos_profile = 47 }
            set_variable = { rl_chance_common = 59 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 36 }
            set_variable = { rl_chance_divine = 2 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_48 }
            set_variable = { rl_chaos_profile = 48 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 29 }
            set_variable = { rl_chance_epic = 38 }
            set_variable = { rl_chance_legendary = 26 }
            set_variable = { rl_chance_divine = 6 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_49 }
            set_variable = { rl_chaos_profile = 49 }
            set_variable = { rl_chance_common = 4 }
            set_variable = { rl_chance_rare = 43 }
            set_variable = { rl_chance_epic = 26 }
            set_variable = { rl_chance_legendary = 2 }
            set_variable = { rl_chance_divine = 25 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_50 }
            set_variable = { rl_chaos_profile = 50 }
            set_variable = { rl_chance_common = 49 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 40 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_51 }
            set_variable = { rl_chaos_profile = 51 }
            set_variable = { rl_chance_common = 12 }
            set_variable = { rl_chance_rare = 27 }
            set_variable = { rl_chance_epic = 6 }
            set_variable = { rl_chance_legendary = 52 }
            set_variable = { rl_chance_divine = 3 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_52 }
            set_variable = { rl_chaos_profile = 52 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 55 }
            set_variable = { rl_chance_epic = 4 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 33 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_53 }
            set_variable = { rl_chaos_profile = 53 }
            set_variable = { rl_chance_common = 5 }
            set_variable = { rl_chance_rare = 17 }
            set_variable = { rl_chance_epic = 3 }
            set_variable = { rl_chance_legendary = 74 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_54 }
            set_variable = { rl_chaos_profile = 54 }
            set_variable = { rl_chance_common = 22 }
            set_variable = { rl_chance_rare = 27 }
            set_variable = { rl_chance_epic = 40 }
            set_variable = { rl_chance_legendary = 3 }
            set_variable = { rl_chance_divine = 8 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_55 }
            set_variable = { rl_chaos_profile = 55 }
            set_variable = { rl_chance_common = 9 }
            set_variable = { rl_chance_rare = 39 }
            set_variable = { rl_chance_epic = 48 }
            set_variable = { rl_chance_legendary = 2 }
            set_variable = { rl_chance_divine = 2 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_56 }
            set_variable = { rl_chaos_profile = 56 }
            set_variable = { rl_chance_common = 30 }
            set_variable = { rl_chance_rare = 15 }
            set_variable = { rl_chance_epic = 8 }
            set_variable = { rl_chance_legendary = 17 }
            set_variable = { rl_chance_divine = 30 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_57 }
            set_variable = { rl_chaos_profile = 57 }
            set_variable = { rl_chance_common = 10 }
            set_variable = { rl_chance_rare = 42 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 43 }
            set_variable = { rl_chance_divine = 3 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_58 }
            set_variable = { rl_chaos_profile = 58 }
            set_variable = { rl_chance_common = 10 }
            set_variable = { rl_chance_rare = 8 }
            set_variable = { rl_chance_epic = 26 }
            set_variable = { rl_chance_legendary = 50 }
            set_variable = { rl_chance_divine = 6 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_59 }
            set_variable = { rl_chaos_profile = 59 }
            set_variable = { rl_chance_common = 27 }
            set_variable = { rl_chance_rare = 7 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 53 }
            set_variable = { rl_chance_divine = 11 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_60 }
            set_variable = { rl_chaos_profile = 60 }
            set_variable = { rl_chance_common = 9 }
            set_variable = { rl_chance_rare = 8 }
            set_variable = { rl_chance_epic = 13 }
            set_variable = { rl_chance_legendary = 66 }
            set_variable = { rl_chance_divine = 4 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_61 }
            set_variable = { rl_chaos_profile = 61 }
            set_variable = { rl_chance_common = 13 }
            set_variable = { rl_chance_rare = 12 }
            set_variable = { rl_chance_epic = 21 }
            set_variable = { rl_chance_legendary = 47 }
            set_variable = { rl_chance_divine = 7 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_62 }
            set_variable = { rl_chaos_profile = 62 }
            set_variable = { rl_chance_common = 41 }
            set_variable = { rl_chance_rare = 4 }
            set_variable = { rl_chance_epic = 5 }
            set_variable = { rl_chance_legendary = 8 }
            set_variable = { rl_chance_divine = 42 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_63 }
            set_variable = { rl_chaos_profile = 63 }
            set_variable = { rl_chance_common = 25 }
            set_variable = { rl_chance_rare = 4 }
            set_variable = { rl_chance_epic = 15 }
            set_variable = { rl_chance_legendary = 55 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_64 }
            set_variable = { rl_chaos_profile = 64 }
            set_variable = { rl_chance_common = 2 }
            set_variable = { rl_chance_rare = 10 }
            set_variable = { rl_chance_epic = 11 }
            set_variable = { rl_chance_legendary = 25 }
            set_variable = { rl_chance_divine = 52 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_65 }
            set_variable = { rl_chaos_profile = 65 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 2 }
            set_variable = { rl_chance_epic = 69 }
            set_variable = { rl_chance_legendary = 4 }
            set_variable = { rl_chance_divine = 22 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_66 }
            set_variable = { rl_chaos_profile = 66 }
            set_variable = { rl_chance_common = 20 }
            set_variable = { rl_chance_rare = 6 }
            set_variable = { rl_chance_epic = 5 }
            set_variable = { rl_chance_legendary = 56 }
            set_variable = { rl_chance_divine = 13 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_67 }
            set_variable = { rl_chaos_profile = 67 }
            set_variable = { rl_chance_common = 42 }
            set_variable = { rl_chance_rare = 31 }
            set_variable = { rl_chance_epic = 4 }
            set_variable = { rl_chance_legendary = 13 }
            set_variable = { rl_chance_divine = 10 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_68 }
            set_variable = { rl_chaos_profile = 68 }
            set_variable = { rl_chance_common = 18 }
            set_variable = { rl_chance_rare = 61 }
            set_variable = { rl_chance_epic = 10 }
            set_variable = { rl_chance_legendary = 2 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_69 }
            set_variable = { rl_chaos_profile = 69 }
            set_variable = { rl_chance_common = 69 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 7 }
            set_variable = { rl_chance_legendary = 15 }
            set_variable = { rl_chance_divine = 8 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_70 }
            set_variable = { rl_chaos_profile = 70 }
            set_variable = { rl_chance_common = 24 }
            set_variable = { rl_chance_rare = 26 }
            set_variable = { rl_chance_epic = 22 }
            set_variable = { rl_chance_legendary = 18 }
            set_variable = { rl_chance_divine = 10 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_71 }
            set_variable = { rl_chaos_profile = 71 }
            set_variable = { rl_chance_common = 15 }
            set_variable = { rl_chance_rare = 32 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 4 }
            set_variable = { rl_chance_divine = 47 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_72 }
            set_variable = { rl_chaos_profile = 72 }
            set_variable = { rl_chance_common = 2 }
            set_variable = { rl_chance_rare = 32 }
            set_variable = { rl_chance_epic = 7 }
            set_variable = { rl_chance_legendary = 37 }
            set_variable = { rl_chance_divine = 22 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_73 }
            set_variable = { rl_chaos_profile = 73 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 21 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 72 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_74 }
            set_variable = { rl_chaos_profile = 74 }
            set_variable = { rl_chance_common = 53 }
            set_variable = { rl_chance_rare = 2 }
            set_variable = { rl_chance_epic = 15 }
            set_variable = { rl_chance_legendary = 28 }
            set_variable = { rl_chance_divine = 2 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_75 }
            set_variable = { rl_chaos_profile = 75 }
            set_variable = { rl_chance_common = 57 }
            set_variable = { rl_chance_rare = 20 }
            set_variable = { rl_chance_epic = 9 }
            set_variable = { rl_chance_legendary = 5 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_76 }
            set_variable = { rl_chaos_profile = 76 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 10 }
            set_variable = { rl_chance_epic = 50 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 36 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_77 }
            set_variable = { rl_chaos_profile = 77 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 29 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 65 }
            set_variable = { rl_chance_divine = 3 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_78 }
            set_variable = { rl_chaos_profile = 78 }
            set_variable = { rl_chance_common = 7 }
            set_variable = { rl_chance_rare = 27 }
            set_variable = { rl_chance_epic = 57 }
            set_variable = { rl_chance_legendary = 8 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_79 }
            set_variable = { rl_chaos_profile = 79 }
            set_variable = { rl_chance_common = 5 }
            set_variable = { rl_chance_rare = 85 }
            set_variable = { rl_chance_epic = 3 }
            set_variable = { rl_chance_legendary = 6 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_80 }
            set_variable = { rl_chaos_profile = 80 }
            set_variable = { rl_chance_common = 15 }
            set_variable = { rl_chance_rare = 29 }
            set_variable = { rl_chance_epic = 31 }
            set_variable = { rl_chance_legendary = 22 }
            set_variable = { rl_chance_divine = 3 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_81 }
            set_variable = { rl_chaos_profile = 81 }
            set_variable = { rl_chance_common = 1 }
            set_variable = { rl_chance_rare = 11 }
            set_variable = { rl_chance_epic = 30 }
            set_variable = { rl_chance_legendary = 15 }
            set_variable = { rl_chance_divine = 43 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_82 }
            set_variable = { rl_chaos_profile = 82 }
            set_variable = { rl_chance_common = 7 }
            set_variable = { rl_chance_rare = 2 }
            set_variable = { rl_chance_epic = 19 }
            set_variable = { rl_chance_legendary = 4 }
            set_variable = { rl_chance_divine = 68 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_83 }
            set_variable = { rl_chaos_profile = 83 }
            set_variable = { rl_chance_common = 2 }
            set_variable = { rl_chance_rare = 26 }
            set_variable = { rl_chance_epic = 48 }
            set_variable = { rl_chance_legendary = 22 }
            set_variable = { rl_chance_divine = 2 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_84 }
            set_variable = { rl_chaos_profile = 84 }
            set_variable = { rl_chance_common = 24 }
            set_variable = { rl_chance_rare = 31 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 18 }
            set_variable = { rl_chance_divine = 26 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_85 }
            set_variable = { rl_chaos_profile = 85 }
            set_variable = { rl_chance_common = 77 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 12 }
            set_variable = { rl_chance_legendary = 4 }
            set_variable = { rl_chance_divine = 6 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_86 }
            set_variable = { rl_chaos_profile = 86 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 25 }
            set_variable = { rl_chance_epic = 53 }
            set_variable = { rl_chance_legendary = 18 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_87 }
            set_variable = { rl_chaos_profile = 87 }
            set_variable = { rl_chance_common = 54 }
            set_variable = { rl_chance_rare = 25 }
            set_variable = { rl_chance_epic = 4 }
            set_variable = { rl_chance_legendary = 3 }
            set_variable = { rl_chance_divine = 14 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_88 }
            set_variable = { rl_chaos_profile = 88 }
            set_variable = { rl_chance_common = 11 }
            set_variable = { rl_chance_rare = 19 }
            set_variable = { rl_chance_epic = 28 }
            set_variable = { rl_chance_legendary = 38 }
            set_variable = { rl_chance_divine = 4 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_89 }
            set_variable = { rl_chaos_profile = 89 }
            set_variable = { rl_chance_common = 8 }
            set_variable = { rl_chance_rare = 17 }
            set_variable = { rl_chance_epic = 5 }
            set_variable = { rl_chance_legendary = 61 }
            set_variable = { rl_chance_divine = 9 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_90 }
            set_variable = { rl_chaos_profile = 90 }
            set_variable = { rl_chance_common = 6 }
            set_variable = { rl_chance_rare = 3 }
            set_variable = { rl_chance_epic = 1 }
            set_variable = { rl_chance_legendary = 74 }
            set_variable = { rl_chance_divine = 16 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_91 }
            set_variable = { rl_chaos_profile = 91 }
            set_variable = { rl_chance_common = 57 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 3 }
            set_variable = { rl_chance_legendary = 22 }
            set_variable = { rl_chance_divine = 17 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_92 }
            set_variable = { rl_chaos_profile = 92 }
            set_variable = { rl_chance_common = 77 }
            set_variable = { rl_chance_rare = 1 }
            set_variable = { rl_chance_epic = 6 }
            set_variable = { rl_chance_legendary = 10 }
            set_variable = { rl_chance_divine = 6 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_93 }
            set_variable = { rl_chaos_profile = 93 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 6 }
            set_variable = { rl_chance_epic = 75 }
            set_variable = { rl_chance_legendary = 1 }
            set_variable = { rl_chance_divine = 15 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_94 }
            set_variable = { rl_chaos_profile = 94 }
            set_variable = { rl_chance_common = 3 }
            set_variable = { rl_chance_rare = 24 }
            set_variable = { rl_chance_epic = 7 }
            set_variable = { rl_chance_legendary = 24 }
            set_variable = { rl_chance_divine = 42 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_95 }
            set_variable = { rl_chaos_profile = 95 }
            set_variable = { rl_chance_common = 59 }
            set_variable = { rl_chance_rare = 4 }
            set_variable = { rl_chance_epic = 23 }
            set_variable = { rl_chance_legendary = 7 }
            set_variable = { rl_chance_divine = 7 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_96 }
            set_variable = { rl_chaos_profile = 96 }
            set_variable = { rl_chance_common = 14 }
            set_variable = { rl_chance_rare = 55 }
            set_variable = { rl_chance_epic = 26 }
            set_variable = { rl_chance_legendary = 4 }
            set_variable = { rl_chance_divine = 1 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_97 }
            set_variable = { rl_chaos_profile = 97 }
            set_variable = { rl_chance_common = 4 }
            set_variable = { rl_chance_rare = 27 }
            set_variable = { rl_chance_epic = 26 }
            set_variable = { rl_chance_legendary = 31 }
            set_variable = { rl_chance_divine = 12 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_98 }
            set_variable = { rl_chaos_profile = 98 }
            set_variable = { rl_chance_common = 52 }
            set_variable = { rl_chance_rare = 14 }
            set_variable = { rl_chance_epic = 2 }
            set_variable = { rl_chance_legendary = 20 }
            set_variable = { rl_chance_divine = 12 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_99 }
            set_variable = { rl_chaos_profile = 99 }
            set_variable = { rl_chance_common = 19 }
            set_variable = { rl_chance_rare = 7 }
            set_variable = { rl_chance_epic = 6 }
            set_variable = { rl_chance_legendary = 41 }
            set_variable = { rl_chance_divine = 27 }
        }
        else_if = {
            limit = { has_global_flag = rl_chaos_profile_100 }
            set_variable = { rl_chaos_profile = 100 }
            set_variable = { rl_chance_common = 67 }
            set_variable = { rl_chance_rare = 2 }
            set_variable = { rl_chance_epic = 11 }
            set_variable = { rl_chance_legendary = 18 }
            set_variable = { rl_chance_divine = 2 }
        }
        else = {
            set_variable = { rl_chaos_profile = 0 }
            set_variable = { rl_chance_common = 70 }
            set_variable = { rl_chance_rare = 15 }
            set_variable = { rl_chance_epic = 10 }
            set_variable = { rl_chance_legendary = 4 }
            set_variable = { rl_chance_divine = 1 }
        }
    }
    else = {
        set_variable = { rl_chaos_profile = 0 }
        set_variable = { rl_chance_common = 70 }
        set_variable = { rl_chance_rare = 15 }
        set_variable = { rl_chance_epic = 10 }
        set_variable = { rl_chance_legendary = 4 }
        set_variable = { rl_chance_divine = 1 }
    }
}

rl_roll_rarity_1 = {
    if = {
        limit = { check_variable = { rl_chaos_profile = 1 } }
        random_list = {
            5 = { set_variable = { rl_offer_1_rarity = 1 } }
            5 = { set_variable = { rl_offer_1_rarity = 2 } }
            5 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            80 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 2 } }
        random_list = {
            80 = { set_variable = { rl_offer_1_rarity = 1 } }
            5 = { set_variable = { rl_offer_1_rarity = 2 } }
            5 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            5 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 3 } }
        random_list = {
            5 = { set_variable = { rl_offer_1_rarity = 1 } }
            80 = { set_variable = { rl_offer_1_rarity = 2 } }
            5 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            5 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 4 } }
        random_list = {
            5 = { set_variable = { rl_offer_1_rarity = 1 } }
            5 = { set_variable = { rl_offer_1_rarity = 2 } }
            80 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            5 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 5 } }
        random_list = {
            5 = { set_variable = { rl_offer_1_rarity = 1 } }
            5 = { set_variable = { rl_offer_1_rarity = 2 } }
            5 = { set_variable = { rl_offer_1_rarity = 3 } }
            80 = { set_variable = { rl_offer_1_rarity = 4 } }
            5 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 6 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            96 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 7 } }
        random_list = {
            96 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 8 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            96 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 9 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            96 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 10 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            96 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 11 } }
        random_list = {
            20 = { set_variable = { rl_offer_1_rarity = 1 } }
            20 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            20 = { set_variable = { rl_offer_1_rarity = 4 } }
            20 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 12 } }
        random_list = {
            10 = { set_variable = { rl_offer_1_rarity = 1 } }
            15 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            25 = { set_variable = { rl_offer_1_rarity = 4 } }
            30 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 13 } }
        random_list = {
            30 = { set_variable = { rl_offer_1_rarity = 1 } }
            25 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            15 = { set_variable = { rl_offer_1_rarity = 4 } }
            10 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 14 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            9 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            30 = { set_variable = { rl_offer_1_rarity = 4 } }
            40 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 15 } }
        random_list = {
            40 = { set_variable = { rl_offer_1_rarity = 1 } }
            30 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            9 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 16 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            34 = { set_variable = { rl_offer_1_rarity = 2 } }
            8 = { set_variable = { rl_offer_1_rarity = 3 } }
            53 = { set_variable = { rl_offer_1_rarity = 4 } }
            4 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 17 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            39 = { set_variable = { rl_offer_1_rarity = 2 } }
            45 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            12 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 18 } }
        random_list = {
            11 = { set_variable = { rl_offer_1_rarity = 1 } }
            57 = { set_variable = { rl_offer_1_rarity = 2 } }
            4 = { set_variable = { rl_offer_1_rarity = 3 } }
            19 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 19 } }
        random_list = {
            45 = { set_variable = { rl_offer_1_rarity = 1 } }
            8 = { set_variable = { rl_offer_1_rarity = 2 } }
            8 = { set_variable = { rl_offer_1_rarity = 3 } }
            2 = { set_variable = { rl_offer_1_rarity = 4 } }
            37 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 20 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            53 = { set_variable = { rl_offer_1_rarity = 2 } }
            13 = { set_variable = { rl_offer_1_rarity = 3 } }
            24 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 21 } }
        random_list = {
            2 = { set_variable = { rl_offer_1_rarity = 1 } }
            12 = { set_variable = { rl_offer_1_rarity = 2 } }
            67 = { set_variable = { rl_offer_1_rarity = 3 } }
            7 = { set_variable = { rl_offer_1_rarity = 4 } }
            12 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 22 } }
        random_list = {
            55 = { set_variable = { rl_offer_1_rarity = 1 } }
            7 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            31 = { set_variable = { rl_offer_1_rarity = 4 } }
            6 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 23 } }
        random_list = {
            17 = { set_variable = { rl_offer_1_rarity = 1 } }
            21 = { set_variable = { rl_offer_1_rarity = 2 } }
            23 = { set_variable = { rl_offer_1_rarity = 3 } }
            17 = { set_variable = { rl_offer_1_rarity = 4 } }
            22 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 24 } }
        random_list = {
            30 = { set_variable = { rl_offer_1_rarity = 1 } }
            23 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            44 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 25 } }
        random_list = {
            61 = { set_variable = { rl_offer_1_rarity = 1 } }
            5 = { set_variable = { rl_offer_1_rarity = 2 } }
            10 = { set_variable = { rl_offer_1_rarity = 3 } }
            3 = { set_variable = { rl_offer_1_rarity = 4 } }
            21 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 26 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            34 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            16 = { set_variable = { rl_offer_1_rarity = 4 } }
            29 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 27 } }
        random_list = {
            9 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            4 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            85 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 28 } }
        random_list = {
            40 = { set_variable = { rl_offer_1_rarity = 1 } }
            39 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            11 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 29 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            9 = { set_variable = { rl_offer_1_rarity = 2 } }
            72 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            15 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 30 } }
        random_list = {
            35 = { set_variable = { rl_offer_1_rarity = 1 } }
            3 = { set_variable = { rl_offer_1_rarity = 2 } }
            33 = { set_variable = { rl_offer_1_rarity = 3 } }
            7 = { set_variable = { rl_offer_1_rarity = 4 } }
            22 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 31 } }
        random_list = {
            6 = { set_variable = { rl_offer_1_rarity = 1 } }
            12 = { set_variable = { rl_offer_1_rarity = 2 } }
            10 = { set_variable = { rl_offer_1_rarity = 3 } }
            50 = { set_variable = { rl_offer_1_rarity = 4 } }
            22 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 32 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            50 = { set_variable = { rl_offer_1_rarity = 2 } }
            38 = { set_variable = { rl_offer_1_rarity = 3 } }
            2 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 33 } }
        random_list = {
            5 = { set_variable = { rl_offer_1_rarity = 1 } }
            65 = { set_variable = { rl_offer_1_rarity = 2 } }
            23 = { set_variable = { rl_offer_1_rarity = 3 } }
            2 = { set_variable = { rl_offer_1_rarity = 4 } }
            5 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 34 } }
        random_list = {
            2 = { set_variable = { rl_offer_1_rarity = 1 } }
            74 = { set_variable = { rl_offer_1_rarity = 2 } }
            8 = { set_variable = { rl_offer_1_rarity = 3 } }
            3 = { set_variable = { rl_offer_1_rarity = 4 } }
            13 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 35 } }
        random_list = {
            16 = { set_variable = { rl_offer_1_rarity = 1 } }
            12 = { set_variable = { rl_offer_1_rarity = 2 } }
            14 = { set_variable = { rl_offer_1_rarity = 3 } }
            42 = { set_variable = { rl_offer_1_rarity = 4 } }
            16 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 36 } }
        random_list = {
            20 = { set_variable = { rl_offer_1_rarity = 1 } }
            45 = { set_variable = { rl_offer_1_rarity = 2 } }
            8 = { set_variable = { rl_offer_1_rarity = 3 } }
            11 = { set_variable = { rl_offer_1_rarity = 4 } }
            16 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 37 } }
        random_list = {
            2 = { set_variable = { rl_offer_1_rarity = 1 } }
            5 = { set_variable = { rl_offer_1_rarity = 2 } }
            14 = { set_variable = { rl_offer_1_rarity = 3 } }
            76 = { set_variable = { rl_offer_1_rarity = 4 } }
            3 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 38 } }
        random_list = {
            46 = { set_variable = { rl_offer_1_rarity = 1 } }
            29 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            23 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 39 } }
        random_list = {
            17 = { set_variable = { rl_offer_1_rarity = 1 } }
            2 = { set_variable = { rl_offer_1_rarity = 2 } }
            40 = { set_variable = { rl_offer_1_rarity = 3 } }
            39 = { set_variable = { rl_offer_1_rarity = 4 } }
            2 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 40 } }
        random_list = {
            7 = { set_variable = { rl_offer_1_rarity = 1 } }
            19 = { set_variable = { rl_offer_1_rarity = 2 } }
            41 = { set_variable = { rl_offer_1_rarity = 3 } }
            3 = { set_variable = { rl_offer_1_rarity = 4 } }
            30 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 41 } }
        random_list = {
            60 = { set_variable = { rl_offer_1_rarity = 1 } }
            6 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            12 = { set_variable = { rl_offer_1_rarity = 4 } }
            2 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 42 } }
        random_list = {
            66 = { set_variable = { rl_offer_1_rarity = 1 } }
            6 = { set_variable = { rl_offer_1_rarity = 2 } }
            20 = { set_variable = { rl_offer_1_rarity = 3 } }
            2 = { set_variable = { rl_offer_1_rarity = 4 } }
            6 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 43 } }
        random_list = {
            16 = { set_variable = { rl_offer_1_rarity = 1 } }
            26 = { set_variable = { rl_offer_1_rarity = 2 } }
            11 = { set_variable = { rl_offer_1_rarity = 3 } }
            9 = { set_variable = { rl_offer_1_rarity = 4 } }
            38 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 44 } }
        random_list = {
            4 = { set_variable = { rl_offer_1_rarity = 1 } }
            44 = { set_variable = { rl_offer_1_rarity = 2 } }
            44 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            3 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 45 } }
        random_list = {
            61 = { set_variable = { rl_offer_1_rarity = 1 } }
            13 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            19 = { set_variable = { rl_offer_1_rarity = 4 } }
            5 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 46 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            2 = { set_variable = { rl_offer_1_rarity = 2 } }
            46 = { set_variable = { rl_offer_1_rarity = 3 } }
            36 = { set_variable = { rl_offer_1_rarity = 4 } }
            15 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 47 } }
        random_list = {
            59 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            36 = { set_variable = { rl_offer_1_rarity = 4 } }
            2 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 48 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            29 = { set_variable = { rl_offer_1_rarity = 2 } }
            38 = { set_variable = { rl_offer_1_rarity = 3 } }
            26 = { set_variable = { rl_offer_1_rarity = 4 } }
            6 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 49 } }
        random_list = {
            4 = { set_variable = { rl_offer_1_rarity = 1 } }
            43 = { set_variable = { rl_offer_1_rarity = 2 } }
            26 = { set_variable = { rl_offer_1_rarity = 3 } }
            2 = { set_variable = { rl_offer_1_rarity = 4 } }
            25 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 50 } }
        random_list = {
            49 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            40 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 51 } }
        random_list = {
            12 = { set_variable = { rl_offer_1_rarity = 1 } }
            27 = { set_variable = { rl_offer_1_rarity = 2 } }
            6 = { set_variable = { rl_offer_1_rarity = 3 } }
            52 = { set_variable = { rl_offer_1_rarity = 4 } }
            3 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 52 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            55 = { set_variable = { rl_offer_1_rarity = 2 } }
            4 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            33 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 53 } }
        random_list = {
            5 = { set_variable = { rl_offer_1_rarity = 1 } }
            17 = { set_variable = { rl_offer_1_rarity = 2 } }
            3 = { set_variable = { rl_offer_1_rarity = 3 } }
            74 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 54 } }
        random_list = {
            22 = { set_variable = { rl_offer_1_rarity = 1 } }
            27 = { set_variable = { rl_offer_1_rarity = 2 } }
            40 = { set_variable = { rl_offer_1_rarity = 3 } }
            3 = { set_variable = { rl_offer_1_rarity = 4 } }
            8 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 55 } }
        random_list = {
            9 = { set_variable = { rl_offer_1_rarity = 1 } }
            39 = { set_variable = { rl_offer_1_rarity = 2 } }
            48 = { set_variable = { rl_offer_1_rarity = 3 } }
            2 = { set_variable = { rl_offer_1_rarity = 4 } }
            2 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 56 } }
        random_list = {
            30 = { set_variable = { rl_offer_1_rarity = 1 } }
            15 = { set_variable = { rl_offer_1_rarity = 2 } }
            8 = { set_variable = { rl_offer_1_rarity = 3 } }
            17 = { set_variable = { rl_offer_1_rarity = 4 } }
            30 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 57 } }
        random_list = {
            10 = { set_variable = { rl_offer_1_rarity = 1 } }
            42 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            43 = { set_variable = { rl_offer_1_rarity = 4 } }
            3 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 58 } }
        random_list = {
            10 = { set_variable = { rl_offer_1_rarity = 1 } }
            8 = { set_variable = { rl_offer_1_rarity = 2 } }
            26 = { set_variable = { rl_offer_1_rarity = 3 } }
            50 = { set_variable = { rl_offer_1_rarity = 4 } }
            6 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 59 } }
        random_list = {
            27 = { set_variable = { rl_offer_1_rarity = 1 } }
            7 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            53 = { set_variable = { rl_offer_1_rarity = 4 } }
            11 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 60 } }
        random_list = {
            9 = { set_variable = { rl_offer_1_rarity = 1 } }
            8 = { set_variable = { rl_offer_1_rarity = 2 } }
            13 = { set_variable = { rl_offer_1_rarity = 3 } }
            66 = { set_variable = { rl_offer_1_rarity = 4 } }
            4 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 61 } }
        random_list = {
            13 = { set_variable = { rl_offer_1_rarity = 1 } }
            12 = { set_variable = { rl_offer_1_rarity = 2 } }
            21 = { set_variable = { rl_offer_1_rarity = 3 } }
            47 = { set_variable = { rl_offer_1_rarity = 4 } }
            7 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 62 } }
        random_list = {
            41 = { set_variable = { rl_offer_1_rarity = 1 } }
            4 = { set_variable = { rl_offer_1_rarity = 2 } }
            5 = { set_variable = { rl_offer_1_rarity = 3 } }
            8 = { set_variable = { rl_offer_1_rarity = 4 } }
            42 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 63 } }
        random_list = {
            25 = { set_variable = { rl_offer_1_rarity = 1 } }
            4 = { set_variable = { rl_offer_1_rarity = 2 } }
            15 = { set_variable = { rl_offer_1_rarity = 3 } }
            55 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 64 } }
        random_list = {
            2 = { set_variable = { rl_offer_1_rarity = 1 } }
            10 = { set_variable = { rl_offer_1_rarity = 2 } }
            11 = { set_variable = { rl_offer_1_rarity = 3 } }
            25 = { set_variable = { rl_offer_1_rarity = 4 } }
            52 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 65 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            2 = { set_variable = { rl_offer_1_rarity = 2 } }
            69 = { set_variable = { rl_offer_1_rarity = 3 } }
            4 = { set_variable = { rl_offer_1_rarity = 4 } }
            22 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 66 } }
        random_list = {
            20 = { set_variable = { rl_offer_1_rarity = 1 } }
            6 = { set_variable = { rl_offer_1_rarity = 2 } }
            5 = { set_variable = { rl_offer_1_rarity = 3 } }
            56 = { set_variable = { rl_offer_1_rarity = 4 } }
            13 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 67 } }
        random_list = {
            42 = { set_variable = { rl_offer_1_rarity = 1 } }
            31 = { set_variable = { rl_offer_1_rarity = 2 } }
            4 = { set_variable = { rl_offer_1_rarity = 3 } }
            13 = { set_variable = { rl_offer_1_rarity = 4 } }
            10 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 68 } }
        random_list = {
            18 = { set_variable = { rl_offer_1_rarity = 1 } }
            61 = { set_variable = { rl_offer_1_rarity = 2 } }
            10 = { set_variable = { rl_offer_1_rarity = 3 } }
            2 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 69 } }
        random_list = {
            69 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            7 = { set_variable = { rl_offer_1_rarity = 3 } }
            15 = { set_variable = { rl_offer_1_rarity = 4 } }
            8 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 70 } }
        random_list = {
            24 = { set_variable = { rl_offer_1_rarity = 1 } }
            26 = { set_variable = { rl_offer_1_rarity = 2 } }
            22 = { set_variable = { rl_offer_1_rarity = 3 } }
            18 = { set_variable = { rl_offer_1_rarity = 4 } }
            10 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 71 } }
        random_list = {
            15 = { set_variable = { rl_offer_1_rarity = 1 } }
            32 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            4 = { set_variable = { rl_offer_1_rarity = 4 } }
            47 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 72 } }
        random_list = {
            2 = { set_variable = { rl_offer_1_rarity = 1 } }
            32 = { set_variable = { rl_offer_1_rarity = 2 } }
            7 = { set_variable = { rl_offer_1_rarity = 3 } }
            37 = { set_variable = { rl_offer_1_rarity = 4 } }
            22 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 73 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            21 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            72 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 74 } }
        random_list = {
            53 = { set_variable = { rl_offer_1_rarity = 1 } }
            2 = { set_variable = { rl_offer_1_rarity = 2 } }
            15 = { set_variable = { rl_offer_1_rarity = 3 } }
            28 = { set_variable = { rl_offer_1_rarity = 4 } }
            2 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 75 } }
        random_list = {
            57 = { set_variable = { rl_offer_1_rarity = 1 } }
            20 = { set_variable = { rl_offer_1_rarity = 2 } }
            9 = { set_variable = { rl_offer_1_rarity = 3 } }
            5 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 76 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            10 = { set_variable = { rl_offer_1_rarity = 2 } }
            50 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            36 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 77 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            29 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            65 = { set_variable = { rl_offer_1_rarity = 4 } }
            3 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 78 } }
        random_list = {
            7 = { set_variable = { rl_offer_1_rarity = 1 } }
            27 = { set_variable = { rl_offer_1_rarity = 2 } }
            57 = { set_variable = { rl_offer_1_rarity = 3 } }
            8 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 79 } }
        random_list = {
            5 = { set_variable = { rl_offer_1_rarity = 1 } }
            85 = { set_variable = { rl_offer_1_rarity = 2 } }
            3 = { set_variable = { rl_offer_1_rarity = 3 } }
            6 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 80 } }
        random_list = {
            15 = { set_variable = { rl_offer_1_rarity = 1 } }
            29 = { set_variable = { rl_offer_1_rarity = 2 } }
            31 = { set_variable = { rl_offer_1_rarity = 3 } }
            22 = { set_variable = { rl_offer_1_rarity = 4 } }
            3 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 81 } }
        random_list = {
            1 = { set_variable = { rl_offer_1_rarity = 1 } }
            11 = { set_variable = { rl_offer_1_rarity = 2 } }
            30 = { set_variable = { rl_offer_1_rarity = 3 } }
            15 = { set_variable = { rl_offer_1_rarity = 4 } }
            43 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 82 } }
        random_list = {
            7 = { set_variable = { rl_offer_1_rarity = 1 } }
            2 = { set_variable = { rl_offer_1_rarity = 2 } }
            19 = { set_variable = { rl_offer_1_rarity = 3 } }
            4 = { set_variable = { rl_offer_1_rarity = 4 } }
            68 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 83 } }
        random_list = {
            2 = { set_variable = { rl_offer_1_rarity = 1 } }
            26 = { set_variable = { rl_offer_1_rarity = 2 } }
            48 = { set_variable = { rl_offer_1_rarity = 3 } }
            22 = { set_variable = { rl_offer_1_rarity = 4 } }
            2 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 84 } }
        random_list = {
            24 = { set_variable = { rl_offer_1_rarity = 1 } }
            31 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            18 = { set_variable = { rl_offer_1_rarity = 4 } }
            26 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 85 } }
        random_list = {
            77 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            12 = { set_variable = { rl_offer_1_rarity = 3 } }
            4 = { set_variable = { rl_offer_1_rarity = 4 } }
            6 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 86 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            25 = { set_variable = { rl_offer_1_rarity = 2 } }
            53 = { set_variable = { rl_offer_1_rarity = 3 } }
            18 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 87 } }
        random_list = {
            54 = { set_variable = { rl_offer_1_rarity = 1 } }
            25 = { set_variable = { rl_offer_1_rarity = 2 } }
            4 = { set_variable = { rl_offer_1_rarity = 3 } }
            3 = { set_variable = { rl_offer_1_rarity = 4 } }
            14 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 88 } }
        random_list = {
            11 = { set_variable = { rl_offer_1_rarity = 1 } }
            19 = { set_variable = { rl_offer_1_rarity = 2 } }
            28 = { set_variable = { rl_offer_1_rarity = 3 } }
            38 = { set_variable = { rl_offer_1_rarity = 4 } }
            4 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 89 } }
        random_list = {
            8 = { set_variable = { rl_offer_1_rarity = 1 } }
            17 = { set_variable = { rl_offer_1_rarity = 2 } }
            5 = { set_variable = { rl_offer_1_rarity = 3 } }
            61 = { set_variable = { rl_offer_1_rarity = 4 } }
            9 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 90 } }
        random_list = {
            6 = { set_variable = { rl_offer_1_rarity = 1 } }
            3 = { set_variable = { rl_offer_1_rarity = 2 } }
            1 = { set_variable = { rl_offer_1_rarity = 3 } }
            74 = { set_variable = { rl_offer_1_rarity = 4 } }
            16 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 91 } }
        random_list = {
            57 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            3 = { set_variable = { rl_offer_1_rarity = 3 } }
            22 = { set_variable = { rl_offer_1_rarity = 4 } }
            17 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 92 } }
        random_list = {
            77 = { set_variable = { rl_offer_1_rarity = 1 } }
            1 = { set_variable = { rl_offer_1_rarity = 2 } }
            6 = { set_variable = { rl_offer_1_rarity = 3 } }
            10 = { set_variable = { rl_offer_1_rarity = 4 } }
            6 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 93 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            6 = { set_variable = { rl_offer_1_rarity = 2 } }
            75 = { set_variable = { rl_offer_1_rarity = 3 } }
            1 = { set_variable = { rl_offer_1_rarity = 4 } }
            15 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 94 } }
        random_list = {
            3 = { set_variable = { rl_offer_1_rarity = 1 } }
            24 = { set_variable = { rl_offer_1_rarity = 2 } }
            7 = { set_variable = { rl_offer_1_rarity = 3 } }
            24 = { set_variable = { rl_offer_1_rarity = 4 } }
            42 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 95 } }
        random_list = {
            59 = { set_variable = { rl_offer_1_rarity = 1 } }
            4 = { set_variable = { rl_offer_1_rarity = 2 } }
            23 = { set_variable = { rl_offer_1_rarity = 3 } }
            7 = { set_variable = { rl_offer_1_rarity = 4 } }
            7 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 96 } }
        random_list = {
            14 = { set_variable = { rl_offer_1_rarity = 1 } }
            55 = { set_variable = { rl_offer_1_rarity = 2 } }
            26 = { set_variable = { rl_offer_1_rarity = 3 } }
            4 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 97 } }
        random_list = {
            4 = { set_variable = { rl_offer_1_rarity = 1 } }
            27 = { set_variable = { rl_offer_1_rarity = 2 } }
            26 = { set_variable = { rl_offer_1_rarity = 3 } }
            31 = { set_variable = { rl_offer_1_rarity = 4 } }
            12 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 98 } }
        random_list = {
            52 = { set_variable = { rl_offer_1_rarity = 1 } }
            14 = { set_variable = { rl_offer_1_rarity = 2 } }
            2 = { set_variable = { rl_offer_1_rarity = 3 } }
            20 = { set_variable = { rl_offer_1_rarity = 4 } }
            12 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 99 } }
        random_list = {
            19 = { set_variable = { rl_offer_1_rarity = 1 } }
            7 = { set_variable = { rl_offer_1_rarity = 2 } }
            6 = { set_variable = { rl_offer_1_rarity = 3 } }
            41 = { set_variable = { rl_offer_1_rarity = 4 } }
            27 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 100 } }
        random_list = {
            67 = { set_variable = { rl_offer_1_rarity = 1 } }
            2 = { set_variable = { rl_offer_1_rarity = 2 } }
            11 = { set_variable = { rl_offer_1_rarity = 3 } }
            18 = { set_variable = { rl_offer_1_rarity = 4 } }
            2 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
    else = {
        random_list = {
            70 = { set_variable = { rl_offer_1_rarity = 1 } }
            15 = { set_variable = { rl_offer_1_rarity = 2 } }
            10 = { set_variable = { rl_offer_1_rarity = 3 } }
            4 = { set_variable = { rl_offer_1_rarity = 4 } }
            1 = { set_variable = { rl_offer_1_rarity = 5 } }
        }
    }
}

rl_roll_rarity_2 = {
    if = {
        limit = { check_variable = { rl_chaos_profile = 1 } }
        random_list = {
            5 = { set_variable = { rl_offer_2_rarity = 1 } }
            5 = { set_variable = { rl_offer_2_rarity = 2 } }
            5 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            80 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 2 } }
        random_list = {
            80 = { set_variable = { rl_offer_2_rarity = 1 } }
            5 = { set_variable = { rl_offer_2_rarity = 2 } }
            5 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            5 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 3 } }
        random_list = {
            5 = { set_variable = { rl_offer_2_rarity = 1 } }
            80 = { set_variable = { rl_offer_2_rarity = 2 } }
            5 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            5 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 4 } }
        random_list = {
            5 = { set_variable = { rl_offer_2_rarity = 1 } }
            5 = { set_variable = { rl_offer_2_rarity = 2 } }
            80 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            5 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 5 } }
        random_list = {
            5 = { set_variable = { rl_offer_2_rarity = 1 } }
            5 = { set_variable = { rl_offer_2_rarity = 2 } }
            5 = { set_variable = { rl_offer_2_rarity = 3 } }
            80 = { set_variable = { rl_offer_2_rarity = 4 } }
            5 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 6 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            96 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 7 } }
        random_list = {
            96 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 8 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            96 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 9 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            96 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 10 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            96 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 11 } }
        random_list = {
            20 = { set_variable = { rl_offer_2_rarity = 1 } }
            20 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            20 = { set_variable = { rl_offer_2_rarity = 4 } }
            20 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 12 } }
        random_list = {
            10 = { set_variable = { rl_offer_2_rarity = 1 } }
            15 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            25 = { set_variable = { rl_offer_2_rarity = 4 } }
            30 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 13 } }
        random_list = {
            30 = { set_variable = { rl_offer_2_rarity = 1 } }
            25 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            15 = { set_variable = { rl_offer_2_rarity = 4 } }
            10 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 14 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            9 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            30 = { set_variable = { rl_offer_2_rarity = 4 } }
            40 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 15 } }
        random_list = {
            40 = { set_variable = { rl_offer_2_rarity = 1 } }
            30 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            9 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 16 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            34 = { set_variable = { rl_offer_2_rarity = 2 } }
            8 = { set_variable = { rl_offer_2_rarity = 3 } }
            53 = { set_variable = { rl_offer_2_rarity = 4 } }
            4 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 17 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            39 = { set_variable = { rl_offer_2_rarity = 2 } }
            45 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            12 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 18 } }
        random_list = {
            11 = { set_variable = { rl_offer_2_rarity = 1 } }
            57 = { set_variable = { rl_offer_2_rarity = 2 } }
            4 = { set_variable = { rl_offer_2_rarity = 3 } }
            19 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 19 } }
        random_list = {
            45 = { set_variable = { rl_offer_2_rarity = 1 } }
            8 = { set_variable = { rl_offer_2_rarity = 2 } }
            8 = { set_variable = { rl_offer_2_rarity = 3 } }
            2 = { set_variable = { rl_offer_2_rarity = 4 } }
            37 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 20 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            53 = { set_variable = { rl_offer_2_rarity = 2 } }
            13 = { set_variable = { rl_offer_2_rarity = 3 } }
            24 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 21 } }
        random_list = {
            2 = { set_variable = { rl_offer_2_rarity = 1 } }
            12 = { set_variable = { rl_offer_2_rarity = 2 } }
            67 = { set_variable = { rl_offer_2_rarity = 3 } }
            7 = { set_variable = { rl_offer_2_rarity = 4 } }
            12 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 22 } }
        random_list = {
            55 = { set_variable = { rl_offer_2_rarity = 1 } }
            7 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            31 = { set_variable = { rl_offer_2_rarity = 4 } }
            6 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 23 } }
        random_list = {
            17 = { set_variable = { rl_offer_2_rarity = 1 } }
            21 = { set_variable = { rl_offer_2_rarity = 2 } }
            23 = { set_variable = { rl_offer_2_rarity = 3 } }
            17 = { set_variable = { rl_offer_2_rarity = 4 } }
            22 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 24 } }
        random_list = {
            30 = { set_variable = { rl_offer_2_rarity = 1 } }
            23 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            44 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 25 } }
        random_list = {
            61 = { set_variable = { rl_offer_2_rarity = 1 } }
            5 = { set_variable = { rl_offer_2_rarity = 2 } }
            10 = { set_variable = { rl_offer_2_rarity = 3 } }
            3 = { set_variable = { rl_offer_2_rarity = 4 } }
            21 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 26 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            34 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            16 = { set_variable = { rl_offer_2_rarity = 4 } }
            29 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 27 } }
        random_list = {
            9 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            4 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            85 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 28 } }
        random_list = {
            40 = { set_variable = { rl_offer_2_rarity = 1 } }
            39 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            11 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 29 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            9 = { set_variable = { rl_offer_2_rarity = 2 } }
            72 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            15 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 30 } }
        random_list = {
            35 = { set_variable = { rl_offer_2_rarity = 1 } }
            3 = { set_variable = { rl_offer_2_rarity = 2 } }
            33 = { set_variable = { rl_offer_2_rarity = 3 } }
            7 = { set_variable = { rl_offer_2_rarity = 4 } }
            22 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 31 } }
        random_list = {
            6 = { set_variable = { rl_offer_2_rarity = 1 } }
            12 = { set_variable = { rl_offer_2_rarity = 2 } }
            10 = { set_variable = { rl_offer_2_rarity = 3 } }
            50 = { set_variable = { rl_offer_2_rarity = 4 } }
            22 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 32 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            50 = { set_variable = { rl_offer_2_rarity = 2 } }
            38 = { set_variable = { rl_offer_2_rarity = 3 } }
            2 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 33 } }
        random_list = {
            5 = { set_variable = { rl_offer_2_rarity = 1 } }
            65 = { set_variable = { rl_offer_2_rarity = 2 } }
            23 = { set_variable = { rl_offer_2_rarity = 3 } }
            2 = { set_variable = { rl_offer_2_rarity = 4 } }
            5 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 34 } }
        random_list = {
            2 = { set_variable = { rl_offer_2_rarity = 1 } }
            74 = { set_variable = { rl_offer_2_rarity = 2 } }
            8 = { set_variable = { rl_offer_2_rarity = 3 } }
            3 = { set_variable = { rl_offer_2_rarity = 4 } }
            13 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 35 } }
        random_list = {
            16 = { set_variable = { rl_offer_2_rarity = 1 } }
            12 = { set_variable = { rl_offer_2_rarity = 2 } }
            14 = { set_variable = { rl_offer_2_rarity = 3 } }
            42 = { set_variable = { rl_offer_2_rarity = 4 } }
            16 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 36 } }
        random_list = {
            20 = { set_variable = { rl_offer_2_rarity = 1 } }
            45 = { set_variable = { rl_offer_2_rarity = 2 } }
            8 = { set_variable = { rl_offer_2_rarity = 3 } }
            11 = { set_variable = { rl_offer_2_rarity = 4 } }
            16 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 37 } }
        random_list = {
            2 = { set_variable = { rl_offer_2_rarity = 1 } }
            5 = { set_variable = { rl_offer_2_rarity = 2 } }
            14 = { set_variable = { rl_offer_2_rarity = 3 } }
            76 = { set_variable = { rl_offer_2_rarity = 4 } }
            3 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 38 } }
        random_list = {
            46 = { set_variable = { rl_offer_2_rarity = 1 } }
            29 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            23 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 39 } }
        random_list = {
            17 = { set_variable = { rl_offer_2_rarity = 1 } }
            2 = { set_variable = { rl_offer_2_rarity = 2 } }
            40 = { set_variable = { rl_offer_2_rarity = 3 } }
            39 = { set_variable = { rl_offer_2_rarity = 4 } }
            2 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 40 } }
        random_list = {
            7 = { set_variable = { rl_offer_2_rarity = 1 } }
            19 = { set_variable = { rl_offer_2_rarity = 2 } }
            41 = { set_variable = { rl_offer_2_rarity = 3 } }
            3 = { set_variable = { rl_offer_2_rarity = 4 } }
            30 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 41 } }
        random_list = {
            60 = { set_variable = { rl_offer_2_rarity = 1 } }
            6 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            12 = { set_variable = { rl_offer_2_rarity = 4 } }
            2 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 42 } }
        random_list = {
            66 = { set_variable = { rl_offer_2_rarity = 1 } }
            6 = { set_variable = { rl_offer_2_rarity = 2 } }
            20 = { set_variable = { rl_offer_2_rarity = 3 } }
            2 = { set_variable = { rl_offer_2_rarity = 4 } }
            6 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 43 } }
        random_list = {
            16 = { set_variable = { rl_offer_2_rarity = 1 } }
            26 = { set_variable = { rl_offer_2_rarity = 2 } }
            11 = { set_variable = { rl_offer_2_rarity = 3 } }
            9 = { set_variable = { rl_offer_2_rarity = 4 } }
            38 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 44 } }
        random_list = {
            4 = { set_variable = { rl_offer_2_rarity = 1 } }
            44 = { set_variable = { rl_offer_2_rarity = 2 } }
            44 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            3 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 45 } }
        random_list = {
            61 = { set_variable = { rl_offer_2_rarity = 1 } }
            13 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            19 = { set_variable = { rl_offer_2_rarity = 4 } }
            5 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 46 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            2 = { set_variable = { rl_offer_2_rarity = 2 } }
            46 = { set_variable = { rl_offer_2_rarity = 3 } }
            36 = { set_variable = { rl_offer_2_rarity = 4 } }
            15 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 47 } }
        random_list = {
            59 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            36 = { set_variable = { rl_offer_2_rarity = 4 } }
            2 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 48 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            29 = { set_variable = { rl_offer_2_rarity = 2 } }
            38 = { set_variable = { rl_offer_2_rarity = 3 } }
            26 = { set_variable = { rl_offer_2_rarity = 4 } }
            6 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 49 } }
        random_list = {
            4 = { set_variable = { rl_offer_2_rarity = 1 } }
            43 = { set_variable = { rl_offer_2_rarity = 2 } }
            26 = { set_variable = { rl_offer_2_rarity = 3 } }
            2 = { set_variable = { rl_offer_2_rarity = 4 } }
            25 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 50 } }
        random_list = {
            49 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            40 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 51 } }
        random_list = {
            12 = { set_variable = { rl_offer_2_rarity = 1 } }
            27 = { set_variable = { rl_offer_2_rarity = 2 } }
            6 = { set_variable = { rl_offer_2_rarity = 3 } }
            52 = { set_variable = { rl_offer_2_rarity = 4 } }
            3 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 52 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            55 = { set_variable = { rl_offer_2_rarity = 2 } }
            4 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            33 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 53 } }
        random_list = {
            5 = { set_variable = { rl_offer_2_rarity = 1 } }
            17 = { set_variable = { rl_offer_2_rarity = 2 } }
            3 = { set_variable = { rl_offer_2_rarity = 3 } }
            74 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 54 } }
        random_list = {
            22 = { set_variable = { rl_offer_2_rarity = 1 } }
            27 = { set_variable = { rl_offer_2_rarity = 2 } }
            40 = { set_variable = { rl_offer_2_rarity = 3 } }
            3 = { set_variable = { rl_offer_2_rarity = 4 } }
            8 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 55 } }
        random_list = {
            9 = { set_variable = { rl_offer_2_rarity = 1 } }
            39 = { set_variable = { rl_offer_2_rarity = 2 } }
            48 = { set_variable = { rl_offer_2_rarity = 3 } }
            2 = { set_variable = { rl_offer_2_rarity = 4 } }
            2 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 56 } }
        random_list = {
            30 = { set_variable = { rl_offer_2_rarity = 1 } }
            15 = { set_variable = { rl_offer_2_rarity = 2 } }
            8 = { set_variable = { rl_offer_2_rarity = 3 } }
            17 = { set_variable = { rl_offer_2_rarity = 4 } }
            30 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 57 } }
        random_list = {
            10 = { set_variable = { rl_offer_2_rarity = 1 } }
            42 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            43 = { set_variable = { rl_offer_2_rarity = 4 } }
            3 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 58 } }
        random_list = {
            10 = { set_variable = { rl_offer_2_rarity = 1 } }
            8 = { set_variable = { rl_offer_2_rarity = 2 } }
            26 = { set_variable = { rl_offer_2_rarity = 3 } }
            50 = { set_variable = { rl_offer_2_rarity = 4 } }
            6 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 59 } }
        random_list = {
            27 = { set_variable = { rl_offer_2_rarity = 1 } }
            7 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            53 = { set_variable = { rl_offer_2_rarity = 4 } }
            11 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 60 } }
        random_list = {
            9 = { set_variable = { rl_offer_2_rarity = 1 } }
            8 = { set_variable = { rl_offer_2_rarity = 2 } }
            13 = { set_variable = { rl_offer_2_rarity = 3 } }
            66 = { set_variable = { rl_offer_2_rarity = 4 } }
            4 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 61 } }
        random_list = {
            13 = { set_variable = { rl_offer_2_rarity = 1 } }
            12 = { set_variable = { rl_offer_2_rarity = 2 } }
            21 = { set_variable = { rl_offer_2_rarity = 3 } }
            47 = { set_variable = { rl_offer_2_rarity = 4 } }
            7 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 62 } }
        random_list = {
            41 = { set_variable = { rl_offer_2_rarity = 1 } }
            4 = { set_variable = { rl_offer_2_rarity = 2 } }
            5 = { set_variable = { rl_offer_2_rarity = 3 } }
            8 = { set_variable = { rl_offer_2_rarity = 4 } }
            42 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 63 } }
        random_list = {
            25 = { set_variable = { rl_offer_2_rarity = 1 } }
            4 = { set_variable = { rl_offer_2_rarity = 2 } }
            15 = { set_variable = { rl_offer_2_rarity = 3 } }
            55 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 64 } }
        random_list = {
            2 = { set_variable = { rl_offer_2_rarity = 1 } }
            10 = { set_variable = { rl_offer_2_rarity = 2 } }
            11 = { set_variable = { rl_offer_2_rarity = 3 } }
            25 = { set_variable = { rl_offer_2_rarity = 4 } }
            52 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 65 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            2 = { set_variable = { rl_offer_2_rarity = 2 } }
            69 = { set_variable = { rl_offer_2_rarity = 3 } }
            4 = { set_variable = { rl_offer_2_rarity = 4 } }
            22 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 66 } }
        random_list = {
            20 = { set_variable = { rl_offer_2_rarity = 1 } }
            6 = { set_variable = { rl_offer_2_rarity = 2 } }
            5 = { set_variable = { rl_offer_2_rarity = 3 } }
            56 = { set_variable = { rl_offer_2_rarity = 4 } }
            13 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 67 } }
        random_list = {
            42 = { set_variable = { rl_offer_2_rarity = 1 } }
            31 = { set_variable = { rl_offer_2_rarity = 2 } }
            4 = { set_variable = { rl_offer_2_rarity = 3 } }
            13 = { set_variable = { rl_offer_2_rarity = 4 } }
            10 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 68 } }
        random_list = {
            18 = { set_variable = { rl_offer_2_rarity = 1 } }
            61 = { set_variable = { rl_offer_2_rarity = 2 } }
            10 = { set_variable = { rl_offer_2_rarity = 3 } }
            2 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 69 } }
        random_list = {
            69 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            7 = { set_variable = { rl_offer_2_rarity = 3 } }
            15 = { set_variable = { rl_offer_2_rarity = 4 } }
            8 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 70 } }
        random_list = {
            24 = { set_variable = { rl_offer_2_rarity = 1 } }
            26 = { set_variable = { rl_offer_2_rarity = 2 } }
            22 = { set_variable = { rl_offer_2_rarity = 3 } }
            18 = { set_variable = { rl_offer_2_rarity = 4 } }
            10 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 71 } }
        random_list = {
            15 = { set_variable = { rl_offer_2_rarity = 1 } }
            32 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            4 = { set_variable = { rl_offer_2_rarity = 4 } }
            47 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 72 } }
        random_list = {
            2 = { set_variable = { rl_offer_2_rarity = 1 } }
            32 = { set_variable = { rl_offer_2_rarity = 2 } }
            7 = { set_variable = { rl_offer_2_rarity = 3 } }
            37 = { set_variable = { rl_offer_2_rarity = 4 } }
            22 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 73 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            21 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            72 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 74 } }
        random_list = {
            53 = { set_variable = { rl_offer_2_rarity = 1 } }
            2 = { set_variable = { rl_offer_2_rarity = 2 } }
            15 = { set_variable = { rl_offer_2_rarity = 3 } }
            28 = { set_variable = { rl_offer_2_rarity = 4 } }
            2 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 75 } }
        random_list = {
            57 = { set_variable = { rl_offer_2_rarity = 1 } }
            20 = { set_variable = { rl_offer_2_rarity = 2 } }
            9 = { set_variable = { rl_offer_2_rarity = 3 } }
            5 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 76 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            10 = { set_variable = { rl_offer_2_rarity = 2 } }
            50 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            36 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 77 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            29 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            65 = { set_variable = { rl_offer_2_rarity = 4 } }
            3 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 78 } }
        random_list = {
            7 = { set_variable = { rl_offer_2_rarity = 1 } }
            27 = { set_variable = { rl_offer_2_rarity = 2 } }
            57 = { set_variable = { rl_offer_2_rarity = 3 } }
            8 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 79 } }
        random_list = {
            5 = { set_variable = { rl_offer_2_rarity = 1 } }
            85 = { set_variable = { rl_offer_2_rarity = 2 } }
            3 = { set_variable = { rl_offer_2_rarity = 3 } }
            6 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 80 } }
        random_list = {
            15 = { set_variable = { rl_offer_2_rarity = 1 } }
            29 = { set_variable = { rl_offer_2_rarity = 2 } }
            31 = { set_variable = { rl_offer_2_rarity = 3 } }
            22 = { set_variable = { rl_offer_2_rarity = 4 } }
            3 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 81 } }
        random_list = {
            1 = { set_variable = { rl_offer_2_rarity = 1 } }
            11 = { set_variable = { rl_offer_2_rarity = 2 } }
            30 = { set_variable = { rl_offer_2_rarity = 3 } }
            15 = { set_variable = { rl_offer_2_rarity = 4 } }
            43 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 82 } }
        random_list = {
            7 = { set_variable = { rl_offer_2_rarity = 1 } }
            2 = { set_variable = { rl_offer_2_rarity = 2 } }
            19 = { set_variable = { rl_offer_2_rarity = 3 } }
            4 = { set_variable = { rl_offer_2_rarity = 4 } }
            68 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 83 } }
        random_list = {
            2 = { set_variable = { rl_offer_2_rarity = 1 } }
            26 = { set_variable = { rl_offer_2_rarity = 2 } }
            48 = { set_variable = { rl_offer_2_rarity = 3 } }
            22 = { set_variable = { rl_offer_2_rarity = 4 } }
            2 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 84 } }
        random_list = {
            24 = { set_variable = { rl_offer_2_rarity = 1 } }
            31 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            18 = { set_variable = { rl_offer_2_rarity = 4 } }
            26 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 85 } }
        random_list = {
            77 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            12 = { set_variable = { rl_offer_2_rarity = 3 } }
            4 = { set_variable = { rl_offer_2_rarity = 4 } }
            6 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 86 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            25 = { set_variable = { rl_offer_2_rarity = 2 } }
            53 = { set_variable = { rl_offer_2_rarity = 3 } }
            18 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 87 } }
        random_list = {
            54 = { set_variable = { rl_offer_2_rarity = 1 } }
            25 = { set_variable = { rl_offer_2_rarity = 2 } }
            4 = { set_variable = { rl_offer_2_rarity = 3 } }
            3 = { set_variable = { rl_offer_2_rarity = 4 } }
            14 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 88 } }
        random_list = {
            11 = { set_variable = { rl_offer_2_rarity = 1 } }
            19 = { set_variable = { rl_offer_2_rarity = 2 } }
            28 = { set_variable = { rl_offer_2_rarity = 3 } }
            38 = { set_variable = { rl_offer_2_rarity = 4 } }
            4 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 89 } }
        random_list = {
            8 = { set_variable = { rl_offer_2_rarity = 1 } }
            17 = { set_variable = { rl_offer_2_rarity = 2 } }
            5 = { set_variable = { rl_offer_2_rarity = 3 } }
            61 = { set_variable = { rl_offer_2_rarity = 4 } }
            9 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 90 } }
        random_list = {
            6 = { set_variable = { rl_offer_2_rarity = 1 } }
            3 = { set_variable = { rl_offer_2_rarity = 2 } }
            1 = { set_variable = { rl_offer_2_rarity = 3 } }
            74 = { set_variable = { rl_offer_2_rarity = 4 } }
            16 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 91 } }
        random_list = {
            57 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            3 = { set_variable = { rl_offer_2_rarity = 3 } }
            22 = { set_variable = { rl_offer_2_rarity = 4 } }
            17 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 92 } }
        random_list = {
            77 = { set_variable = { rl_offer_2_rarity = 1 } }
            1 = { set_variable = { rl_offer_2_rarity = 2 } }
            6 = { set_variable = { rl_offer_2_rarity = 3 } }
            10 = { set_variable = { rl_offer_2_rarity = 4 } }
            6 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 93 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            6 = { set_variable = { rl_offer_2_rarity = 2 } }
            75 = { set_variable = { rl_offer_2_rarity = 3 } }
            1 = { set_variable = { rl_offer_2_rarity = 4 } }
            15 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 94 } }
        random_list = {
            3 = { set_variable = { rl_offer_2_rarity = 1 } }
            24 = { set_variable = { rl_offer_2_rarity = 2 } }
            7 = { set_variable = { rl_offer_2_rarity = 3 } }
            24 = { set_variable = { rl_offer_2_rarity = 4 } }
            42 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 95 } }
        random_list = {
            59 = { set_variable = { rl_offer_2_rarity = 1 } }
            4 = { set_variable = { rl_offer_2_rarity = 2 } }
            23 = { set_variable = { rl_offer_2_rarity = 3 } }
            7 = { set_variable = { rl_offer_2_rarity = 4 } }
            7 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 96 } }
        random_list = {
            14 = { set_variable = { rl_offer_2_rarity = 1 } }
            55 = { set_variable = { rl_offer_2_rarity = 2 } }
            26 = { set_variable = { rl_offer_2_rarity = 3 } }
            4 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 97 } }
        random_list = {
            4 = { set_variable = { rl_offer_2_rarity = 1 } }
            27 = { set_variable = { rl_offer_2_rarity = 2 } }
            26 = { set_variable = { rl_offer_2_rarity = 3 } }
            31 = { set_variable = { rl_offer_2_rarity = 4 } }
            12 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 98 } }
        random_list = {
            52 = { set_variable = { rl_offer_2_rarity = 1 } }
            14 = { set_variable = { rl_offer_2_rarity = 2 } }
            2 = { set_variable = { rl_offer_2_rarity = 3 } }
            20 = { set_variable = { rl_offer_2_rarity = 4 } }
            12 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 99 } }
        random_list = {
            19 = { set_variable = { rl_offer_2_rarity = 1 } }
            7 = { set_variable = { rl_offer_2_rarity = 2 } }
            6 = { set_variable = { rl_offer_2_rarity = 3 } }
            41 = { set_variable = { rl_offer_2_rarity = 4 } }
            27 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 100 } }
        random_list = {
            67 = { set_variable = { rl_offer_2_rarity = 1 } }
            2 = { set_variable = { rl_offer_2_rarity = 2 } }
            11 = { set_variable = { rl_offer_2_rarity = 3 } }
            18 = { set_variable = { rl_offer_2_rarity = 4 } }
            2 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
    else = {
        random_list = {
            70 = { set_variable = { rl_offer_2_rarity = 1 } }
            15 = { set_variable = { rl_offer_2_rarity = 2 } }
            10 = { set_variable = { rl_offer_2_rarity = 3 } }
            4 = { set_variable = { rl_offer_2_rarity = 4 } }
            1 = { set_variable = { rl_offer_2_rarity = 5 } }
        }
    }
}

rl_roll_rarity_3 = {
    if = {
        limit = { check_variable = { rl_chaos_profile = 1 } }
        random_list = {
            5 = { set_variable = { rl_offer_3_rarity = 1 } }
            5 = { set_variable = { rl_offer_3_rarity = 2 } }
            5 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            80 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 2 } }
        random_list = {
            80 = { set_variable = { rl_offer_3_rarity = 1 } }
            5 = { set_variable = { rl_offer_3_rarity = 2 } }
            5 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            5 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 3 } }
        random_list = {
            5 = { set_variable = { rl_offer_3_rarity = 1 } }
            80 = { set_variable = { rl_offer_3_rarity = 2 } }
            5 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            5 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 4 } }
        random_list = {
            5 = { set_variable = { rl_offer_3_rarity = 1 } }
            5 = { set_variable = { rl_offer_3_rarity = 2 } }
            80 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            5 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 5 } }
        random_list = {
            5 = { set_variable = { rl_offer_3_rarity = 1 } }
            5 = { set_variable = { rl_offer_3_rarity = 2 } }
            5 = { set_variable = { rl_offer_3_rarity = 3 } }
            80 = { set_variable = { rl_offer_3_rarity = 4 } }
            5 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 6 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            96 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 7 } }
        random_list = {
            96 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 8 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            96 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 9 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            96 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 10 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            96 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 11 } }
        random_list = {
            20 = { set_variable = { rl_offer_3_rarity = 1 } }
            20 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            20 = { set_variable = { rl_offer_3_rarity = 4 } }
            20 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 12 } }
        random_list = {
            10 = { set_variable = { rl_offer_3_rarity = 1 } }
            15 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            25 = { set_variable = { rl_offer_3_rarity = 4 } }
            30 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 13 } }
        random_list = {
            30 = { set_variable = { rl_offer_3_rarity = 1 } }
            25 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            15 = { set_variable = { rl_offer_3_rarity = 4 } }
            10 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 14 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            9 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            30 = { set_variable = { rl_offer_3_rarity = 4 } }
            40 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 15 } }
        random_list = {
            40 = { set_variable = { rl_offer_3_rarity = 1 } }
            30 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            9 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 16 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            34 = { set_variable = { rl_offer_3_rarity = 2 } }
            8 = { set_variable = { rl_offer_3_rarity = 3 } }
            53 = { set_variable = { rl_offer_3_rarity = 4 } }
            4 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 17 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            39 = { set_variable = { rl_offer_3_rarity = 2 } }
            45 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            12 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 18 } }
        random_list = {
            11 = { set_variable = { rl_offer_3_rarity = 1 } }
            57 = { set_variable = { rl_offer_3_rarity = 2 } }
            4 = { set_variable = { rl_offer_3_rarity = 3 } }
            19 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 19 } }
        random_list = {
            45 = { set_variable = { rl_offer_3_rarity = 1 } }
            8 = { set_variable = { rl_offer_3_rarity = 2 } }
            8 = { set_variable = { rl_offer_3_rarity = 3 } }
            2 = { set_variable = { rl_offer_3_rarity = 4 } }
            37 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 20 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            53 = { set_variable = { rl_offer_3_rarity = 2 } }
            13 = { set_variable = { rl_offer_3_rarity = 3 } }
            24 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 21 } }
        random_list = {
            2 = { set_variable = { rl_offer_3_rarity = 1 } }
            12 = { set_variable = { rl_offer_3_rarity = 2 } }
            67 = { set_variable = { rl_offer_3_rarity = 3 } }
            7 = { set_variable = { rl_offer_3_rarity = 4 } }
            12 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 22 } }
        random_list = {
            55 = { set_variable = { rl_offer_3_rarity = 1 } }
            7 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            31 = { set_variable = { rl_offer_3_rarity = 4 } }
            6 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 23 } }
        random_list = {
            17 = { set_variable = { rl_offer_3_rarity = 1 } }
            21 = { set_variable = { rl_offer_3_rarity = 2 } }
            23 = { set_variable = { rl_offer_3_rarity = 3 } }
            17 = { set_variable = { rl_offer_3_rarity = 4 } }
            22 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 24 } }
        random_list = {
            30 = { set_variable = { rl_offer_3_rarity = 1 } }
            23 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            44 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 25 } }
        random_list = {
            61 = { set_variable = { rl_offer_3_rarity = 1 } }
            5 = { set_variable = { rl_offer_3_rarity = 2 } }
            10 = { set_variable = { rl_offer_3_rarity = 3 } }
            3 = { set_variable = { rl_offer_3_rarity = 4 } }
            21 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 26 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            34 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            16 = { set_variable = { rl_offer_3_rarity = 4 } }
            29 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 27 } }
        random_list = {
            9 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            4 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            85 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 28 } }
        random_list = {
            40 = { set_variable = { rl_offer_3_rarity = 1 } }
            39 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            11 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 29 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            9 = { set_variable = { rl_offer_3_rarity = 2 } }
            72 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            15 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 30 } }
        random_list = {
            35 = { set_variable = { rl_offer_3_rarity = 1 } }
            3 = { set_variable = { rl_offer_3_rarity = 2 } }
            33 = { set_variable = { rl_offer_3_rarity = 3 } }
            7 = { set_variable = { rl_offer_3_rarity = 4 } }
            22 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 31 } }
        random_list = {
            6 = { set_variable = { rl_offer_3_rarity = 1 } }
            12 = { set_variable = { rl_offer_3_rarity = 2 } }
            10 = { set_variable = { rl_offer_3_rarity = 3 } }
            50 = { set_variable = { rl_offer_3_rarity = 4 } }
            22 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 32 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            50 = { set_variable = { rl_offer_3_rarity = 2 } }
            38 = { set_variable = { rl_offer_3_rarity = 3 } }
            2 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 33 } }
        random_list = {
            5 = { set_variable = { rl_offer_3_rarity = 1 } }
            65 = { set_variable = { rl_offer_3_rarity = 2 } }
            23 = { set_variable = { rl_offer_3_rarity = 3 } }
            2 = { set_variable = { rl_offer_3_rarity = 4 } }
            5 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 34 } }
        random_list = {
            2 = { set_variable = { rl_offer_3_rarity = 1 } }
            74 = { set_variable = { rl_offer_3_rarity = 2 } }
            8 = { set_variable = { rl_offer_3_rarity = 3 } }
            3 = { set_variable = { rl_offer_3_rarity = 4 } }
            13 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 35 } }
        random_list = {
            16 = { set_variable = { rl_offer_3_rarity = 1 } }
            12 = { set_variable = { rl_offer_3_rarity = 2 } }
            14 = { set_variable = { rl_offer_3_rarity = 3 } }
            42 = { set_variable = { rl_offer_3_rarity = 4 } }
            16 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 36 } }
        random_list = {
            20 = { set_variable = { rl_offer_3_rarity = 1 } }
            45 = { set_variable = { rl_offer_3_rarity = 2 } }
            8 = { set_variable = { rl_offer_3_rarity = 3 } }
            11 = { set_variable = { rl_offer_3_rarity = 4 } }
            16 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 37 } }
        random_list = {
            2 = { set_variable = { rl_offer_3_rarity = 1 } }
            5 = { set_variable = { rl_offer_3_rarity = 2 } }
            14 = { set_variable = { rl_offer_3_rarity = 3 } }
            76 = { set_variable = { rl_offer_3_rarity = 4 } }
            3 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 38 } }
        random_list = {
            46 = { set_variable = { rl_offer_3_rarity = 1 } }
            29 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            23 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 39 } }
        random_list = {
            17 = { set_variable = { rl_offer_3_rarity = 1 } }
            2 = { set_variable = { rl_offer_3_rarity = 2 } }
            40 = { set_variable = { rl_offer_3_rarity = 3 } }
            39 = { set_variable = { rl_offer_3_rarity = 4 } }
            2 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 40 } }
        random_list = {
            7 = { set_variable = { rl_offer_3_rarity = 1 } }
            19 = { set_variable = { rl_offer_3_rarity = 2 } }
            41 = { set_variable = { rl_offer_3_rarity = 3 } }
            3 = { set_variable = { rl_offer_3_rarity = 4 } }
            30 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 41 } }
        random_list = {
            60 = { set_variable = { rl_offer_3_rarity = 1 } }
            6 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            12 = { set_variable = { rl_offer_3_rarity = 4 } }
            2 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 42 } }
        random_list = {
            66 = { set_variable = { rl_offer_3_rarity = 1 } }
            6 = { set_variable = { rl_offer_3_rarity = 2 } }
            20 = { set_variable = { rl_offer_3_rarity = 3 } }
            2 = { set_variable = { rl_offer_3_rarity = 4 } }
            6 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 43 } }
        random_list = {
            16 = { set_variable = { rl_offer_3_rarity = 1 } }
            26 = { set_variable = { rl_offer_3_rarity = 2 } }
            11 = { set_variable = { rl_offer_3_rarity = 3 } }
            9 = { set_variable = { rl_offer_3_rarity = 4 } }
            38 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 44 } }
        random_list = {
            4 = { set_variable = { rl_offer_3_rarity = 1 } }
            44 = { set_variable = { rl_offer_3_rarity = 2 } }
            44 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            3 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 45 } }
        random_list = {
            61 = { set_variable = { rl_offer_3_rarity = 1 } }
            13 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            19 = { set_variable = { rl_offer_3_rarity = 4 } }
            5 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 46 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            2 = { set_variable = { rl_offer_3_rarity = 2 } }
            46 = { set_variable = { rl_offer_3_rarity = 3 } }
            36 = { set_variable = { rl_offer_3_rarity = 4 } }
            15 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 47 } }
        random_list = {
            59 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            36 = { set_variable = { rl_offer_3_rarity = 4 } }
            2 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 48 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            29 = { set_variable = { rl_offer_3_rarity = 2 } }
            38 = { set_variable = { rl_offer_3_rarity = 3 } }
            26 = { set_variable = { rl_offer_3_rarity = 4 } }
            6 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 49 } }
        random_list = {
            4 = { set_variable = { rl_offer_3_rarity = 1 } }
            43 = { set_variable = { rl_offer_3_rarity = 2 } }
            26 = { set_variable = { rl_offer_3_rarity = 3 } }
            2 = { set_variable = { rl_offer_3_rarity = 4 } }
            25 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 50 } }
        random_list = {
            49 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            40 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 51 } }
        random_list = {
            12 = { set_variable = { rl_offer_3_rarity = 1 } }
            27 = { set_variable = { rl_offer_3_rarity = 2 } }
            6 = { set_variable = { rl_offer_3_rarity = 3 } }
            52 = { set_variable = { rl_offer_3_rarity = 4 } }
            3 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 52 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            55 = { set_variable = { rl_offer_3_rarity = 2 } }
            4 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            33 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 53 } }
        random_list = {
            5 = { set_variable = { rl_offer_3_rarity = 1 } }
            17 = { set_variable = { rl_offer_3_rarity = 2 } }
            3 = { set_variable = { rl_offer_3_rarity = 3 } }
            74 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 54 } }
        random_list = {
            22 = { set_variable = { rl_offer_3_rarity = 1 } }
            27 = { set_variable = { rl_offer_3_rarity = 2 } }
            40 = { set_variable = { rl_offer_3_rarity = 3 } }
            3 = { set_variable = { rl_offer_3_rarity = 4 } }
            8 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 55 } }
        random_list = {
            9 = { set_variable = { rl_offer_3_rarity = 1 } }
            39 = { set_variable = { rl_offer_3_rarity = 2 } }
            48 = { set_variable = { rl_offer_3_rarity = 3 } }
            2 = { set_variable = { rl_offer_3_rarity = 4 } }
            2 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 56 } }
        random_list = {
            30 = { set_variable = { rl_offer_3_rarity = 1 } }
            15 = { set_variable = { rl_offer_3_rarity = 2 } }
            8 = { set_variable = { rl_offer_3_rarity = 3 } }
            17 = { set_variable = { rl_offer_3_rarity = 4 } }
            30 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 57 } }
        random_list = {
            10 = { set_variable = { rl_offer_3_rarity = 1 } }
            42 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            43 = { set_variable = { rl_offer_3_rarity = 4 } }
            3 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 58 } }
        random_list = {
            10 = { set_variable = { rl_offer_3_rarity = 1 } }
            8 = { set_variable = { rl_offer_3_rarity = 2 } }
            26 = { set_variable = { rl_offer_3_rarity = 3 } }
            50 = { set_variable = { rl_offer_3_rarity = 4 } }
            6 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 59 } }
        random_list = {
            27 = { set_variable = { rl_offer_3_rarity = 1 } }
            7 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            53 = { set_variable = { rl_offer_3_rarity = 4 } }
            11 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 60 } }
        random_list = {
            9 = { set_variable = { rl_offer_3_rarity = 1 } }
            8 = { set_variable = { rl_offer_3_rarity = 2 } }
            13 = { set_variable = { rl_offer_3_rarity = 3 } }
            66 = { set_variable = { rl_offer_3_rarity = 4 } }
            4 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 61 } }
        random_list = {
            13 = { set_variable = { rl_offer_3_rarity = 1 } }
            12 = { set_variable = { rl_offer_3_rarity = 2 } }
            21 = { set_variable = { rl_offer_3_rarity = 3 } }
            47 = { set_variable = { rl_offer_3_rarity = 4 } }
            7 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 62 } }
        random_list = {
            41 = { set_variable = { rl_offer_3_rarity = 1 } }
            4 = { set_variable = { rl_offer_3_rarity = 2 } }
            5 = { set_variable = { rl_offer_3_rarity = 3 } }
            8 = { set_variable = { rl_offer_3_rarity = 4 } }
            42 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 63 } }
        random_list = {
            25 = { set_variable = { rl_offer_3_rarity = 1 } }
            4 = { set_variable = { rl_offer_3_rarity = 2 } }
            15 = { set_variable = { rl_offer_3_rarity = 3 } }
            55 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 64 } }
        random_list = {
            2 = { set_variable = { rl_offer_3_rarity = 1 } }
            10 = { set_variable = { rl_offer_3_rarity = 2 } }
            11 = { set_variable = { rl_offer_3_rarity = 3 } }
            25 = { set_variable = { rl_offer_3_rarity = 4 } }
            52 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 65 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            2 = { set_variable = { rl_offer_3_rarity = 2 } }
            69 = { set_variable = { rl_offer_3_rarity = 3 } }
            4 = { set_variable = { rl_offer_3_rarity = 4 } }
            22 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 66 } }
        random_list = {
            20 = { set_variable = { rl_offer_3_rarity = 1 } }
            6 = { set_variable = { rl_offer_3_rarity = 2 } }
            5 = { set_variable = { rl_offer_3_rarity = 3 } }
            56 = { set_variable = { rl_offer_3_rarity = 4 } }
            13 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 67 } }
        random_list = {
            42 = { set_variable = { rl_offer_3_rarity = 1 } }
            31 = { set_variable = { rl_offer_3_rarity = 2 } }
            4 = { set_variable = { rl_offer_3_rarity = 3 } }
            13 = { set_variable = { rl_offer_3_rarity = 4 } }
            10 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 68 } }
        random_list = {
            18 = { set_variable = { rl_offer_3_rarity = 1 } }
            61 = { set_variable = { rl_offer_3_rarity = 2 } }
            10 = { set_variable = { rl_offer_3_rarity = 3 } }
            2 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 69 } }
        random_list = {
            69 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            7 = { set_variable = { rl_offer_3_rarity = 3 } }
            15 = { set_variable = { rl_offer_3_rarity = 4 } }
            8 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 70 } }
        random_list = {
            24 = { set_variable = { rl_offer_3_rarity = 1 } }
            26 = { set_variable = { rl_offer_3_rarity = 2 } }
            22 = { set_variable = { rl_offer_3_rarity = 3 } }
            18 = { set_variable = { rl_offer_3_rarity = 4 } }
            10 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 71 } }
        random_list = {
            15 = { set_variable = { rl_offer_3_rarity = 1 } }
            32 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            4 = { set_variable = { rl_offer_3_rarity = 4 } }
            47 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 72 } }
        random_list = {
            2 = { set_variable = { rl_offer_3_rarity = 1 } }
            32 = { set_variable = { rl_offer_3_rarity = 2 } }
            7 = { set_variable = { rl_offer_3_rarity = 3 } }
            37 = { set_variable = { rl_offer_3_rarity = 4 } }
            22 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 73 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            21 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            72 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 74 } }
        random_list = {
            53 = { set_variable = { rl_offer_3_rarity = 1 } }
            2 = { set_variable = { rl_offer_3_rarity = 2 } }
            15 = { set_variable = { rl_offer_3_rarity = 3 } }
            28 = { set_variable = { rl_offer_3_rarity = 4 } }
            2 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 75 } }
        random_list = {
            57 = { set_variable = { rl_offer_3_rarity = 1 } }
            20 = { set_variable = { rl_offer_3_rarity = 2 } }
            9 = { set_variable = { rl_offer_3_rarity = 3 } }
            5 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 76 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            10 = { set_variable = { rl_offer_3_rarity = 2 } }
            50 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            36 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 77 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            29 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            65 = { set_variable = { rl_offer_3_rarity = 4 } }
            3 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 78 } }
        random_list = {
            7 = { set_variable = { rl_offer_3_rarity = 1 } }
            27 = { set_variable = { rl_offer_3_rarity = 2 } }
            57 = { set_variable = { rl_offer_3_rarity = 3 } }
            8 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 79 } }
        random_list = {
            5 = { set_variable = { rl_offer_3_rarity = 1 } }
            85 = { set_variable = { rl_offer_3_rarity = 2 } }
            3 = { set_variable = { rl_offer_3_rarity = 3 } }
            6 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 80 } }
        random_list = {
            15 = { set_variable = { rl_offer_3_rarity = 1 } }
            29 = { set_variable = { rl_offer_3_rarity = 2 } }
            31 = { set_variable = { rl_offer_3_rarity = 3 } }
            22 = { set_variable = { rl_offer_3_rarity = 4 } }
            3 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 81 } }
        random_list = {
            1 = { set_variable = { rl_offer_3_rarity = 1 } }
            11 = { set_variable = { rl_offer_3_rarity = 2 } }
            30 = { set_variable = { rl_offer_3_rarity = 3 } }
            15 = { set_variable = { rl_offer_3_rarity = 4 } }
            43 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 82 } }
        random_list = {
            7 = { set_variable = { rl_offer_3_rarity = 1 } }
            2 = { set_variable = { rl_offer_3_rarity = 2 } }
            19 = { set_variable = { rl_offer_3_rarity = 3 } }
            4 = { set_variable = { rl_offer_3_rarity = 4 } }
            68 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 83 } }
        random_list = {
            2 = { set_variable = { rl_offer_3_rarity = 1 } }
            26 = { set_variable = { rl_offer_3_rarity = 2 } }
            48 = { set_variable = { rl_offer_3_rarity = 3 } }
            22 = { set_variable = { rl_offer_3_rarity = 4 } }
            2 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 84 } }
        random_list = {
            24 = { set_variable = { rl_offer_3_rarity = 1 } }
            31 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            18 = { set_variable = { rl_offer_3_rarity = 4 } }
            26 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 85 } }
        random_list = {
            77 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            12 = { set_variable = { rl_offer_3_rarity = 3 } }
            4 = { set_variable = { rl_offer_3_rarity = 4 } }
            6 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 86 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            25 = { set_variable = { rl_offer_3_rarity = 2 } }
            53 = { set_variable = { rl_offer_3_rarity = 3 } }
            18 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 87 } }
        random_list = {
            54 = { set_variable = { rl_offer_3_rarity = 1 } }
            25 = { set_variable = { rl_offer_3_rarity = 2 } }
            4 = { set_variable = { rl_offer_3_rarity = 3 } }
            3 = { set_variable = { rl_offer_3_rarity = 4 } }
            14 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 88 } }
        random_list = {
            11 = { set_variable = { rl_offer_3_rarity = 1 } }
            19 = { set_variable = { rl_offer_3_rarity = 2 } }
            28 = { set_variable = { rl_offer_3_rarity = 3 } }
            38 = { set_variable = { rl_offer_3_rarity = 4 } }
            4 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 89 } }
        random_list = {
            8 = { set_variable = { rl_offer_3_rarity = 1 } }
            17 = { set_variable = { rl_offer_3_rarity = 2 } }
            5 = { set_variable = { rl_offer_3_rarity = 3 } }
            61 = { set_variable = { rl_offer_3_rarity = 4 } }
            9 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 90 } }
        random_list = {
            6 = { set_variable = { rl_offer_3_rarity = 1 } }
            3 = { set_variable = { rl_offer_3_rarity = 2 } }
            1 = { set_variable = { rl_offer_3_rarity = 3 } }
            74 = { set_variable = { rl_offer_3_rarity = 4 } }
            16 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 91 } }
        random_list = {
            57 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            3 = { set_variable = { rl_offer_3_rarity = 3 } }
            22 = { set_variable = { rl_offer_3_rarity = 4 } }
            17 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 92 } }
        random_list = {
            77 = { set_variable = { rl_offer_3_rarity = 1 } }
            1 = { set_variable = { rl_offer_3_rarity = 2 } }
            6 = { set_variable = { rl_offer_3_rarity = 3 } }
            10 = { set_variable = { rl_offer_3_rarity = 4 } }
            6 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 93 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            6 = { set_variable = { rl_offer_3_rarity = 2 } }
            75 = { set_variable = { rl_offer_3_rarity = 3 } }
            1 = { set_variable = { rl_offer_3_rarity = 4 } }
            15 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 94 } }
        random_list = {
            3 = { set_variable = { rl_offer_3_rarity = 1 } }
            24 = { set_variable = { rl_offer_3_rarity = 2 } }
            7 = { set_variable = { rl_offer_3_rarity = 3 } }
            24 = { set_variable = { rl_offer_3_rarity = 4 } }
            42 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 95 } }
        random_list = {
            59 = { set_variable = { rl_offer_3_rarity = 1 } }
            4 = { set_variable = { rl_offer_3_rarity = 2 } }
            23 = { set_variable = { rl_offer_3_rarity = 3 } }
            7 = { set_variable = { rl_offer_3_rarity = 4 } }
            7 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 96 } }
        random_list = {
            14 = { set_variable = { rl_offer_3_rarity = 1 } }
            55 = { set_variable = { rl_offer_3_rarity = 2 } }
            26 = { set_variable = { rl_offer_3_rarity = 3 } }
            4 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 97 } }
        random_list = {
            4 = { set_variable = { rl_offer_3_rarity = 1 } }
            27 = { set_variable = { rl_offer_3_rarity = 2 } }
            26 = { set_variable = { rl_offer_3_rarity = 3 } }
            31 = { set_variable = { rl_offer_3_rarity = 4 } }
            12 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 98 } }
        random_list = {
            52 = { set_variable = { rl_offer_3_rarity = 1 } }
            14 = { set_variable = { rl_offer_3_rarity = 2 } }
            2 = { set_variable = { rl_offer_3_rarity = 3 } }
            20 = { set_variable = { rl_offer_3_rarity = 4 } }
            12 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 99 } }
        random_list = {
            19 = { set_variable = { rl_offer_3_rarity = 1 } }
            7 = { set_variable = { rl_offer_3_rarity = 2 } }
            6 = { set_variable = { rl_offer_3_rarity = 3 } }
            41 = { set_variable = { rl_offer_3_rarity = 4 } }
            27 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_chaos_profile = 100 } }
        random_list = {
            67 = { set_variable = { rl_offer_3_rarity = 1 } }
            2 = { set_variable = { rl_offer_3_rarity = 2 } }
            11 = { set_variable = { rl_offer_3_rarity = 3 } }
            18 = { set_variable = { rl_offer_3_rarity = 4 } }
            2 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
    else = {
        random_list = {
            70 = { set_variable = { rl_offer_3_rarity = 1 } }
            15 = { set_variable = { rl_offer_3_rarity = 2 } }
            10 = { set_variable = { rl_offer_3_rarity = 3 } }
            4 = { set_variable = { rl_offer_3_rarity = 4 } }
            1 = { set_variable = { rl_offer_3_rarity = 5 } }
        }
    }
}

rl_roll_offer_1 = {
    random_list = {
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_1 }
            set_variable = { rl_offer_1_id = 1 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_2 }
            set_variable = { rl_offer_1_id = 2 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_3 }
            set_variable = { rl_offer_1_id = 3 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_4 }
            set_variable = { rl_offer_1_id = 4 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_5 }
            set_variable = { rl_offer_1_id = 5 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_6 }
            set_variable = { rl_offer_1_id = 6 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_7 }
            set_variable = { rl_offer_1_id = 7 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_8 }
            set_variable = { rl_offer_1_id = 8 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_9 }
            set_variable = { rl_offer_1_id = 9 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_10 }
            set_variable = { rl_offer_1_id = 10 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_11 }
            set_variable = { rl_offer_1_id = 11 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_12 }
            set_variable = { rl_offer_1_id = 12 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_13 }
            set_variable = { rl_offer_1_id = 13 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_14 }
            set_variable = { rl_offer_1_id = 14 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_15 }
            set_variable = { rl_offer_1_id = 15 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_16 }
            set_variable = { rl_offer_1_id = 16 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_17 }
            set_variable = { rl_offer_1_id = 17 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_18 }
            set_variable = { rl_offer_1_id = 18 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_19 }
            set_variable = { rl_offer_1_id = 19 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_20 }
            set_variable = { rl_offer_1_id = 20 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_21 }
            set_variable = { rl_offer_1_id = 21 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_22 }
            set_variable = { rl_offer_1_id = 22 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_23 }
            set_variable = { rl_offer_1_id = 23 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_24 }
            set_variable = { rl_offer_1_id = 24 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_25 }
            set_variable = { rl_offer_1_id = 25 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_26 }
            set_variable = { rl_offer_1_id = 26 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_27 }
            set_variable = { rl_offer_1_id = 27 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_28 }
            set_variable = { rl_offer_1_id = 28 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_29 }
            set_variable = { rl_offer_1_id = 29 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_30 }
            set_variable = { rl_offer_1_id = 30 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_31 }
            set_variable = { rl_offer_1_id = 31 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_32 }
            set_variable = { rl_offer_1_id = 32 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_33 }
            set_variable = { rl_offer_1_id = 33 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_34 }
            set_variable = { rl_offer_1_id = 34 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_35 }
            set_variable = { rl_offer_1_id = 35 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_36 }
            set_variable = { rl_offer_1_id = 36 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_37 }
            set_variable = { rl_offer_1_id = 37 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_38 }
            set_variable = { rl_offer_1_id = 38 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_39 }
            set_variable = { rl_offer_1_id = 39 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_40 }
            set_variable = { rl_offer_1_id = 40 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_41 }
            set_variable = { rl_offer_1_id = 41 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_42 }
            set_variable = { rl_offer_1_id = 42 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_43 }
            set_variable = { rl_offer_1_id = 43 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_44 }
            set_variable = { rl_offer_1_id = 44 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_45 }
            set_variable = { rl_offer_1_id = 45 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_46 }
            set_variable = { rl_offer_1_id = 46 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_47 }
            set_variable = { rl_offer_1_id = 47 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_48 }
            set_variable = { rl_offer_1_id = 48 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_49 }
            set_variable = { rl_offer_1_id = 49 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_50 }
            set_variable = { rl_offer_1_id = 50 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_51 }
            set_variable = { rl_offer_1_id = 51 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_52 }
            set_variable = { rl_offer_1_id = 52 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_53 }
            set_variable = { rl_offer_1_id = 53 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_54 }
            set_variable = { rl_offer_1_id = 54 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_55 }
            set_variable = { rl_offer_1_id = 55 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_56 }
            set_variable = { rl_offer_1_id = 56 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_57 }
            set_variable = { rl_offer_1_id = 57 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_58 }
            set_variable = { rl_offer_1_id = 58 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_59 }
            set_variable = { rl_offer_1_id = 59 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_60 }
            set_variable = { rl_offer_1_id = 60 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_61 }
            set_variable = { rl_offer_1_id = 61 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_62 }
            set_variable = { rl_offer_1_id = 62 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_63 }
            set_variable = { rl_offer_1_id = 63 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_64 }
            set_variable = { rl_offer_1_id = 64 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_65 }
            set_variable = { rl_offer_1_id = 65 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_66 }
            set_variable = { rl_offer_1_id = 66 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_67 }
            set_variable = { rl_offer_1_id = 67 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_68 }
            set_variable = { rl_offer_1_id = 68 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_69 }
            set_variable = { rl_offer_1_id = 69 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_70 }
            set_variable = { rl_offer_1_id = 70 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_71 }
            set_variable = { rl_offer_1_id = 71 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_72 }
            set_variable = { rl_offer_1_id = 72 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_73 }
            set_variable = { rl_offer_1_id = 73 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_74 }
            set_variable = { rl_offer_1_id = 74 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_75 }
            set_variable = { rl_offer_1_id = 75 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_76 }
            set_variable = { rl_offer_1_id = 76 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_77 }
            set_variable = { rl_offer_1_id = 77 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_78 }
            set_variable = { rl_offer_1_id = 78 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_79 }
            set_variable = { rl_offer_1_id = 79 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_80 }
            set_variable = { rl_offer_1_id = 80 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_81 }
            set_variable = { rl_offer_1_id = 81 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_82 }
            set_variable = { rl_offer_1_id = 82 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_83 }
            set_variable = { rl_offer_1_id = 83 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_84 }
            set_variable = { rl_offer_1_id = 84 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_85 }
            set_variable = { rl_offer_1_id = 85 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_86 }
            set_variable = { rl_offer_1_id = 86 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_87 }
            set_variable = { rl_offer_1_id = 87 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_88 }
            set_variable = { rl_offer_1_id = 88 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_89 }
            set_variable = { rl_offer_1_id = 89 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_90 }
            set_variable = { rl_offer_1_id = 90 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_91 }
            set_variable = { rl_offer_1_id = 91 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_92 }
            set_variable = { rl_offer_1_id = 92 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_93 }
            set_variable = { rl_offer_1_id = 93 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_94 }
            set_variable = { rl_offer_1_id = 94 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_95 }
            set_variable = { rl_offer_1_id = 95 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_96 }
            set_variable = { rl_offer_1_id = 96 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_97 }
            set_variable = { rl_offer_1_id = 97 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_98 }
            set_variable = { rl_offer_1_id = 98 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_99 }
            set_variable = { rl_offer_1_id = 99 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_100 }
            set_variable = { rl_offer_1_id = 100 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_101 }
            set_variable = { rl_offer_1_id = 101 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_102 }
            set_variable = { rl_offer_1_id = 102 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_103 }
            set_variable = { rl_offer_1_id = 103 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_104 }
            set_variable = { rl_offer_1_id = 104 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_105 }
            set_variable = { rl_offer_1_id = 105 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_106 }
            set_variable = { rl_offer_1_id = 106 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_107 }
            set_variable = { rl_offer_1_id = 107 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_108 }
            set_variable = { rl_offer_1_id = 108 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_109 }
            set_variable = { rl_offer_1_id = 109 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_110 }
            set_variable = { rl_offer_1_id = 110 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_111 }
            set_variable = { rl_offer_1_id = 111 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_112 }
            set_variable = { rl_offer_1_id = 112 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_113 }
            set_variable = { rl_offer_1_id = 113 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_114 }
            set_variable = { rl_offer_1_id = 114 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_115 }
            set_variable = { rl_offer_1_id = 115 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_116 }
            set_variable = { rl_offer_1_id = 116 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_117 }
            set_variable = { rl_offer_1_id = 117 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_118 }
            set_variable = { rl_offer_1_id = 118 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_119 }
            set_variable = { rl_offer_1_id = 119 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_120 }
            set_variable = { rl_offer_1_id = 120 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_121 }
            set_variable = { rl_offer_1_id = 121 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_122 }
            set_variable = { rl_offer_1_id = 122 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_123 }
            set_variable = { rl_offer_1_id = 123 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_124 }
            set_variable = { rl_offer_1_id = 124 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_125 }
            set_variable = { rl_offer_1_id = 125 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_126 }
            set_variable = { rl_offer_1_id = 126 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_127 }
            set_variable = { rl_offer_1_id = 127 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_128 }
            set_variable = { rl_offer_1_id = 128 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_129 }
            set_variable = { rl_offer_1_id = 129 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_130 }
            set_variable = { rl_offer_1_id = 130 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_131 }
            set_variable = { rl_offer_1_id = 131 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_132 }
            set_variable = { rl_offer_1_id = 132 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_133 }
            set_variable = { rl_offer_1_id = 133 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_134 }
            set_variable = { rl_offer_1_id = 134 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_135 }
            set_variable = { rl_offer_1_id = 135 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_136 }
            set_variable = { rl_offer_1_id = 136 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_137 }
            set_variable = { rl_offer_1_id = 137 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_138 }
            set_variable = { rl_offer_1_id = 138 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_139 }
            set_variable = { rl_offer_1_id = 139 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_140 }
            set_variable = { rl_offer_1_id = 140 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_141 }
            set_variable = { rl_offer_1_id = 141 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_142 }
            set_variable = { rl_offer_1_id = 142 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_143 }
            set_variable = { rl_offer_1_id = 143 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_144 }
            set_variable = { rl_offer_1_id = 144 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_145 }
            set_variable = { rl_offer_1_id = 145 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_146 }
            set_variable = { rl_offer_1_id = 146 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_147 }
            set_variable = { rl_offer_1_id = 147 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_148 }
            set_variable = { rl_offer_1_id = 148 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_149 }
            set_variable = { rl_offer_1_id = 149 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_150 }
            set_variable = { rl_offer_1_id = 150 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_151 }
            set_variable = { rl_offer_1_id = 151 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_152 }
            set_variable = { rl_offer_1_id = 152 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_153 }
            set_variable = { rl_offer_1_id = 153 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_154 }
            set_variable = { rl_offer_1_id = 154 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_155 }
            set_variable = { rl_offer_1_id = 155 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_156 }
            set_variable = { rl_offer_1_id = 156 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_157 }
            set_variable = { rl_offer_1_id = 157 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_158 }
            set_variable = { rl_offer_1_id = 158 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_159 }
            set_variable = { rl_offer_1_id = 159 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_160 }
            set_variable = { rl_offer_1_id = 160 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_161 }
            set_variable = { rl_offer_1_id = 161 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_162 }
            set_variable = { rl_offer_1_id = 162 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_163 }
            set_variable = { rl_offer_1_id = 163 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_164 }
            set_variable = { rl_offer_1_id = 164 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_165 }
            set_variable = { rl_offer_1_id = 165 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_166 }
            set_variable = { rl_offer_1_id = 166 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_167 }
            set_variable = { rl_offer_1_id = 167 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_168 }
            set_variable = { rl_offer_1_id = 168 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_169 }
            set_variable = { rl_offer_1_id = 169 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_170 }
            set_variable = { rl_offer_1_id = 170 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_171 }
            set_variable = { rl_offer_1_id = 171 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_172 }
            set_variable = { rl_offer_1_id = 172 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_173 }
            set_variable = { rl_offer_1_id = 173 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_174 }
            set_variable = { rl_offer_1_id = 174 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_175 }
            set_variable = { rl_offer_1_id = 175 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_176 }
            set_variable = { rl_offer_1_id = 176 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_177 }
            set_variable = { rl_offer_1_id = 177 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_178 }
            set_variable = { rl_offer_1_id = 178 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_179 }
            set_variable = { rl_offer_1_id = 179 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_180 }
            set_variable = { rl_offer_1_id = 180 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_181 }
            set_variable = { rl_offer_1_id = 181 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_182 }
            set_variable = { rl_offer_1_id = 182 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_183 }
            set_variable = { rl_offer_1_id = 183 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_184 }
            set_variable = { rl_offer_1_id = 184 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_185 }
            set_variable = { rl_offer_1_id = 185 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_186 }
            set_variable = { rl_offer_1_id = 186 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_187 }
            set_variable = { rl_offer_1_id = 187 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_188 }
            set_variable = { rl_offer_1_id = 188 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_189 }
            set_variable = { rl_offer_1_id = 189 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_190 }
            set_variable = { rl_offer_1_id = 190 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_191 }
            set_variable = { rl_offer_1_id = 191 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_192 }
            set_variable = { rl_offer_1_id = 192 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_193 }
            set_variable = { rl_offer_1_id = 193 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_194 }
            set_variable = { rl_offer_1_id = 194 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_195 }
            set_variable = { rl_offer_1_id = 195 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_196 }
            set_variable = { rl_offer_1_id = 196 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_197 }
            set_variable = { rl_offer_1_id = 197 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_198 }
            set_variable = { rl_offer_1_id = 198 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_199 }
            set_variable = { rl_offer_1_id = 199 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_200 }
            set_variable = { rl_offer_1_id = 200 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_201 }
            set_variable = { rl_offer_1_id = 201 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_202 }
            set_variable = { rl_offer_1_id = 202 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_203 }
            set_variable = { rl_offer_1_id = 203 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_204 }
            set_variable = { rl_offer_1_id = 204 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_205 }
            set_variable = { rl_offer_1_id = 205 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_206 }
            set_variable = { rl_offer_1_id = 206 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_207 }
            set_variable = { rl_offer_1_id = 207 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_208 }
            set_variable = { rl_offer_1_id = 208 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_209 }
            set_variable = { rl_offer_1_id = 209 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_210 }
            set_variable = { rl_offer_1_id = 210 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_211 }
            set_variable = { rl_offer_1_id = 211 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_212 }
            set_variable = { rl_offer_1_id = 212 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_213 }
            set_variable = { rl_offer_1_id = 213 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_214 }
            set_variable = { rl_offer_1_id = 214 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_215 }
            set_variable = { rl_offer_1_id = 215 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_216 }
            set_variable = { rl_offer_1_id = 216 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_217 }
            set_variable = { rl_offer_1_id = 217 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_218 }
            set_variable = { rl_offer_1_id = 218 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_219 }
            set_variable = { rl_offer_1_id = 219 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_220 }
            set_variable = { rl_offer_1_id = 220 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_221 }
            set_variable = { rl_offer_1_id = 221 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_222 }
            set_variable = { rl_offer_1_id = 222 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_223 }
            set_variable = { rl_offer_1_id = 223 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_224 }
            set_variable = { rl_offer_1_id = 224 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_225 }
            set_variable = { rl_offer_1_id = 225 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_226 }
            set_variable = { rl_offer_1_id = 226 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_227 }
            set_variable = { rl_offer_1_id = 227 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_228 }
            set_variable = { rl_offer_1_id = 228 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_229 }
            set_variable = { rl_offer_1_id = 229 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_230 }
            set_variable = { rl_offer_1_id = 230 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_231 }
            set_variable = { rl_offer_1_id = 231 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_232 }
            set_variable = { rl_offer_1_id = 232 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_233 }
            set_variable = { rl_offer_1_id = 233 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_234 }
            set_variable = { rl_offer_1_id = 234 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_235 }
            set_variable = { rl_offer_1_id = 235 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_236 }
            set_variable = { rl_offer_1_id = 236 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_237 }
            set_variable = { rl_offer_1_id = 237 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_238 }
            set_variable = { rl_offer_1_id = 238 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_239 }
            set_variable = { rl_offer_1_id = 239 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_240 }
            set_variable = { rl_offer_1_id = 240 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_241 }
            set_variable = { rl_offer_1_id = 241 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_242 }
            set_variable = { rl_offer_1_id = 242 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_243 }
            set_variable = { rl_offer_1_id = 243 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_244 }
            set_variable = { rl_offer_1_id = 244 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_245 }
            set_variable = { rl_offer_1_id = 245 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_246 }
            set_variable = { rl_offer_1_id = 246 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_247 }
            set_variable = { rl_offer_1_id = 247 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_248 }
            set_variable = { rl_offer_1_id = 248 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_249 }
            set_variable = { rl_offer_1_id = 249 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_250 }
            set_variable = { rl_offer_1_id = 250 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_251 }
            set_variable = { rl_offer_1_id = 251 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_252 }
            set_variable = { rl_offer_1_id = 252 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_253 }
            set_variable = { rl_offer_1_id = 253 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_254 }
            set_variable = { rl_offer_1_id = 254 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_255 }
            set_variable = { rl_offer_1_id = 255 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_256 }
            set_variable = { rl_offer_1_id = 256 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_257 }
            set_variable = { rl_offer_1_id = 257 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_258 }
            set_variable = { rl_offer_1_id = 258 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_259 }
            set_variable = { rl_offer_1_id = 259 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_260 }
            set_variable = { rl_offer_1_id = 260 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_261 }
            set_variable = { rl_offer_1_id = 261 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_262 }
            set_variable = { rl_offer_1_id = 262 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_263 }
            set_variable = { rl_offer_1_id = 263 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_264 }
            set_variable = { rl_offer_1_id = 264 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_265 }
            set_variable = { rl_offer_1_id = 265 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_266 }
            set_variable = { rl_offer_1_id = 266 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_267 }
            set_variable = { rl_offer_1_id = 267 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_268 }
            set_variable = { rl_offer_1_id = 268 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_269 }
            set_variable = { rl_offer_1_id = 269 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_270 }
            set_variable = { rl_offer_1_id = 270 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_271 }
            set_variable = { rl_offer_1_id = 271 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_272 }
            set_variable = { rl_offer_1_id = 272 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_273 }
            set_variable = { rl_offer_1_id = 273 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_274 }
            set_variable = { rl_offer_1_id = 274 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_275 }
            set_variable = { rl_offer_1_id = 275 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_276 }
            set_variable = { rl_offer_1_id = 276 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_277 }
            set_variable = { rl_offer_1_id = 277 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_278 }
            set_variable = { rl_offer_1_id = 278 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_279 }
            set_variable = { rl_offer_1_id = 279 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_280 }
            set_variable = { rl_offer_1_id = 280 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_281 }
            set_variable = { rl_offer_1_id = 281 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_282 }
            set_variable = { rl_offer_1_id = 282 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_283 }
            set_variable = { rl_offer_1_id = 283 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_284 }
            set_variable = { rl_offer_1_id = 284 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_285 }
            set_variable = { rl_offer_1_id = 285 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_286 }
            set_variable = { rl_offer_1_id = 286 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_287 }
            set_variable = { rl_offer_1_id = 287 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_288 }
            set_variable = { rl_offer_1_id = 288 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_289 }
            set_variable = { rl_offer_1_id = 289 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_290 }
            set_variable = { rl_offer_1_id = 290 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_291 }
            set_variable = { rl_offer_1_id = 291 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_292 }
            set_variable = { rl_offer_1_id = 292 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_293 }
            set_variable = { rl_offer_1_id = 293 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_294 }
            set_variable = { rl_offer_1_id = 294 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_295 }
            set_variable = { rl_offer_1_id = 295 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_296 }
            set_variable = { rl_offer_1_id = 296 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_297 }
            set_variable = { rl_offer_1_id = 297 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_298 }
            set_variable = { rl_offer_1_id = 298 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_299 }
            set_variable = { rl_offer_1_id = 299 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_300 }
            set_variable = { rl_offer_1_id = 300 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_301 }
            set_variable = { rl_offer_1_id = 301 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_302 }
            set_variable = { rl_offer_1_id = 302 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_303 }
            set_variable = { rl_offer_1_id = 303 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_304 }
            set_variable = { rl_offer_1_id = 304 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_305 }
            set_variable = { rl_offer_1_id = 305 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_306 }
            set_variable = { rl_offer_1_id = 306 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_307 }
            set_variable = { rl_offer_1_id = 307 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_308 }
            set_variable = { rl_offer_1_id = 308 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_309 }
            set_variable = { rl_offer_1_id = 309 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_310 }
            set_variable = { rl_offer_1_id = 310 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_311 }
            set_variable = { rl_offer_1_id = 311 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_312 }
            set_variable = { rl_offer_1_id = 312 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_313 }
            set_variable = { rl_offer_1_id = 313 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_314 }
            set_variable = { rl_offer_1_id = 314 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_315 }
            set_variable = { rl_offer_1_id = 315 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_316 }
            set_variable = { rl_offer_1_id = 316 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_317 }
            set_variable = { rl_offer_1_id = 317 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_318 }
            set_variable = { rl_offer_1_id = 318 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_319 }
            set_variable = { rl_offer_1_id = 319 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_320 }
            set_variable = { rl_offer_1_id = 320 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_321 }
            set_variable = { rl_offer_1_id = 321 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_322 }
            set_variable = { rl_offer_1_id = 322 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_323 }
            set_variable = { rl_offer_1_id = 323 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_324 }
            set_variable = { rl_offer_1_id = 324 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_325 }
            set_variable = { rl_offer_1_id = 325 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_326 }
            set_variable = { rl_offer_1_id = 326 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_327 }
            set_variable = { rl_offer_1_id = 327 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_328 }
            set_variable = { rl_offer_1_id = 328 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_329 }
            set_variable = { rl_offer_1_id = 329 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_330 }
            set_variable = { rl_offer_1_id = 330 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_331 }
            set_variable = { rl_offer_1_id = 331 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_332 }
            set_variable = { rl_offer_1_id = 332 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_333 }
            set_variable = { rl_offer_1_id = 333 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_334 }
            set_variable = { rl_offer_1_id = 334 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_335 }
            set_variable = { rl_offer_1_id = 335 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_336 }
            set_variable = { rl_offer_1_id = 336 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_337 }
            set_variable = { rl_offer_1_id = 337 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_338 }
            set_variable = { rl_offer_1_id = 338 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_339 }
            set_variable = { rl_offer_1_id = 339 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_340 }
            set_variable = { rl_offer_1_id = 340 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_341 }
            set_variable = { rl_offer_1_id = 341 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_342 }
            set_variable = { rl_offer_1_id = 342 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_343 }
            set_variable = { rl_offer_1_id = 343 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_344 }
            set_variable = { rl_offer_1_id = 344 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_345 }
            set_variable = { rl_offer_1_id = 345 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_346 }
            set_variable = { rl_offer_1_id = 346 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_347 }
            set_variable = { rl_offer_1_id = 347 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_348 }
            set_variable = { rl_offer_1_id = 348 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_349 }
            set_variable = { rl_offer_1_id = 349 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_350 }
            set_variable = { rl_offer_1_id = 350 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_351 }
            set_variable = { rl_offer_1_id = 351 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_352 }
            set_variable = { rl_offer_1_id = 352 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_353 }
            set_variable = { rl_offer_1_id = 353 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_354 }
            set_variable = { rl_offer_1_id = 354 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_355 }
            set_variable = { rl_offer_1_id = 355 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_356 }
            set_variable = { rl_offer_1_id = 356 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_357 }
            set_variable = { rl_offer_1_id = 357 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_358 }
            set_variable = { rl_offer_1_id = 358 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_359 }
            set_variable = { rl_offer_1_id = 359 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_360 }
            set_variable = { rl_offer_1_id = 360 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_361 }
            set_variable = { rl_offer_1_id = 361 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_362 }
            set_variable = { rl_offer_1_id = 362 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_363 }
            set_variable = { rl_offer_1_id = 363 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_364 }
            set_variable = { rl_offer_1_id = 364 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_365 }
            set_variable = { rl_offer_1_id = 365 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_366 }
            set_variable = { rl_offer_1_id = 366 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_367 }
            set_variable = { rl_offer_1_id = 367 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_368 }
            set_variable = { rl_offer_1_id = 368 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_369 }
            set_variable = { rl_offer_1_id = 369 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_370 }
            set_variable = { rl_offer_1_id = 370 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_371 }
            set_variable = { rl_offer_1_id = 371 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_372 }
            set_variable = { rl_offer_1_id = 372 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_373 }
            set_variable = { rl_offer_1_id = 373 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_374 }
            set_variable = { rl_offer_1_id = 374 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_375 }
            set_variable = { rl_offer_1_id = 375 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_376 }
            set_variable = { rl_offer_1_id = 376 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_377 }
            set_variable = { rl_offer_1_id = 377 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_378 }
            set_variable = { rl_offer_1_id = 378 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_379 }
            set_variable = { rl_offer_1_id = 379 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_380 }
            set_variable = { rl_offer_1_id = 380 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_381 }
            set_variable = { rl_offer_1_id = 381 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_382 }
            set_variable = { rl_offer_1_id = 382 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_383 }
            set_variable = { rl_offer_1_id = 383 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_384 }
            set_variable = { rl_offer_1_id = 384 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_385 }
            set_variable = { rl_offer_1_id = 385 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_386 }
            set_variable = { rl_offer_1_id = 386 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_387 }
            set_variable = { rl_offer_1_id = 387 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_388 }
            set_variable = { rl_offer_1_id = 388 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_389 }
            set_variable = { rl_offer_1_id = 389 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_390 }
            set_variable = { rl_offer_1_id = 390 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_391 }
            set_variable = { rl_offer_1_id = 391 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_392 }
            set_variable = { rl_offer_1_id = 392 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_393 }
            set_variable = { rl_offer_1_id = 393 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_394 }
            set_variable = { rl_offer_1_id = 394 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_395 }
            set_variable = { rl_offer_1_id = 395 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_396 }
            set_variable = { rl_offer_1_id = 396 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_397 }
            set_variable = { rl_offer_1_id = 397 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_398 }
            set_variable = { rl_offer_1_id = 398 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_399 }
            set_variable = { rl_offer_1_id = 399 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_400 }
            set_variable = { rl_offer_1_id = 400 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_401 }
            set_variable = { rl_offer_1_id = 401 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_402 }
            set_variable = { rl_offer_1_id = 402 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_403 }
            set_variable = { rl_offer_1_id = 403 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_404 }
            set_variable = { rl_offer_1_id = 404 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_405 }
            set_variable = { rl_offer_1_id = 405 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_406 }
            set_variable = { rl_offer_1_id = 406 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_407 }
            set_variable = { rl_offer_1_id = 407 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_408 }
            set_variable = { rl_offer_1_id = 408 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_409 }
            set_variable = { rl_offer_1_id = 409 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_410 }
            set_variable = { rl_offer_1_id = 410 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_411 }
            set_variable = { rl_offer_1_id = 411 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_412 }
            set_variable = { rl_offer_1_id = 412 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_413 }
            set_variable = { rl_offer_1_id = 413 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_414 }
            set_variable = { rl_offer_1_id = 414 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_415 }
            set_variable = { rl_offer_1_id = 415 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_416 }
            set_variable = { rl_offer_1_id = 416 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_417 }
            set_variable = { rl_offer_1_id = 417 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_418 }
            set_variable = { rl_offer_1_id = 418 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_419 }
            set_variable = { rl_offer_1_id = 419 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_420 }
            set_variable = { rl_offer_1_id = 420 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_421 }
            set_variable = { rl_offer_1_id = 421 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_422 }
            set_variable = { rl_offer_1_id = 422 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_423 }
            set_variable = { rl_offer_1_id = 423 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_424 }
            set_variable = { rl_offer_1_id = 424 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_425 }
            set_variable = { rl_offer_1_id = 425 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_426 }
            set_variable = { rl_offer_1_id = 426 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_427 }
            set_variable = { rl_offer_1_id = 427 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_428 }
            set_variable = { rl_offer_1_id = 428 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_429 }
            set_variable = { rl_offer_1_id = 429 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_430 }
            set_variable = { rl_offer_1_id = 430 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_431 }
            set_variable = { rl_offer_1_id = 431 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_432 }
            set_variable = { rl_offer_1_id = 432 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_433 }
            set_variable = { rl_offer_1_id = 433 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_434 }
            set_variable = { rl_offer_1_id = 434 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_435 }
            set_variable = { rl_offer_1_id = 435 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_436 }
            set_variable = { rl_offer_1_id = 436 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_437 }
            set_variable = { rl_offer_1_id = 437 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_438 }
            set_variable = { rl_offer_1_id = 438 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_439 }
            set_variable = { rl_offer_1_id = 439 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_440 }
            set_variable = { rl_offer_1_id = 440 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_441 }
            set_variable = { rl_offer_1_id = 441 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_442 }
            set_variable = { rl_offer_1_id = 442 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_443 }
            set_variable = { rl_offer_1_id = 443 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_444 }
            set_variable = { rl_offer_1_id = 444 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_445 }
            set_variable = { rl_offer_1_id = 445 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_446 }
            set_variable = { rl_offer_1_id = 446 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_447 }
            set_variable = { rl_offer_1_id = 447 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_448 }
            set_variable = { rl_offer_1_id = 448 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_449 }
            set_variable = { rl_offer_1_id = 449 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_450 }
            set_variable = { rl_offer_1_id = 450 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_451 }
            set_variable = { rl_offer_1_id = 451 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_452 }
            set_variable = { rl_offer_1_id = 452 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_453 }
            set_variable = { rl_offer_1_id = 453 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_454 }
            set_variable = { rl_offer_1_id = 454 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_455 }
            set_variable = { rl_offer_1_id = 455 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_456 }
            set_variable = { rl_offer_1_id = 456 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_457 }
            set_variable = { rl_offer_1_id = 457 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_458 }
            set_variable = { rl_offer_1_id = 458 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_459 }
            set_variable = { rl_offer_1_id = 459 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_460 }
            set_variable = { rl_offer_1_id = 460 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_461 }
            set_variable = { rl_offer_1_id = 461 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_462 }
            set_variable = { rl_offer_1_id = 462 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_463 }
            set_variable = { rl_offer_1_id = 463 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_464 }
            set_variable = { rl_offer_1_id = 464 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_465 }
            set_variable = { rl_offer_1_id = 465 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_466 }
            set_variable = { rl_offer_1_id = 466 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_467 }
            set_variable = { rl_offer_1_id = 467 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_468 }
            set_variable = { rl_offer_1_id = 468 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_469 }
            set_variable = { rl_offer_1_id = 469 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_470 }
            set_variable = { rl_offer_1_id = 470 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_471 }
            set_variable = { rl_offer_1_id = 471 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_472 }
            set_variable = { rl_offer_1_id = 472 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_473 }
            set_variable = { rl_offer_1_id = 473 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_474 }
            set_variable = { rl_offer_1_id = 474 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_475 }
            set_variable = { rl_offer_1_id = 475 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_476 }
            set_variable = { rl_offer_1_id = 476 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_477 }
            set_variable = { rl_offer_1_id = 477 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_478 }
            set_variable = { rl_offer_1_id = 478 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_479 }
            set_variable = { rl_offer_1_id = 479 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_480 }
            set_variable = { rl_offer_1_id = 480 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_481 }
            set_variable = { rl_offer_1_id = 481 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_482 }
            set_variable = { rl_offer_1_id = 482 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_483 }
            set_variable = { rl_offer_1_id = 483 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_484 }
            set_variable = { rl_offer_1_id = 484 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_485 }
            set_variable = { rl_offer_1_id = 485 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_486 }
            set_variable = { rl_offer_1_id = 486 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_487 }
            set_variable = { rl_offer_1_id = 487 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_488 }
            set_variable = { rl_offer_1_id = 488 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_489 }
            set_variable = { rl_offer_1_id = 489 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_490 }
            set_variable = { rl_offer_1_id = 490 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_491 }
            set_variable = { rl_offer_1_id = 491 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_492 }
            set_variable = { rl_offer_1_id = 492 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_493 }
            set_variable = { rl_offer_1_id = 493 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_494 }
            set_variable = { rl_offer_1_id = 494 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_495 }
            set_variable = { rl_offer_1_id = 495 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_496 }
            set_variable = { rl_offer_1_id = 496 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_497 }
            set_variable = { rl_offer_1_id = 497 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_498 }
            set_variable = { rl_offer_1_id = 498 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_499 }
            set_variable = { rl_offer_1_id = 499 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_500 }
            set_variable = { rl_offer_1_id = 500 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_501 }
            set_variable = { rl_offer_1_id = 501 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_502 }
            set_variable = { rl_offer_1_id = 502 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_503 }
            set_variable = { rl_offer_1_id = 503 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_504 }
            set_variable = { rl_offer_1_id = 504 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_505 }
            set_variable = { rl_offer_1_id = 505 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_506 }
            set_variable = { rl_offer_1_id = 506 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_507 }
            set_variable = { rl_offer_1_id = 507 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_508 }
            set_variable = { rl_offer_1_id = 508 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_509 }
            set_variable = { rl_offer_1_id = 509 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_510 }
            set_variable = { rl_offer_1_id = 510 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_511 }
            set_variable = { rl_offer_1_id = 511 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_512 }
            set_variable = { rl_offer_1_id = 512 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_513 }
            set_variable = { rl_offer_1_id = 513 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_514 }
            set_variable = { rl_offer_1_id = 514 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_515 }
            set_variable = { rl_offer_1_id = 515 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_516 }
            set_variable = { rl_offer_1_id = 516 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_517 }
            set_variable = { rl_offer_1_id = 517 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_518 }
            set_variable = { rl_offer_1_id = 518 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_519 }
            set_variable = { rl_offer_1_id = 519 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_520 }
            set_variable = { rl_offer_1_id = 520 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_521 }
            set_variable = { rl_offer_1_id = 521 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_522 }
            set_variable = { rl_offer_1_id = 522 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_523 }
            set_variable = { rl_offer_1_id = 523 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_524 }
            set_variable = { rl_offer_1_id = 524 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_525 }
            set_variable = { rl_offer_1_id = 525 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_526 }
            set_variable = { rl_offer_1_id = 526 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_527 }
            set_variable = { rl_offer_1_id = 527 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_528 }
            set_variable = { rl_offer_1_id = 528 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_529 }
            set_variable = { rl_offer_1_id = 529 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_530 }
            set_variable = { rl_offer_1_id = 530 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_531 }
            set_variable = { rl_offer_1_id = 531 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_532 }
            set_variable = { rl_offer_1_id = 532 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_533 }
            set_variable = { rl_offer_1_id = 533 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_534 }
            set_variable = { rl_offer_1_id = 534 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_535 }
            set_variable = { rl_offer_1_id = 535 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_536 }
            set_variable = { rl_offer_1_id = 536 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_537 }
            set_variable = { rl_offer_1_id = 537 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_538 }
            set_variable = { rl_offer_1_id = 538 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_539 }
            set_variable = { rl_offer_1_id = 539 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_540 }
            set_variable = { rl_offer_1_id = 540 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_541 }
            set_variable = { rl_offer_1_id = 541 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_542 }
            set_variable = { rl_offer_1_id = 542 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_543 }
            set_variable = { rl_offer_1_id = 543 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_544 }
            set_variable = { rl_offer_1_id = 544 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_545 }
            set_variable = { rl_offer_1_id = 545 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_546 }
            set_variable = { rl_offer_1_id = 546 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_547 }
            set_variable = { rl_offer_1_id = 547 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_548 }
            set_variable = { rl_offer_1_id = 548 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_549 }
            set_variable = { rl_offer_1_id = 549 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_550 }
            set_variable = { rl_offer_1_id = 550 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_551 }
            set_variable = { rl_offer_1_id = 551 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_552 }
            set_variable = { rl_offer_1_id = 552 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_553 }
            set_variable = { rl_offer_1_id = 553 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_554 }
            set_variable = { rl_offer_1_id = 554 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_555 }
            set_variable = { rl_offer_1_id = 555 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_556 }
            set_variable = { rl_offer_1_id = 556 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_557 }
            set_variable = { rl_offer_1_id = 557 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_558 }
            set_variable = { rl_offer_1_id = 558 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_559 }
            set_variable = { rl_offer_1_id = 559 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_560 }
            set_variable = { rl_offer_1_id = 560 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_561 }
            set_variable = { rl_offer_1_id = 561 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_562 }
            set_variable = { rl_offer_1_id = 562 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_563 }
            set_variable = { rl_offer_1_id = 563 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_564 }
            set_variable = { rl_offer_1_id = 564 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_565 }
            set_variable = { rl_offer_1_id = 565 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_566 }
            set_variable = { rl_offer_1_id = 566 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_567 }
            set_variable = { rl_offer_1_id = 567 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_568 }
            set_variable = { rl_offer_1_id = 568 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_569 }
            set_variable = { rl_offer_1_id = 569 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_570 }
            set_variable = { rl_offer_1_id = 570 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_571 }
            set_variable = { rl_offer_1_id = 571 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_572 }
            set_variable = { rl_offer_1_id = 572 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_573 }
            set_variable = { rl_offer_1_id = 573 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_574 }
            set_variable = { rl_offer_1_id = 574 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_575 }
            set_variable = { rl_offer_1_id = 575 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_576 }
            set_variable = { rl_offer_1_id = 576 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_577 }
            set_variable = { rl_offer_1_id = 577 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_578 }
            set_variable = { rl_offer_1_id = 578 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_579 }
            set_variable = { rl_offer_1_id = 579 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_580 }
            set_variable = { rl_offer_1_id = 580 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_581 }
            set_variable = { rl_offer_1_id = 581 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_582 }
            set_variable = { rl_offer_1_id = 582 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_583 }
            set_variable = { rl_offer_1_id = 583 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_584 }
            set_variable = { rl_offer_1_id = 584 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_585 }
            set_variable = { rl_offer_1_id = 585 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_586 }
            set_variable = { rl_offer_1_id = 586 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_587 }
            set_variable = { rl_offer_1_id = 587 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_588 }
            set_variable = { rl_offer_1_id = 588 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_589 }
            set_variable = { rl_offer_1_id = 589 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_590 }
            set_variable = { rl_offer_1_id = 590 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_591 }
            set_variable = { rl_offer_1_id = 591 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_592 }
            set_variable = { rl_offer_1_id = 592 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_593 }
            set_variable = { rl_offer_1_id = 593 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_594 }
            set_variable = { rl_offer_1_id = 594 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_595 }
            set_variable = { rl_offer_1_id = 595 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_596 }
            set_variable = { rl_offer_1_id = 596 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_597 }
            set_variable = { rl_offer_1_id = 597 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_598 }
            set_variable = { rl_offer_1_id = 598 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_599 }
            set_variable = { rl_offer_1_id = 599 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_600 }
            set_variable = { rl_offer_1_id = 600 }
        }
    }
    rl_roll_rarity_1 = yes
}

rl_roll_offer_2 = {
    random_list = {
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_1 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 1 } }
            set_variable = { rl_offer_2_id = 1 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_2 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 2 } }
            set_variable = { rl_offer_2_id = 2 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_3 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 3 } }
            set_variable = { rl_offer_2_id = 3 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_4 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 4 } }
            set_variable = { rl_offer_2_id = 4 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_5 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 5 } }
            set_variable = { rl_offer_2_id = 5 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_6 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 6 } }
            set_variable = { rl_offer_2_id = 6 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_7 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 7 } }
            set_variable = { rl_offer_2_id = 7 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_8 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 8 } }
            set_variable = { rl_offer_2_id = 8 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_9 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 9 } }
            set_variable = { rl_offer_2_id = 9 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_10 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 10 } }
            set_variable = { rl_offer_2_id = 10 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_11 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 11 } }
            set_variable = { rl_offer_2_id = 11 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_12 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 12 } }
            set_variable = { rl_offer_2_id = 12 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_13 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 13 } }
            set_variable = { rl_offer_2_id = 13 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_14 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 14 } }
            set_variable = { rl_offer_2_id = 14 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_15 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 15 } }
            set_variable = { rl_offer_2_id = 15 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_16 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 16 } }
            set_variable = { rl_offer_2_id = 16 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_17 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 17 } }
            set_variable = { rl_offer_2_id = 17 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_18 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 18 } }
            set_variable = { rl_offer_2_id = 18 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_19 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 19 } }
            set_variable = { rl_offer_2_id = 19 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_20 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 20 } }
            set_variable = { rl_offer_2_id = 20 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_21 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 21 } }
            set_variable = { rl_offer_2_id = 21 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_22 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 22 } }
            set_variable = { rl_offer_2_id = 22 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_23 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 23 } }
            set_variable = { rl_offer_2_id = 23 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_24 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 24 } }
            set_variable = { rl_offer_2_id = 24 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_25 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 25 } }
            set_variable = { rl_offer_2_id = 25 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_26 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 26 } }
            set_variable = { rl_offer_2_id = 26 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_27 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 27 } }
            set_variable = { rl_offer_2_id = 27 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_28 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 28 } }
            set_variable = { rl_offer_2_id = 28 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_29 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 29 } }
            set_variable = { rl_offer_2_id = 29 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_30 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 30 } }
            set_variable = { rl_offer_2_id = 30 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_31 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 31 } }
            set_variable = { rl_offer_2_id = 31 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_32 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 32 } }
            set_variable = { rl_offer_2_id = 32 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_33 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 33 } }
            set_variable = { rl_offer_2_id = 33 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_34 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 34 } }
            set_variable = { rl_offer_2_id = 34 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_35 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 35 } }
            set_variable = { rl_offer_2_id = 35 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_36 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 36 } }
            set_variable = { rl_offer_2_id = 36 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_37 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 37 } }
            set_variable = { rl_offer_2_id = 37 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_38 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 38 } }
            set_variable = { rl_offer_2_id = 38 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_39 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 39 } }
            set_variable = { rl_offer_2_id = 39 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_40 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 40 } }
            set_variable = { rl_offer_2_id = 40 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_41 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 41 } }
            set_variable = { rl_offer_2_id = 41 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_42 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 42 } }
            set_variable = { rl_offer_2_id = 42 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_43 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 43 } }
            set_variable = { rl_offer_2_id = 43 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_44 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 44 } }
            set_variable = { rl_offer_2_id = 44 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_45 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 45 } }
            set_variable = { rl_offer_2_id = 45 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_46 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 46 } }
            set_variable = { rl_offer_2_id = 46 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_47 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 47 } }
            set_variable = { rl_offer_2_id = 47 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_48 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 48 } }
            set_variable = { rl_offer_2_id = 48 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_49 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 49 } }
            set_variable = { rl_offer_2_id = 49 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_50 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 50 } }
            set_variable = { rl_offer_2_id = 50 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_51 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 51 } }
            set_variable = { rl_offer_2_id = 51 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_52 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 52 } }
            set_variable = { rl_offer_2_id = 52 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_53 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 53 } }
            set_variable = { rl_offer_2_id = 53 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_54 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 54 } }
            set_variable = { rl_offer_2_id = 54 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_55 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 55 } }
            set_variable = { rl_offer_2_id = 55 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_56 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 56 } }
            set_variable = { rl_offer_2_id = 56 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_57 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 57 } }
            set_variable = { rl_offer_2_id = 57 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_58 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 58 } }
            set_variable = { rl_offer_2_id = 58 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_59 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 59 } }
            set_variable = { rl_offer_2_id = 59 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_60 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 60 } }
            set_variable = { rl_offer_2_id = 60 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_61 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 61 } }
            set_variable = { rl_offer_2_id = 61 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_62 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 62 } }
            set_variable = { rl_offer_2_id = 62 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_63 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 63 } }
            set_variable = { rl_offer_2_id = 63 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_64 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 64 } }
            set_variable = { rl_offer_2_id = 64 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_65 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 65 } }
            set_variable = { rl_offer_2_id = 65 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_66 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 66 } }
            set_variable = { rl_offer_2_id = 66 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_67 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 67 } }
            set_variable = { rl_offer_2_id = 67 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_68 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 68 } }
            set_variable = { rl_offer_2_id = 68 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_69 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 69 } }
            set_variable = { rl_offer_2_id = 69 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_70 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 70 } }
            set_variable = { rl_offer_2_id = 70 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_71 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 71 } }
            set_variable = { rl_offer_2_id = 71 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_72 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 72 } }
            set_variable = { rl_offer_2_id = 72 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_73 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 73 } }
            set_variable = { rl_offer_2_id = 73 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_74 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 74 } }
            set_variable = { rl_offer_2_id = 74 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_75 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 75 } }
            set_variable = { rl_offer_2_id = 75 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_76 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 76 } }
            set_variable = { rl_offer_2_id = 76 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_77 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 77 } }
            set_variable = { rl_offer_2_id = 77 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_78 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 78 } }
            set_variable = { rl_offer_2_id = 78 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_79 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 79 } }
            set_variable = { rl_offer_2_id = 79 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_80 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 80 } }
            set_variable = { rl_offer_2_id = 80 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_81 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 81 } }
            set_variable = { rl_offer_2_id = 81 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_82 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 82 } }
            set_variable = { rl_offer_2_id = 82 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_83 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 83 } }
            set_variable = { rl_offer_2_id = 83 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_84 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 84 } }
            set_variable = { rl_offer_2_id = 84 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_85 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 85 } }
            set_variable = { rl_offer_2_id = 85 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_86 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 86 } }
            set_variable = { rl_offer_2_id = 86 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_87 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 87 } }
            set_variable = { rl_offer_2_id = 87 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_88 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 88 } }
            set_variable = { rl_offer_2_id = 88 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_89 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 89 } }
            set_variable = { rl_offer_2_id = 89 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_90 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 90 } }
            set_variable = { rl_offer_2_id = 90 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_91 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 91 } }
            set_variable = { rl_offer_2_id = 91 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_92 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 92 } }
            set_variable = { rl_offer_2_id = 92 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_93 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 93 } }
            set_variable = { rl_offer_2_id = 93 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_94 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 94 } }
            set_variable = { rl_offer_2_id = 94 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_95 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 95 } }
            set_variable = { rl_offer_2_id = 95 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_96 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 96 } }
            set_variable = { rl_offer_2_id = 96 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_97 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 97 } }
            set_variable = { rl_offer_2_id = 97 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_98 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 98 } }
            set_variable = { rl_offer_2_id = 98 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_99 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 99 } }
            set_variable = { rl_offer_2_id = 99 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_100 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 100 } }
            set_variable = { rl_offer_2_id = 100 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_101 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 101 } }
            set_variable = { rl_offer_2_id = 101 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_102 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 102 } }
            set_variable = { rl_offer_2_id = 102 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_103 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 103 } }
            set_variable = { rl_offer_2_id = 103 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_104 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 104 } }
            set_variable = { rl_offer_2_id = 104 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_105 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 105 } }
            set_variable = { rl_offer_2_id = 105 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_106 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 106 } }
            set_variable = { rl_offer_2_id = 106 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_107 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 107 } }
            set_variable = { rl_offer_2_id = 107 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_108 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 108 } }
            set_variable = { rl_offer_2_id = 108 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_109 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 109 } }
            set_variable = { rl_offer_2_id = 109 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_110 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 110 } }
            set_variable = { rl_offer_2_id = 110 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_111 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 111 } }
            set_variable = { rl_offer_2_id = 111 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_112 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 112 } }
            set_variable = { rl_offer_2_id = 112 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_113 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 113 } }
            set_variable = { rl_offer_2_id = 113 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_114 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 114 } }
            set_variable = { rl_offer_2_id = 114 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_115 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 115 } }
            set_variable = { rl_offer_2_id = 115 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_116 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 116 } }
            set_variable = { rl_offer_2_id = 116 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_117 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 117 } }
            set_variable = { rl_offer_2_id = 117 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_118 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 118 } }
            set_variable = { rl_offer_2_id = 118 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_119 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 119 } }
            set_variable = { rl_offer_2_id = 119 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_120 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 120 } }
            set_variable = { rl_offer_2_id = 120 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_121 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 121 } }
            set_variable = { rl_offer_2_id = 121 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_122 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 122 } }
            set_variable = { rl_offer_2_id = 122 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_123 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 123 } }
            set_variable = { rl_offer_2_id = 123 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_124 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 124 } }
            set_variable = { rl_offer_2_id = 124 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_125 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 125 } }
            set_variable = { rl_offer_2_id = 125 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_126 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 126 } }
            set_variable = { rl_offer_2_id = 126 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_127 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 127 } }
            set_variable = { rl_offer_2_id = 127 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_128 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 128 } }
            set_variable = { rl_offer_2_id = 128 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_129 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 129 } }
            set_variable = { rl_offer_2_id = 129 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_130 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 130 } }
            set_variable = { rl_offer_2_id = 130 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_131 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 131 } }
            set_variable = { rl_offer_2_id = 131 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_132 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 132 } }
            set_variable = { rl_offer_2_id = 132 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_133 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 133 } }
            set_variable = { rl_offer_2_id = 133 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_134 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 134 } }
            set_variable = { rl_offer_2_id = 134 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_135 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 135 } }
            set_variable = { rl_offer_2_id = 135 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_136 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 136 } }
            set_variable = { rl_offer_2_id = 136 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_137 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 137 } }
            set_variable = { rl_offer_2_id = 137 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_138 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 138 } }
            set_variable = { rl_offer_2_id = 138 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_139 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 139 } }
            set_variable = { rl_offer_2_id = 139 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_140 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 140 } }
            set_variable = { rl_offer_2_id = 140 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_141 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 141 } }
            set_variable = { rl_offer_2_id = 141 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_142 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 142 } }
            set_variable = { rl_offer_2_id = 142 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_143 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 143 } }
            set_variable = { rl_offer_2_id = 143 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_144 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 144 } }
            set_variable = { rl_offer_2_id = 144 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_145 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 145 } }
            set_variable = { rl_offer_2_id = 145 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_146 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 146 } }
            set_variable = { rl_offer_2_id = 146 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_147 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 147 } }
            set_variable = { rl_offer_2_id = 147 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_148 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 148 } }
            set_variable = { rl_offer_2_id = 148 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_149 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 149 } }
            set_variable = { rl_offer_2_id = 149 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_150 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 150 } }
            set_variable = { rl_offer_2_id = 150 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_151 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 151 } }
            set_variable = { rl_offer_2_id = 151 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_152 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 152 } }
            set_variable = { rl_offer_2_id = 152 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_153 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 153 } }
            set_variable = { rl_offer_2_id = 153 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_154 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 154 } }
            set_variable = { rl_offer_2_id = 154 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_155 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 155 } }
            set_variable = { rl_offer_2_id = 155 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_156 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 156 } }
            set_variable = { rl_offer_2_id = 156 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_157 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 157 } }
            set_variable = { rl_offer_2_id = 157 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_158 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 158 } }
            set_variable = { rl_offer_2_id = 158 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_159 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 159 } }
            set_variable = { rl_offer_2_id = 159 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_160 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 160 } }
            set_variable = { rl_offer_2_id = 160 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_161 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 161 } }
            set_variable = { rl_offer_2_id = 161 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_162 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 162 } }
            set_variable = { rl_offer_2_id = 162 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_163 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 163 } }
            set_variable = { rl_offer_2_id = 163 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_164 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 164 } }
            set_variable = { rl_offer_2_id = 164 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_165 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 165 } }
            set_variable = { rl_offer_2_id = 165 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_166 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 166 } }
            set_variable = { rl_offer_2_id = 166 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_167 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 167 } }
            set_variable = { rl_offer_2_id = 167 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_168 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 168 } }
            set_variable = { rl_offer_2_id = 168 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_169 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 169 } }
            set_variable = { rl_offer_2_id = 169 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_170 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 170 } }
            set_variable = { rl_offer_2_id = 170 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_171 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 171 } }
            set_variable = { rl_offer_2_id = 171 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_172 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 172 } }
            set_variable = { rl_offer_2_id = 172 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_173 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 173 } }
            set_variable = { rl_offer_2_id = 173 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_174 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 174 } }
            set_variable = { rl_offer_2_id = 174 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_175 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 175 } }
            set_variable = { rl_offer_2_id = 175 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_176 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 176 } }
            set_variable = { rl_offer_2_id = 176 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_177 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 177 } }
            set_variable = { rl_offer_2_id = 177 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_178 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 178 } }
            set_variable = { rl_offer_2_id = 178 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_179 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 179 } }
            set_variable = { rl_offer_2_id = 179 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_180 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 180 } }
            set_variable = { rl_offer_2_id = 180 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_181 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 181 } }
            set_variable = { rl_offer_2_id = 181 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_182 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 182 } }
            set_variable = { rl_offer_2_id = 182 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_183 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 183 } }
            set_variable = { rl_offer_2_id = 183 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_184 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 184 } }
            set_variable = { rl_offer_2_id = 184 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_185 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 185 } }
            set_variable = { rl_offer_2_id = 185 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_186 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 186 } }
            set_variable = { rl_offer_2_id = 186 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_187 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 187 } }
            set_variable = { rl_offer_2_id = 187 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_188 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 188 } }
            set_variable = { rl_offer_2_id = 188 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_189 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 189 } }
            set_variable = { rl_offer_2_id = 189 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_190 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 190 } }
            set_variable = { rl_offer_2_id = 190 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_191 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 191 } }
            set_variable = { rl_offer_2_id = 191 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_192 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 192 } }
            set_variable = { rl_offer_2_id = 192 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_193 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 193 } }
            set_variable = { rl_offer_2_id = 193 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_194 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 194 } }
            set_variable = { rl_offer_2_id = 194 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_195 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 195 } }
            set_variable = { rl_offer_2_id = 195 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_196 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 196 } }
            set_variable = { rl_offer_2_id = 196 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_197 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 197 } }
            set_variable = { rl_offer_2_id = 197 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_198 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 198 } }
            set_variable = { rl_offer_2_id = 198 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_199 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 199 } }
            set_variable = { rl_offer_2_id = 199 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_200 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 200 } }
            set_variable = { rl_offer_2_id = 200 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_201 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 201 } }
            set_variable = { rl_offer_2_id = 201 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_202 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 202 } }
            set_variable = { rl_offer_2_id = 202 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_203 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 203 } }
            set_variable = { rl_offer_2_id = 203 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_204 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 204 } }
            set_variable = { rl_offer_2_id = 204 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_205 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 205 } }
            set_variable = { rl_offer_2_id = 205 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_206 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 206 } }
            set_variable = { rl_offer_2_id = 206 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_207 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 207 } }
            set_variable = { rl_offer_2_id = 207 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_208 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 208 } }
            set_variable = { rl_offer_2_id = 208 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_209 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 209 } }
            set_variable = { rl_offer_2_id = 209 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_210 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 210 } }
            set_variable = { rl_offer_2_id = 210 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_211 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 211 } }
            set_variable = { rl_offer_2_id = 211 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_212 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 212 } }
            set_variable = { rl_offer_2_id = 212 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_213 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 213 } }
            set_variable = { rl_offer_2_id = 213 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_214 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 214 } }
            set_variable = { rl_offer_2_id = 214 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_215 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 215 } }
            set_variable = { rl_offer_2_id = 215 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_216 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 216 } }
            set_variable = { rl_offer_2_id = 216 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_217 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 217 } }
            set_variable = { rl_offer_2_id = 217 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_218 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 218 } }
            set_variable = { rl_offer_2_id = 218 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_219 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 219 } }
            set_variable = { rl_offer_2_id = 219 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_220 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 220 } }
            set_variable = { rl_offer_2_id = 220 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_221 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 221 } }
            set_variable = { rl_offer_2_id = 221 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_222 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 222 } }
            set_variable = { rl_offer_2_id = 222 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_223 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 223 } }
            set_variable = { rl_offer_2_id = 223 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_224 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 224 } }
            set_variable = { rl_offer_2_id = 224 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_225 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 225 } }
            set_variable = { rl_offer_2_id = 225 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_226 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 226 } }
            set_variable = { rl_offer_2_id = 226 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_227 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 227 } }
            set_variable = { rl_offer_2_id = 227 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_228 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 228 } }
            set_variable = { rl_offer_2_id = 228 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_229 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 229 } }
            set_variable = { rl_offer_2_id = 229 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_230 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 230 } }
            set_variable = { rl_offer_2_id = 230 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_231 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 231 } }
            set_variable = { rl_offer_2_id = 231 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_232 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 232 } }
            set_variable = { rl_offer_2_id = 232 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_233 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 233 } }
            set_variable = { rl_offer_2_id = 233 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_234 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 234 } }
            set_variable = { rl_offer_2_id = 234 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_235 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 235 } }
            set_variable = { rl_offer_2_id = 235 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_236 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 236 } }
            set_variable = { rl_offer_2_id = 236 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_237 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 237 } }
            set_variable = { rl_offer_2_id = 237 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_238 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 238 } }
            set_variable = { rl_offer_2_id = 238 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_239 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 239 } }
            set_variable = { rl_offer_2_id = 239 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_240 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 240 } }
            set_variable = { rl_offer_2_id = 240 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_241 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 241 } }
            set_variable = { rl_offer_2_id = 241 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_242 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 242 } }
            set_variable = { rl_offer_2_id = 242 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_243 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 243 } }
            set_variable = { rl_offer_2_id = 243 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_244 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 244 } }
            set_variable = { rl_offer_2_id = 244 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_245 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 245 } }
            set_variable = { rl_offer_2_id = 245 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_246 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 246 } }
            set_variable = { rl_offer_2_id = 246 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_247 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 247 } }
            set_variable = { rl_offer_2_id = 247 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_248 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 248 } }
            set_variable = { rl_offer_2_id = 248 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_249 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 249 } }
            set_variable = { rl_offer_2_id = 249 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_250 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 250 } }
            set_variable = { rl_offer_2_id = 250 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_251 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 251 } }
            set_variable = { rl_offer_2_id = 251 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_252 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 252 } }
            set_variable = { rl_offer_2_id = 252 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_253 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 253 } }
            set_variable = { rl_offer_2_id = 253 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_254 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 254 } }
            set_variable = { rl_offer_2_id = 254 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_255 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 255 } }
            set_variable = { rl_offer_2_id = 255 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_256 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 256 } }
            set_variable = { rl_offer_2_id = 256 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_257 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 257 } }
            set_variable = { rl_offer_2_id = 257 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_258 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 258 } }
            set_variable = { rl_offer_2_id = 258 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_259 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 259 } }
            set_variable = { rl_offer_2_id = 259 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_260 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 260 } }
            set_variable = { rl_offer_2_id = 260 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_261 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 261 } }
            set_variable = { rl_offer_2_id = 261 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_262 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 262 } }
            set_variable = { rl_offer_2_id = 262 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_263 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 263 } }
            set_variable = { rl_offer_2_id = 263 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_264 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 264 } }
            set_variable = { rl_offer_2_id = 264 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_265 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 265 } }
            set_variable = { rl_offer_2_id = 265 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_266 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 266 } }
            set_variable = { rl_offer_2_id = 266 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_267 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 267 } }
            set_variable = { rl_offer_2_id = 267 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_268 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 268 } }
            set_variable = { rl_offer_2_id = 268 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_269 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 269 } }
            set_variable = { rl_offer_2_id = 269 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_270 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 270 } }
            set_variable = { rl_offer_2_id = 270 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_271 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 271 } }
            set_variable = { rl_offer_2_id = 271 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_272 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 272 } }
            set_variable = { rl_offer_2_id = 272 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_273 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 273 } }
            set_variable = { rl_offer_2_id = 273 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_274 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 274 } }
            set_variable = { rl_offer_2_id = 274 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_275 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 275 } }
            set_variable = { rl_offer_2_id = 275 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_276 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 276 } }
            set_variable = { rl_offer_2_id = 276 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_277 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 277 } }
            set_variable = { rl_offer_2_id = 277 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_278 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 278 } }
            set_variable = { rl_offer_2_id = 278 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_279 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 279 } }
            set_variable = { rl_offer_2_id = 279 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_280 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 280 } }
            set_variable = { rl_offer_2_id = 280 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_281 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 281 } }
            set_variable = { rl_offer_2_id = 281 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_282 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 282 } }
            set_variable = { rl_offer_2_id = 282 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_283 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 283 } }
            set_variable = { rl_offer_2_id = 283 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_284 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 284 } }
            set_variable = { rl_offer_2_id = 284 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_285 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 285 } }
            set_variable = { rl_offer_2_id = 285 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_286 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 286 } }
            set_variable = { rl_offer_2_id = 286 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_287 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 287 } }
            set_variable = { rl_offer_2_id = 287 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_288 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 288 } }
            set_variable = { rl_offer_2_id = 288 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_289 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 289 } }
            set_variable = { rl_offer_2_id = 289 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_290 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 290 } }
            set_variable = { rl_offer_2_id = 290 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_291 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 291 } }
            set_variable = { rl_offer_2_id = 291 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_292 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 292 } }
            set_variable = { rl_offer_2_id = 292 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_293 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 293 } }
            set_variable = { rl_offer_2_id = 293 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_294 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 294 } }
            set_variable = { rl_offer_2_id = 294 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_295 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 295 } }
            set_variable = { rl_offer_2_id = 295 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_296 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 296 } }
            set_variable = { rl_offer_2_id = 296 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_297 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 297 } }
            set_variable = { rl_offer_2_id = 297 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_298 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 298 } }
            set_variable = { rl_offer_2_id = 298 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_299 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 299 } }
            set_variable = { rl_offer_2_id = 299 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_300 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 300 } }
            set_variable = { rl_offer_2_id = 300 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_301 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 301 } }
            set_variable = { rl_offer_2_id = 301 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_302 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 302 } }
            set_variable = { rl_offer_2_id = 302 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_303 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 303 } }
            set_variable = { rl_offer_2_id = 303 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_304 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 304 } }
            set_variable = { rl_offer_2_id = 304 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_305 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 305 } }
            set_variable = { rl_offer_2_id = 305 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_306 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 306 } }
            set_variable = { rl_offer_2_id = 306 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_307 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 307 } }
            set_variable = { rl_offer_2_id = 307 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_308 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 308 } }
            set_variable = { rl_offer_2_id = 308 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_309 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 309 } }
            set_variable = { rl_offer_2_id = 309 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_310 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 310 } }
            set_variable = { rl_offer_2_id = 310 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_311 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 311 } }
            set_variable = { rl_offer_2_id = 311 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_312 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 312 } }
            set_variable = { rl_offer_2_id = 312 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_313 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 313 } }
            set_variable = { rl_offer_2_id = 313 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_314 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 314 } }
            set_variable = { rl_offer_2_id = 314 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_315 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 315 } }
            set_variable = { rl_offer_2_id = 315 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_316 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 316 } }
            set_variable = { rl_offer_2_id = 316 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_317 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 317 } }
            set_variable = { rl_offer_2_id = 317 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_318 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 318 } }
            set_variable = { rl_offer_2_id = 318 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_319 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 319 } }
            set_variable = { rl_offer_2_id = 319 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_320 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 320 } }
            set_variable = { rl_offer_2_id = 320 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_321 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 321 } }
            set_variable = { rl_offer_2_id = 321 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_322 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 322 } }
            set_variable = { rl_offer_2_id = 322 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_323 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 323 } }
            set_variable = { rl_offer_2_id = 323 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_324 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 324 } }
            set_variable = { rl_offer_2_id = 324 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_325 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 325 } }
            set_variable = { rl_offer_2_id = 325 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_326 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 326 } }
            set_variable = { rl_offer_2_id = 326 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_327 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 327 } }
            set_variable = { rl_offer_2_id = 327 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_328 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 328 } }
            set_variable = { rl_offer_2_id = 328 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_329 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 329 } }
            set_variable = { rl_offer_2_id = 329 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_330 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 330 } }
            set_variable = { rl_offer_2_id = 330 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_331 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 331 } }
            set_variable = { rl_offer_2_id = 331 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_332 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 332 } }
            set_variable = { rl_offer_2_id = 332 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_333 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 333 } }
            set_variable = { rl_offer_2_id = 333 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_334 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 334 } }
            set_variable = { rl_offer_2_id = 334 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_335 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 335 } }
            set_variable = { rl_offer_2_id = 335 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_336 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 336 } }
            set_variable = { rl_offer_2_id = 336 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_337 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 337 } }
            set_variable = { rl_offer_2_id = 337 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_338 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 338 } }
            set_variable = { rl_offer_2_id = 338 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_339 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 339 } }
            set_variable = { rl_offer_2_id = 339 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_340 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 340 } }
            set_variable = { rl_offer_2_id = 340 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_341 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 341 } }
            set_variable = { rl_offer_2_id = 341 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_342 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 342 } }
            set_variable = { rl_offer_2_id = 342 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_343 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 343 } }
            set_variable = { rl_offer_2_id = 343 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_344 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 344 } }
            set_variable = { rl_offer_2_id = 344 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_345 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 345 } }
            set_variable = { rl_offer_2_id = 345 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_346 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 346 } }
            set_variable = { rl_offer_2_id = 346 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_347 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 347 } }
            set_variable = { rl_offer_2_id = 347 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_348 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 348 } }
            set_variable = { rl_offer_2_id = 348 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_349 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 349 } }
            set_variable = { rl_offer_2_id = 349 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_350 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 350 } }
            set_variable = { rl_offer_2_id = 350 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_351 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 351 } }
            set_variable = { rl_offer_2_id = 351 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_352 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 352 } }
            set_variable = { rl_offer_2_id = 352 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_353 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 353 } }
            set_variable = { rl_offer_2_id = 353 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_354 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 354 } }
            set_variable = { rl_offer_2_id = 354 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_355 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 355 } }
            set_variable = { rl_offer_2_id = 355 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_356 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 356 } }
            set_variable = { rl_offer_2_id = 356 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_357 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 357 } }
            set_variable = { rl_offer_2_id = 357 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_358 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 358 } }
            set_variable = { rl_offer_2_id = 358 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_359 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 359 } }
            set_variable = { rl_offer_2_id = 359 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_360 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 360 } }
            set_variable = { rl_offer_2_id = 360 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_361 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 361 } }
            set_variable = { rl_offer_2_id = 361 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_362 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 362 } }
            set_variable = { rl_offer_2_id = 362 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_363 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 363 } }
            set_variable = { rl_offer_2_id = 363 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_364 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 364 } }
            set_variable = { rl_offer_2_id = 364 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_365 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 365 } }
            set_variable = { rl_offer_2_id = 365 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_366 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 366 } }
            set_variable = { rl_offer_2_id = 366 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_367 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 367 } }
            set_variable = { rl_offer_2_id = 367 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_368 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 368 } }
            set_variable = { rl_offer_2_id = 368 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_369 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 369 } }
            set_variable = { rl_offer_2_id = 369 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_370 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 370 } }
            set_variable = { rl_offer_2_id = 370 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_371 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 371 } }
            set_variable = { rl_offer_2_id = 371 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_372 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 372 } }
            set_variable = { rl_offer_2_id = 372 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_373 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 373 } }
            set_variable = { rl_offer_2_id = 373 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_374 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 374 } }
            set_variable = { rl_offer_2_id = 374 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_375 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 375 } }
            set_variable = { rl_offer_2_id = 375 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_376 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 376 } }
            set_variable = { rl_offer_2_id = 376 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_377 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 377 } }
            set_variable = { rl_offer_2_id = 377 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_378 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 378 } }
            set_variable = { rl_offer_2_id = 378 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_379 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 379 } }
            set_variable = { rl_offer_2_id = 379 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_380 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 380 } }
            set_variable = { rl_offer_2_id = 380 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_381 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 381 } }
            set_variable = { rl_offer_2_id = 381 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_382 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 382 } }
            set_variable = { rl_offer_2_id = 382 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_383 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 383 } }
            set_variable = { rl_offer_2_id = 383 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_384 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 384 } }
            set_variable = { rl_offer_2_id = 384 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_385 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 385 } }
            set_variable = { rl_offer_2_id = 385 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_386 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 386 } }
            set_variable = { rl_offer_2_id = 386 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_387 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 387 } }
            set_variable = { rl_offer_2_id = 387 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_388 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 388 } }
            set_variable = { rl_offer_2_id = 388 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_389 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 389 } }
            set_variable = { rl_offer_2_id = 389 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_390 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 390 } }
            set_variable = { rl_offer_2_id = 390 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_391 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 391 } }
            set_variable = { rl_offer_2_id = 391 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_392 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 392 } }
            set_variable = { rl_offer_2_id = 392 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_393 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 393 } }
            set_variable = { rl_offer_2_id = 393 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_394 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 394 } }
            set_variable = { rl_offer_2_id = 394 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_395 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 395 } }
            set_variable = { rl_offer_2_id = 395 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_396 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 396 } }
            set_variable = { rl_offer_2_id = 396 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_397 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 397 } }
            set_variable = { rl_offer_2_id = 397 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_398 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 398 } }
            set_variable = { rl_offer_2_id = 398 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_399 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 399 } }
            set_variable = { rl_offer_2_id = 399 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_400 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 400 } }
            set_variable = { rl_offer_2_id = 400 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_401 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 401 } }
            set_variable = { rl_offer_2_id = 401 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_402 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 402 } }
            set_variable = { rl_offer_2_id = 402 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_403 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 403 } }
            set_variable = { rl_offer_2_id = 403 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_404 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 404 } }
            set_variable = { rl_offer_2_id = 404 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_405 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 405 } }
            set_variable = { rl_offer_2_id = 405 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_406 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 406 } }
            set_variable = { rl_offer_2_id = 406 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_407 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 407 } }
            set_variable = { rl_offer_2_id = 407 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_408 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 408 } }
            set_variable = { rl_offer_2_id = 408 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_409 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 409 } }
            set_variable = { rl_offer_2_id = 409 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_410 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 410 } }
            set_variable = { rl_offer_2_id = 410 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_411 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 411 } }
            set_variable = { rl_offer_2_id = 411 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_412 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 412 } }
            set_variable = { rl_offer_2_id = 412 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_413 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 413 } }
            set_variable = { rl_offer_2_id = 413 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_414 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 414 } }
            set_variable = { rl_offer_2_id = 414 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_415 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 415 } }
            set_variable = { rl_offer_2_id = 415 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_416 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 416 } }
            set_variable = { rl_offer_2_id = 416 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_417 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 417 } }
            set_variable = { rl_offer_2_id = 417 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_418 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 418 } }
            set_variable = { rl_offer_2_id = 418 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_419 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 419 } }
            set_variable = { rl_offer_2_id = 419 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_420 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 420 } }
            set_variable = { rl_offer_2_id = 420 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_421 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 421 } }
            set_variable = { rl_offer_2_id = 421 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_422 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 422 } }
            set_variable = { rl_offer_2_id = 422 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_423 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 423 } }
            set_variable = { rl_offer_2_id = 423 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_424 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 424 } }
            set_variable = { rl_offer_2_id = 424 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_425 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 425 } }
            set_variable = { rl_offer_2_id = 425 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_426 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 426 } }
            set_variable = { rl_offer_2_id = 426 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_427 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 427 } }
            set_variable = { rl_offer_2_id = 427 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_428 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 428 } }
            set_variable = { rl_offer_2_id = 428 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_429 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 429 } }
            set_variable = { rl_offer_2_id = 429 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_430 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 430 } }
            set_variable = { rl_offer_2_id = 430 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_431 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 431 } }
            set_variable = { rl_offer_2_id = 431 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_432 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 432 } }
            set_variable = { rl_offer_2_id = 432 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_433 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 433 } }
            set_variable = { rl_offer_2_id = 433 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_434 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 434 } }
            set_variable = { rl_offer_2_id = 434 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_435 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 435 } }
            set_variable = { rl_offer_2_id = 435 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_436 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 436 } }
            set_variable = { rl_offer_2_id = 436 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_437 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 437 } }
            set_variable = { rl_offer_2_id = 437 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_438 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 438 } }
            set_variable = { rl_offer_2_id = 438 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_439 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 439 } }
            set_variable = { rl_offer_2_id = 439 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_440 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 440 } }
            set_variable = { rl_offer_2_id = 440 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_441 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 441 } }
            set_variable = { rl_offer_2_id = 441 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_442 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 442 } }
            set_variable = { rl_offer_2_id = 442 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_443 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 443 } }
            set_variable = { rl_offer_2_id = 443 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_444 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 444 } }
            set_variable = { rl_offer_2_id = 444 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_445 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 445 } }
            set_variable = { rl_offer_2_id = 445 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_446 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 446 } }
            set_variable = { rl_offer_2_id = 446 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_447 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 447 } }
            set_variable = { rl_offer_2_id = 447 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_448 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 448 } }
            set_variable = { rl_offer_2_id = 448 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_449 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 449 } }
            set_variable = { rl_offer_2_id = 449 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_450 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 450 } }
            set_variable = { rl_offer_2_id = 450 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_451 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 451 } }
            set_variable = { rl_offer_2_id = 451 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_452 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 452 } }
            set_variable = { rl_offer_2_id = 452 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_453 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 453 } }
            set_variable = { rl_offer_2_id = 453 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_454 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 454 } }
            set_variable = { rl_offer_2_id = 454 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_455 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 455 } }
            set_variable = { rl_offer_2_id = 455 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_456 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 456 } }
            set_variable = { rl_offer_2_id = 456 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_457 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 457 } }
            set_variable = { rl_offer_2_id = 457 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_458 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 458 } }
            set_variable = { rl_offer_2_id = 458 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_459 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 459 } }
            set_variable = { rl_offer_2_id = 459 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_460 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 460 } }
            set_variable = { rl_offer_2_id = 460 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_461 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 461 } }
            set_variable = { rl_offer_2_id = 461 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_462 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 462 } }
            set_variable = { rl_offer_2_id = 462 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_463 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 463 } }
            set_variable = { rl_offer_2_id = 463 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_464 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 464 } }
            set_variable = { rl_offer_2_id = 464 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_465 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 465 } }
            set_variable = { rl_offer_2_id = 465 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_466 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 466 } }
            set_variable = { rl_offer_2_id = 466 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_467 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 467 } }
            set_variable = { rl_offer_2_id = 467 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_468 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 468 } }
            set_variable = { rl_offer_2_id = 468 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_469 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 469 } }
            set_variable = { rl_offer_2_id = 469 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_470 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 470 } }
            set_variable = { rl_offer_2_id = 470 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_471 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 471 } }
            set_variable = { rl_offer_2_id = 471 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_472 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 472 } }
            set_variable = { rl_offer_2_id = 472 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_473 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 473 } }
            set_variable = { rl_offer_2_id = 473 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_474 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 474 } }
            set_variable = { rl_offer_2_id = 474 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_475 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 475 } }
            set_variable = { rl_offer_2_id = 475 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_476 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 476 } }
            set_variable = { rl_offer_2_id = 476 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_477 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 477 } }
            set_variable = { rl_offer_2_id = 477 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_478 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 478 } }
            set_variable = { rl_offer_2_id = 478 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_479 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 479 } }
            set_variable = { rl_offer_2_id = 479 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_480 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 480 } }
            set_variable = { rl_offer_2_id = 480 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_481 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 481 } }
            set_variable = { rl_offer_2_id = 481 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_482 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 482 } }
            set_variable = { rl_offer_2_id = 482 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_483 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 483 } }
            set_variable = { rl_offer_2_id = 483 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_484 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 484 } }
            set_variable = { rl_offer_2_id = 484 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_485 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 485 } }
            set_variable = { rl_offer_2_id = 485 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_486 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 486 } }
            set_variable = { rl_offer_2_id = 486 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_487 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 487 } }
            set_variable = { rl_offer_2_id = 487 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_488 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 488 } }
            set_variable = { rl_offer_2_id = 488 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_489 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 489 } }
            set_variable = { rl_offer_2_id = 489 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_490 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 490 } }
            set_variable = { rl_offer_2_id = 490 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_491 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 491 } }
            set_variable = { rl_offer_2_id = 491 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_492 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 492 } }
            set_variable = { rl_offer_2_id = 492 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_493 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 493 } }
            set_variable = { rl_offer_2_id = 493 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_494 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 494 } }
            set_variable = { rl_offer_2_id = 494 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_495 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 495 } }
            set_variable = { rl_offer_2_id = 495 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_496 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 496 } }
            set_variable = { rl_offer_2_id = 496 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_497 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 497 } }
            set_variable = { rl_offer_2_id = 497 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_498 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 498 } }
            set_variable = { rl_offer_2_id = 498 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_499 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 499 } }
            set_variable = { rl_offer_2_id = 499 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_500 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 500 } }
            set_variable = { rl_offer_2_id = 500 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_501 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 501 } }
            set_variable = { rl_offer_2_id = 501 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_502 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 502 } }
            set_variable = { rl_offer_2_id = 502 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_503 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 503 } }
            set_variable = { rl_offer_2_id = 503 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_504 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 504 } }
            set_variable = { rl_offer_2_id = 504 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_505 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 505 } }
            set_variable = { rl_offer_2_id = 505 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_506 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 506 } }
            set_variable = { rl_offer_2_id = 506 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_507 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 507 } }
            set_variable = { rl_offer_2_id = 507 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_508 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 508 } }
            set_variable = { rl_offer_2_id = 508 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_509 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 509 } }
            set_variable = { rl_offer_2_id = 509 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_510 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 510 } }
            set_variable = { rl_offer_2_id = 510 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_511 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 511 } }
            set_variable = { rl_offer_2_id = 511 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_512 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 512 } }
            set_variable = { rl_offer_2_id = 512 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_513 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 513 } }
            set_variable = { rl_offer_2_id = 513 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_514 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 514 } }
            set_variable = { rl_offer_2_id = 514 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_515 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 515 } }
            set_variable = { rl_offer_2_id = 515 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_516 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 516 } }
            set_variable = { rl_offer_2_id = 516 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_517 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 517 } }
            set_variable = { rl_offer_2_id = 517 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_518 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 518 } }
            set_variable = { rl_offer_2_id = 518 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_519 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 519 } }
            set_variable = { rl_offer_2_id = 519 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_520 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 520 } }
            set_variable = { rl_offer_2_id = 520 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_521 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 521 } }
            set_variable = { rl_offer_2_id = 521 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_522 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 522 } }
            set_variable = { rl_offer_2_id = 522 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_523 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 523 } }
            set_variable = { rl_offer_2_id = 523 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_524 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 524 } }
            set_variable = { rl_offer_2_id = 524 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_525 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 525 } }
            set_variable = { rl_offer_2_id = 525 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_526 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 526 } }
            set_variable = { rl_offer_2_id = 526 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_527 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 527 } }
            set_variable = { rl_offer_2_id = 527 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_528 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 528 } }
            set_variable = { rl_offer_2_id = 528 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_529 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 529 } }
            set_variable = { rl_offer_2_id = 529 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_530 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 530 } }
            set_variable = { rl_offer_2_id = 530 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_531 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 531 } }
            set_variable = { rl_offer_2_id = 531 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_532 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 532 } }
            set_variable = { rl_offer_2_id = 532 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_533 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 533 } }
            set_variable = { rl_offer_2_id = 533 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_534 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 534 } }
            set_variable = { rl_offer_2_id = 534 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_535 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 535 } }
            set_variable = { rl_offer_2_id = 535 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_536 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 536 } }
            set_variable = { rl_offer_2_id = 536 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_537 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 537 } }
            set_variable = { rl_offer_2_id = 537 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_538 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 538 } }
            set_variable = { rl_offer_2_id = 538 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_539 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 539 } }
            set_variable = { rl_offer_2_id = 539 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_540 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 540 } }
            set_variable = { rl_offer_2_id = 540 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_541 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 541 } }
            set_variable = { rl_offer_2_id = 541 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_542 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 542 } }
            set_variable = { rl_offer_2_id = 542 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_543 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 543 } }
            set_variable = { rl_offer_2_id = 543 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_544 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 544 } }
            set_variable = { rl_offer_2_id = 544 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_545 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 545 } }
            set_variable = { rl_offer_2_id = 545 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_546 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 546 } }
            set_variable = { rl_offer_2_id = 546 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_547 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 547 } }
            set_variable = { rl_offer_2_id = 547 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_548 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 548 } }
            set_variable = { rl_offer_2_id = 548 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_549 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 549 } }
            set_variable = { rl_offer_2_id = 549 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_550 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 550 } }
            set_variable = { rl_offer_2_id = 550 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_551 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 551 } }
            set_variable = { rl_offer_2_id = 551 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_552 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 552 } }
            set_variable = { rl_offer_2_id = 552 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_553 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 553 } }
            set_variable = { rl_offer_2_id = 553 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_554 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 554 } }
            set_variable = { rl_offer_2_id = 554 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_555 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 555 } }
            set_variable = { rl_offer_2_id = 555 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_556 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 556 } }
            set_variable = { rl_offer_2_id = 556 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_557 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 557 } }
            set_variable = { rl_offer_2_id = 557 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_558 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 558 } }
            set_variable = { rl_offer_2_id = 558 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_559 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 559 } }
            set_variable = { rl_offer_2_id = 559 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_560 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 560 } }
            set_variable = { rl_offer_2_id = 560 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_561 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 561 } }
            set_variable = { rl_offer_2_id = 561 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_562 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 562 } }
            set_variable = { rl_offer_2_id = 562 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_563 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 563 } }
            set_variable = { rl_offer_2_id = 563 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_564 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 564 } }
            set_variable = { rl_offer_2_id = 564 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_565 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 565 } }
            set_variable = { rl_offer_2_id = 565 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_566 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 566 } }
            set_variable = { rl_offer_2_id = 566 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_567 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 567 } }
            set_variable = { rl_offer_2_id = 567 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_568 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 568 } }
            set_variable = { rl_offer_2_id = 568 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_569 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 569 } }
            set_variable = { rl_offer_2_id = 569 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_570 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 570 } }
            set_variable = { rl_offer_2_id = 570 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_571 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 571 } }
            set_variable = { rl_offer_2_id = 571 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_572 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 572 } }
            set_variable = { rl_offer_2_id = 572 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_573 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 573 } }
            set_variable = { rl_offer_2_id = 573 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_574 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 574 } }
            set_variable = { rl_offer_2_id = 574 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_575 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 575 } }
            set_variable = { rl_offer_2_id = 575 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_576 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 576 } }
            set_variable = { rl_offer_2_id = 576 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_577 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 577 } }
            set_variable = { rl_offer_2_id = 577 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_578 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 578 } }
            set_variable = { rl_offer_2_id = 578 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_579 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 579 } }
            set_variable = { rl_offer_2_id = 579 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_580 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 580 } }
            set_variable = { rl_offer_2_id = 580 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_581 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 581 } }
            set_variable = { rl_offer_2_id = 581 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_582 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 582 } }
            set_variable = { rl_offer_2_id = 582 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_583 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 583 } }
            set_variable = { rl_offer_2_id = 583 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_584 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 584 } }
            set_variable = { rl_offer_2_id = 584 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_585 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 585 } }
            set_variable = { rl_offer_2_id = 585 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_586 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 586 } }
            set_variable = { rl_offer_2_id = 586 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_587 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 587 } }
            set_variable = { rl_offer_2_id = 587 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_588 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 588 } }
            set_variable = { rl_offer_2_id = 588 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_589 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 589 } }
            set_variable = { rl_offer_2_id = 589 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_590 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 590 } }
            set_variable = { rl_offer_2_id = 590 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_591 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 591 } }
            set_variable = { rl_offer_2_id = 591 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_592 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 592 } }
            set_variable = { rl_offer_2_id = 592 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_593 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 593 } }
            set_variable = { rl_offer_2_id = 593 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_594 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 594 } }
            set_variable = { rl_offer_2_id = 594 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_595 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 595 } }
            set_variable = { rl_offer_2_id = 595 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_596 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 596 } }
            set_variable = { rl_offer_2_id = 596 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_597 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 597 } }
            set_variable = { rl_offer_2_id = 597 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_598 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 598 } }
            set_variable = { rl_offer_2_id = 598 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_599 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 599 } }
            set_variable = { rl_offer_2_id = 599 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_600 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 600 } }
            set_variable = { rl_offer_2_id = 600 }
        }
    }
    rl_roll_rarity_2 = yes
}

rl_roll_offer_3 = {
    random_list = {
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_1 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 1 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 1 } }
            set_variable = { rl_offer_3_id = 1 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_2 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 2 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 2 } }
            set_variable = { rl_offer_3_id = 2 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_3 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 3 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 3 } }
            set_variable = { rl_offer_3_id = 3 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_4 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 4 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 4 } }
            set_variable = { rl_offer_3_id = 4 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_5 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 5 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 5 } }
            set_variable = { rl_offer_3_id = 5 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_6 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 6 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 6 } }
            set_variable = { rl_offer_3_id = 6 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_7 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 7 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 7 } }
            set_variable = { rl_offer_3_id = 7 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_8 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 8 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 8 } }
            set_variable = { rl_offer_3_id = 8 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_9 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 9 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 9 } }
            set_variable = { rl_offer_3_id = 9 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_10 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 10 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 10 } }
            set_variable = { rl_offer_3_id = 10 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_11 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 11 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 11 } }
            set_variable = { rl_offer_3_id = 11 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_12 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 12 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 12 } }
            set_variable = { rl_offer_3_id = 12 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_13 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 13 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 13 } }
            set_variable = { rl_offer_3_id = 13 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_14 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 14 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 14 } }
            set_variable = { rl_offer_3_id = 14 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_15 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 15 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 15 } }
            set_variable = { rl_offer_3_id = 15 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_16 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 16 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 16 } }
            set_variable = { rl_offer_3_id = 16 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_17 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 17 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 17 } }
            set_variable = { rl_offer_3_id = 17 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_18 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 18 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 18 } }
            set_variable = { rl_offer_3_id = 18 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_19 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 19 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 19 } }
            set_variable = { rl_offer_3_id = 19 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_20 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 20 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 20 } }
            set_variable = { rl_offer_3_id = 20 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_21 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 21 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 21 } }
            set_variable = { rl_offer_3_id = 21 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_22 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 22 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 22 } }
            set_variable = { rl_offer_3_id = 22 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_23 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 23 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 23 } }
            set_variable = { rl_offer_3_id = 23 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_24 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 24 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 24 } }
            set_variable = { rl_offer_3_id = 24 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_25 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 25 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 25 } }
            set_variable = { rl_offer_3_id = 25 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_26 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 26 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 26 } }
            set_variable = { rl_offer_3_id = 26 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_27 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 27 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 27 } }
            set_variable = { rl_offer_3_id = 27 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_28 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 28 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 28 } }
            set_variable = { rl_offer_3_id = 28 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_29 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 29 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 29 } }
            set_variable = { rl_offer_3_id = 29 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_30 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 30 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 30 } }
            set_variable = { rl_offer_3_id = 30 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_31 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 31 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 31 } }
            set_variable = { rl_offer_3_id = 31 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_32 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 32 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 32 } }
            set_variable = { rl_offer_3_id = 32 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_33 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 33 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 33 } }
            set_variable = { rl_offer_3_id = 33 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_34 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 34 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 34 } }
            set_variable = { rl_offer_3_id = 34 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_35 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 35 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 35 } }
            set_variable = { rl_offer_3_id = 35 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_36 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 36 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 36 } }
            set_variable = { rl_offer_3_id = 36 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_37 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 37 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 37 } }
            set_variable = { rl_offer_3_id = 37 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_38 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 38 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 38 } }
            set_variable = { rl_offer_3_id = 38 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_39 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 39 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 39 } }
            set_variable = { rl_offer_3_id = 39 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_40 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 40 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 40 } }
            set_variable = { rl_offer_3_id = 40 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_41 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 41 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 41 } }
            set_variable = { rl_offer_3_id = 41 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_42 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 42 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 42 } }
            set_variable = { rl_offer_3_id = 42 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_43 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 43 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 43 } }
            set_variable = { rl_offer_3_id = 43 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_44 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 44 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 44 } }
            set_variable = { rl_offer_3_id = 44 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_45 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 45 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 45 } }
            set_variable = { rl_offer_3_id = 45 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_46 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 46 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 46 } }
            set_variable = { rl_offer_3_id = 46 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_47 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 47 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 47 } }
            set_variable = { rl_offer_3_id = 47 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_48 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 48 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 48 } }
            set_variable = { rl_offer_3_id = 48 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_49 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 49 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 49 } }
            set_variable = { rl_offer_3_id = 49 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_50 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 50 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 50 } }
            set_variable = { rl_offer_3_id = 50 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_51 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 51 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 51 } }
            set_variable = { rl_offer_3_id = 51 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_52 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 52 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 52 } }
            set_variable = { rl_offer_3_id = 52 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_53 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 53 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 53 } }
            set_variable = { rl_offer_3_id = 53 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_54 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 54 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 54 } }
            set_variable = { rl_offer_3_id = 54 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_55 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 55 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 55 } }
            set_variable = { rl_offer_3_id = 55 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_56 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 56 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 56 } }
            set_variable = { rl_offer_3_id = 56 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_57 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 57 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 57 } }
            set_variable = { rl_offer_3_id = 57 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_58 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 58 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 58 } }
            set_variable = { rl_offer_3_id = 58 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_59 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 59 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 59 } }
            set_variable = { rl_offer_3_id = 59 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_60 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 60 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 60 } }
            set_variable = { rl_offer_3_id = 60 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_61 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 61 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 61 } }
            set_variable = { rl_offer_3_id = 61 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_62 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 62 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 62 } }
            set_variable = { rl_offer_3_id = 62 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_63 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 63 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 63 } }
            set_variable = { rl_offer_3_id = 63 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_64 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 64 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 64 } }
            set_variable = { rl_offer_3_id = 64 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_65 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 65 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 65 } }
            set_variable = { rl_offer_3_id = 65 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_66 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 66 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 66 } }
            set_variable = { rl_offer_3_id = 66 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_67 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 67 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 67 } }
            set_variable = { rl_offer_3_id = 67 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_68 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 68 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 68 } }
            set_variable = { rl_offer_3_id = 68 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_69 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 69 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 69 } }
            set_variable = { rl_offer_3_id = 69 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_70 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 70 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 70 } }
            set_variable = { rl_offer_3_id = 70 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_71 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 71 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 71 } }
            set_variable = { rl_offer_3_id = 71 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_72 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 72 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 72 } }
            set_variable = { rl_offer_3_id = 72 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_73 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 73 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 73 } }
            set_variable = { rl_offer_3_id = 73 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_74 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 74 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 74 } }
            set_variable = { rl_offer_3_id = 74 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_75 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 75 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 75 } }
            set_variable = { rl_offer_3_id = 75 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_76 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 76 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 76 } }
            set_variable = { rl_offer_3_id = 76 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_77 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 77 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 77 } }
            set_variable = { rl_offer_3_id = 77 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_78 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 78 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 78 } }
            set_variable = { rl_offer_3_id = 78 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_79 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 79 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 79 } }
            set_variable = { rl_offer_3_id = 79 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_80 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 80 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 80 } }
            set_variable = { rl_offer_3_id = 80 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_81 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 81 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 81 } }
            set_variable = { rl_offer_3_id = 81 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_82 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 82 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 82 } }
            set_variable = { rl_offer_3_id = 82 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_83 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 83 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 83 } }
            set_variable = { rl_offer_3_id = 83 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_84 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 84 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 84 } }
            set_variable = { rl_offer_3_id = 84 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_85 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 85 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 85 } }
            set_variable = { rl_offer_3_id = 85 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_86 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 86 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 86 } }
            set_variable = { rl_offer_3_id = 86 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_87 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 87 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 87 } }
            set_variable = { rl_offer_3_id = 87 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_88 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 88 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 88 } }
            set_variable = { rl_offer_3_id = 88 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_89 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 89 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 89 } }
            set_variable = { rl_offer_3_id = 89 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_90 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 90 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 90 } }
            set_variable = { rl_offer_3_id = 90 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_91 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 91 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 91 } }
            set_variable = { rl_offer_3_id = 91 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_92 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 92 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 92 } }
            set_variable = { rl_offer_3_id = 92 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_93 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 93 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 93 } }
            set_variable = { rl_offer_3_id = 93 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_94 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 94 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 94 } }
            set_variable = { rl_offer_3_id = 94 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_95 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 95 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 95 } }
            set_variable = { rl_offer_3_id = 95 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_96 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 96 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 96 } }
            set_variable = { rl_offer_3_id = 96 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_97 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 97 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 97 } }
            set_variable = { rl_offer_3_id = 97 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_98 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 98 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 98 } }
            set_variable = { rl_offer_3_id = 98 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_99 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 99 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 99 } }
            set_variable = { rl_offer_3_id = 99 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_100 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 100 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 100 } }
            set_variable = { rl_offer_3_id = 100 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_101 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 101 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 101 } }
            set_variable = { rl_offer_3_id = 101 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_102 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 102 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 102 } }
            set_variable = { rl_offer_3_id = 102 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_103 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 103 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 103 } }
            set_variable = { rl_offer_3_id = 103 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_104 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 104 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 104 } }
            set_variable = { rl_offer_3_id = 104 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_105 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 105 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 105 } }
            set_variable = { rl_offer_3_id = 105 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_106 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 106 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 106 } }
            set_variable = { rl_offer_3_id = 106 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_107 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 107 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 107 } }
            set_variable = { rl_offer_3_id = 107 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_108 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 108 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 108 } }
            set_variable = { rl_offer_3_id = 108 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_109 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 109 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 109 } }
            set_variable = { rl_offer_3_id = 109 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_110 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 110 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 110 } }
            set_variable = { rl_offer_3_id = 110 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_111 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 111 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 111 } }
            set_variable = { rl_offer_3_id = 111 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_112 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 112 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 112 } }
            set_variable = { rl_offer_3_id = 112 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_113 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 113 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 113 } }
            set_variable = { rl_offer_3_id = 113 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_114 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 114 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 114 } }
            set_variable = { rl_offer_3_id = 114 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_115 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 115 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 115 } }
            set_variable = { rl_offer_3_id = 115 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_116 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 116 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 116 } }
            set_variable = { rl_offer_3_id = 116 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_117 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 117 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 117 } }
            set_variable = { rl_offer_3_id = 117 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_118 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 118 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 118 } }
            set_variable = { rl_offer_3_id = 118 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_119 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 119 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 119 } }
            set_variable = { rl_offer_3_id = 119 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_120 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 120 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 120 } }
            set_variable = { rl_offer_3_id = 120 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_121 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 121 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 121 } }
            set_variable = { rl_offer_3_id = 121 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_122 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 122 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 122 } }
            set_variable = { rl_offer_3_id = 122 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_123 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 123 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 123 } }
            set_variable = { rl_offer_3_id = 123 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_124 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 124 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 124 } }
            set_variable = { rl_offer_3_id = 124 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_125 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 125 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 125 } }
            set_variable = { rl_offer_3_id = 125 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_126 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 126 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 126 } }
            set_variable = { rl_offer_3_id = 126 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_127 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 127 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 127 } }
            set_variable = { rl_offer_3_id = 127 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_128 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 128 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 128 } }
            set_variable = { rl_offer_3_id = 128 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_129 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 129 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 129 } }
            set_variable = { rl_offer_3_id = 129 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_130 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 130 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 130 } }
            set_variable = { rl_offer_3_id = 130 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_131 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 131 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 131 } }
            set_variable = { rl_offer_3_id = 131 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_132 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 132 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 132 } }
            set_variable = { rl_offer_3_id = 132 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_133 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 133 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 133 } }
            set_variable = { rl_offer_3_id = 133 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_134 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 134 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 134 } }
            set_variable = { rl_offer_3_id = 134 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_135 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 135 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 135 } }
            set_variable = { rl_offer_3_id = 135 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_136 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 136 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 136 } }
            set_variable = { rl_offer_3_id = 136 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_137 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 137 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 137 } }
            set_variable = { rl_offer_3_id = 137 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_138 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 138 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 138 } }
            set_variable = { rl_offer_3_id = 138 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_139 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 139 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 139 } }
            set_variable = { rl_offer_3_id = 139 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_140 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 140 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 140 } }
            set_variable = { rl_offer_3_id = 140 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_141 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 141 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 141 } }
            set_variable = { rl_offer_3_id = 141 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_142 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 142 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 142 } }
            set_variable = { rl_offer_3_id = 142 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_143 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 143 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 143 } }
            set_variable = { rl_offer_3_id = 143 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_144 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 144 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 144 } }
            set_variable = { rl_offer_3_id = 144 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_145 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 145 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 145 } }
            set_variable = { rl_offer_3_id = 145 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_146 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 146 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 146 } }
            set_variable = { rl_offer_3_id = 146 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_147 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 147 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 147 } }
            set_variable = { rl_offer_3_id = 147 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_148 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 148 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 148 } }
            set_variable = { rl_offer_3_id = 148 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_149 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 149 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 149 } }
            set_variable = { rl_offer_3_id = 149 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_150 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 150 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 150 } }
            set_variable = { rl_offer_3_id = 150 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_151 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 151 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 151 } }
            set_variable = { rl_offer_3_id = 151 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_152 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 152 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 152 } }
            set_variable = { rl_offer_3_id = 152 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_153 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 153 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 153 } }
            set_variable = { rl_offer_3_id = 153 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_154 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 154 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 154 } }
            set_variable = { rl_offer_3_id = 154 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_155 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 155 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 155 } }
            set_variable = { rl_offer_3_id = 155 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_156 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 156 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 156 } }
            set_variable = { rl_offer_3_id = 156 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_157 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 157 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 157 } }
            set_variable = { rl_offer_3_id = 157 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_158 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 158 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 158 } }
            set_variable = { rl_offer_3_id = 158 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_159 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 159 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 159 } }
            set_variable = { rl_offer_3_id = 159 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_160 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 160 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 160 } }
            set_variable = { rl_offer_3_id = 160 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_161 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 161 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 161 } }
            set_variable = { rl_offer_3_id = 161 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_162 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 162 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 162 } }
            set_variable = { rl_offer_3_id = 162 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_163 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 163 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 163 } }
            set_variable = { rl_offer_3_id = 163 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_164 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 164 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 164 } }
            set_variable = { rl_offer_3_id = 164 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_165 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 165 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 165 } }
            set_variable = { rl_offer_3_id = 165 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_166 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 166 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 166 } }
            set_variable = { rl_offer_3_id = 166 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_167 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 167 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 167 } }
            set_variable = { rl_offer_3_id = 167 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_168 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 168 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 168 } }
            set_variable = { rl_offer_3_id = 168 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_169 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 169 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 169 } }
            set_variable = { rl_offer_3_id = 169 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_170 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 170 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 170 } }
            set_variable = { rl_offer_3_id = 170 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_171 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 171 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 171 } }
            set_variable = { rl_offer_3_id = 171 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_172 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 172 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 172 } }
            set_variable = { rl_offer_3_id = 172 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_173 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 173 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 173 } }
            set_variable = { rl_offer_3_id = 173 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_174 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 174 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 174 } }
            set_variable = { rl_offer_3_id = 174 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_175 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 175 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 175 } }
            set_variable = { rl_offer_3_id = 175 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_176 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 176 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 176 } }
            set_variable = { rl_offer_3_id = 176 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_177 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 177 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 177 } }
            set_variable = { rl_offer_3_id = 177 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_178 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 178 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 178 } }
            set_variable = { rl_offer_3_id = 178 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_179 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 179 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 179 } }
            set_variable = { rl_offer_3_id = 179 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_180 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 180 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 180 } }
            set_variable = { rl_offer_3_id = 180 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_181 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 181 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 181 } }
            set_variable = { rl_offer_3_id = 181 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_182 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 182 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 182 } }
            set_variable = { rl_offer_3_id = 182 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_183 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 183 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 183 } }
            set_variable = { rl_offer_3_id = 183 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_184 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 184 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 184 } }
            set_variable = { rl_offer_3_id = 184 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_185 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 185 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 185 } }
            set_variable = { rl_offer_3_id = 185 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_186 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 186 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 186 } }
            set_variable = { rl_offer_3_id = 186 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_187 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 187 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 187 } }
            set_variable = { rl_offer_3_id = 187 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_188 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 188 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 188 } }
            set_variable = { rl_offer_3_id = 188 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_189 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 189 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 189 } }
            set_variable = { rl_offer_3_id = 189 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_190 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 190 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 190 } }
            set_variable = { rl_offer_3_id = 190 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_191 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 191 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 191 } }
            set_variable = { rl_offer_3_id = 191 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_192 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 192 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 192 } }
            set_variable = { rl_offer_3_id = 192 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_193 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 193 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 193 } }
            set_variable = { rl_offer_3_id = 193 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_194 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 194 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 194 } }
            set_variable = { rl_offer_3_id = 194 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_195 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 195 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 195 } }
            set_variable = { rl_offer_3_id = 195 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_196 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 196 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 196 } }
            set_variable = { rl_offer_3_id = 196 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_197 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 197 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 197 } }
            set_variable = { rl_offer_3_id = 197 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_198 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 198 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 198 } }
            set_variable = { rl_offer_3_id = 198 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_199 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 199 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 199 } }
            set_variable = { rl_offer_3_id = 199 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_200 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 200 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 200 } }
            set_variable = { rl_offer_3_id = 200 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_201 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 201 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 201 } }
            set_variable = { rl_offer_3_id = 201 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_202 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 202 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 202 } }
            set_variable = { rl_offer_3_id = 202 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_203 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 203 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 203 } }
            set_variable = { rl_offer_3_id = 203 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_204 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 204 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 204 } }
            set_variable = { rl_offer_3_id = 204 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_205 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 205 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 205 } }
            set_variable = { rl_offer_3_id = 205 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_206 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 206 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 206 } }
            set_variable = { rl_offer_3_id = 206 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_207 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 207 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 207 } }
            set_variable = { rl_offer_3_id = 207 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_208 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 208 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 208 } }
            set_variable = { rl_offer_3_id = 208 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_209 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 209 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 209 } }
            set_variable = { rl_offer_3_id = 209 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_210 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 210 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 210 } }
            set_variable = { rl_offer_3_id = 210 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_211 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 211 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 211 } }
            set_variable = { rl_offer_3_id = 211 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_212 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 212 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 212 } }
            set_variable = { rl_offer_3_id = 212 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_213 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 213 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 213 } }
            set_variable = { rl_offer_3_id = 213 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_214 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 214 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 214 } }
            set_variable = { rl_offer_3_id = 214 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_215 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 215 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 215 } }
            set_variable = { rl_offer_3_id = 215 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_216 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 216 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 216 } }
            set_variable = { rl_offer_3_id = 216 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_217 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 217 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 217 } }
            set_variable = { rl_offer_3_id = 217 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_218 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 218 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 218 } }
            set_variable = { rl_offer_3_id = 218 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_219 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 219 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 219 } }
            set_variable = { rl_offer_3_id = 219 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_220 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 220 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 220 } }
            set_variable = { rl_offer_3_id = 220 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_221 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 221 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 221 } }
            set_variable = { rl_offer_3_id = 221 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_222 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 222 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 222 } }
            set_variable = { rl_offer_3_id = 222 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_223 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 223 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 223 } }
            set_variable = { rl_offer_3_id = 223 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_224 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 224 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 224 } }
            set_variable = { rl_offer_3_id = 224 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_225 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 225 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 225 } }
            set_variable = { rl_offer_3_id = 225 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_226 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 226 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 226 } }
            set_variable = { rl_offer_3_id = 226 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_227 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 227 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 227 } }
            set_variable = { rl_offer_3_id = 227 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_228 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 228 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 228 } }
            set_variable = { rl_offer_3_id = 228 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_229 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 229 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 229 } }
            set_variable = { rl_offer_3_id = 229 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_230 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 230 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 230 } }
            set_variable = { rl_offer_3_id = 230 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_231 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 231 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 231 } }
            set_variable = { rl_offer_3_id = 231 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_232 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 232 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 232 } }
            set_variable = { rl_offer_3_id = 232 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_233 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 233 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 233 } }
            set_variable = { rl_offer_3_id = 233 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_234 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 234 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 234 } }
            set_variable = { rl_offer_3_id = 234 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_235 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 235 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 235 } }
            set_variable = { rl_offer_3_id = 235 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_236 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 236 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 236 } }
            set_variable = { rl_offer_3_id = 236 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_237 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 237 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 237 } }
            set_variable = { rl_offer_3_id = 237 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_238 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 238 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 238 } }
            set_variable = { rl_offer_3_id = 238 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_239 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 239 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 239 } }
            set_variable = { rl_offer_3_id = 239 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_240 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 240 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 240 } }
            set_variable = { rl_offer_3_id = 240 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_241 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 241 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 241 } }
            set_variable = { rl_offer_3_id = 241 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_242 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 242 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 242 } }
            set_variable = { rl_offer_3_id = 242 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_243 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 243 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 243 } }
            set_variable = { rl_offer_3_id = 243 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_244 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 244 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 244 } }
            set_variable = { rl_offer_3_id = 244 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_245 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 245 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 245 } }
            set_variable = { rl_offer_3_id = 245 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_246 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 246 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 246 } }
            set_variable = { rl_offer_3_id = 246 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_247 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 247 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 247 } }
            set_variable = { rl_offer_3_id = 247 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_248 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 248 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 248 } }
            set_variable = { rl_offer_3_id = 248 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_249 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 249 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 249 } }
            set_variable = { rl_offer_3_id = 249 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_250 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 250 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 250 } }
            set_variable = { rl_offer_3_id = 250 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_251 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 251 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 251 } }
            set_variable = { rl_offer_3_id = 251 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_252 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 252 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 252 } }
            set_variable = { rl_offer_3_id = 252 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_253 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 253 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 253 } }
            set_variable = { rl_offer_3_id = 253 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_254 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 254 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 254 } }
            set_variable = { rl_offer_3_id = 254 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_255 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 255 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 255 } }
            set_variable = { rl_offer_3_id = 255 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_256 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 256 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 256 } }
            set_variable = { rl_offer_3_id = 256 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_257 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 257 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 257 } }
            set_variable = { rl_offer_3_id = 257 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_258 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 258 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 258 } }
            set_variable = { rl_offer_3_id = 258 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_259 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 259 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 259 } }
            set_variable = { rl_offer_3_id = 259 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_260 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 260 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 260 } }
            set_variable = { rl_offer_3_id = 260 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_261 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 261 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 261 } }
            set_variable = { rl_offer_3_id = 261 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_262 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 262 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 262 } }
            set_variable = { rl_offer_3_id = 262 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_263 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 263 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 263 } }
            set_variable = { rl_offer_3_id = 263 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_264 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 264 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 264 } }
            set_variable = { rl_offer_3_id = 264 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_265 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 265 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 265 } }
            set_variable = { rl_offer_3_id = 265 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_266 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 266 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 266 } }
            set_variable = { rl_offer_3_id = 266 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_267 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 267 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 267 } }
            set_variable = { rl_offer_3_id = 267 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_268 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 268 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 268 } }
            set_variable = { rl_offer_3_id = 268 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_269 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 269 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 269 } }
            set_variable = { rl_offer_3_id = 269 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_270 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 270 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 270 } }
            set_variable = { rl_offer_3_id = 270 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_271 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 271 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 271 } }
            set_variable = { rl_offer_3_id = 271 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_272 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 272 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 272 } }
            set_variable = { rl_offer_3_id = 272 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_273 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 273 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 273 } }
            set_variable = { rl_offer_3_id = 273 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_274 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 274 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 274 } }
            set_variable = { rl_offer_3_id = 274 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_275 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 275 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 275 } }
            set_variable = { rl_offer_3_id = 275 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_276 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 276 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 276 } }
            set_variable = { rl_offer_3_id = 276 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_277 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 277 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 277 } }
            set_variable = { rl_offer_3_id = 277 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_278 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 278 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 278 } }
            set_variable = { rl_offer_3_id = 278 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_279 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 279 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 279 } }
            set_variable = { rl_offer_3_id = 279 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_280 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 280 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 280 } }
            set_variable = { rl_offer_3_id = 280 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_281 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 281 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 281 } }
            set_variable = { rl_offer_3_id = 281 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_282 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 282 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 282 } }
            set_variable = { rl_offer_3_id = 282 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_283 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 283 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 283 } }
            set_variable = { rl_offer_3_id = 283 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_284 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 284 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 284 } }
            set_variable = { rl_offer_3_id = 284 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_285 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 285 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 285 } }
            set_variable = { rl_offer_3_id = 285 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_286 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 286 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 286 } }
            set_variable = { rl_offer_3_id = 286 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_287 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 287 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 287 } }
            set_variable = { rl_offer_3_id = 287 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_288 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 288 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 288 } }
            set_variable = { rl_offer_3_id = 288 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_289 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 289 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 289 } }
            set_variable = { rl_offer_3_id = 289 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_290 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 290 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 290 } }
            set_variable = { rl_offer_3_id = 290 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_291 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 291 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 291 } }
            set_variable = { rl_offer_3_id = 291 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_292 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 292 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 292 } }
            set_variable = { rl_offer_3_id = 292 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_293 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 293 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 293 } }
            set_variable = { rl_offer_3_id = 293 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_294 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 294 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 294 } }
            set_variable = { rl_offer_3_id = 294 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_295 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 295 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 295 } }
            set_variable = { rl_offer_3_id = 295 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_296 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 296 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 296 } }
            set_variable = { rl_offer_3_id = 296 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_297 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 297 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 297 } }
            set_variable = { rl_offer_3_id = 297 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_298 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 298 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 298 } }
            set_variable = { rl_offer_3_id = 298 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_299 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 299 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 299 } }
            set_variable = { rl_offer_3_id = 299 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_300 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 300 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 300 } }
            set_variable = { rl_offer_3_id = 300 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_301 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 301 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 301 } }
            set_variable = { rl_offer_3_id = 301 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_302 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 302 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 302 } }
            set_variable = { rl_offer_3_id = 302 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_303 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 303 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 303 } }
            set_variable = { rl_offer_3_id = 303 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_304 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 304 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 304 } }
            set_variable = { rl_offer_3_id = 304 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_305 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 305 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 305 } }
            set_variable = { rl_offer_3_id = 305 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_306 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 306 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 306 } }
            set_variable = { rl_offer_3_id = 306 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_307 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 307 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 307 } }
            set_variable = { rl_offer_3_id = 307 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_308 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 308 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 308 } }
            set_variable = { rl_offer_3_id = 308 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_309 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 309 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 309 } }
            set_variable = { rl_offer_3_id = 309 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_310 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 310 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 310 } }
            set_variable = { rl_offer_3_id = 310 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_311 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 311 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 311 } }
            set_variable = { rl_offer_3_id = 311 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_312 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 312 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 312 } }
            set_variable = { rl_offer_3_id = 312 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_313 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 313 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 313 } }
            set_variable = { rl_offer_3_id = 313 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_314 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 314 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 314 } }
            set_variable = { rl_offer_3_id = 314 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_315 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 315 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 315 } }
            set_variable = { rl_offer_3_id = 315 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_316 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 316 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 316 } }
            set_variable = { rl_offer_3_id = 316 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_317 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 317 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 317 } }
            set_variable = { rl_offer_3_id = 317 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_318 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 318 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 318 } }
            set_variable = { rl_offer_3_id = 318 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_319 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 319 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 319 } }
            set_variable = { rl_offer_3_id = 319 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_320 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 320 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 320 } }
            set_variable = { rl_offer_3_id = 320 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_321 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 321 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 321 } }
            set_variable = { rl_offer_3_id = 321 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_322 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 322 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 322 } }
            set_variable = { rl_offer_3_id = 322 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_323 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 323 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 323 } }
            set_variable = { rl_offer_3_id = 323 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_324 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 324 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 324 } }
            set_variable = { rl_offer_3_id = 324 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_325 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 325 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 325 } }
            set_variable = { rl_offer_3_id = 325 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_326 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 326 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 326 } }
            set_variable = { rl_offer_3_id = 326 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_327 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 327 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 327 } }
            set_variable = { rl_offer_3_id = 327 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_328 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 328 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 328 } }
            set_variable = { rl_offer_3_id = 328 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_329 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 329 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 329 } }
            set_variable = { rl_offer_3_id = 329 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_330 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 330 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 330 } }
            set_variable = { rl_offer_3_id = 330 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_331 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 331 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 331 } }
            set_variable = { rl_offer_3_id = 331 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_332 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 332 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 332 } }
            set_variable = { rl_offer_3_id = 332 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_333 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 333 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 333 } }
            set_variable = { rl_offer_3_id = 333 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_334 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 334 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 334 } }
            set_variable = { rl_offer_3_id = 334 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_335 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 335 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 335 } }
            set_variable = { rl_offer_3_id = 335 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_336 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 336 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 336 } }
            set_variable = { rl_offer_3_id = 336 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_337 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 337 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 337 } }
            set_variable = { rl_offer_3_id = 337 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_338 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 338 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 338 } }
            set_variable = { rl_offer_3_id = 338 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_339 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 339 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 339 } }
            set_variable = { rl_offer_3_id = 339 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_340 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 340 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 340 } }
            set_variable = { rl_offer_3_id = 340 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_341 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 341 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 341 } }
            set_variable = { rl_offer_3_id = 341 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_342 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 342 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 342 } }
            set_variable = { rl_offer_3_id = 342 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_343 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 343 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 343 } }
            set_variable = { rl_offer_3_id = 343 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_344 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 344 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 344 } }
            set_variable = { rl_offer_3_id = 344 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_345 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 345 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 345 } }
            set_variable = { rl_offer_3_id = 345 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_346 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 346 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 346 } }
            set_variable = { rl_offer_3_id = 346 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_347 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 347 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 347 } }
            set_variable = { rl_offer_3_id = 347 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_348 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 348 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 348 } }
            set_variable = { rl_offer_3_id = 348 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_349 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 349 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 349 } }
            set_variable = { rl_offer_3_id = 349 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_350 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 350 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 350 } }
            set_variable = { rl_offer_3_id = 350 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_351 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 351 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 351 } }
            set_variable = { rl_offer_3_id = 351 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_352 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 352 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 352 } }
            set_variable = { rl_offer_3_id = 352 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_353 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 353 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 353 } }
            set_variable = { rl_offer_3_id = 353 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_354 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 354 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 354 } }
            set_variable = { rl_offer_3_id = 354 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_355 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 355 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 355 } }
            set_variable = { rl_offer_3_id = 355 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_356 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 356 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 356 } }
            set_variable = { rl_offer_3_id = 356 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_357 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 357 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 357 } }
            set_variable = { rl_offer_3_id = 357 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_358 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 358 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 358 } }
            set_variable = { rl_offer_3_id = 358 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_359 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 359 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 359 } }
            set_variable = { rl_offer_3_id = 359 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_360 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 360 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 360 } }
            set_variable = { rl_offer_3_id = 360 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_361 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 361 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 361 } }
            set_variable = { rl_offer_3_id = 361 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_362 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 362 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 362 } }
            set_variable = { rl_offer_3_id = 362 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_363 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 363 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 363 } }
            set_variable = { rl_offer_3_id = 363 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_364 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 364 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 364 } }
            set_variable = { rl_offer_3_id = 364 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_365 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 365 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 365 } }
            set_variable = { rl_offer_3_id = 365 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_366 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 366 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 366 } }
            set_variable = { rl_offer_3_id = 366 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_367 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 367 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 367 } }
            set_variable = { rl_offer_3_id = 367 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_368 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 368 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 368 } }
            set_variable = { rl_offer_3_id = 368 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_369 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 369 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 369 } }
            set_variable = { rl_offer_3_id = 369 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_370 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 370 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 370 } }
            set_variable = { rl_offer_3_id = 370 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_371 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 371 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 371 } }
            set_variable = { rl_offer_3_id = 371 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_372 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 372 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 372 } }
            set_variable = { rl_offer_3_id = 372 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_373 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 373 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 373 } }
            set_variable = { rl_offer_3_id = 373 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_374 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 374 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 374 } }
            set_variable = { rl_offer_3_id = 374 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_375 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 375 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 375 } }
            set_variable = { rl_offer_3_id = 375 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_376 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 376 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 376 } }
            set_variable = { rl_offer_3_id = 376 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_377 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 377 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 377 } }
            set_variable = { rl_offer_3_id = 377 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_378 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 378 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 378 } }
            set_variable = { rl_offer_3_id = 378 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_379 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 379 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 379 } }
            set_variable = { rl_offer_3_id = 379 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_380 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 380 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 380 } }
            set_variable = { rl_offer_3_id = 380 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_381 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 381 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 381 } }
            set_variable = { rl_offer_3_id = 381 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_382 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 382 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 382 } }
            set_variable = { rl_offer_3_id = 382 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_383 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 383 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 383 } }
            set_variable = { rl_offer_3_id = 383 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_384 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 384 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 384 } }
            set_variable = { rl_offer_3_id = 384 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_385 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 385 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 385 } }
            set_variable = { rl_offer_3_id = 385 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_386 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 386 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 386 } }
            set_variable = { rl_offer_3_id = 386 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_387 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 387 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 387 } }
            set_variable = { rl_offer_3_id = 387 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_388 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 388 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 388 } }
            set_variable = { rl_offer_3_id = 388 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_389 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 389 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 389 } }
            set_variable = { rl_offer_3_id = 389 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_390 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 390 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 390 } }
            set_variable = { rl_offer_3_id = 390 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_391 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 391 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 391 } }
            set_variable = { rl_offer_3_id = 391 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_392 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 392 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 392 } }
            set_variable = { rl_offer_3_id = 392 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_393 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 393 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 393 } }
            set_variable = { rl_offer_3_id = 393 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_394 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 394 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 394 } }
            set_variable = { rl_offer_3_id = 394 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_395 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 395 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 395 } }
            set_variable = { rl_offer_3_id = 395 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_396 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 396 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 396 } }
            set_variable = { rl_offer_3_id = 396 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_397 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 397 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 397 } }
            set_variable = { rl_offer_3_id = 397 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_398 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 398 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 398 } }
            set_variable = { rl_offer_3_id = 398 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_399 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 399 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 399 } }
            set_variable = { rl_offer_3_id = 399 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_400 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 400 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 400 } }
            set_variable = { rl_offer_3_id = 400 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_401 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 401 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 401 } }
            set_variable = { rl_offer_3_id = 401 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_402 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 402 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 402 } }
            set_variable = { rl_offer_3_id = 402 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_403 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 403 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 403 } }
            set_variable = { rl_offer_3_id = 403 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_404 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 404 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 404 } }
            set_variable = { rl_offer_3_id = 404 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_405 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 405 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 405 } }
            set_variable = { rl_offer_3_id = 405 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_406 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 406 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 406 } }
            set_variable = { rl_offer_3_id = 406 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_407 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 407 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 407 } }
            set_variable = { rl_offer_3_id = 407 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_408 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 408 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 408 } }
            set_variable = { rl_offer_3_id = 408 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_409 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 409 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 409 } }
            set_variable = { rl_offer_3_id = 409 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_410 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 410 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 410 } }
            set_variable = { rl_offer_3_id = 410 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_411 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 411 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 411 } }
            set_variable = { rl_offer_3_id = 411 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_412 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 412 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 412 } }
            set_variable = { rl_offer_3_id = 412 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_413 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 413 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 413 } }
            set_variable = { rl_offer_3_id = 413 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_414 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 414 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 414 } }
            set_variable = { rl_offer_3_id = 414 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_415 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 415 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 415 } }
            set_variable = { rl_offer_3_id = 415 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_416 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 416 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 416 } }
            set_variable = { rl_offer_3_id = 416 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_417 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 417 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 417 } }
            set_variable = { rl_offer_3_id = 417 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_418 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 418 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 418 } }
            set_variable = { rl_offer_3_id = 418 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_419 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 419 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 419 } }
            set_variable = { rl_offer_3_id = 419 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_420 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 420 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 420 } }
            set_variable = { rl_offer_3_id = 420 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_421 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 421 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 421 } }
            set_variable = { rl_offer_3_id = 421 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_422 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 422 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 422 } }
            set_variable = { rl_offer_3_id = 422 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_423 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 423 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 423 } }
            set_variable = { rl_offer_3_id = 423 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_424 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 424 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 424 } }
            set_variable = { rl_offer_3_id = 424 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_425 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 425 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 425 } }
            set_variable = { rl_offer_3_id = 425 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_426 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 426 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 426 } }
            set_variable = { rl_offer_3_id = 426 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_427 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 427 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 427 } }
            set_variable = { rl_offer_3_id = 427 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_428 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 428 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 428 } }
            set_variable = { rl_offer_3_id = 428 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_429 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 429 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 429 } }
            set_variable = { rl_offer_3_id = 429 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_430 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 430 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 430 } }
            set_variable = { rl_offer_3_id = 430 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_431 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 431 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 431 } }
            set_variable = { rl_offer_3_id = 431 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_432 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 432 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 432 } }
            set_variable = { rl_offer_3_id = 432 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_433 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 433 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 433 } }
            set_variable = { rl_offer_3_id = 433 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_434 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 434 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 434 } }
            set_variable = { rl_offer_3_id = 434 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_435 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 435 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 435 } }
            set_variable = { rl_offer_3_id = 435 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_436 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 436 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 436 } }
            set_variable = { rl_offer_3_id = 436 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_437 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 437 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 437 } }
            set_variable = { rl_offer_3_id = 437 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_438 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 438 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 438 } }
            set_variable = { rl_offer_3_id = 438 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_439 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 439 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 439 } }
            set_variable = { rl_offer_3_id = 439 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_440 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 440 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 440 } }
            set_variable = { rl_offer_3_id = 440 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_441 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 441 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 441 } }
            set_variable = { rl_offer_3_id = 441 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_442 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 442 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 442 } }
            set_variable = { rl_offer_3_id = 442 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_443 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 443 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 443 } }
            set_variable = { rl_offer_3_id = 443 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_444 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 444 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 444 } }
            set_variable = { rl_offer_3_id = 444 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_445 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 445 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 445 } }
            set_variable = { rl_offer_3_id = 445 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_446 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 446 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 446 } }
            set_variable = { rl_offer_3_id = 446 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_447 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 447 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 447 } }
            set_variable = { rl_offer_3_id = 447 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_448 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 448 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 448 } }
            set_variable = { rl_offer_3_id = 448 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_449 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 449 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 449 } }
            set_variable = { rl_offer_3_id = 449 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_450 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 450 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 450 } }
            set_variable = { rl_offer_3_id = 450 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_451 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 451 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 451 } }
            set_variable = { rl_offer_3_id = 451 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_452 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 452 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 452 } }
            set_variable = { rl_offer_3_id = 452 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_453 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 453 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 453 } }
            set_variable = { rl_offer_3_id = 453 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_454 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 454 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 454 } }
            set_variable = { rl_offer_3_id = 454 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_455 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 455 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 455 } }
            set_variable = { rl_offer_3_id = 455 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_456 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 456 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 456 } }
            set_variable = { rl_offer_3_id = 456 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_457 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 457 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 457 } }
            set_variable = { rl_offer_3_id = 457 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_458 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 458 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 458 } }
            set_variable = { rl_offer_3_id = 458 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_459 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 459 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 459 } }
            set_variable = { rl_offer_3_id = 459 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_460 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 460 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 460 } }
            set_variable = { rl_offer_3_id = 460 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_461 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 461 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 461 } }
            set_variable = { rl_offer_3_id = 461 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_462 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 462 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 462 } }
            set_variable = { rl_offer_3_id = 462 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_463 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 463 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 463 } }
            set_variable = { rl_offer_3_id = 463 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_464 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 464 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 464 } }
            set_variable = { rl_offer_3_id = 464 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_465 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 465 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 465 } }
            set_variable = { rl_offer_3_id = 465 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_466 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 466 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 466 } }
            set_variable = { rl_offer_3_id = 466 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_467 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 467 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 467 } }
            set_variable = { rl_offer_3_id = 467 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_468 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 468 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 468 } }
            set_variable = { rl_offer_3_id = 468 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_469 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 469 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 469 } }
            set_variable = { rl_offer_3_id = 469 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_470 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 470 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 470 } }
            set_variable = { rl_offer_3_id = 470 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_471 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 471 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 471 } }
            set_variable = { rl_offer_3_id = 471 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_472 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 472 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 472 } }
            set_variable = { rl_offer_3_id = 472 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_473 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 473 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 473 } }
            set_variable = { rl_offer_3_id = 473 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_474 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 474 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 474 } }
            set_variable = { rl_offer_3_id = 474 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_475 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 475 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 475 } }
            set_variable = { rl_offer_3_id = 475 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_476 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 476 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 476 } }
            set_variable = { rl_offer_3_id = 476 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_477 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 477 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 477 } }
            set_variable = { rl_offer_3_id = 477 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_478 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 478 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 478 } }
            set_variable = { rl_offer_3_id = 478 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_479 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 479 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 479 } }
            set_variable = { rl_offer_3_id = 479 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_480 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 480 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 480 } }
            set_variable = { rl_offer_3_id = 480 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_481 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 481 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 481 } }
            set_variable = { rl_offer_3_id = 481 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_482 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 482 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 482 } }
            set_variable = { rl_offer_3_id = 482 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_483 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 483 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 483 } }
            set_variable = { rl_offer_3_id = 483 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_484 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 484 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 484 } }
            set_variable = { rl_offer_3_id = 484 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_485 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 485 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 485 } }
            set_variable = { rl_offer_3_id = 485 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_486 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 486 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 486 } }
            set_variable = { rl_offer_3_id = 486 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_487 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 487 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 487 } }
            set_variable = { rl_offer_3_id = 487 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_488 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 488 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 488 } }
            set_variable = { rl_offer_3_id = 488 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_489 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 489 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 489 } }
            set_variable = { rl_offer_3_id = 489 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_490 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 490 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 490 } }
            set_variable = { rl_offer_3_id = 490 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_491 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 491 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 491 } }
            set_variable = { rl_offer_3_id = 491 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_492 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 492 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 492 } }
            set_variable = { rl_offer_3_id = 492 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_493 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 493 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 493 } }
            set_variable = { rl_offer_3_id = 493 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_494 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 494 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 494 } }
            set_variable = { rl_offer_3_id = 494 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_495 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 495 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 495 } }
            set_variable = { rl_offer_3_id = 495 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_496 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 496 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 496 } }
            set_variable = { rl_offer_3_id = 496 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_497 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 497 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 497 } }
            set_variable = { rl_offer_3_id = 497 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_498 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 498 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 498 } }
            set_variable = { rl_offer_3_id = 498 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_499 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 499 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 499 } }
            set_variable = { rl_offer_3_id = 499 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_500 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 500 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 500 } }
            set_variable = { rl_offer_3_id = 500 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_501 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 501 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 501 } }
            set_variable = { rl_offer_3_id = 501 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_502 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 502 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 502 } }
            set_variable = { rl_offer_3_id = 502 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_503 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 503 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 503 } }
            set_variable = { rl_offer_3_id = 503 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_504 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 504 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 504 } }
            set_variable = { rl_offer_3_id = 504 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_505 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 505 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 505 } }
            set_variable = { rl_offer_3_id = 505 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_506 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 506 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 506 } }
            set_variable = { rl_offer_3_id = 506 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_507 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 507 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 507 } }
            set_variable = { rl_offer_3_id = 507 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_508 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 508 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 508 } }
            set_variable = { rl_offer_3_id = 508 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_509 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 509 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 509 } }
            set_variable = { rl_offer_3_id = 509 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_510 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 510 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 510 } }
            set_variable = { rl_offer_3_id = 510 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_511 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 511 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 511 } }
            set_variable = { rl_offer_3_id = 511 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_512 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 512 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 512 } }
            set_variable = { rl_offer_3_id = 512 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_513 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 513 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 513 } }
            set_variable = { rl_offer_3_id = 513 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_514 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 514 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 514 } }
            set_variable = { rl_offer_3_id = 514 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_515 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 515 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 515 } }
            set_variable = { rl_offer_3_id = 515 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_516 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 516 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 516 } }
            set_variable = { rl_offer_3_id = 516 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_517 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 517 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 517 } }
            set_variable = { rl_offer_3_id = 517 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_518 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 518 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 518 } }
            set_variable = { rl_offer_3_id = 518 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_519 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 519 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 519 } }
            set_variable = { rl_offer_3_id = 519 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_520 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 520 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 520 } }
            set_variable = { rl_offer_3_id = 520 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_521 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 521 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 521 } }
            set_variable = { rl_offer_3_id = 521 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_522 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 522 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 522 } }
            set_variable = { rl_offer_3_id = 522 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_523 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 523 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 523 } }
            set_variable = { rl_offer_3_id = 523 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_524 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 524 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 524 } }
            set_variable = { rl_offer_3_id = 524 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_525 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 525 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 525 } }
            set_variable = { rl_offer_3_id = 525 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_526 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 526 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 526 } }
            set_variable = { rl_offer_3_id = 526 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_527 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 527 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 527 } }
            set_variable = { rl_offer_3_id = 527 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_528 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 528 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 528 } }
            set_variable = { rl_offer_3_id = 528 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_529 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 529 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 529 } }
            set_variable = { rl_offer_3_id = 529 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_530 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 530 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 530 } }
            set_variable = { rl_offer_3_id = 530 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_531 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 531 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 531 } }
            set_variable = { rl_offer_3_id = 531 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_532 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 532 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 532 } }
            set_variable = { rl_offer_3_id = 532 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_533 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 533 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 533 } }
            set_variable = { rl_offer_3_id = 533 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_534 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 534 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 534 } }
            set_variable = { rl_offer_3_id = 534 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_535 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 535 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 535 } }
            set_variable = { rl_offer_3_id = 535 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_536 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 536 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 536 } }
            set_variable = { rl_offer_3_id = 536 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_537 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 537 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 537 } }
            set_variable = { rl_offer_3_id = 537 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_538 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 538 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 538 } }
            set_variable = { rl_offer_3_id = 538 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_539 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 539 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 539 } }
            set_variable = { rl_offer_3_id = 539 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_540 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 540 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 540 } }
            set_variable = { rl_offer_3_id = 540 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_541 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 541 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 541 } }
            set_variable = { rl_offer_3_id = 541 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_542 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 542 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 542 } }
            set_variable = { rl_offer_3_id = 542 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_543 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 543 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 543 } }
            set_variable = { rl_offer_3_id = 543 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_544 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 544 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 544 } }
            set_variable = { rl_offer_3_id = 544 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_545 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 545 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 545 } }
            set_variable = { rl_offer_3_id = 545 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_546 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 546 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 546 } }
            set_variable = { rl_offer_3_id = 546 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_547 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 547 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 547 } }
            set_variable = { rl_offer_3_id = 547 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_548 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 548 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 548 } }
            set_variable = { rl_offer_3_id = 548 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_549 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 549 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 549 } }
            set_variable = { rl_offer_3_id = 549 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_550 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 550 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 550 } }
            set_variable = { rl_offer_3_id = 550 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_551 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 551 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 551 } }
            set_variable = { rl_offer_3_id = 551 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_552 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 552 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 552 } }
            set_variable = { rl_offer_3_id = 552 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_553 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 553 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 553 } }
            set_variable = { rl_offer_3_id = 553 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_554 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 554 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 554 } }
            set_variable = { rl_offer_3_id = 554 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_555 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 555 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 555 } }
            set_variable = { rl_offer_3_id = 555 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_556 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 556 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 556 } }
            set_variable = { rl_offer_3_id = 556 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_557 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 557 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 557 } }
            set_variable = { rl_offer_3_id = 557 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_558 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 558 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 558 } }
            set_variable = { rl_offer_3_id = 558 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_559 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 559 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 559 } }
            set_variable = { rl_offer_3_id = 559 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_560 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 560 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 560 } }
            set_variable = { rl_offer_3_id = 560 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_561 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 561 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 561 } }
            set_variable = { rl_offer_3_id = 561 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_562 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 562 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 562 } }
            set_variable = { rl_offer_3_id = 562 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_563 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 563 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 563 } }
            set_variable = { rl_offer_3_id = 563 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_564 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 564 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 564 } }
            set_variable = { rl_offer_3_id = 564 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_565 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 565 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 565 } }
            set_variable = { rl_offer_3_id = 565 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_566 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 566 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 566 } }
            set_variable = { rl_offer_3_id = 566 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_567 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 567 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 567 } }
            set_variable = { rl_offer_3_id = 567 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_568 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 568 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 568 } }
            set_variable = { rl_offer_3_id = 568 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_569 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 569 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 569 } }
            set_variable = { rl_offer_3_id = 569 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_570 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 570 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 570 } }
            set_variable = { rl_offer_3_id = 570 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_571 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 571 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 571 } }
            set_variable = { rl_offer_3_id = 571 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_572 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 572 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 572 } }
            set_variable = { rl_offer_3_id = 572 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_573 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 573 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 573 } }
            set_variable = { rl_offer_3_id = 573 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_574 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 574 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 574 } }
            set_variable = { rl_offer_3_id = 574 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_575 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 575 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 575 } }
            set_variable = { rl_offer_3_id = 575 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_576 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 576 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 576 } }
            set_variable = { rl_offer_3_id = 576 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_577 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 577 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 577 } }
            set_variable = { rl_offer_3_id = 577 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_578 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 578 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 578 } }
            set_variable = { rl_offer_3_id = 578 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_579 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 579 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 579 } }
            set_variable = { rl_offer_3_id = 579 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_580 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 580 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 580 } }
            set_variable = { rl_offer_3_id = 580 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_581 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 581 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 581 } }
            set_variable = { rl_offer_3_id = 581 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_582 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 582 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 582 } }
            set_variable = { rl_offer_3_id = 582 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_583 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 583 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 583 } }
            set_variable = { rl_offer_3_id = 583 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_584 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 584 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 584 } }
            set_variable = { rl_offer_3_id = 584 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_585 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 585 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 585 } }
            set_variable = { rl_offer_3_id = 585 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_586 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 586 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 586 } }
            set_variable = { rl_offer_3_id = 586 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_587 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 587 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 587 } }
            set_variable = { rl_offer_3_id = 587 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_588 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 588 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 588 } }
            set_variable = { rl_offer_3_id = 588 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_589 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 589 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 589 } }
            set_variable = { rl_offer_3_id = 589 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_590 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 590 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 590 } }
            set_variable = { rl_offer_3_id = 590 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_591 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 591 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 591 } }
            set_variable = { rl_offer_3_id = 591 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_592 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 592 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 592 } }
            set_variable = { rl_offer_3_id = 592 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_593 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 593 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 593 } }
            set_variable = { rl_offer_3_id = 593 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_594 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 594 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 594 } }
            set_variable = { rl_offer_3_id = 594 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_595 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 595 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 595 } }
            set_variable = { rl_offer_3_id = 595 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_596 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 596 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 596 } }
            set_variable = { rl_offer_3_id = 596 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_597 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 597 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 597 } }
            set_variable = { rl_offer_3_id = 597 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_598 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 598 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 598 } }
            set_variable = { rl_offer_3_id = 598 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_599 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 599 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 599 } }
            set_variable = { rl_offer_3_id = 599 }
        }
        1 = {
            modifier = { factor = 0 has_country_flag = rl_banned_600 }
            modifier = { factor = 0 check_variable = { rl_offer_1_id = 600 } }
            modifier = { factor = 0 check_variable = { rl_offer_2_id = 600 } }
            set_variable = { rl_offer_3_id = 600 }
        }
    }
    rl_roll_rarity_3 = yes
}


rl_generate_three_offers = {
    rl_clear_offer_variables = yes
    rl_sync_rarity_distribution = yes
    if = {
        limit = { has_country_flag = rl_has_locked_offer }
        set_variable = { rl_offer_1_id = rl_locked_offer_id }
        set_variable = { rl_offer_1_rarity = rl_locked_offer_rarity }
        clr_country_flag = rl_has_locked_offer
        set_variable = { rl_locked_offer_id = 0 }
        set_variable = { rl_locked_offer_rarity = 0 }
        rl_roll_offer_2 = yes
        rl_roll_offer_3 = yes
    }
    else = {
        rl_roll_offer_1 = yes
        rl_roll_offer_2 = yes
        rl_roll_offer_3 = yes
    }
    set_country_flag = rl_offers_ready
}


rl_reset_tech_results = {
    set_variable = { rl_tech_result_count = 0 }
    set_variable = { rl_tech_result_1 = 0 }
    set_variable = { rl_tech_result_2 = 0 }
    set_variable = { rl_tech_result_3 = 0 }
    set_variable = { rl_tech_result_4 = 0 }
    set_variable = { rl_tech_result_5 = 0 }
    set_variable = { rl_tech_result_6 = 0 }
    set_variable = { rl_tech_result_7 = 0 }
    set_variable = { rl_tech_result_8 = 0 }
    set_variable = { rl_tech_result_9 = 0 }
    set_variable = { rl_tech_result_10 = 0 }
    set_variable = { rl_tech_result_11 = 0 }
    set_variable = { rl_tech_result_12 = 0 }
    clr_country_flag = rl_batch_tech_1
    clr_country_flag = rl_batch_tech_2
    clr_country_flag = rl_batch_tech_3
    clr_country_flag = rl_batch_tech_4
    clr_country_flag = rl_batch_tech_5
    clr_country_flag = rl_batch_tech_6
    clr_country_flag = rl_batch_tech_7
    clr_country_flag = rl_batch_tech_8
    clr_country_flag = rl_batch_tech_9
    clr_country_flag = rl_batch_tech_10
    clr_country_flag = rl_batch_tech_11
    clr_country_flag = rl_batch_tech_12
    clr_country_flag = rl_batch_tech_13
    clr_country_flag = rl_batch_tech_14
    clr_country_flag = rl_batch_tech_15
    clr_country_flag = rl_batch_tech_16
    clr_country_flag = rl_batch_tech_17
    clr_country_flag = rl_batch_tech_18
    clr_country_flag = rl_batch_tech_19
    clr_country_flag = rl_batch_tech_20
    clr_country_flag = rl_batch_tech_21
    clr_country_flag = rl_batch_tech_22
    clr_country_flag = rl_batch_tech_23
    clr_country_flag = rl_batch_tech_24
    clr_country_flag = rl_batch_tech_25
    clr_country_flag = rl_batch_tech_26
    clr_country_flag = rl_batch_tech_27
    clr_country_flag = rl_batch_tech_28
    clr_country_flag = rl_batch_tech_29
    clr_country_flag = rl_batch_tech_30
    clr_country_flag = rl_batch_tech_31
    clr_country_flag = rl_batch_tech_32
    clr_country_flag = rl_batch_tech_33
    clr_country_flag = rl_batch_tech_34
    clr_country_flag = rl_batch_tech_35
    clr_country_flag = rl_batch_tech_36
    clr_country_flag = rl_batch_tech_37
    clr_country_flag = rl_batch_tech_38
    clr_country_flag = rl_batch_tech_39
    clr_country_flag = rl_batch_tech_40
}

rl_record_random_tech_1 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 1 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_2 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 2 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 2 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_3 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 3 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 3 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_4 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 4 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 4 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_5 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 5 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 5 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_6 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 6 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 6 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_7 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 7 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 7 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_8 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 8 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 8 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_9 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 9 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 9 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_10 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 10 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 10 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_11 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 11 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 11 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_12 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 12 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 12 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_13 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 13 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 13 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_14 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 14 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 14 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_15 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 15 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 15 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_16 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 16 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 16 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_17 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 17 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 17 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_18 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 18 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 18 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_19 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 19 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 19 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_20 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 20 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 20 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_21 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 21 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 21 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_22 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 22 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 22 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_23 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 23 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 23 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_24 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 24 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 24 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_25 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 25 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 25 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_26 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 26 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 26 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_27 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 27 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 27 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_28 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 28 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 28 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_29 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 29 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 29 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_30 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 30 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 30 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_31 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 31 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 31 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_32 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 32 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 32 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_33 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 33 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 33 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_34 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 34 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 34 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_35 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 35 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 35 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_36 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 36 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 36 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_37 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 37 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 37 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_38 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 38 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 38 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_39 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 39 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 39 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_record_random_tech_40 = {
    if = {
        limit = { check_variable = { rl_tech_result_count = 0 } }
        set_variable = { rl_tech_result_1 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 1 } }
        set_variable = { rl_tech_result_2 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 2 } }
        set_variable = { rl_tech_result_3 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 3 } }
        set_variable = { rl_tech_result_4 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 4 } }
        set_variable = { rl_tech_result_5 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 5 } }
        set_variable = { rl_tech_result_6 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 6 } }
        set_variable = { rl_tech_result_7 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 7 } }
        set_variable = { rl_tech_result_8 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 8 } }
        set_variable = { rl_tech_result_9 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 9 } }
        set_variable = { rl_tech_result_10 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 10 } }
        set_variable = { rl_tech_result_11 = 40 }
    }
    else_if = {
        limit = { check_variable = { rl_tech_result_count = 11 } }
        set_variable = { rl_tech_result_12 = 40 }
    }
    add_to_variable = { rl_tech_result_count = 1 }
    add_to_variable = { rl_random_techs_granted = 1 }
}

rl_grant_one_random_tech = {
    random_list = {
        1 = {
            modifier = { factor = 0 OR = { has_tech = infantry_weapons has_country_flag = rl_batch_tech_1 } }
            set_technology = { infantry_weapons = 1 popup = no }
            set_country_flag = rl_batch_tech_1
            rl_record_random_tech_1 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = infantry_weapons1 has_country_flag = rl_batch_tech_2 } }
            set_technology = { infantry_weapons1 = 1 popup = no }
            set_country_flag = rl_batch_tech_2
            rl_record_random_tech_2 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = infantry_weapons2 has_country_flag = rl_batch_tech_3 } }
            set_technology = { infantry_weapons2 = 1 popup = no }
            set_country_flag = rl_batch_tech_3
            rl_record_random_tech_3 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = improved_infantry_weapons has_country_flag = rl_batch_tech_4 } }
            set_technology = { improved_infantry_weapons = 1 popup = no }
            set_country_flag = rl_batch_tech_4
            rl_record_random_tech_4 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = support_weapons has_country_flag = rl_batch_tech_5 } }
            set_technology = { support_weapons = 1 popup = no }
            set_country_flag = rl_batch_tech_5
            rl_record_random_tech_5 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = support_weapons2 has_country_flag = rl_batch_tech_6 } }
            set_technology = { support_weapons2 = 1 popup = no }
            set_country_flag = rl_batch_tech_6
            rl_record_random_tech_6 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = support_weapons3 has_country_flag = rl_batch_tech_7 } }
            set_technology = { support_weapons3 = 1 popup = no }
            set_country_flag = rl_batch_tech_7
            rl_record_random_tech_7 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = support_weapons4 has_country_flag = rl_batch_tech_8 } }
            set_technology = { support_weapons4 = 1 popup = no }
            set_country_flag = rl_batch_tech_8
            rl_record_random_tech_8 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_engineers has_country_flag = rl_batch_tech_9 } }
            set_technology = { tech_engineers = 1 popup = no }
            set_country_flag = rl_batch_tech_9
            rl_record_random_tech_9 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_engineers2 has_country_flag = rl_batch_tech_10 } }
            set_technology = { tech_engineers2 = 1 popup = no }
            set_country_flag = rl_batch_tech_10
            rl_record_random_tech_10 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_engineers3 has_country_flag = rl_batch_tech_11 } }
            set_technology = { tech_engineers3 = 1 popup = no }
            set_country_flag = rl_batch_tech_11
            rl_record_random_tech_11 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_engineers4 has_country_flag = rl_batch_tech_12 } }
            set_technology = { tech_engineers4 = 1 popup = no }
            set_country_flag = rl_batch_tech_12
            rl_record_random_tech_12 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_recon has_country_flag = rl_batch_tech_13 } }
            set_technology = { tech_recon = 1 popup = no }
            set_country_flag = rl_batch_tech_13
            rl_record_random_tech_13 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_recon2 has_country_flag = rl_batch_tech_14 } }
            set_technology = { tech_recon2 = 1 popup = no }
            set_country_flag = rl_batch_tech_14
            rl_record_random_tech_14 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_recon3 has_country_flag = rl_batch_tech_15 } }
            set_technology = { tech_recon3 = 1 popup = no }
            set_country_flag = rl_batch_tech_15
            rl_record_random_tech_15 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = tech_recon4 has_country_flag = rl_batch_tech_16 } }
            set_technology = { tech_recon4 = 1 popup = no }
            set_country_flag = rl_batch_tech_16
            rl_record_random_tech_16 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = artillery1 has_country_flag = rl_batch_tech_17 } }
            set_technology = { artillery1 = 1 popup = no }
            set_country_flag = rl_batch_tech_17
            rl_record_random_tech_17 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = artillery2 has_country_flag = rl_batch_tech_18 } }
            set_technology = { artillery2 = 1 popup = no }
            set_country_flag = rl_batch_tech_18
            rl_record_random_tech_18 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = artillery3 has_country_flag = rl_batch_tech_19 } }
            set_technology = { artillery3 = 1 popup = no }
            set_country_flag = rl_batch_tech_19
            rl_record_random_tech_19 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = artillery4 has_country_flag = rl_batch_tech_20 } }
            set_technology = { artillery4 = 1 popup = no }
            set_country_flag = rl_batch_tech_20
            rl_record_random_tech_20 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = basic_machine_tools has_country_flag = rl_batch_tech_21 } }
            set_technology = { basic_machine_tools = 1 popup = no }
            set_country_flag = rl_batch_tech_21
            rl_record_random_tech_21 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = improved_machine_tools has_country_flag = rl_batch_tech_22 } }
            set_technology = { improved_machine_tools = 1 popup = no }
            set_country_flag = rl_batch_tech_22
            rl_record_random_tech_22 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = advanced_machine_tools has_country_flag = rl_batch_tech_23 } }
            set_technology = { advanced_machine_tools = 1 popup = no }
            set_country_flag = rl_batch_tech_23
            rl_record_random_tech_23 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = assembly_line_production has_country_flag = rl_batch_tech_24 } }
            set_technology = { assembly_line_production = 1 popup = no }
            set_country_flag = rl_batch_tech_24
            rl_record_random_tech_24 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = flexible_line has_country_flag = rl_batch_tech_25 } }
            set_technology = { flexible_line = 1 popup = no }
            set_country_flag = rl_batch_tech_25
            rl_record_random_tech_25 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = streamlined_line has_country_flag = rl_batch_tech_26 } }
            set_technology = { streamlined_line = 1 popup = no }
            set_country_flag = rl_batch_tech_26
            rl_record_random_tech_26 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = construction1 has_country_flag = rl_batch_tech_27 } }
            set_technology = { construction1 = 1 popup = no }
            set_country_flag = rl_batch_tech_27
            rl_record_random_tech_27 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = construction2 has_country_flag = rl_batch_tech_28 } }
            set_technology = { construction2 = 1 popup = no }
            set_country_flag = rl_batch_tech_28
            rl_record_random_tech_28 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = construction3 has_country_flag = rl_batch_tech_29 } }
            set_technology = { construction3 = 1 popup = no }
            set_country_flag = rl_batch_tech_29
            rl_record_random_tech_29 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = construction4 has_country_flag = rl_batch_tech_30 } }
            set_technology = { construction4 = 1 popup = no }
            set_country_flag = rl_batch_tech_30
            rl_record_random_tech_30 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = excavation1 has_country_flag = rl_batch_tech_31 } }
            set_technology = { excavation1 = 1 popup = no }
            set_country_flag = rl_batch_tech_31
            rl_record_random_tech_31 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = excavation2 has_country_flag = rl_batch_tech_32 } }
            set_technology = { excavation2 = 1 popup = no }
            set_country_flag = rl_batch_tech_32
            rl_record_random_tech_32 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = excavation3 has_country_flag = rl_batch_tech_33 } }
            set_technology = { excavation3 = 1 popup = no }
            set_country_flag = rl_batch_tech_33
            rl_record_random_tech_33 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = excavation4 has_country_flag = rl_batch_tech_34 } }
            set_technology = { excavation4 = 1 popup = no }
            set_country_flag = rl_batch_tech_34
            rl_record_random_tech_34 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = electronic_mechanical_engineering has_country_flag = rl_batch_tech_35 } }
            set_technology = { electronic_mechanical_engineering = 1 popup = no }
            set_country_flag = rl_batch_tech_35
            rl_record_random_tech_35 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = radio has_country_flag = rl_batch_tech_36 } }
            set_technology = { radio = 1 popup = no }
            set_country_flag = rl_batch_tech_36
            rl_record_random_tech_36 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = radio_detection has_country_flag = rl_batch_tech_37 } }
            set_technology = { radio_detection = 1 popup = no }
            set_country_flag = rl_batch_tech_37
            rl_record_random_tech_37 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = computing_machine has_country_flag = rl_batch_tech_38 } }
            set_technology = { computing_machine = 1 popup = no }
            set_country_flag = rl_batch_tech_38
            rl_record_random_tech_38 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = improved_computing_machine has_country_flag = rl_batch_tech_39 } }
            set_technology = { improved_computing_machine = 1 popup = no }
            set_country_flag = rl_batch_tech_39
            rl_record_random_tech_39 = yes
        }
        1 = {
            modifier = { factor = 0 OR = { has_tech = advanced_computing_machine has_country_flag = rl_batch_tech_40 } }
            set_technology = { advanced_computing_machine = 1 popup = no }
            set_country_flag = rl_batch_tech_40
            rl_record_random_tech_40 = yes
        }
    }
}

rl_apply_selected_upgrade = {
    if = {
        limit = { has_global_flag = rl_ruleset_hardcore }
        rl_hc_try_grant_selected_upgrade = yes
    }
    else = { rl_apply_selected_upgrade_direct = yes }
}

rl_apply_selected_upgrade_direct = {
    rl_reset_tech_results = yes
    add_to_variable = { rl_total_upgrades = 1 }
    if = { limit = { check_variable = { rl_selected_rarity = 1 } } add_to_variable = { rl_common_count = 1 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 2 } } add_to_variable = { rl_rare_count = 1 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 3 } } add_to_variable = { rl_epic_count = 1 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 4 } } add_to_variable = { rl_legendary_count = 1 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 5 } } add_to_variable = { rl_divine_count = 1 } }
    if = {
        limit = { check_variable = { rl_selected_id = 1 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 2 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 3 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 4 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 5 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 6 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 7 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 8 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 9 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 10 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 11 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 12 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 13 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 14 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 15 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 16 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 17 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 18 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_min_export = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_min_export = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_min_export = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_min_export = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_min_export = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 19 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 20 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_fuel_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_fuel_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 21 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 22 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 23 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 24 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 3.2 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 25 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 26 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 27 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 28 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 29 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 30 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 31 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 32 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 33 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 34 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 35 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 36 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.15 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -1.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -2.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 37 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 38 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 39 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 40 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 41 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 42 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 43 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 44 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 45 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_planning_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 46 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_planning_speed = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_planning_speed = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_planning_speed = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_planning_speed = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_planning_speed = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 47 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 48 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 49 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 50 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 51 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 52 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_out_of_supply_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 53 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 54 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 55 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_loss_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_loss_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 56 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 1.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 3.2 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 57 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_command_power = 10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_command_power = 20 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_command_power = 40 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_command_power = 80 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_command_power = 160 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 58 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 59 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 60 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 61 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 62 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 63 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 64 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_org_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 65 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 66 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 67 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 68 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 69 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 70 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 71 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 72 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 73 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 74 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 75 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 76 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 77 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 78 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 79 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = 0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = 1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 80 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 81 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 82 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 83 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 84 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 85 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 86 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 87 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 88 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = -1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 89 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = -1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 90 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 91 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 92 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 93 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 94 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_gain = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_gain = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_gain = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_gain = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_gain = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 95 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 96 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 97 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_manpower = 100000
            add_to_variable = { rl_manpower_granted = 100000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_manpower = 250000
            add_to_variable = { rl_manpower_granted = 250000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_manpower = 500000
            add_to_variable = { rl_manpower_granted = 500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_manpower = 1000000
            add_to_variable = { rl_manpower_granted = 1000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_manpower = 2500000
            add_to_variable = { rl_manpower_granted = 2500000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 98 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 99 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = 1 }
            add_to_variable = { rl_mod_decryption = 1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = 2 }
            add_to_variable = { rl_mod_decryption = 2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = 4 }
            add_to_variable = { rl_mod_decryption = 4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = 8 }
            add_to_variable = { rl_mod_decryption = 8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = 16 }
            add_to_variable = { rl_mod_decryption = 16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 100 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_core_forge_chance = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_core_forge_chance = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_core_forge_chance = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_core_forge_chance = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_core_forge_chance = 16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 101 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 102 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.05 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.1 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.2 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.4 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.8 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 103 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.04 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.08 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.16 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.32 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.64 }
            add_to_variable = { rl_mod_repair_speed_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 104 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.08 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.16 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.32 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.64 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 1.28 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 105 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.1 }
            add_to_variable = { rl_mod_local_resources_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.2 }
            add_to_variable = { rl_mod_local_resources_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.4 }
            add_to_variable = { rl_mod_local_resources_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.8 }
            add_to_variable = { rl_mod_local_resources_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 1.6 }
            add_to_variable = { rl_mod_local_resources_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 106 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.12 }
            add_to_variable = { rl_mod_air_range_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.24 }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.48 }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.96 }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 1.92 }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 107 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 108 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_min_export = -0.03 }
            add_to_variable = { rl_mod_local_resources_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_min_export = -0.06 }
            add_to_variable = { rl_mod_local_resources_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_min_export = -0.12 }
            add_to_variable = { rl_mod_local_resources_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_min_export = -0.24 }
            add_to_variable = { rl_mod_local_resources_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_min_export = -0.48 }
            add_to_variable = { rl_mod_local_resources_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 109 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.02 }
            add_to_variable = { rl_mod_political_power_gain = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
            add_to_variable = { rl_mod_political_power_gain = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
            add_to_variable = { rl_mod_political_power_gain = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
            add_to_variable = { rl_mod_political_power_gain = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
            add_to_variable = { rl_mod_political_power_gain = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 110 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.1 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.2 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.4 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.8 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = 1.6 }
            add_to_variable = { rl_mod_fuel_gain_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 111 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.8 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_fuel_factor = 1.6 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 112 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.12 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.24 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.48 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.96 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.92 }
            add_to_variable = { rl_mod_equipment_capture_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 113 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.08 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.16 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.32 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.64 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -1.28 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 114 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.1 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.2 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.4 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.8 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = 1.6 }
            add_to_variable = { rl_mod_repair_speed_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 115 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.08 }
            add_to_variable = { rl_mod_stability_factor = 0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.16 }
            add_to_variable = { rl_mod_stability_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.32 }
            add_to_variable = { rl_mod_stability_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.64 }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -1.28 }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 116 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -1.6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 117 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.06 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.12 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.24 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.48 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.96 }
            add_to_variable = { rl_mod_out_of_supply_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 118 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
            add_to_variable = { rl_mod_max_planning_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
            add_to_variable = { rl_mod_max_planning_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
            add_to_variable = { rl_mod_max_planning_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
            add_to_variable = { rl_mod_max_planning_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
            add_to_variable = { rl_mod_max_planning_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 119 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.1 }
            add_to_variable = { rl_mod_armor_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.2 }
            add_to_variable = { rl_mod_armor_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.4 }
            add_to_variable = { rl_mod_armor_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.8 }
            add_to_variable = { rl_mod_armor_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -1.6 }
            add_to_variable = { rl_mod_armor_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 120 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
            add_to_variable = { rl_mod_war_support_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
            add_to_variable = { rl_mod_war_support_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
            add_to_variable = { rl_mod_war_support_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
            add_to_variable = { rl_mod_war_support_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
            add_to_variable = { rl_mod_war_support_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 121 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_max_planning_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_max_planning_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_max_planning_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_max_planning_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_max_planning_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 122 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.04 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 123 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_planning_speed = 0.08 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_planning_speed = 0.16 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_planning_speed = 0.32 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_planning_speed = 0.64 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_planning_speed = 1.28 }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 124 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.04 }
            add_to_variable = { rl_mod_army_org_regain = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.08 }
            add_to_variable = { rl_mod_army_org_regain = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.16 }
            add_to_variable = { rl_mod_army_org_regain = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.32 }
            add_to_variable = { rl_mod_army_org_regain = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.64 }
            add_to_variable = { rl_mod_army_org_regain = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 125 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = -1.28 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 126 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_loss_factor = -1.6 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 127 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.15 }
            add_to_variable = { rl_mod_max_command_power = 5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.3 }
            add_to_variable = { rl_mod_max_command_power = 10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.6 }
            add_to_variable = { rl_mod_max_command_power = 20 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 1.2 }
            add_to_variable = { rl_mod_max_command_power = 40 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 2.4 }
            add_to_variable = { rl_mod_max_command_power = 80 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 128 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.08 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.16 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.32 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.64 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -1.28 }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 129 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 130 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 131 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.02 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 132 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.03 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.06 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.12 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.24 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.48 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 133 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_planning_speed = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_planning_speed = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_planning_speed = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_planning_speed = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_planning_speed = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 134 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.06 }
            add_to_variable = { rl_mod_special_forces_cap = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.12 }
            add_to_variable = { rl_mod_special_forces_cap = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.24 }
            add_to_variable = { rl_mod_special_forces_cap = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.48 }
            add_to_variable = { rl_mod_special_forces_cap = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.96 }
            add_to_variable = { rl_mod_special_forces_cap = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 135 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.05 }
            add_to_variable = { rl_mod_max_planning_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.1 }
            add_to_variable = { rl_mod_max_planning_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.2 }
            add_to_variable = { rl_mod_max_planning_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.4 }
            add_to_variable = { rl_mod_max_planning_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.8 }
            add_to_variable = { rl_mod_max_planning_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 136 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 137 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = 0.06 }
            add_to_variable = { rl_mod_army_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = 0.12 }
            add_to_variable = { rl_mod_army_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = 0.24 }
            add_to_variable = { rl_mod_army_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = 0.48 }
            add_to_variable = { rl_mod_army_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = 0.96 }
            add_to_variable = { rl_mod_army_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 138 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.05 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.1 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.2 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.4 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.8 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 139 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 140 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = 0.03 }
            add_manpower = 75000
            add_to_variable = { rl_manpower_granted = 75000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = 0.06 }
            add_manpower = 175000
            add_to_variable = { rl_manpower_granted = 175000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = 0.12 }
            add_manpower = 350000
            add_to_variable = { rl_manpower_granted = 350000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = 0.24 }
            add_manpower = 750000
            add_to_variable = { rl_manpower_granted = 750000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = 0.48 }
            add_manpower = 1750000
            add_to_variable = { rl_manpower_granted = 1750000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 141 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_armor_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_armor_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_armor_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_armor_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_armor_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 142 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.07 }
            add_to_variable = { rl_mod_army_speed_factor = 0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.14 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.28 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.56 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 1.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 143 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.05 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.1 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.2 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.4 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.8 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 144 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.05 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.1 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.2 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.4 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.8 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 145 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_attack_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 146 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 147 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 148 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.06 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.24 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.48 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.96 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 149 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.05 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.1 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.2 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.4 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.8 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 150 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.06 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.24 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.48 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.96 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 151 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.04 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 152 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.05 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.1 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.2 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.4 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.8 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 153 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
            add_to_variable = { rl_mod_planning_speed = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.1 }
            add_to_variable = { rl_mod_planning_speed = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.2 }
            add_to_variable = { rl_mod_planning_speed = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.4 }
            add_to_variable = { rl_mod_planning_speed = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.8 }
            add_to_variable = { rl_mod_planning_speed = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 154 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.02 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.04 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.08 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.16 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.32 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 155 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = 0.04 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = 0.08 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = 0.16 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = 0.32 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = 0.64 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 156 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.05 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.1 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.2 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.4 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.8 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 157 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.08 }
            add_to_variable = { rl_mod_positioning = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.16 }
            add_to_variable = { rl_mod_positioning = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.32 }
            add_to_variable = { rl_mod_positioning = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.64 }
            add_to_variable = { rl_mod_positioning = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.28 }
            add_to_variable = { rl_mod_positioning = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 158 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.08 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.16 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.32 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.64 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.28 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 159 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.06 }
            add_to_variable = { rl_mod_screening_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.12 }
            add_to_variable = { rl_mod_screening_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.24 }
            add_to_variable = { rl_mod_screening_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.48 }
            add_to_variable = { rl_mod_screening_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.96 }
            add_to_variable = { rl_mod_screening_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 160 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.06 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.12 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.24 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.48 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.96 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 161 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 162 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.1 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.2 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.4 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.8 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.6 }
            add_to_variable = { rl_mod_navy_max_range_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 163 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 1.6 }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 164 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.06 }
            add_to_variable = { rl_mod_screening_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.12 }
            add_to_variable = { rl_mod_screening_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.24 }
            add_to_variable = { rl_mod_screening_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.48 }
            add_to_variable = { rl_mod_screening_efficiency = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.96 }
            add_to_variable = { rl_mod_screening_efficiency = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 165 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.07 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.14 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.28 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.56 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 1.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 166 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.05 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.1 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.2 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.4 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.8 }
            add_to_variable = { rl_mod_naval_morale_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 167 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.1 }
            add_to_variable = { rl_mod_spotting_chance = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.2 }
            add_to_variable = { rl_mod_spotting_chance = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.4 }
            add_to_variable = { rl_mod_spotting_chance = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.8 }
            add_to_variable = { rl_mod_spotting_chance = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.6 }
            add_to_variable = { rl_mod_spotting_chance = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 168 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 1.6 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 169 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.03 }
            add_to_variable = { rl_mod_navy_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.06 }
            add_to_variable = { rl_mod_navy_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.12 }
            add_to_variable = { rl_mod_navy_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.24 }
            add_to_variable = { rl_mod_navy_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.48 }
            add_to_variable = { rl_mod_navy_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 170 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.06 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 171 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 172 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.05 }
            add_to_variable = { rl_mod_air_agility_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.1 }
            add_to_variable = { rl_mod_air_agility_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.2 }
            add_to_variable = { rl_mod_air_agility_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.4 }
            add_to_variable = { rl_mod_air_agility_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.8 }
            add_to_variable = { rl_mod_air_agility_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 173 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.06 }
            add_to_variable = { rl_mod_air_range_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.12 }
            add_to_variable = { rl_mod_air_range_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.24 }
            add_to_variable = { rl_mod_air_range_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.48 }
            add_to_variable = { rl_mod_air_range_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.96 }
            add_to_variable = { rl_mod_air_range_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 174 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.96 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 175 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.08 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.16 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.32 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.64 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 1.28 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 176 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.08 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.16 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.32 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.64 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 1.28 }
            add_to_variable = { rl_mod_ground_attack_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 177 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.08 }
            add_to_variable = { rl_mod_air_range_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.16 }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.32 }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.64 }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 1.28 }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 178 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.1 }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.2 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.4 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.8 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 1.6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 179 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.08 }
            add_to_variable = { rl_mod_air_night_penalty = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.16 }
            add_to_variable = { rl_mod_air_night_penalty = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.32 }
            add_to_variable = { rl_mod_air_night_penalty = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.64 }
            add_to_variable = { rl_mod_air_night_penalty = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = -1.28 }
            add_to_variable = { rl_mod_air_night_penalty = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 180 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.1 }
            add_to_variable = { rl_mod_air_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.2 }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.4 }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.8 }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = -1.6 }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 181 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.08 }
            add_to_variable = { rl_mod_air_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.16 }
            add_to_variable = { rl_mod_air_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.32 }
            add_to_variable = { rl_mod_air_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.64 }
            add_to_variable = { rl_mod_air_range_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 1.28 }
            add_to_variable = { rl_mod_air_range_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 182 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.08 }
            add_to_variable = { rl_mod_air_agility_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.16 }
            add_to_variable = { rl_mod_air_agility_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.32 }
            add_to_variable = { rl_mod_air_agility_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.64 }
            add_to_variable = { rl_mod_air_agility_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 1.28 }
            add_to_variable = { rl_mod_air_agility_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 183 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = 1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 184 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 185 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = 1.6 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 186 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.04 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 187 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_gain = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_gain = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_gain = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_gain = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 0.96 }
            add_to_variable = { rl_mod_political_power_gain = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 188 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = 0.02 }
            add_to_variable = { rl_mod_war_support_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = 0.04 }
            add_to_variable = { rl_mod_war_support_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 189 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = 1 }
            add_to_variable = { rl_mod_decryption = 1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = 2 }
            add_to_variable = { rl_mod_decryption = 2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = 4 }
            add_to_variable = { rl_mod_decryption = 4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = 8 }
            add_to_variable = { rl_mod_decryption = 8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = 16 }
            add_to_variable = { rl_mod_decryption = 16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 190 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.003 }
            add_to_variable = { rl_mod_resistance_target = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.006 }
            add_to_variable = { rl_mod_resistance_target = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.012 }
            add_to_variable = { rl_mod_resistance_target = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.024 }
            add_to_variable = { rl_mod_resistance_target = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.048 }
            add_to_variable = { rl_mod_resistance_target = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 191 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = 0.01 }
            add_manpower = 75000
            add_to_variable = { rl_manpower_granted = 75000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = 0.02 }
            add_manpower = 175000
            add_to_variable = { rl_manpower_granted = 175000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = 0.04 }
            add_manpower = 350000
            add_to_variable = { rl_manpower_granted = 350000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
            add_manpower = 750000
            add_to_variable = { rl_manpower_granted = 750000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
            add_manpower = 1750000
            add_to_variable = { rl_manpower_granted = 1750000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 192 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.06 }
            add_to_variable = { rl_mod_political_power_gain = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.12 }
            add_to_variable = { rl_mod_political_power_gain = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.24 }
            add_to_variable = { rl_mod_political_power_gain = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.48 }
            add_to_variable = { rl_mod_political_power_gain = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.96 }
            add_to_variable = { rl_mod_political_power_gain = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 193 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = 1 }
            add_to_variable = { rl_mod_research_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = 2 }
            add_to_variable = { rl_mod_research_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = 4 }
            add_to_variable = { rl_mod_research_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = 8 }
            add_to_variable = { rl_mod_research_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = 16 }
            add_to_variable = { rl_mod_research_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 194 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_decryption = 2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_decryption = 4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_decryption = 8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_decryption = 16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_decryption = 32 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 195 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.02 }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 196 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.003 }
            add_to_variable = { rl_core_forge_chance = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.006 }
            add_to_variable = { rl_core_forge_chance = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.012 }
            add_to_variable = { rl_core_forge_chance = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.024 }
            add_to_variable = { rl_core_forge_chance = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.048 }
            add_to_variable = { rl_core_forge_chance = 16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 197 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = 0.02 }
            add_to_variable = { rl_mod_stability_factor = 0.02 }
            add_manpower = 100000
            add_to_variable = { rl_manpower_granted = 100000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = 0.04 }
            add_to_variable = { rl_mod_stability_factor = 0.04 }
            add_manpower = 250000
            add_to_variable = { rl_manpower_granted = 250000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = 0.08 }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
            add_manpower = 500000
            add_to_variable = { rl_manpower_granted = 500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = 0.16 }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
            add_manpower = 1000000
            add_to_variable = { rl_manpower_granted = 1000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = 0.32 }
            add_to_variable = { rl_mod_stability_factor = 0.32 }
            add_manpower = 2500000
            add_to_variable = { rl_manpower_granted = 2500000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 198 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.02 }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 199 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_research_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_research_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 200 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
            add_to_variable = { rl_core_forge_chance = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
            add_to_variable = { rl_core_forge_chance = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
            add_to_variable = { rl_core_forge_chance = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
            add_to_variable = { rl_core_forge_chance = 16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
            add_to_variable = { rl_core_forge_chance = 32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 201 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 202 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.06 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.12 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.24 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.48 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.96 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 203 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 204 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.05 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.1 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.2 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.4 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.8 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 205 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.04 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.08 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.16 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.32 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.64 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 206 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.08 }
            add_to_variable = { rl_mod_local_resources_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.16 }
            add_to_variable = { rl_mod_local_resources_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.32 }
            add_to_variable = { rl_mod_local_resources_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.64 }
            add_to_variable = { rl_mod_local_resources_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 1.28 }
            add_to_variable = { rl_mod_local_resources_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 207 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 208 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.1 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.2 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.4 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.8 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 1.6 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 209 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 1.92 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 210 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 1.92 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 211 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 1.6 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 212 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.12 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.24 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.48 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.96 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = 1.92 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 213 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 214 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.1 }
            add_to_variable = { rl_mod_min_export = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.2 }
            add_to_variable = { rl_mod_min_export = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.4 }
            add_to_variable = { rl_mod_min_export = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.8 }
            add_to_variable = { rl_mod_min_export = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = 1.6 }
            add_to_variable = { rl_mod_min_export = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 215 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.12 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.24 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.48 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.96 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 1.92 }
            add_to_variable = { rl_mod_max_fuel_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 216 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.12 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.24 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.48 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.96 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = 1.92 }
            add_to_variable = { rl_mod_fuel_gain_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 217 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.02 }
            add_to_variable = { rl_mod_political_power_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 218 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.12 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.24 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.48 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.96 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -1.92 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 219 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.15 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.3 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.6 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.2 }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 2.4 }
            add_to_variable = { rl_mod_equipment_capture_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 220 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 221 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_offsite_building = { type = arms_factory level = 1 }
            add_to_variable = { rl_factories_added = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_offsite_building = { type = arms_factory level = 2 }
            add_to_variable = { rl_factories_added = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_offsite_building = { type = arms_factory level = 3 }
            add_to_variable = { rl_factories_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_offsite_building = { type = arms_factory level = 5 }
            add_to_variable = { rl_factories_added = 5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_offsite_building = { type = arms_factory level = 10 }
            add_to_variable = { rl_factories_added = 10 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 222 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_offsite_building = { type = industrial_complex level = 1 }
            add_to_variable = { rl_factories_added = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_offsite_building = { type = industrial_complex level = 2 }
            add_to_variable = { rl_factories_added = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_offsite_building = { type = industrial_complex level = 3 }
            add_to_variable = { rl_factories_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_offsite_building = { type = industrial_complex level = 5 }
            add_to_variable = { rl_factories_added = 5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_offsite_building = { type = industrial_complex level = 10 }
            add_to_variable = { rl_factories_added = 10 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 223 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_offsite_building = { type = dockyard level = 1 }
            add_to_variable = { rl_factories_added = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_offsite_building = { type = dockyard level = 2 }
            add_to_variable = { rl_factories_added = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_offsite_building = { type = dockyard level = 3 }
            add_to_variable = { rl_factories_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_offsite_building = { type = dockyard level = 5 }
            add_to_variable = { rl_factories_added = 5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_offsite_building = { type = dockyard level = 10 }
            add_to_variable = { rl_factories_added = 10 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 224 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 4 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 8 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 16 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 32 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 64 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 225 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 4 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 8 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 16 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 32 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 64 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 226 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 4 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 8 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 16 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 32 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 64 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 227 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 3 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 6 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 12 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 24 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 48 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 228 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 3 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 6 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 12 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 24 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 48 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 229 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 3 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 6 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 12 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 24 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 48 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 230 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.05 }
            add_offsite_building = { type = arms_factory level = 1 }
            add_to_variable = { rl_factories_added = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.1 }
            add_offsite_building = { type = arms_factory level = 1 }
            add_to_variable = { rl_factories_added = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.2 }
            add_offsite_building = { type = arms_factory level = 2 }
            add_to_variable = { rl_factories_added = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.4 }
            add_offsite_building = { type = arms_factory level = 3 }
            add_to_variable = { rl_factories_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.8 }
            add_offsite_building = { type = arms_factory level = 6 }
            add_to_variable = { rl_factories_added = 6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 231 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.08 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.16 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.32 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.64 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = 1.28 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 232 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.05 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.05 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.1 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.1 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.2 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.2 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.8 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.4 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.4 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 1.6 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.8 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.8 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 233 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.18 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.36 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.72 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.44 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 2.88 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 234 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.12 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.24 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.48 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.96 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 1.92 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 235 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 236 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 237 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.09 }
            add_to_variable = { rl_mod_min_export = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.18 }
            add_to_variable = { rl_mod_min_export = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.36 }
            add_to_variable = { rl_mod_min_export = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.72 }
            add_to_variable = { rl_mod_min_export = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = 1.44 }
            add_to_variable = { rl_mod_min_export = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 238 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.015 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.035 }
            add_to_variable = { rl_mod_political_power_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.07 }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.14 }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.28 }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.56 }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 239 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.15 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.3 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.6 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = 1.2 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = 2.4 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 240 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.05 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.06 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.1 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.12 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.2 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.24 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.4 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.48 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.8 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.96 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 241 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_planning_speed = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_planning_speed = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_planning_speed = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_planning_speed = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_planning_speed = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 242 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.04 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 243 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_regain = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_regain = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_regain = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_regain = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_regain = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 244 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.025 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.05 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.1 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.2 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.4 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 245 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.04 }
            add_to_variable = { rl_mod_army_defence_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.08 }
            add_to_variable = { rl_mod_army_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.16 }
            add_to_variable = { rl_mod_army_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.32 }
            add_to_variable = { rl_mod_army_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.64 }
            add_to_variable = { rl_mod_army_defence_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 246 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.06 }
            add_to_variable = { rl_mod_planning_speed = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.12 }
            add_to_variable = { rl_mod_planning_speed = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.24 }
            add_to_variable = { rl_mod_planning_speed = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.48 }
            add_to_variable = { rl_mod_planning_speed = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.96 }
            add_to_variable = { rl_mod_planning_speed = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 247 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.06 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.12 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.24 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.48 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.96 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 248 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = -1.28 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 249 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.12 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.24 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.48 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.96 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.92 }
            add_to_variable = { rl_mod_experience_loss_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 250 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.15 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.3 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.6 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 1.2 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 2.4 }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 251 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_command_power = 8 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_command_power = 16 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_command_power = 32 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_command_power = 64 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_command_power = 128 }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 252 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.08 }
            add_to_variable = { rl_mod_max_planning_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.16 }
            add_to_variable = { rl_mod_max_planning_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.32 }
            add_to_variable = { rl_mod_max_planning_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.64 }
            add_to_variable = { rl_mod_max_planning_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -1.28 }
            add_to_variable = { rl_mod_max_planning_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 253 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.96 }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 1.92 }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 254 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 255 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.07 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.14 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.56 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 1.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 256 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.07 }
            add_to_variable = { rl_mod_planning_speed = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.14 }
            add_to_variable = { rl_mod_planning_speed = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.28 }
            add_to_variable = { rl_mod_planning_speed = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.56 }
            add_to_variable = { rl_mod_planning_speed = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 1.12 }
            add_to_variable = { rl_mod_planning_speed = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 257 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.07 }
            add_to_variable = { rl_mod_army_defence_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.14 }
            add_to_variable = { rl_mod_army_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.28 }
            add_to_variable = { rl_mod_army_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.56 }
            add_to_variable = { rl_mod_army_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 1.12 }
            add_to_variable = { rl_mod_army_defence_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 258 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.07 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.14 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.28 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.56 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -1.12 }
            add_to_variable = { rl_mod_out_of_supply_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 259 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.08 }
            add_to_variable = { rl_mod_army_speed_factor = 0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.16 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.32 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.64 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -1.28 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 260 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = 0.07 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = 0.14 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = 0.28 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = 0.56 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = 1.12 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 261 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_manpower = 25000
            add_to_variable = { rl_manpower_granted = 25000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_manpower = 75000
            add_to_variable = { rl_manpower_granted = 75000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_manpower = 150000
            add_to_variable = { rl_manpower_granted = 150000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_manpower = 350000
            add_to_variable = { rl_manpower_granted = 350000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_manpower = 1000000
            add_to_variable = { rl_manpower_granted = 1000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 262 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_manpower = 50000
            add_to_variable = { rl_manpower_granted = 50000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_manpower = 125000
            add_to_variable = { rl_manpower_granted = 125000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_manpower = 250000
            add_to_variable = { rl_manpower_granted = 250000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_manpower = 500000
            add_to_variable = { rl_manpower_granted = 500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_manpower = 1500000
            add_to_variable = { rl_manpower_granted = 1500000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 263 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_manpower = 100000
            add_to_variable = { rl_manpower_granted = 100000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_manpower = 250000
            add_to_variable = { rl_manpower_granted = 250000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_manpower = 500000
            add_to_variable = { rl_manpower_granted = 500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_manpower = 1250000
            add_to_variable = { rl_manpower_granted = 1250000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_manpower = 3000000
            add_to_variable = { rl_manpower_granted = 3000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 264 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 1000 }
            add_to_variable = { rl_equipment_granted = 1000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 2500 }
            add_to_variable = { rl_equipment_granted = 2500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 5000 }
            add_to_variable = { rl_equipment_granted = 5000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 10000 }
            add_to_variable = { rl_equipment_granted = 10000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 25000 }
            add_to_variable = { rl_equipment_granted = 25000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 265 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = infantry_equipment_1 amount = 500 }
            add_to_variable = { rl_equipment_granted = 500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = infantry_equipment_1 amount = 1250 }
            add_to_variable = { rl_equipment_granted = 1250 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = infantry_equipment_1 amount = 3000 }
            add_to_variable = { rl_equipment_granted = 3000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = infantry_equipment_1 amount = 7000 }
            add_to_variable = { rl_equipment_granted = 7000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = infantry_equipment_1 amount = 18000 }
            add_to_variable = { rl_equipment_granted = 18000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 266 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 100 }
            add_to_variable = { rl_equipment_granted = 100 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 250 }
            add_to_variable = { rl_equipment_granted = 250 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 600 }
            add_to_variable = { rl_equipment_granted = 600 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 1500 }
            add_to_variable = { rl_equipment_granted = 1500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 4000 }
            add_to_variable = { rl_equipment_granted = 4000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 267 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 250 }
            add_to_variable = { rl_equipment_granted = 250 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 600 }
            add_to_variable = { rl_equipment_granted = 600 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 1500 }
            add_to_variable = { rl_equipment_granted = 1500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 3500 }
            add_to_variable = { rl_equipment_granted = 3500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 9000 }
            add_to_variable = { rl_equipment_granted = 9000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 268 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 150 }
            add_to_variable = { rl_equipment_granted = 150 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 400 }
            add_to_variable = { rl_equipment_granted = 400 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 1000 }
            add_to_variable = { rl_equipment_granted = 1000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 2500 }
            add_to_variable = { rl_equipment_granted = 2500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 7000 }
            add_to_variable = { rl_equipment_granted = 7000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 269 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = anti_tank_equipment_1 amount = 80 }
            add_to_variable = { rl_equipment_granted = 80 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = anti_tank_equipment_1 amount = 200 }
            add_to_variable = { rl_equipment_granted = 200 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = anti_tank_equipment_1 amount = 500 }
            add_to_variable = { rl_equipment_granted = 500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = anti_tank_equipment_1 amount = 1200 }
            add_to_variable = { rl_equipment_granted = 1200 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = anti_tank_equipment_1 amount = 3500 }
            add_to_variable = { rl_equipment_granted = 3500 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 270 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = anti_air_equipment_1 amount = 80 }
            add_to_variable = { rl_equipment_granted = 80 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = anti_air_equipment_1 amount = 200 }
            add_to_variable = { rl_equipment_granted = 200 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = anti_air_equipment_1 amount = 500 }
            add_to_variable = { rl_equipment_granted = 500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = anti_air_equipment_1 amount = 1200 }
            add_to_variable = { rl_equipment_granted = 1200 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = anti_air_equipment_1 amount = 3500 }
            add_to_variable = { rl_equipment_granted = 3500 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 271 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 1 }
                }
                add_to_variable = { rl_divisions_spawned = 1 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 2 }
                }
                add_to_variable = { rl_divisions_spawned = 2 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 3 }
                }
                add_to_variable = { rl_divisions_spawned = 3 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 5 }
                }
                add_to_variable = { rl_divisions_spawned = 5 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 10 }
                }
                add_to_variable = { rl_divisions_spawned = 10 }
            }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 272 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = 0.02 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 2 }
                }
                add_to_variable = { rl_divisions_spawned = 2 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 3 }
                }
                add_to_variable = { rl_divisions_spawned = 3 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 5 }
                }
                add_to_variable = { rl_divisions_spawned = 5 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 8 }
                }
                add_to_variable = { rl_divisions_spawned = 8 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.5 start_equipment_factor = 1.0" owner = ROOT count = 15 }
                }
                add_to_variable = { rl_divisions_spawned = 15 }
            }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 273 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.08 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.75 start_equipment_factor = 1.0" owner = ROOT count = 1 }
                }
                add_to_variable = { rl_divisions_spawned = 1 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.16 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.75 start_equipment_factor = 1.0" owner = ROOT count = 2 }
                }
                add_to_variable = { rl_divisions_spawned = 2 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.32 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.75 start_equipment_factor = 1.0" owner = ROOT count = 4 }
                }
                add_to_variable = { rl_divisions_spawned = 4 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.64 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.75 start_equipment_factor = 1.0" owner = ROOT count = 6 }
                }
                add_to_variable = { rl_divisions_spawned = 6 }
            }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.28 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.75 start_equipment_factor = 1.0" owner = ROOT count = 12 }
                }
                add_to_variable = { rl_divisions_spawned = 12 }
            }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 274 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            army_experience = 15
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            army_experience = 35
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            army_experience = 75
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            army_experience = 150
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            army_experience = 400
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 275 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_command_power = 20
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_command_power = 50
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_command_power = 100
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_command_power = 200
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_command_power = 500
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 276 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.05 }
            add_manpower = 75000
            add_to_variable = { rl_manpower_granted = 75000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.1 }
            add_manpower = 175000
            add_to_variable = { rl_manpower_granted = 175000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.2 }
            add_manpower = 350000
            add_to_variable = { rl_manpower_granted = 350000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.4 }
            add_manpower = 750000
            add_to_variable = { rl_manpower_granted = 750000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.8 }
            add_manpower = 1750000
            add_to_variable = { rl_manpower_granted = 1750000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 277 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.03 }
            add_to_variable = { rl_mod_war_support_factor = 0.025 }
            add_to_variable = { rl_mod_stability_factor = 0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.06 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.12 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.24 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.48 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 278 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.025 }
            add_to_variable = { rl_mod_army_speed_factor = 0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 279 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.1 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.2 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.4 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.8 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 1.6 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 280 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.03 }
            add_manpower = 75000
            add_to_variable = { rl_manpower_granted = 75000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.06 }
            add_manpower = 175000
            add_to_variable = { rl_manpower_granted = 175000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.12 }
            add_manpower = 350000
            add_to_variable = { rl_manpower_granted = 350000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.24 }
            add_manpower = 750000
            add_to_variable = { rl_manpower_granted = 750000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.48 }
            add_manpower = 1750000
            add_to_variable = { rl_manpower_granted = 1750000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 281 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.96 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 282 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 283 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.08 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.16 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.32 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.64 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 1.28 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 284 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.08 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.16 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.32 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.64 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.28 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 285 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = 0.08 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = 0.16 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = 0.32 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = 0.64 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = 1.28 }
            add_to_variable = { rl_mod_experience_loss_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 286 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_armor_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_armor_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_armor_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_armor_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_armor_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 287 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.07 }
            add_to_variable = { rl_mod_armor_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.14 }
            add_to_variable = { rl_mod_armor_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.28 }
            add_to_variable = { rl_mod_armor_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.56 }
            add_to_variable = { rl_mod_armor_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 1.12 }
            add_to_variable = { rl_mod_armor_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 288 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
            add_to_variable = { rl_mod_planning_speed = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
            add_to_variable = { rl_mod_planning_speed = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
            add_to_variable = { rl_mod_planning_speed = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
            add_to_variable = { rl_mod_planning_speed = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
            add_to_variable = { rl_mod_planning_speed = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 289 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.025 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -1.6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 290 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.06 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.12 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.24 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.48 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.96 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 291 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.07 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.14 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.28 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.56 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 1.12 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 292 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.07 }
            add_to_variable = { rl_mod_army_org_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.14 }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.56 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 1.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 293 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.07 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.14 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.56 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 1.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 294 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.025 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.05 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 295 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_speed_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_speed_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 296 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.07 }
            add_to_variable = { rl_mod_special_forces_cap = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.14 }
            add_to_variable = { rl_mod_special_forces_cap = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.28 }
            add_to_variable = { rl_mod_special_forces_cap = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.56 }
            add_to_variable = { rl_mod_special_forces_cap = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 1.12 }
            add_to_variable = { rl_mod_special_forces_cap = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 297 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.07 }
            add_to_variable = { rl_mod_special_forces_cap = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.14 }
            add_to_variable = { rl_mod_special_forces_cap = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.28 }
            add_to_variable = { rl_mod_special_forces_cap = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.56 }
            add_to_variable = { rl_mod_special_forces_cap = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 1.12 }
            add_to_variable = { rl_mod_special_forces_cap = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 298 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.03 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.06 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.12 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.24 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.48 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 299 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.05 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.1 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.2 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.4 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.8 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 300 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_regain = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_org_regain = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_org_regain = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_org_regain = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 1.28 }
            add_to_variable = { rl_mod_army_org_regain = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 301 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.06 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.12 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.24 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.48 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.96 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 302 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.04 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 303 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.05 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.1 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.2 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.4 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.8 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 304 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.07 }
            add_to_variable = { rl_mod_army_attack_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.14 }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.28 }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.56 }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 1.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 305 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.06 }
            add_to_variable = { rl_mod_army_defence_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.12 }
            add_to_variable = { rl_mod_army_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.24 }
            add_to_variable = { rl_mod_army_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.48 }
            add_to_variable = { rl_mod_army_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.96 }
            add_to_variable = { rl_mod_army_defence_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 306 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = 0.06 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = 0.12 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = 0.24 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = 0.48 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = 0.96 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 307 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_max_planning_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_max_planning_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_max_planning_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_max_planning_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_max_planning_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 308 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.04 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.05 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.08 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.16 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.32 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.64 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.8 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 309 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.02 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.06 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.04 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.12 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.08 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.24 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.16 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.48 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.32 }
            add_to_variable = { rl_mod_training_time_army_factor = -0.96 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 310 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.1 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.8 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 1.6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 311 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.06 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.12 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.24 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.48 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.96 }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 312 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.07 }
            add_to_variable = { rl_mod_planning_speed = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.14 }
            add_to_variable = { rl_mod_planning_speed = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.28 }
            add_to_variable = { rl_mod_planning_speed = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.56 }
            add_to_variable = { rl_mod_planning_speed = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 1.12 }
            add_to_variable = { rl_mod_planning_speed = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 313 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.025 }
            add_to_variable = { rl_mod_army_speed_factor = 0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 314 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.05 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.1 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.2 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.4 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.8 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 315 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.04 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.08 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.16 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.32 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.64 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 316 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.96 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 317 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.07 }
            add_to_variable = { rl_mod_navy_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.14 }
            add_to_variable = { rl_mod_navy_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.28 }
            add_to_variable = { rl_mod_navy_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.56 }
            add_to_variable = { rl_mod_navy_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = 1.12 }
            add_to_variable = { rl_mod_navy_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 318 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_navy_max_range_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 319 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.08 }
            add_to_variable = { rl_mod_navy_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.16 }
            add_to_variable = { rl_mod_navy_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.32 }
            add_to_variable = { rl_mod_navy_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.64 }
            add_to_variable = { rl_mod_navy_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = 1.28 }
            add_to_variable = { rl_mod_navy_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 320 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.1 }
            add_to_variable = { rl_mod_positioning = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.2 }
            add_to_variable = { rl_mod_positioning = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.4 }
            add_to_variable = { rl_mod_positioning = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.8 }
            add_to_variable = { rl_mod_positioning = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.6 }
            add_to_variable = { rl_mod_positioning = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 321 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = 0.08 }
            add_to_variable = { rl_mod_screening_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = 0.16 }
            add_to_variable = { rl_mod_screening_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = 0.32 }
            add_to_variable = { rl_mod_screening_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = 0.64 }
            add_to_variable = { rl_mod_screening_efficiency = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = 1.28 }
            add_to_variable = { rl_mod_screening_efficiency = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 322 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.07 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.14 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.56 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 1.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 323 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 324 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.08 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.16 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.32 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.64 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.28 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 325 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.1 }
            add_to_variable = { rl_mod_spotting_chance = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.2 }
            add_to_variable = { rl_mod_spotting_chance = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.4 }
            add_to_variable = { rl_mod_spotting_chance = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.8 }
            add_to_variable = { rl_mod_spotting_chance = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.6 }
            add_to_variable = { rl_mod_spotting_chance = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 326 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 1.92 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 327 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.12 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.24 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.48 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.96 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 1.92 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 328 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 329 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.08 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.16 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.32 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.64 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = 1.28 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 330 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = 0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = 0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = 0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = 0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = 1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 331 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            navy_experience = 15
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            navy_experience = 35
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            navy_experience = 75
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            navy_experience = 150
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            navy_experience = 400
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 332 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = convoy_1 amount = 50 }
            add_to_variable = { rl_equipment_granted = 50 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = convoy_1 amount = 125 }
            add_to_variable = { rl_equipment_granted = 125 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = convoy_1 amount = 300 }
            add_to_variable = { rl_equipment_granted = 300 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = convoy_1 amount = 750 }
            add_to_variable = { rl_equipment_granted = 750 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = convoy_1 amount = 2000 }
            add_to_variable = { rl_equipment_granted = 2000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 333 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = train_equipment_1 amount = 20 }
            add_to_variable = { rl_equipment_granted = 20 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = train_equipment_1 amount = 50 }
            add_to_variable = { rl_equipment_granted = 50 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = train_equipment_1 amount = 125 }
            add_to_variable = { rl_equipment_granted = 125 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = train_equipment_1 amount = 300 }
            add_to_variable = { rl_equipment_granted = 300 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = train_equipment_1 amount = 800 }
            add_to_variable = { rl_equipment_granted = 800 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 334 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 335 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 336 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.06 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 337 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.07 }
            add_to_variable = { rl_mod_screening_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.14 }
            add_to_variable = { rl_mod_screening_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.28 }
            add_to_variable = { rl_mod_screening_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.56 }
            add_to_variable = { rl_mod_screening_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 1.12 }
            add_to_variable = { rl_mod_screening_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 338 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.12 }
            add_to_variable = { rl_mod_positioning = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.24 }
            add_to_variable = { rl_mod_positioning = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.48 }
            add_to_variable = { rl_mod_positioning = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.96 }
            add_to_variable = { rl_mod_positioning = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.92 }
            add_to_variable = { rl_mod_positioning = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 339 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.1 }
            add_to_variable = { rl_mod_navy_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.2 }
            add_to_variable = { rl_mod_navy_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.4 }
            add_to_variable = { rl_mod_navy_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.8 }
            add_to_variable = { rl_mod_navy_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = 1.6 }
            add_to_variable = { rl_mod_navy_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 340 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.06 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.12 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.24 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.48 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.96 }
            add_to_variable = { rl_mod_navy_max_range_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 341 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
            add_to_variable = { rl_mod_positioning = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
            add_to_variable = { rl_mod_positioning = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
            add_to_variable = { rl_mod_positioning = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
            add_to_variable = { rl_mod_positioning = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.8 }
            add_to_variable = { rl_mod_positioning = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 342 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.08 }
            add_to_variable = { rl_mod_navy_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.16 }
            add_to_variable = { rl_mod_navy_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.32 }
            add_to_variable = { rl_mod_navy_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.64 }
            add_to_variable = { rl_mod_navy_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = 1.28 }
            add_to_variable = { rl_mod_navy_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 343 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.04 }
            add_to_variable = { rl_mod_spotting_chance = 0.06 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_spotting_chance = 0.12 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_spotting_chance = 0.24 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_spotting_chance = 0.48 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_spotting_chance = 0.96 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 344 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.14 }
            add_to_variable = { rl_mod_screening_efficiency = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.28 }
            add_to_variable = { rl_mod_screening_efficiency = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.56 }
            add_to_variable = { rl_mod_screening_efficiency = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 1.12 }
            add_to_variable = { rl_mod_screening_efficiency = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 2.24 }
            add_to_variable = { rl_mod_screening_efficiency = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 345 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = 0.06 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.06 }
            add_to_variable = { rl_mod_spotting_chance = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = 0.12 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.12 }
            add_to_variable = { rl_mod_spotting_chance = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = 0.24 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.24 }
            add_to_variable = { rl_mod_spotting_chance = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = 0.48 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.48 }
            add_to_variable = { rl_mod_spotting_chance = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = 0.96 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.96 }
            add_to_variable = { rl_mod_spotting_chance = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 346 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
            add_to_variable = { rl_mod_air_agility_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_air_agility_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_air_agility_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_air_agility_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.96 }
            add_to_variable = { rl_mod_air_agility_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 347 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.07 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.14 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.56 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = 1.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 348 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.07 }
            add_to_variable = { rl_mod_air_attack_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.14 }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.28 }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.56 }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = 1.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 349 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.07 }
            add_to_variable = { rl_mod_air_range_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.14 }
            add_to_variable = { rl_mod_air_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.28 }
            add_to_variable = { rl_mod_air_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.56 }
            add_to_variable = { rl_mod_air_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 1.12 }
            add_to_variable = { rl_mod_air_range_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 350 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = 1.6 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 351 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.08 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.16 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.32 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.64 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 1.28 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 352 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.1 }
            add_to_variable = { rl_mod_air_attack_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.2 }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.4 }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.8 }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 1.6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 353 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.1 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.2 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.4 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.8 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 1.6 }
            add_to_variable = { rl_mod_ground_attack_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 354 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = 1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 355 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.1 }
            add_to_variable = { rl_mod_air_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.2 }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.4 }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.8 }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 1.6 }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 356 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.1 }
            add_to_variable = { rl_mod_air_range_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.2 }
            add_to_variable = { rl_mod_air_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.4 }
            add_to_variable = { rl_mod_air_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.8 }
            add_to_variable = { rl_mod_air_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 1.6 }
            add_to_variable = { rl_mod_air_range_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 357 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = -1.92 }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 358 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = -1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 359 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.1 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.2 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.4 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.8 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = -1.6 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 360 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.08 }
            add_to_variable = { rl_mod_air_range_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.16 }
            add_to_variable = { rl_mod_air_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.32 }
            add_to_variable = { rl_mod_air_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.64 }
            add_to_variable = { rl_mod_air_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -1.28 }
            add_to_variable = { rl_mod_air_range_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 361 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            air_experience = 15
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            air_experience = 35
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            air_experience = 75
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            air_experience = 150
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            air_experience = 400
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 362 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 50 }
            add_to_variable = { rl_equipment_granted = 50 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 125 }
            add_to_variable = { rl_equipment_granted = 125 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 300 }
            add_to_variable = { rl_equipment_granted = 300 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 750 }
            add_to_variable = { rl_equipment_granted = 750 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 2000 }
            add_to_variable = { rl_equipment_granted = 2000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 363 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 364 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.05 }
            add_to_variable = { rl_mod_air_night_penalty = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.1 }
            add_to_variable = { rl_mod_air_night_penalty = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.2 }
            add_to_variable = { rl_mod_air_night_penalty = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.4 }
            add_to_variable = { rl_mod_air_night_penalty = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.8 }
            add_to_variable = { rl_mod_air_night_penalty = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 365 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = 0.08 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = 0.16 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = 0.32 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = 0.64 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = 1.28 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 366 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 367 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = 1.28 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 368 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 369 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_cas_efficiency = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 370 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.1 }
            add_to_variable = { rl_mod_air_range_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.2 }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.4 }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.8 }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 1.6 }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 371 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.1 }
            add_to_variable = { rl_mod_air_agility_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.2 }
            add_to_variable = { rl_mod_air_agility_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.4 }
            add_to_variable = { rl_mod_air_agility_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.8 }
            add_to_variable = { rl_mod_air_agility_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = -1.6 }
            add_to_variable = { rl_mod_air_agility_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 372 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 373 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = -1.28 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 374 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.08 }
            add_to_variable = { rl_mod_air_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.16 }
            add_to_variable = { rl_mod_air_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.32 }
            add_to_variable = { rl_mod_air_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.64 }
            add_to_variable = { rl_mod_air_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 1.28 }
            add_to_variable = { rl_mod_air_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 375 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
            add_to_variable = { rl_mod_air_defence_factor = 0.04 }
            add_to_variable = { rl_mod_air_agility_factor = 0.04 }
            add_to_variable = { rl_mod_air_range_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
            add_to_variable = { rl_mod_air_agility_factor = 0.08 }
            add_to_variable = { rl_mod_air_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
            add_to_variable = { rl_mod_air_agility_factor = 0.16 }
            add_to_variable = { rl_mod_air_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
            add_to_variable = { rl_mod_air_agility_factor = 0.32 }
            add_to_variable = { rl_mod_air_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
            add_to_variable = { rl_mod_air_agility_factor = 0.64 }
            add_to_variable = { rl_mod_air_range_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 376 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 377 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.07 }
            add_to_variable = { rl_mod_political_power_gain = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.14 }
            add_to_variable = { rl_mod_political_power_gain = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.28 }
            add_to_variable = { rl_mod_political_power_gain = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.56 }
            add_to_variable = { rl_mod_political_power_gain = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.12 }
            add_to_variable = { rl_mod_political_power_gain = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 378 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = 0.025 }
            add_to_variable = { rl_mod_war_support_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = 0.05 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = 0.1 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = 0.2 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = 0.4 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 379 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = 0.01 }
            add_manpower = 90000
            add_to_variable = { rl_manpower_granted = 90000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = 0.02 }
            add_manpower = 225000
            add_to_variable = { rl_manpower_granted = 225000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = 0.04 }
            add_manpower = 450000
            add_to_variable = { rl_manpower_granted = 450000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
            add_manpower = 900000
            add_to_variable = { rl_manpower_granted = 900000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
            add_manpower = 2000000
            add_to_variable = { rl_manpower_granted = 2000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 380 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.004 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.008 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.016 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.032 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.064 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 381 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = 1 }
            add_to_variable = { rl_mod_decryption = 1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = 2 }
            add_to_variable = { rl_mod_decryption = 2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = 4 }
            add_to_variable = { rl_mod_decryption = 4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = 8 }
            add_to_variable = { rl_mod_decryption = 8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = 16 }
            add_to_variable = { rl_mod_decryption = 16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 382 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_political_power = 50
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_political_power = 125
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_political_power = 300
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_political_power = 700
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_political_power = 2000
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 383 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 384 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.03 }
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.06 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.12 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.24 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.48 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 385 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.12 }
            add_research_slot = 1
            add_to_variable = { rl_research_slots_granted = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.24 }
            add_research_slot = 2
            add_to_variable = { rl_research_slots_granted = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.48 }
            add_research_slot = 3
            add_to_variable = { rl_research_slots_granted = 3 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 386 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            add_research_slot = 2
            add_to_variable = { rl_research_slots_granted = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            add_research_slot = 3
            add_to_variable = { rl_research_slots_granted = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            add_research_slot = 4
            add_to_variable = { rl_research_slots_granted = 4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 387 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 388 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.003 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.006 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.012 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.024 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.048 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 389 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_core_forge_chance = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_core_forge_chance = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_core_forge_chance = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_core_forge_chance = 16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_core_forge_chance = 32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 390 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_manpower = 100000
            add_to_variable = { rl_manpower_granted = 100000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_manpower = 250000
            add_to_variable = { rl_manpower_granted = 250000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_manpower = 500000
            add_to_variable = { rl_manpower_granted = 500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_manpower = 1000000
            add_to_variable = { rl_manpower_granted = 1000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_manpower = 3000000
            add_to_variable = { rl_manpower_granted = 3000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 391 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_manpower = 200000
            add_to_variable = { rl_manpower_granted = 200000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_manpower = 500000
            add_to_variable = { rl_manpower_granted = 500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_manpower = 1000000
            add_to_variable = { rl_manpower_granted = 1000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_manpower = 2500000
            add_to_variable = { rl_manpower_granted = 2500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_manpower = 6000000
            add_to_variable = { rl_manpower_granted = 6000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 392 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            army_experience = 20
            navy_experience = 20
            air_experience = 20
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            army_experience = 50
            navy_experience = 50
            air_experience = 50
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            army_experience = 100
            navy_experience = 100
            air_experience = 100
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            army_experience = 250
            navy_experience = 250
            air_experience = 250
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            army_experience = 750
            navy_experience = 750
            air_experience = 750
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 393 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_nuclear_bombs = 1
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_nuclear_bombs = 1
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_nuclear_bombs = 2
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_nuclear_bombs = 4
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_nuclear_bombs = 10
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 394 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 1000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 100 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 250 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 150 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 50 }
            add_to_variable = { rl_equipment_granted = 1550 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 2000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 200 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 500 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 300 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 100 }
            add_to_variable = { rl_equipment_granted = 3100 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 4000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 400 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 1000 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 600 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 200 }
            add_to_variable = { rl_equipment_granted = 6200 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 8000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 800 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 2000 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 1200 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 400 }
            add_to_variable = { rl_equipment_granted = 12400 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 20000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 2000 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 5000 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 3000 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 1000 }
            add_to_variable = { rl_equipment_granted = 31000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 395 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_offsite_building = { type = arms_factory level = 1 }
            add_offsite_building = { type = industrial_complex level = 1 }
            add_to_variable = { rl_factories_added = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_offsite_building = { type = arms_factory level = 2 }
            add_offsite_building = { type = industrial_complex level = 2 }
            add_to_variable = { rl_factories_added = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_offsite_building = { type = arms_factory level = 3 }
            add_offsite_building = { type = industrial_complex level = 3 }
            add_to_variable = { rl_factories_added = 6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_offsite_building = { type = arms_factory level = 5 }
            add_offsite_building = { type = industrial_complex level = 5 }
            add_to_variable = { rl_factories_added = 10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_offsite_building = { type = arms_factory level = 10 }
            add_offsite_building = { type = industrial_complex level = 10 }
            add_to_variable = { rl_factories_added = 20 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 396 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 2 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 4 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 4 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 4 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 4 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 4 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 4 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 8 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 8 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 8 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 8 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 8 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 8 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 16 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 16 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 16 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 16 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 16 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 16 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 40 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 40 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 40 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 40 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 40 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 40 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 240 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 397 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.06 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 2 }
                }
                add_to_variable = { rl_divisions_spawned = 2 }
            }
            add_manpower = 100000
            add_to_variable = { rl_manpower_granted = 100000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.12 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 4 }
                }
                add_to_variable = { rl_divisions_spawned = 4 }
            }
            add_manpower = 250000
            add_to_variable = { rl_manpower_granted = 250000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.24 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 8 }
                }
                add_to_variable = { rl_divisions_spawned = 8 }
            }
            add_manpower = 600000
            add_to_variable = { rl_manpower_granted = 600000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.48 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 15 }
                }
                add_to_variable = { rl_divisions_spawned = 15 }
            }
            add_manpower = 1500000
            add_to_variable = { rl_manpower_granted = 1500000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.96 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 30 }
                }
                add_to_variable = { rl_divisions_spawned = 30 }
            }
            add_manpower = 4000000
            add_to_variable = { rl_manpower_granted = 4000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 398 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 399 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.05 }
            add_to_variable = { rl_mod_local_resources_factor = 0.08 }
            add_offsite_building = { type = arms_factory level = 1 }
            add_offsite_building = { type = industrial_complex level = 1 }
            add_to_variable = { rl_factories_added = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.1 }
            add_to_variable = { rl_mod_local_resources_factor = 0.16 }
            add_offsite_building = { type = arms_factory level = 2 }
            add_offsite_building = { type = industrial_complex level = 2 }
            add_to_variable = { rl_factories_added = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.2 }
            add_to_variable = { rl_mod_local_resources_factor = 0.32 }
            add_offsite_building = { type = arms_factory level = 4 }
            add_offsite_building = { type = industrial_complex level = 4 }
            add_to_variable = { rl_factories_added = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.4 }
            add_to_variable = { rl_mod_local_resources_factor = 0.64 }
            add_offsite_building = { type = arms_factory level = 8 }
            add_offsite_building = { type = industrial_complex level = 8 }
            add_to_variable = { rl_factories_added = 16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.8 }
            add_to_variable = { rl_mod_local_resources_factor = 1.28 }
            add_offsite_building = { type = arms_factory level = 16 }
            add_offsite_building = { type = industrial_complex level = 16 }
            add_to_variable = { rl_factories_added = 32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 400 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            army_experience = 25
            navy_experience = 25
            air_experience = 25
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            army_experience = 60
            navy_experience = 60
            air_experience = 60
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            army_experience = 150
            navy_experience = 150
            air_experience = 150
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            army_experience = 350
            navy_experience = 350
            air_experience = 350
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            army_experience = 1000
            navy_experience = 1000
            air_experience = 1000
        }
    }
    rl_apply_selected_upgrade_v26 = yes
    rl_apply_selected_upgrade_v30 = yes
    rl_relic_after_upgrade = yes
    if = { limit = { check_variable = { rl_core_forge_chance > 100 } } set_variable = { rl_core_forge_chance = 100 } }
    force_update_dynamic_modifier = yes
    if = {
        limit = {
            is_ai = no
            NOT = { has_country_flag = rl_fate_purchase_in_progress }
            check_variable = { rl_tech_result_count > 0 }
        }
        country_event = { id = rl.5 hours = 1 }
    }
}

rl_apply_selected_upgrade_v26 = {
    if = {
        limit = { check_variable = { rl_selected_id = 401 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.035 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.07 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.14 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.28 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.56 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 402 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.04 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.08 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.16 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.32 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.64 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 403 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.06 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.12 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.24 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.48 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.96 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 404 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 405 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.05 }
            add_to_variable = { rl_mod_min_export = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.1 }
            add_to_variable = { rl_mod_min_export = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.2 }
            add_to_variable = { rl_mod_min_export = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.4 }
            add_to_variable = { rl_mod_min_export = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.8 }
            add_to_variable = { rl_mod_min_export = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 406 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 407 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.04 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.08 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.16 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.32 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.64 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 408 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.045 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.09 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.18 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.36 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.72 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 409 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.08 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.16 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.32 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.64 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.28 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 410 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.05 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.1 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.2 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.4 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.8 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 411 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.08 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.16 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.32 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.64 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = 1.28 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 412 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.07 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.14 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.28 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.56 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = 1.12 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 413 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.08 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.16 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.32 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.64 }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = 1.28 }
            add_to_variable = { rl_mod_fuel_gain_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 414 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.1 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.2 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.4 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 0.8 }
            add_to_variable = { rl_mod_max_fuel_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = 1.6 }
            add_to_variable = { rl_mod_max_fuel_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 415 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.04 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.08 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.16 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.32 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.64 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 416 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.08 }
            add_to_variable = { rl_mod_army_speed_factor = 0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.16 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.32 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.64 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 1.28 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 417 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.05 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.1 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.2 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.4 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.8 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 418 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.1 }
            add_to_variable = { rl_mod_local_resources_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.2 }
            add_to_variable = { rl_mod_local_resources_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.4 }
            add_to_variable = { rl_mod_local_resources_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 0.8 }
            add_to_variable = { rl_mod_local_resources_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = 1.6 }
            add_to_variable = { rl_mod_local_resources_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 419 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.05 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.1 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.2 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.4 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.8 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 420 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 421 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.09 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.18 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.36 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.72 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 1.44 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 422 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.05 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.1 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.2 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.4 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = 0.8 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 423 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.1 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.2 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.4 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.8 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.6 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 424 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.07 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.14 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.28 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.56 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -1.12 }
            add_to_variable = { rl_mod_repair_speed_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 425 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_min_export = -0.035 }
            add_to_variable = { rl_mod_local_resources_factor = 0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_min_export = -0.07 }
            add_to_variable = { rl_mod_local_resources_factor = 0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_min_export = -0.14 }
            add_to_variable = { rl_mod_local_resources_factor = 0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_min_export = -0.28 }
            add_to_variable = { rl_mod_local_resources_factor = 0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_min_export = -0.56 }
            add_to_variable = { rl_mod_local_resources_factor = 0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 426 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.018 }
            add_to_variable = { rl_mod_political_power_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.036 }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.072 }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.144 }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.288 }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 427 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.05 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.1 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.2 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.4 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.8 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 428 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.06 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.12 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.24 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.48 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = -0.96 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 429 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 430 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.045 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.09 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.18 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.36 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.72 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 431 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.12 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.24 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.48 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_fuel_factor = 0.96 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_fuel_factor = 1.92 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 432 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.1 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.2 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.4 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = 0.8 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = 1.6 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 433 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.08 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.16 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.32 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.64 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 1.28 }
            add_to_variable = { rl_mod_equipment_conversion_speed = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 434 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.1 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.2 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.4 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = 0.8 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = 1.6 }
            add_to_variable = { rl_mod_industry_free_repair_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 435 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 1.92 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 436 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = 1.6 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 437 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.1 }
            add_to_variable = { rl_mod_navy_org_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.2 }
            add_to_variable = { rl_mod_navy_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.4 }
            add_to_variable = { rl_mod_navy_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 0.8 }
            add_to_variable = { rl_mod_navy_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = 1.6 }
            add_to_variable = { rl_mod_navy_org_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 438 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.08 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.16 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.32 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 0.64 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = 1.28 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 439 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 440 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.04 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.08 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.16 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.32 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.64 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 441 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.025 }
            add_to_variable = { rl_mod_army_defence_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_defence_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 442 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_planning_speed = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_planning_speed = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_planning_speed = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_planning_speed = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_planning_speed = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 443 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.96 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 444 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 445 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.045 }
            add_to_variable = { rl_mod_army_defence_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.09 }
            add_to_variable = { rl_mod_army_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.18 }
            add_to_variable = { rl_mod_army_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.36 }
            add_to_variable = { rl_mod_army_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.72 }
            add_to_variable = { rl_mod_army_defence_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 446 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.07 }
            add_to_variable = { rl_mod_max_planning_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.14 }
            add_to_variable = { rl_mod_max_planning_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.28 }
            add_to_variable = { rl_mod_max_planning_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.56 }
            add_to_variable = { rl_mod_max_planning_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 1.12 }
            add_to_variable = { rl_mod_max_planning_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 447 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.055 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.11 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.22 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.44 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.88 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 448 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.05 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.1 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.2 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.4 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.8 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 449 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = 1.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 450 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.06 }
            add_to_variable = { rl_mod_planning_speed = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.12 }
            add_to_variable = { rl_mod_planning_speed = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.24 }
            add_to_variable = { rl_mod_planning_speed = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.48 }
            add_to_variable = { rl_mod_planning_speed = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_planning_factor = 0.96 }
            add_to_variable = { rl_mod_planning_speed = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 451 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.12 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.24 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.48 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.96 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 1.92 }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 452 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.06 }
            add_to_variable = { rl_mod_max_command_power = 5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.12 }
            add_to_variable = { rl_mod_max_command_power = 10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.24 }
            add_to_variable = { rl_mod_max_command_power = 20 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.48 }
            add_to_variable = { rl_mod_max_command_power = 40 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.96 }
            add_to_variable = { rl_mod_max_command_power = 80 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 453 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.035 }
            add_to_variable = { rl_mod_army_org_regain = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.07 }
            add_to_variable = { rl_mod_army_org_regain = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.14 }
            add_to_variable = { rl_mod_army_org_regain = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.28 }
            add_to_variable = { rl_mod_army_org_regain = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.56 }
            add_to_variable = { rl_mod_army_org_regain = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 454 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_regain = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_regain = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_regain = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_regain = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_regain = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 455 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.045 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.09 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.18 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.36 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.72 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 456 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.035 }
            add_to_variable = { rl_mod_planning_speed = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.07 }
            add_to_variable = { rl_mod_planning_speed = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.14 }
            add_to_variable = { rl_mod_planning_speed = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.28 }
            add_to_variable = { rl_mod_planning_speed = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.56 }
            add_to_variable = { rl_mod_planning_speed = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 457 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.06 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.12 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.24 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.48 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.96 }
            add_to_variable = { rl_mod_out_of_supply_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 458 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.1 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.2 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.4 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.8 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.6 }
            add_to_variable = { rl_mod_experience_loss_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 459 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = -1.28 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 460 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_regain = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_regain = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_regain = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_loss_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_regain = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_loss_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_regain = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 461 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.07 }
            add_to_variable = { rl_mod_max_planning_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.14 }
            add_to_variable = { rl_mod_max_planning_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.28 }
            add_to_variable = { rl_mod_max_planning_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.56 }
            add_to_variable = { rl_mod_max_planning_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 1.12 }
            add_to_variable = { rl_mod_max_planning_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 462 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.07 }
            add_to_variable = { rl_mod_armor_factor = 0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.14 }
            add_to_variable = { rl_mod_armor_factor = 0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.28 }
            add_to_variable = { rl_mod_armor_factor = 0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.56 }
            add_to_variable = { rl_mod_armor_factor = 0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 1.12 }
            add_to_variable = { rl_mod_armor_factor = 0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 463 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.055 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.11 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.22 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.44 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.88 }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 464 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.96 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 465 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.06 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.12 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.24 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.48 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.96 }
            add_to_variable = { rl_mod_mechanized_defence_factor = 0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 466 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.06 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.12 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.24 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.48 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.96 }
            add_to_variable = { rl_mod_motorized_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 467 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.04 }
            add_to_variable = { rl_mod_planning_speed = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.1 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.08 }
            add_to_variable = { rl_mod_planning_speed = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.2 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.16 }
            add_to_variable = { rl_mod_planning_speed = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.4 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.32 }
            add_to_variable = { rl_mod_planning_speed = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.8 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.64 }
            add_to_variable = { rl_mod_planning_speed = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 468 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = 0.06 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = 0.12 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = 0.24 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = 0.48 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = 0.96 }
            add_to_variable = { rl_mod_army_armor_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 469 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_regain = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_regain = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_regain = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_regain = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_org_regain = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 470 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.07 }
            add_to_variable = { rl_mod_army_speed_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.14 }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.28 }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -0.56 }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = -1.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 471 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.07 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.14 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.28 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.56 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 1.12 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 472 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 1.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 473 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.065 }
            add_to_variable = { rl_mod_army_speed_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.13 }
            add_to_variable = { rl_mod_army_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.26 }
            add_to_variable = { rl_mod_army_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.52 }
            add_to_variable = { rl_mod_army_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 1.04 }
            add_to_variable = { rl_mod_army_speed_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 474 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.055 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.11 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.22 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.44 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.88 }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 475 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.06 }
            add_to_variable = { rl_mod_planning_speed = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.12 }
            add_to_variable = { rl_mod_planning_speed = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.24 }
            add_to_variable = { rl_mod_planning_speed = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.48 }
            add_to_variable = { rl_mod_planning_speed = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.96 }
            add_to_variable = { rl_mod_planning_speed = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 476 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.06 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.12 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.24 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.48 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = -0.96 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 477 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.025 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.05 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.1 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.2 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = 0.4 }
            add_to_variable = { rl_mod_special_forces_attack_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 478 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.06 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.12 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.24 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.48 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = 0.96 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 479 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_planning_speed = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_planning_speed = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_planning_speed = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_planning_speed = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_planning_speed = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 480 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_army_defence_factor = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_defence_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_defence_factor = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_defence_factor = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_defence_factor = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 481 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 482 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.1 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.2 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.4 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.8 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 483 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.055 }
            add_to_variable = { rl_mod_army_org_regain = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.11 }
            add_to_variable = { rl_mod_army_org_regain = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.22 }
            add_to_variable = { rl_mod_army_org_regain = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.44 }
            add_to_variable = { rl_mod_army_org_regain = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = 0.88 }
            add_to_variable = { rl_mod_army_org_regain = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 484 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.055 }
            add_to_variable = { rl_mod_max_planning_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.11 }
            add_to_variable = { rl_mod_max_planning_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.22 }
            add_to_variable = { rl_mod_max_planning_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.44 }
            add_to_variable = { rl_mod_max_planning_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.88 }
            add_to_variable = { rl_mod_max_planning_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 485 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.035 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.045 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.07 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.09 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.14 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.18 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.28 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.36 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.56 }
            add_to_variable = { rl_mod_motorized_attack_factor = 0.72 }
            add_to_variable = { rl_mod_mechanized_attack_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 486 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_attack_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = 1.28 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 487 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.07 }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.14 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 0.56 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = 1.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 488 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.15 }
            add_to_variable = { rl_mod_max_command_power = 6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.3 }
            add_to_variable = { rl_mod_max_command_power = 12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 0.6 }
            add_to_variable = { rl_mod_max_command_power = 24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 1.2 }
            add_to_variable = { rl_mod_max_command_power = 48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = 2.4 }
            add_to_variable = { rl_mod_max_command_power = 96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 489 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.1 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.2 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.4 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.8 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.6 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 490 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.04 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.025 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.08 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.05 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.16 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.1 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.32 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.2 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = 0.64 }
            add_to_variable = { rl_mod_land_reinforce_rate = 0.4 }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 491 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
            add_to_variable = { rl_mod_air_agility_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_air_agility_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_air_agility_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_air_agility_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.96 }
            add_to_variable = { rl_mod_air_agility_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 492 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.06 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.12 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.24 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.48 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.96 }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 493 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.055 }
            add_to_variable = { rl_mod_air_defence_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.11 }
            add_to_variable = { rl_mod_air_defence_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.22 }
            add_to_variable = { rl_mod_air_defence_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.44 }
            add_to_variable = { rl_mod_air_defence_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.88 }
            add_to_variable = { rl_mod_air_defence_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 494 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 495 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = 1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 496 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.07 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.14 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.28 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.56 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 1.12 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 497 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.075 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.15 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.3 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = 0.6 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = 1.2 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 498 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.09 }
            add_to_variable = { rl_mod_air_attack_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.18 }
            add_to_variable = { rl_mod_air_attack_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.36 }
            add_to_variable = { rl_mod_air_attack_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.72 }
            add_to_variable = { rl_mod_air_attack_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 1.44 }
            add_to_variable = { rl_mod_air_attack_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 499 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.09 }
            add_to_variable = { rl_mod_air_range_factor = 0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.18 }
            add_to_variable = { rl_mod_air_range_factor = 0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.36 }
            add_to_variable = { rl_mod_air_range_factor = 0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 0.72 }
            add_to_variable = { rl_mod_air_range_factor = 0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = 1.44 }
            add_to_variable = { rl_mod_air_range_factor = 0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 500 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.09 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.18 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.36 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.72 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = 1.44 }
            add_to_variable = { rl_mod_ground_attack_factor = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 501 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = 1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 502 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.09 }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.18 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.36 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.72 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 1.44 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 503 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.08 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.16 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.32 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.64 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = -1.28 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 504 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.09 }
            add_to_variable = { rl_mod_air_agility_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.18 }
            add_to_variable = { rl_mod_air_agility_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.36 }
            add_to_variable = { rl_mod_air_agility_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.72 }
            add_to_variable = { rl_mod_air_agility_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = -1.44 }
            add_to_variable = { rl_mod_air_agility_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 505 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = -0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = -1.92 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 506 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.08 }
            add_to_variable = { rl_mod_air_range_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.16 }
            add_to_variable = { rl_mod_air_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.32 }
            add_to_variable = { rl_mod_air_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.64 }
            add_to_variable = { rl_mod_air_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -1.28 }
            add_to_variable = { rl_mod_air_range_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 507 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.1 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.2 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.4 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.8 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 1.6 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 508 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_defence_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_defence_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_defence_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_defence_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_defence_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 509 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.07 }
            add_to_variable = { rl_mod_air_range_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.14 }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.28 }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.56 }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = 1.12 }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 510 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.07 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.14 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.28 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.56 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 1.12 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 511 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
            add_to_variable = { rl_mod_air_range_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
            add_to_variable = { rl_mod_air_range_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
            add_to_variable = { rl_mod_air_range_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
            add_to_variable = { rl_mod_air_range_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.96 }
            add_to_variable = { rl_mod_air_range_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 512 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.08 }
            add_to_variable = { rl_mod_air_agility_factor = 0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.16 }
            add_to_variable = { rl_mod_air_agility_factor = 0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.32 }
            add_to_variable = { rl_mod_air_agility_factor = 0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.64 }
            add_to_variable = { rl_mod_air_agility_factor = 0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 1.28 }
            add_to_variable = { rl_mod_air_agility_factor = 0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 513 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.07 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.14 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.28 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.56 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.12 }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 514 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.11 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.22 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.44 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = 0.88 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = 1.76 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 515 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_defence_factor = 0.05 }
            add_to_variable = { rl_mod_air_agility_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_defence_factor = 0.1 }
            add_to_variable = { rl_mod_air_agility_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_defence_factor = 0.2 }
            add_to_variable = { rl_mod_air_agility_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_defence_factor = 0.4 }
            add_to_variable = { rl_mod_air_agility_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_defence_factor = 0.8 }
            add_to_variable = { rl_mod_air_agility_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 516 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.08 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.16 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.32 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = 0.64 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = 1.28 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 517 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = 0.12 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = 0.24 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = 0.48 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = 0.96 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = 1.92 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 518 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.07 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.14 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.28 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.56 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = 1.12 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 519 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.07 }
            add_to_variable = { rl_mod_air_night_penalty = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.14 }
            add_to_variable = { rl_mod_air_night_penalty = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.28 }
            add_to_variable = { rl_mod_air_night_penalty = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = -0.56 }
            add_to_variable = { rl_mod_air_night_penalty = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = -1.12 }
            add_to_variable = { rl_mod_air_night_penalty = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 520 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.1 }
            add_to_variable = { rl_mod_air_range_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.2 }
            add_to_variable = { rl_mod_air_range_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.4 }
            add_to_variable = { rl_mod_air_range_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 0.8 }
            add_to_variable = { rl_mod_air_range_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = 1.6 }
            add_to_variable = { rl_mod_air_range_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 521 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = 1.92 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 522 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.07 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.14 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 0.56 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = 1.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 523 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.07 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.14 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.28 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_ground_attack_factor = 0.56 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_ground_attack_factor = 1.12 }
            add_to_variable = { rl_mod_air_cas_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 524 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.08 }
            add_to_variable = { rl_mod_air_weather_penalty = -0.08 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.16 }
            add_to_variable = { rl_mod_air_weather_penalty = -0.16 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.32 }
            add_to_variable = { rl_mod_air_weather_penalty = -0.32 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = -0.64 }
            add_to_variable = { rl_mod_air_weather_penalty = -0.64 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = -1.28 }
            add_to_variable = { rl_mod_air_weather_penalty = -1.28 }
            add_to_variable = { rl_mod_air_accidents_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 525 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
            add_to_variable = { rl_mod_air_range_factor = 0.07 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
            add_to_variable = { rl_mod_air_range_factor = 0.14 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
            add_to_variable = { rl_mod_air_range_factor = 0.28 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
            add_to_variable = { rl_mod_air_range_factor = 0.56 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.96 }
            add_to_variable = { rl_mod_air_range_factor = 1.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 526 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.08 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.16 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.32 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.64 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.28 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 527 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.055 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.11 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.22 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.44 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.88 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 528 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.09 }
            add_to_variable = { rl_mod_spotting_chance = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.18 }
            add_to_variable = { rl_mod_spotting_chance = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.36 }
            add_to_variable = { rl_mod_spotting_chance = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.72 }
            add_to_variable = { rl_mod_spotting_chance = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.44 }
            add_to_variable = { rl_mod_spotting_chance = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 529 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.08 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.16 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.32 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.64 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 1.28 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 530 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 531 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.06 }
            add_to_variable = { rl_mod_positioning = 0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.12 }
            add_to_variable = { rl_mod_positioning = 0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.24 }
            add_to_variable = { rl_mod_positioning = 0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.48 }
            add_to_variable = { rl_mod_positioning = 0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.96 }
            add_to_variable = { rl_mod_positioning = 0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 532 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.08 }
            add_to_variable = { rl_mod_screening_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.16 }
            add_to_variable = { rl_mod_screening_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.32 }
            add_to_variable = { rl_mod_screening_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.64 }
            add_to_variable = { rl_mod_screening_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 1.28 }
            add_to_variable = { rl_mod_screening_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 533 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.06 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.12 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.24 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.48 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.96 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 534 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = 0.08 }
            add_to_variable = { rl_mod_screening_efficiency = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = 0.16 }
            add_to_variable = { rl_mod_screening_efficiency = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = 0.32 }
            add_to_variable = { rl_mod_screening_efficiency = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = 0.64 }
            add_to_variable = { rl_mod_screening_efficiency = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = 1.28 }
            add_to_variable = { rl_mod_screening_efficiency = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 535 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.11 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.22 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.44 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.88 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.76 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 536 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.07 }
            add_to_variable = { rl_mod_spotting_chance = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.14 }
            add_to_variable = { rl_mod_spotting_chance = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.28 }
            add_to_variable = { rl_mod_spotting_chance = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.56 }
            add_to_variable = { rl_mod_spotting_chance = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.12 }
            add_to_variable = { rl_mod_spotting_chance = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 537 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 538 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.12 }
            add_to_variable = { rl_mod_spotting_chance = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.24 }
            add_to_variable = { rl_mod_spotting_chance = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.48 }
            add_to_variable = { rl_mod_spotting_chance = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.96 }
            add_to_variable = { rl_mod_spotting_chance = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = 1.92 }
            add_to_variable = { rl_mod_spotting_chance = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 539 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.09 }
            add_to_variable = { rl_mod_navy_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.18 }
            add_to_variable = { rl_mod_navy_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.36 }
            add_to_variable = { rl_mod_navy_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.72 }
            add_to_variable = { rl_mod_navy_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = 1.44 }
            add_to_variable = { rl_mod_navy_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 540 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.08 }
            add_to_variable = { rl_mod_navy_org_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.16 }
            add_to_variable = { rl_mod_navy_org_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.32 }
            add_to_variable = { rl_mod_navy_org_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.64 }
            add_to_variable = { rl_mod_navy_org_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = 1.28 }
            add_to_variable = { rl_mod_navy_org_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 541 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = 1.92 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 542 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.09 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.18 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.36 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.72 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = 1.44 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 543 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.09 }
            add_to_variable = { rl_mod_positioning = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.18 }
            add_to_variable = { rl_mod_positioning = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.36 }
            add_to_variable = { rl_mod_positioning = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.72 }
            add_to_variable = { rl_mod_positioning = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 1.44 }
            add_to_variable = { rl_mod_positioning = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 544 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.09 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.18 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.36 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.72 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 1.44 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 545 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.1 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.2 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.4 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.8 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.6 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 546 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.055 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.11 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.22 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.44 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = 0.88 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 547 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.12 }
            add_to_variable = { rl_mod_positioning = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.24 }
            add_to_variable = { rl_mod_positioning = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.48 }
            add_to_variable = { rl_mod_positioning = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.96 }
            add_to_variable = { rl_mod_positioning = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.92 }
            add_to_variable = { rl_mod_positioning = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 548 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.07 }
            add_to_variable = { rl_mod_navy_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.14 }
            add_to_variable = { rl_mod_navy_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.28 }
            add_to_variable = { rl_mod_navy_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.56 }
            add_to_variable = { rl_mod_navy_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.12 }
            add_to_variable = { rl_mod_navy_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 549 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.07 }
            add_to_variable = { rl_mod_positioning = 0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.14 }
            add_to_variable = { rl_mod_positioning = 0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.28 }
            add_to_variable = { rl_mod_positioning = 0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = 0.56 }
            add_to_variable = { rl_mod_positioning = 0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = 1.12 }
            add_to_variable = { rl_mod_positioning = 0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 550 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_org_factor = 0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_org_factor = 1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 551 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.07 }
            add_to_variable = { rl_mod_screening_efficiency = 0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.14 }
            add_to_variable = { rl_mod_screening_efficiency = 0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.28 }
            add_to_variable = { rl_mod_screening_efficiency = 0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.56 }
            add_to_variable = { rl_mod_screening_efficiency = 0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 1.12 }
            add_to_variable = { rl_mod_screening_efficiency = 0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 552 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.06 }
            add_to_variable = { rl_mod_spotting_chance = 0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.12 }
            add_to_variable = { rl_mod_spotting_chance = 0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.24 }
            add_to_variable = { rl_mod_spotting_chance = 0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.48 }
            add_to_variable = { rl_mod_spotting_chance = 0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = 0.96 }
            add_to_variable = { rl_mod_spotting_chance = 0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 553 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.11 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.22 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.44 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.88 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.76 }
            add_to_variable = { rl_mod_navy_max_range_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 554 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = 1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 555 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_positioning = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_positioning = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_positioning = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_positioning = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_positioning = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 556 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = 0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = 1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = 0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 557 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.1 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.2 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.4 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 0.8 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = 1.6 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 558 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.065 }
            add_to_variable = { rl_mod_spotting_chance = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.13 }
            add_to_variable = { rl_mod_spotting_chance = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.26 }
            add_to_variable = { rl_mod_spotting_chance = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.52 }
            add_to_variable = { rl_mod_spotting_chance = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.04 }
            add_to_variable = { rl_mod_spotting_chance = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 559 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.1 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.2 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.4 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = 0.8 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = 1.6 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 560 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.035 }
            add_to_variable = { rl_mod_positioning = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.07 }
            add_to_variable = { rl_mod_positioning = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.14 }
            add_to_variable = { rl_mod_positioning = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.28 }
            add_to_variable = { rl_mod_positioning = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = 0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.56 }
            add_to_variable = { rl_mod_positioning = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 561 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_gain = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_gain = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_gain = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_gain = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 0.96 }
            add_to_variable = { rl_mod_political_power_gain = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 562 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_stability_factor = 0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 563 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = 0.035 }
            add_to_variable = { rl_mod_war_support_factor = 0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = 0.07 }
            add_to_variable = { rl_mod_war_support_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = 0.14 }
            add_to_variable = { rl_mod_war_support_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = 0.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = 0.56 }
            add_to_variable = { rl_mod_war_support_factor = 0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 564 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 565 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.1 }
            add_to_variable = { rl_mod_decryption = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.2 }
            add_to_variable = { rl_mod_decryption = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.4 }
            add_to_variable = { rl_mod_decryption = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.8 }
            add_to_variable = { rl_mod_decryption = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 1.6 }
            add_to_variable = { rl_mod_decryption = 16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 566 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = 1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = 2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = 4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = 8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = 16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 567 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_decryption = 1 }
            add_to_variable = { rl_mod_research_speed_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_decryption = 2 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_decryption = 4 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_decryption = 8 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_decryption = 16 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 568 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.12 }
            add_to_variable = { rl_mod_encryption = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.24 }
            add_to_variable = { rl_mod_encryption = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.48 }
            add_to_variable = { rl_mod_encryption = 4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.96 }
            add_to_variable = { rl_mod_encryption = 8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 1.92 }
            add_to_variable = { rl_mod_encryption = 16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 569 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.006 }
            add_to_variable = { rl_mod_resistance_target = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.012 }
            add_to_variable = { rl_mod_resistance_target = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.024 }
            add_to_variable = { rl_mod_resistance_target = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.048 }
            add_to_variable = { rl_mod_resistance_target = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.096 }
            add_to_variable = { rl_mod_resistance_target = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 570 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_resistance_target = -0.08 }
            add_to_variable = { rl_mod_compliance_gain = 0.003 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_resistance_target = -0.16 }
            add_to_variable = { rl_mod_compliance_gain = 0.006 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_resistance_target = -0.32 }
            add_to_variable = { rl_mod_compliance_gain = 0.012 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_resistance_target = -0.64 }
            add_to_variable = { rl_mod_compliance_gain = 0.024 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_resistance_target = -1.28 }
            add_to_variable = { rl_mod_compliance_gain = 0.048 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 571 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.008 }
            add_to_variable = { rl_mod_political_power_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.016 }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.032 }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.064 }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.128 }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 572 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 573 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.055 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.11 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.22 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.44 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.88 }
            add_to_variable = { rl_mod_production_speed_facility_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 574 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.6 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 575 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.07 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.14 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.56 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 1.12 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 576 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = 1 }
            add_to_variable = { rl_mod_decryption = 1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = 2 }
            add_to_variable = { rl_mod_decryption = 2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = 4 }
            add_to_variable = { rl_mod_decryption = 4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = 8 }
            add_to_variable = { rl_mod_decryption = 8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = 16 }
            add_to_variable = { rl_mod_decryption = 16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 577 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.07 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.012 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.14 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.024 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.048 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.56 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.096 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.192 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 578 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = 0.025 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = 0.05 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = 0.1 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = 0.2 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = 0.4 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 579 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = 0.035 }
            add_to_variable = { rl_mod_stability_factor = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = 0.07 }
            add_to_variable = { rl_mod_stability_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = 0.14 }
            add_to_variable = { rl_mod_stability_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = 0.28 }
            add_to_variable = { rl_mod_stability_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = 0.56 }
            add_to_variable = { rl_mod_stability_factor = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 580 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 1.28 }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 581 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_offsite_building = { type = arms_factory level = 1 }
            add_offsite_building = { type = industrial_complex level = 1 }
            add_offsite_building = { type = dockyard level = 1 }
            add_to_variable = { rl_factories_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_offsite_building = { type = arms_factory level = 2 }
            add_offsite_building = { type = industrial_complex level = 2 }
            add_offsite_building = { type = dockyard level = 2 }
            add_to_variable = { rl_factories_added = 6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_offsite_building = { type = arms_factory level = 4 }
            add_offsite_building = { type = industrial_complex level = 4 }
            add_offsite_building = { type = dockyard level = 4 }
            add_to_variable = { rl_factories_added = 12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_offsite_building = { type = arms_factory level = 8 }
            add_offsite_building = { type = industrial_complex level = 8 }
            add_offsite_building = { type = dockyard level = 8 }
            add_to_variable = { rl_factories_added = 24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_offsite_building = { type = arms_factory level = 20 }
            add_offsite_building = { type = industrial_complex level = 20 }
            add_offsite_building = { type = dockyard level = 20 }
            add_to_variable = { rl_factories_added = 60 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 582 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.05 }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 1000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 100 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 250 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 150 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 50 }
            add_to_variable = { rl_equipment_granted = 1550 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.1 }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 2000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 200 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 500 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 300 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 100 }
            add_to_variable = { rl_equipment_granted = 3100 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.2 }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 5000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 500 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 1250 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 750 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 250 }
            add_to_variable = { rl_equipment_granted = 7750 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.4 }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 10000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 1000 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 2500 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 1500 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 500 }
            add_to_variable = { rl_equipment_granted = 15500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = 0.8 }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 25000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 2500 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 6250 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 3750 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 1250 }
            add_to_variable = { rl_equipment_granted = 38750 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 583 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.05 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 3 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 3 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 3 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 3 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 3 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 3 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.1 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 6 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 6 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 6 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 6 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 6 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 6 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.2 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 12 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 12 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 12 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 12 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 12 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 12 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 72 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.4 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 30 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 30 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 30 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 30 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 30 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 30 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 180 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = 0.8 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 80 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 80 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 80 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 80 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 80 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 80 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 480 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 584 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = 0.02 }
            add_manpower = 150000
            add_to_variable = { rl_manpower_granted = 150000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = 0.04 }
            add_manpower = 400000
            add_to_variable = { rl_manpower_granted = 400000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = 0.08 }
            add_manpower = 1000000
            add_to_variable = { rl_manpower_granted = 1000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = 0.16 }
            add_manpower = 3000000
            add_to_variable = { rl_manpower_granted = 3000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = 0.32 }
            add_manpower = 10000000
            add_to_variable = { rl_manpower_granted = 10000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 585 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 2 }
                }
                add_to_variable = { rl_divisions_spawned = 2 }
            }
            add_manpower = 100000
            add_to_variable = { rl_manpower_granted = 100000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 5 }
                }
                add_to_variable = { rl_divisions_spawned = 5 }
            }
            add_manpower = 300000
            add_to_variable = { rl_manpower_granted = 300000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 10 }
                }
                add_to_variable = { rl_divisions_spawned = 10 }
            }
            add_manpower = 800000
            add_to_variable = { rl_manpower_granted = 800000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 20 }
                }
                add_to_variable = { rl_divisions_spawned = 20 }
            }
            add_manpower = 2000000
            add_to_variable = { rl_manpower_granted = 2000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.8 start_equipment_factor = 1.0" owner = ROOT count = 50 }
                }
                add_to_variable = { rl_divisions_spawned = 50 }
            }
            add_manpower = 6000000
            add_to_variable = { rl_manpower_granted = 6000000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 586 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.04 }
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 587 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_research_slot = 1
            add_to_variable = { rl_research_slots_granted = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_research_slot = 3
            add_to_variable = { rl_research_slots_granted = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_research_slot = 6
            add_to_variable = { rl_research_slots_granted = 6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 588 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.004 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.008 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.016 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.032 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.064 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 589 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_resistance_target = -0.04 }
            add_to_variable = { rl_core_forge_chance = 2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_resistance_target = -0.08 }
            add_to_variable = { rl_core_forge_chance = 5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_resistance_target = -0.16 }
            add_to_variable = { rl_core_forge_chance = 10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_resistance_target = -0.32 }
            add_to_variable = { rl_core_forge_chance = 25 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_resistance_target = -0.64 }
            add_to_variable = { rl_core_forge_chance = 60 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 590 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.04 }
            add_nuclear_bombs = 1
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_nuclear_bombs = 2
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_nuclear_bombs = 5
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_nuclear_bombs = 12
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_nuclear_bombs = 40
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 591 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.04 }
            army_experience = 30
            navy_experience = 30
            air_experience = 30
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.08 }
            army_experience = 80
            navy_experience = 80
            air_experience = 80
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.16 }
            army_experience = 200
            navy_experience = 200
            air_experience = 200
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.32 }
            army_experience = 500
            navy_experience = 500
            air_experience = 500
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = 0.64 }
            army_experience = 1500
            navy_experience = 1500
            air_experience = 1500
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 592 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.04 }
            add_political_power = 100
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_political_power = 250
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_political_power = 600
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_political_power = 1500
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_political_power = 5000
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 593 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 100 }
            add_to_variable = { rl_equipment_granted = 100 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 300 }
            add_to_variable = { rl_equipment_granted = 300 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 800 }
            add_to_variable = { rl_equipment_granted = 800 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 2500 }
            add_to_variable = { rl_equipment_granted = 2500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_equipment_to_stockpile = { type = fighter_equipment_0 amount = 8000 }
            add_to_variable = { rl_equipment_granted = 8000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 594 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.03 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 300 }
            add_to_variable = { rl_equipment_granted = 300 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.06 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 800 }
            add_to_variable = { rl_equipment_granted = 800 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.12 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 2000 }
            add_to_variable = { rl_equipment_granted = 2000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.24 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 6000 }
            add_to_variable = { rl_equipment_granted = 6000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = -0.48 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 20000 }
            add_to_variable = { rl_equipment_granted = 20000 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 595 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.04 }
            add_offsite_building = { type = dockyard level = 1 }
            add_to_variable = { rl_factories_added = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.08 }
            add_offsite_building = { type = dockyard level = 3 }
            add_to_variable = { rl_factories_added = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.16 }
            add_offsite_building = { type = dockyard level = 6 }
            add_to_variable = { rl_factories_added = 6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.32 }
            add_offsite_building = { type = dockyard level = 15 }
            add_to_variable = { rl_factories_added = 15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = 0.64 }
            add_offsite_building = { type = dockyard level = 40 }
            add_to_variable = { rl_factories_added = 40 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 596 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.006 }
            add_to_variable = { rl_mod_resistance_target = -0.06 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.012 }
            add_to_variable = { rl_mod_resistance_target = -0.12 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.024 }
            add_to_variable = { rl_mod_resistance_target = -0.24 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.048 }
            add_to_variable = { rl_mod_resistance_target = -0.48 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.096 }
            add_to_variable = { rl_mod_resistance_target = -0.96 }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
            if = { limit = { any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } } random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 597 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.06 }
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.12 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.24 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            add_research_slot = 1
            add_to_variable = { rl_research_slots_granted = 1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.48 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            add_research_slot = 3
            add_to_variable = { rl_research_slots_granted = 3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.96 }
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            rl_grant_one_random_tech = yes
            add_research_slot = 5
            add_to_variable = { rl_research_slots_granted = 5 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 598 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.035 }
            add_to_variable = { rl_mod_army_defence_factor = 0.035 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.85 start_equipment_factor = 1.0" owner = ROOT count = 3 }
                }
                add_to_variable = { rl_divisions_spawned = 3 }
            }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 1000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 100 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 250 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 150 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 50 }
            add_to_variable = { rl_equipment_granted = 1550 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.07 }
            add_to_variable = { rl_mod_army_defence_factor = 0.07 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.85 start_equipment_factor = 1.0" owner = ROOT count = 6 }
                }
                add_to_variable = { rl_divisions_spawned = 6 }
            }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 2000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 200 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 500 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 300 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 100 }
            add_to_variable = { rl_equipment_granted = 3100 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.14 }
            add_to_variable = { rl_mod_army_defence_factor = 0.14 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.85 start_equipment_factor = 1.0" owner = ROOT count = 12 }
                }
                add_to_variable = { rl_divisions_spawned = 12 }
            }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 4000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 400 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 1000 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 600 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 200 }
            add_to_variable = { rl_equipment_granted = 6200 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.28 }
            add_to_variable = { rl_mod_army_defence_factor = 0.28 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.85 start_equipment_factor = 1.0" owner = ROOT count = 25 }
                }
                add_to_variable = { rl_divisions_spawned = 25 }
            }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 10000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 1000 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 2500 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 1500 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 500 }
            add_to_variable = { rl_equipment_granted = 15500 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.56 }
            add_to_variable = { rl_mod_army_defence_factor = 0.56 }
            if = {
                limit = { any_owned_state = { is_controlled_by = ROOT } }
                random_owned_controlled_state = {
                    limit = { is_controlled_by = ROOT }
                    create_unit = { division = "name = \"Roguelike Legion\" division_template = \"Roguelike Legion\" start_experience_factor = 0.85 start_equipment_factor = 1.0" owner = ROOT count = 60 }
                }
                add_to_variable = { rl_divisions_spawned = 60 }
            }
            add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 25000 }
            add_equipment_to_stockpile = { type = artillery_equipment_1 amount = 2500 }
            add_equipment_to_stockpile = { type = support_equipment_1 amount = 6250 }
            add_equipment_to_stockpile = { type = motorized_equipment_1 amount = 3750 }
            add_equipment_to_stockpile = { type = convoy_1 amount = 1250 }
            add_to_variable = { rl_equipment_granted = 38750 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 599 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.02 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.04 }
            add_offsite_building = { type = arms_factory level = 1 }
            add_offsite_building = { type = industrial_complex level = 1 }
            add_offsite_building = { type = dockyard level = 1 }
            add_to_variable = { rl_factories_added = 3 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 2 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 2 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.08 }
            add_offsite_building = { type = arms_factory level = 3 }
            add_offsite_building = { type = industrial_complex level = 3 }
            add_offsite_building = { type = dockyard level = 3 }
            add_to_variable = { rl_factories_added = 9 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 5 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 5 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 5 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 5 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 5 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 5 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 30 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.16 }
            add_offsite_building = { type = arms_factory level = 6 }
            add_offsite_building = { type = industrial_complex level = 6 }
            add_offsite_building = { type = dockyard level = 6 }
            add_to_variable = { rl_factories_added = 18 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 10 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 10 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 10 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 10 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 10 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 10 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 60 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.32 }
            add_offsite_building = { type = arms_factory level = 15 }
            add_offsite_building = { type = industrial_complex level = 15 }
            add_offsite_building = { type = dockyard level = 15 }
            add_to_variable = { rl_factories_added = 45 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 25 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 25 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 25 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 25 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 25 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 25 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 150 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.64 }
            add_offsite_building = { type = arms_factory level = 40 }
            add_offsite_building = { type = industrial_complex level = 40 }
            add_offsite_building = { type = dockyard level = 40 }
            add_to_variable = { rl_factories_added = 120 }
            random_owned_controlled_state = {
                add_resource = { type = steel amount = 60 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = oil amount = 60 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = aluminium amount = 60 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = tungsten amount = 60 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = chromium amount = 60 show_state_in_tooltip = no }
            }
            random_owned_controlled_state = {
                add_resource = { type = rubber amount = 60 show_state_in_tooltip = no }
            }
            add_to_variable = { rl_resources_added = 360 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 600 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_army_defence_factor = 0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.04 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_research_speed_factor = 0.03 }
            army_experience = 50
            navy_experience = 50
            air_experience = 50
            add_manpower = 100000
            add_to_variable = { rl_manpower_granted = 100000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_defence_factor = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_research_speed_factor = 0.06 }
            army_experience = 150
            navy_experience = 150
            air_experience = 150
            add_manpower = 300000
            add_to_variable = { rl_manpower_granted = 300000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_defence_factor = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_research_speed_factor = 0.12 }
            army_experience = 400
            navy_experience = 400
            air_experience = 400
            add_manpower = 1000000
            add_to_variable = { rl_manpower_granted = 1000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_defence_factor = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_research_speed_factor = 0.24 }
            army_experience = 1000
            navy_experience = 1000
            air_experience = 1000
            add_manpower = 3000000
            add_to_variable = { rl_manpower_granted = 3000000 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_defence_factor = 0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_research_speed_factor = 0.48 }
            army_experience = 3000
            navy_experience = 3000
            air_experience = 3000
            add_manpower = 10000000
            add_to_variable = { rl_manpower_granted = 10000000 }
        }
    }
}

rl_run_monthly_specials = {
    if = {
        limit = { check_variable = { rl_core_forge_chance > 0 } any_owned_state = { is_controlled_by = ROOT NOT = { is_core_of = ROOT } } }
        random = { chance = rl_core_forge_chance random_owned_controlled_state = { limit = { NOT = { is_core_of = ROOT } } add_core_of = ROOT } }
    }
}


rl_handle_weekly_offer_schedule = {
    if = { limit = { has_global_flag = rl_freq_weekly } country_event = { id = rl.1 } }
    else_if = {
        limit = { has_global_flag = rl_freq_biweekly }
        add_to_variable = { rl_offer_week_counter = 1 }
        if = {
            limit = { check_variable = { rl_offer_week_counter > 1 } }
            set_variable = { rl_offer_week_counter = 0 }
            country_event = { id = rl.1 }
        }
    }
}

rl_handle_monthly_offer_schedule = {
    if = { limit = { has_global_flag = rl_freq_monthly } country_event = { id = rl.1 } }
    else_if = {
        limit = { has_global_flag = rl_freq_quarterly }
        add_to_variable = { rl_offer_month_counter = 1 }
        if = {
            limit = { check_variable = { rl_offer_month_counter > 2 } }
            set_variable = { rl_offer_month_counter = 0 }
            country_event = { id = rl.1 }
        }
    }
}

rl_refresh_recruitable_population_bonus = {
    # Static hidden ideas are used here because recruitable_population did not reliably update from a variable-driven dynamic modifier.
    if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 1 } }
        set_variable = { rl_mod_recruitable_population_factor = 1 }
    }
    remove_ideas = rl_recruitable_population_tier_001
    remove_ideas = rl_recruitable_population_tier_002
    remove_ideas = rl_recruitable_population_tier_003
    remove_ideas = rl_recruitable_population_tier_004
    remove_ideas = rl_recruitable_population_tier_005
    remove_ideas = rl_recruitable_population_tier_006
    remove_ideas = rl_recruitable_population_tier_007
    remove_ideas = rl_recruitable_population_tier_008
    remove_ideas = rl_recruitable_population_tier_009
    remove_ideas = rl_recruitable_population_tier_010
    remove_ideas = rl_recruitable_population_tier_011
    remove_ideas = rl_recruitable_population_tier_012
    remove_ideas = rl_recruitable_population_tier_013
    remove_ideas = rl_recruitable_population_tier_014
    remove_ideas = rl_recruitable_population_tier_015
    remove_ideas = rl_recruitable_population_tier_016
    remove_ideas = rl_recruitable_population_tier_017
    remove_ideas = rl_recruitable_population_tier_018
    remove_ideas = rl_recruitable_population_tier_019
    remove_ideas = rl_recruitable_population_tier_020
    remove_ideas = rl_recruitable_population_tier_021
    remove_ideas = rl_recruitable_population_tier_022
    remove_ideas = rl_recruitable_population_tier_023
    remove_ideas = rl_recruitable_population_tier_024
    remove_ideas = rl_recruitable_population_tier_025
    remove_ideas = rl_recruitable_population_tier_026
    remove_ideas = rl_recruitable_population_tier_027
    remove_ideas = rl_recruitable_population_tier_028
    remove_ideas = rl_recruitable_population_tier_029
    remove_ideas = rl_recruitable_population_tier_030
    remove_ideas = rl_recruitable_population_tier_031
    remove_ideas = rl_recruitable_population_tier_032
    remove_ideas = rl_recruitable_population_tier_033
    remove_ideas = rl_recruitable_population_tier_034
    remove_ideas = rl_recruitable_population_tier_035
    remove_ideas = rl_recruitable_population_tier_036
    remove_ideas = rl_recruitable_population_tier_037
    remove_ideas = rl_recruitable_population_tier_038
    remove_ideas = rl_recruitable_population_tier_039
    remove_ideas = rl_recruitable_population_tier_040
    remove_ideas = rl_recruitable_population_tier_041
    remove_ideas = rl_recruitable_population_tier_042
    remove_ideas = rl_recruitable_population_tier_043
    remove_ideas = rl_recruitable_population_tier_044
    remove_ideas = rl_recruitable_population_tier_045
    remove_ideas = rl_recruitable_population_tier_046
    remove_ideas = rl_recruitable_population_tier_047
    remove_ideas = rl_recruitable_population_tier_048
    remove_ideas = rl_recruitable_population_tier_049
    remove_ideas = rl_recruitable_population_tier_050
    remove_ideas = rl_recruitable_population_tier_051
    remove_ideas = rl_recruitable_population_tier_052
    remove_ideas = rl_recruitable_population_tier_053
    remove_ideas = rl_recruitable_population_tier_054
    remove_ideas = rl_recruitable_population_tier_055
    remove_ideas = rl_recruitable_population_tier_056
    remove_ideas = rl_recruitable_population_tier_057
    remove_ideas = rl_recruitable_population_tier_058
    remove_ideas = rl_recruitable_population_tier_059
    remove_ideas = rl_recruitable_population_tier_060
    remove_ideas = rl_recruitable_population_tier_061
    remove_ideas = rl_recruitable_population_tier_062
    remove_ideas = rl_recruitable_population_tier_063
    remove_ideas = rl_recruitable_population_tier_064
    remove_ideas = rl_recruitable_population_tier_065
    remove_ideas = rl_recruitable_population_tier_066
    remove_ideas = rl_recruitable_population_tier_067
    remove_ideas = rl_recruitable_population_tier_068
    remove_ideas = rl_recruitable_population_tier_069
    remove_ideas = rl_recruitable_population_tier_070
    remove_ideas = rl_recruitable_population_tier_071
    remove_ideas = rl_recruitable_population_tier_072
    remove_ideas = rl_recruitable_population_tier_073
    remove_ideas = rl_recruitable_population_tier_074
    remove_ideas = rl_recruitable_population_tier_075
    remove_ideas = rl_recruitable_population_tier_076
    remove_ideas = rl_recruitable_population_tier_077
    remove_ideas = rl_recruitable_population_tier_078
    remove_ideas = rl_recruitable_population_tier_079
    remove_ideas = rl_recruitable_population_tier_080
    remove_ideas = rl_recruitable_population_tier_081
    remove_ideas = rl_recruitable_population_tier_082
    remove_ideas = rl_recruitable_population_tier_083
    remove_ideas = rl_recruitable_population_tier_084
    remove_ideas = rl_recruitable_population_tier_085
    remove_ideas = rl_recruitable_population_tier_086
    remove_ideas = rl_recruitable_population_tier_087
    remove_ideas = rl_recruitable_population_tier_088
    remove_ideas = rl_recruitable_population_tier_089
    remove_ideas = rl_recruitable_population_tier_090
    remove_ideas = rl_recruitable_population_tier_091
    remove_ideas = rl_recruitable_population_tier_092
    remove_ideas = rl_recruitable_population_tier_093
    remove_ideas = rl_recruitable_population_tier_094
    remove_ideas = rl_recruitable_population_tier_095
    remove_ideas = rl_recruitable_population_tier_096
    remove_ideas = rl_recruitable_population_tier_097
    remove_ideas = rl_recruitable_population_tier_098
    remove_ideas = rl_recruitable_population_tier_099
    remove_ideas = rl_recruitable_population_tier_100
    remove_ideas = rl_recruitable_population_tier_101
    remove_ideas = rl_recruitable_population_tier_102
    remove_ideas = rl_recruitable_population_tier_103
    remove_ideas = rl_recruitable_population_tier_104
    remove_ideas = rl_recruitable_population_tier_105
    remove_ideas = rl_recruitable_population_tier_106
    remove_ideas = rl_recruitable_population_tier_107
    remove_ideas = rl_recruitable_population_tier_108
    remove_ideas = rl_recruitable_population_tier_109
    remove_ideas = rl_recruitable_population_tier_110
    remove_ideas = rl_recruitable_population_tier_111
    remove_ideas = rl_recruitable_population_tier_112
    remove_ideas = rl_recruitable_population_tier_113
    remove_ideas = rl_recruitable_population_tier_114
    remove_ideas = rl_recruitable_population_tier_115
    remove_ideas = rl_recruitable_population_tier_116
    remove_ideas = rl_recruitable_population_tier_117
    remove_ideas = rl_recruitable_population_tier_118
    remove_ideas = rl_recruitable_population_tier_119
    remove_ideas = rl_recruitable_population_tier_120
    remove_ideas = rl_recruitable_population_tier_121
    remove_ideas = rl_recruitable_population_tier_122
    remove_ideas = rl_recruitable_population_tier_123
    remove_ideas = rl_recruitable_population_tier_124
    remove_ideas = rl_recruitable_population_tier_125
    remove_ideas = rl_recruitable_population_tier_126
    remove_ideas = rl_recruitable_population_tier_127
    remove_ideas = rl_recruitable_population_tier_128
    remove_ideas = rl_recruitable_population_tier_129
    remove_ideas = rl_recruitable_population_tier_130
    remove_ideas = rl_recruitable_population_tier_131
    remove_ideas = rl_recruitable_population_tier_132
    remove_ideas = rl_recruitable_population_tier_133
    remove_ideas = rl_recruitable_population_tier_134
    remove_ideas = rl_recruitable_population_tier_135
    remove_ideas = rl_recruitable_population_tier_136
    remove_ideas = rl_recruitable_population_tier_137
    remove_ideas = rl_recruitable_population_tier_138
    remove_ideas = rl_recruitable_population_tier_139
    remove_ideas = rl_recruitable_population_tier_140
    remove_ideas = rl_recruitable_population_tier_141
    remove_ideas = rl_recruitable_population_tier_142
    remove_ideas = rl_recruitable_population_tier_143
    remove_ideas = rl_recruitable_population_tier_144
    remove_ideas = rl_recruitable_population_tier_145
    remove_ideas = rl_recruitable_population_tier_146
    remove_ideas = rl_recruitable_population_tier_147
    remove_ideas = rl_recruitable_population_tier_148
    remove_ideas = rl_recruitable_population_tier_149
    remove_ideas = rl_recruitable_population_tier_150
    remove_ideas = rl_recruitable_population_tier_151
    remove_ideas = rl_recruitable_population_tier_152
    remove_ideas = rl_recruitable_population_tier_153
    remove_ideas = rl_recruitable_population_tier_154
    remove_ideas = rl_recruitable_population_tier_155
    remove_ideas = rl_recruitable_population_tier_156
    remove_ideas = rl_recruitable_population_tier_157
    remove_ideas = rl_recruitable_population_tier_158
    remove_ideas = rl_recruitable_population_tier_159
    remove_ideas = rl_recruitable_population_tier_160
    remove_ideas = rl_recruitable_population_tier_161
    remove_ideas = rl_recruitable_population_tier_162
    remove_ideas = rl_recruitable_population_tier_163
    remove_ideas = rl_recruitable_population_tier_164
    remove_ideas = rl_recruitable_population_tier_165
    remove_ideas = rl_recruitable_population_tier_166
    remove_ideas = rl_recruitable_population_tier_167
    remove_ideas = rl_recruitable_population_tier_168
    remove_ideas = rl_recruitable_population_tier_169
    remove_ideas = rl_recruitable_population_tier_170
    remove_ideas = rl_recruitable_population_tier_171
    remove_ideas = rl_recruitable_population_tier_172
    remove_ideas = rl_recruitable_population_tier_173
    remove_ideas = rl_recruitable_population_tier_174
    remove_ideas = rl_recruitable_population_tier_175
    remove_ideas = rl_recruitable_population_tier_176
    remove_ideas = rl_recruitable_population_tier_177
    remove_ideas = rl_recruitable_population_tier_178
    remove_ideas = rl_recruitable_population_tier_179
    remove_ideas = rl_recruitable_population_tier_180
    remove_ideas = rl_recruitable_population_tier_181
    remove_ideas = rl_recruitable_population_tier_182
    remove_ideas = rl_recruitable_population_tier_183
    remove_ideas = rl_recruitable_population_tier_184
    remove_ideas = rl_recruitable_population_tier_185
    remove_ideas = rl_recruitable_population_tier_186
    remove_ideas = rl_recruitable_population_tier_187
    remove_ideas = rl_recruitable_population_tier_188
    remove_ideas = rl_recruitable_population_tier_189
    remove_ideas = rl_recruitable_population_tier_190
    remove_ideas = rl_recruitable_population_tier_191
    remove_ideas = rl_recruitable_population_tier_192
    remove_ideas = rl_recruitable_population_tier_193
    remove_ideas = rl_recruitable_population_tier_194
    remove_ideas = rl_recruitable_population_tier_195
    remove_ideas = rl_recruitable_population_tier_196
    remove_ideas = rl_recruitable_population_tier_197
    remove_ideas = rl_recruitable_population_tier_198
    remove_ideas = rl_recruitable_population_tier_199
    remove_ideas = rl_recruitable_population_tier_200
    if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9975 } }
        add_ideas = rl_recruitable_population_tier_200
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9925 } }
        add_ideas = rl_recruitable_population_tier_199
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9875 } }
        add_ideas = rl_recruitable_population_tier_198
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9825 } }
        add_ideas = rl_recruitable_population_tier_197
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9775 } }
        add_ideas = rl_recruitable_population_tier_196
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9725 } }
        add_ideas = rl_recruitable_population_tier_195
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9675 } }
        add_ideas = rl_recruitable_population_tier_194
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9625 } }
        add_ideas = rl_recruitable_population_tier_193
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9575 } }
        add_ideas = rl_recruitable_population_tier_192
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9525 } }
        add_ideas = rl_recruitable_population_tier_191
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9475 } }
        add_ideas = rl_recruitable_population_tier_190
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9425 } }
        add_ideas = rl_recruitable_population_tier_189
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9375 } }
        add_ideas = rl_recruitable_population_tier_188
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9325 } }
        add_ideas = rl_recruitable_population_tier_187
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9275 } }
        add_ideas = rl_recruitable_population_tier_186
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9225 } }
        add_ideas = rl_recruitable_population_tier_185
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9175 } }
        add_ideas = rl_recruitable_population_tier_184
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9125 } }
        add_ideas = rl_recruitable_population_tier_183
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9075 } }
        add_ideas = rl_recruitable_population_tier_182
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.9025 } }
        add_ideas = rl_recruitable_population_tier_181
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8975 } }
        add_ideas = rl_recruitable_population_tier_180
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8925 } }
        add_ideas = rl_recruitable_population_tier_179
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8875 } }
        add_ideas = rl_recruitable_population_tier_178
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8825 } }
        add_ideas = rl_recruitable_population_tier_177
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8775 } }
        add_ideas = rl_recruitable_population_tier_176
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8725 } }
        add_ideas = rl_recruitable_population_tier_175
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8675 } }
        add_ideas = rl_recruitable_population_tier_174
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8625 } }
        add_ideas = rl_recruitable_population_tier_173
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8575 } }
        add_ideas = rl_recruitable_population_tier_172
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8525 } }
        add_ideas = rl_recruitable_population_tier_171
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8475 } }
        add_ideas = rl_recruitable_population_tier_170
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8425 } }
        add_ideas = rl_recruitable_population_tier_169
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8375 } }
        add_ideas = rl_recruitable_population_tier_168
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8325 } }
        add_ideas = rl_recruitable_population_tier_167
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8275 } }
        add_ideas = rl_recruitable_population_tier_166
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8225 } }
        add_ideas = rl_recruitable_population_tier_165
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8175 } }
        add_ideas = rl_recruitable_population_tier_164
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8125 } }
        add_ideas = rl_recruitable_population_tier_163
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8075 } }
        add_ideas = rl_recruitable_population_tier_162
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.8025 } }
        add_ideas = rl_recruitable_population_tier_161
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7975 } }
        add_ideas = rl_recruitable_population_tier_160
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7925 } }
        add_ideas = rl_recruitable_population_tier_159
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7875 } }
        add_ideas = rl_recruitable_population_tier_158
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7825 } }
        add_ideas = rl_recruitable_population_tier_157
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7775 } }
        add_ideas = rl_recruitable_population_tier_156
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7725 } }
        add_ideas = rl_recruitable_population_tier_155
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7675 } }
        add_ideas = rl_recruitable_population_tier_154
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7625 } }
        add_ideas = rl_recruitable_population_tier_153
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7575 } }
        add_ideas = rl_recruitable_population_tier_152
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7525 } }
        add_ideas = rl_recruitable_population_tier_151
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7475 } }
        add_ideas = rl_recruitable_population_tier_150
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7425 } }
        add_ideas = rl_recruitable_population_tier_149
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7375 } }
        add_ideas = rl_recruitable_population_tier_148
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7325 } }
        add_ideas = rl_recruitable_population_tier_147
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7275 } }
        add_ideas = rl_recruitable_population_tier_146
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7225 } }
        add_ideas = rl_recruitable_population_tier_145
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7175 } }
        add_ideas = rl_recruitable_population_tier_144
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7125 } }
        add_ideas = rl_recruitable_population_tier_143
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7075 } }
        add_ideas = rl_recruitable_population_tier_142
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.7025 } }
        add_ideas = rl_recruitable_population_tier_141
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6975 } }
        add_ideas = rl_recruitable_population_tier_140
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6925 } }
        add_ideas = rl_recruitable_population_tier_139
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6875 } }
        add_ideas = rl_recruitable_population_tier_138
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6825 } }
        add_ideas = rl_recruitable_population_tier_137
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6775 } }
        add_ideas = rl_recruitable_population_tier_136
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6725 } }
        add_ideas = rl_recruitable_population_tier_135
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6675 } }
        add_ideas = rl_recruitable_population_tier_134
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6625 } }
        add_ideas = rl_recruitable_population_tier_133
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6575 } }
        add_ideas = rl_recruitable_population_tier_132
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6525 } }
        add_ideas = rl_recruitable_population_tier_131
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6475 } }
        add_ideas = rl_recruitable_population_tier_130
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6425 } }
        add_ideas = rl_recruitable_population_tier_129
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6375 } }
        add_ideas = rl_recruitable_population_tier_128
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6325 } }
        add_ideas = rl_recruitable_population_tier_127
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6275 } }
        add_ideas = rl_recruitable_population_tier_126
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6225 } }
        add_ideas = rl_recruitable_population_tier_125
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6175 } }
        add_ideas = rl_recruitable_population_tier_124
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6125 } }
        add_ideas = rl_recruitable_population_tier_123
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6075 } }
        add_ideas = rl_recruitable_population_tier_122
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.6025 } }
        add_ideas = rl_recruitable_population_tier_121
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5975 } }
        add_ideas = rl_recruitable_population_tier_120
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5925 } }
        add_ideas = rl_recruitable_population_tier_119
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5875 } }
        add_ideas = rl_recruitable_population_tier_118
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5825 } }
        add_ideas = rl_recruitable_population_tier_117
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5775 } }
        add_ideas = rl_recruitable_population_tier_116
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5725 } }
        add_ideas = rl_recruitable_population_tier_115
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5675 } }
        add_ideas = rl_recruitable_population_tier_114
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5625 } }
        add_ideas = rl_recruitable_population_tier_113
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5575 } }
        add_ideas = rl_recruitable_population_tier_112
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5525 } }
        add_ideas = rl_recruitable_population_tier_111
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5475 } }
        add_ideas = rl_recruitable_population_tier_110
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5425 } }
        add_ideas = rl_recruitable_population_tier_109
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5375 } }
        add_ideas = rl_recruitable_population_tier_108
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5325 } }
        add_ideas = rl_recruitable_population_tier_107
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5275 } }
        add_ideas = rl_recruitable_population_tier_106
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5225 } }
        add_ideas = rl_recruitable_population_tier_105
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5175 } }
        add_ideas = rl_recruitable_population_tier_104
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5125 } }
        add_ideas = rl_recruitable_population_tier_103
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5075 } }
        add_ideas = rl_recruitable_population_tier_102
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.5025 } }
        add_ideas = rl_recruitable_population_tier_101
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4975 } }
        add_ideas = rl_recruitable_population_tier_100
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4925 } }
        add_ideas = rl_recruitable_population_tier_099
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4875 } }
        add_ideas = rl_recruitable_population_tier_098
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4825 } }
        add_ideas = rl_recruitable_population_tier_097
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4775 } }
        add_ideas = rl_recruitable_population_tier_096
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4725 } }
        add_ideas = rl_recruitable_population_tier_095
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4675 } }
        add_ideas = rl_recruitable_population_tier_094
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4625 } }
        add_ideas = rl_recruitable_population_tier_093
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4575 } }
        add_ideas = rl_recruitable_population_tier_092
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4525 } }
        add_ideas = rl_recruitable_population_tier_091
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4475 } }
        add_ideas = rl_recruitable_population_tier_090
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4425 } }
        add_ideas = rl_recruitable_population_tier_089
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4375 } }
        add_ideas = rl_recruitable_population_tier_088
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4325 } }
        add_ideas = rl_recruitable_population_tier_087
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4275 } }
        add_ideas = rl_recruitable_population_tier_086
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4225 } }
        add_ideas = rl_recruitable_population_tier_085
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4175 } }
        add_ideas = rl_recruitable_population_tier_084
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4125 } }
        add_ideas = rl_recruitable_population_tier_083
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4075 } }
        add_ideas = rl_recruitable_population_tier_082
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.4025 } }
        add_ideas = rl_recruitable_population_tier_081
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3975 } }
        add_ideas = rl_recruitable_population_tier_080
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3925 } }
        add_ideas = rl_recruitable_population_tier_079
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3875 } }
        add_ideas = rl_recruitable_population_tier_078
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3825 } }
        add_ideas = rl_recruitable_population_tier_077
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3775 } }
        add_ideas = rl_recruitable_population_tier_076
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3725 } }
        add_ideas = rl_recruitable_population_tier_075
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3675 } }
        add_ideas = rl_recruitable_population_tier_074
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3625 } }
        add_ideas = rl_recruitable_population_tier_073
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3575 } }
        add_ideas = rl_recruitable_population_tier_072
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3525 } }
        add_ideas = rl_recruitable_population_tier_071
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3475 } }
        add_ideas = rl_recruitable_population_tier_070
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3425 } }
        add_ideas = rl_recruitable_population_tier_069
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3375 } }
        add_ideas = rl_recruitable_population_tier_068
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3325 } }
        add_ideas = rl_recruitable_population_tier_067
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3275 } }
        add_ideas = rl_recruitable_population_tier_066
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3225 } }
        add_ideas = rl_recruitable_population_tier_065
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3175 } }
        add_ideas = rl_recruitable_population_tier_064
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3125 } }
        add_ideas = rl_recruitable_population_tier_063
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3075 } }
        add_ideas = rl_recruitable_population_tier_062
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.3025 } }
        add_ideas = rl_recruitable_population_tier_061
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2975 } }
        add_ideas = rl_recruitable_population_tier_060
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2925 } }
        add_ideas = rl_recruitable_population_tier_059
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2875 } }
        add_ideas = rl_recruitable_population_tier_058
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2825 } }
        add_ideas = rl_recruitable_population_tier_057
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2775 } }
        add_ideas = rl_recruitable_population_tier_056
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2725 } }
        add_ideas = rl_recruitable_population_tier_055
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2675 } }
        add_ideas = rl_recruitable_population_tier_054
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2625 } }
        add_ideas = rl_recruitable_population_tier_053
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2575 } }
        add_ideas = rl_recruitable_population_tier_052
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2525 } }
        add_ideas = rl_recruitable_population_tier_051
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2475 } }
        add_ideas = rl_recruitable_population_tier_050
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2425 } }
        add_ideas = rl_recruitable_population_tier_049
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2375 } }
        add_ideas = rl_recruitable_population_tier_048
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2325 } }
        add_ideas = rl_recruitable_population_tier_047
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2275 } }
        add_ideas = rl_recruitable_population_tier_046
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2225 } }
        add_ideas = rl_recruitable_population_tier_045
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2175 } }
        add_ideas = rl_recruitable_population_tier_044
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2125 } }
        add_ideas = rl_recruitable_population_tier_043
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2075 } }
        add_ideas = rl_recruitable_population_tier_042
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.2025 } }
        add_ideas = rl_recruitable_population_tier_041
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1975 } }
        add_ideas = rl_recruitable_population_tier_040
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1925 } }
        add_ideas = rl_recruitable_population_tier_039
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1875 } }
        add_ideas = rl_recruitable_population_tier_038
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1825 } }
        add_ideas = rl_recruitable_population_tier_037
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1775 } }
        add_ideas = rl_recruitable_population_tier_036
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1725 } }
        add_ideas = rl_recruitable_population_tier_035
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1675 } }
        add_ideas = rl_recruitable_population_tier_034
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1625 } }
        add_ideas = rl_recruitable_population_tier_033
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1575 } }
        add_ideas = rl_recruitable_population_tier_032
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1525 } }
        add_ideas = rl_recruitable_population_tier_031
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1475 } }
        add_ideas = rl_recruitable_population_tier_030
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1425 } }
        add_ideas = rl_recruitable_population_tier_029
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1375 } }
        add_ideas = rl_recruitable_population_tier_028
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1325 } }
        add_ideas = rl_recruitable_population_tier_027
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1275 } }
        add_ideas = rl_recruitable_population_tier_026
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1225 } }
        add_ideas = rl_recruitable_population_tier_025
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1175 } }
        add_ideas = rl_recruitable_population_tier_024
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1125 } }
        add_ideas = rl_recruitable_population_tier_023
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1075 } }
        add_ideas = rl_recruitable_population_tier_022
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.1025 } }
        add_ideas = rl_recruitable_population_tier_021
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0975 } }
        add_ideas = rl_recruitable_population_tier_020
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0925 } }
        add_ideas = rl_recruitable_population_tier_019
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0875 } }
        add_ideas = rl_recruitable_population_tier_018
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0825 } }
        add_ideas = rl_recruitable_population_tier_017
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0775 } }
        add_ideas = rl_recruitable_population_tier_016
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0725 } }
        add_ideas = rl_recruitable_population_tier_015
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0675 } }
        add_ideas = rl_recruitable_population_tier_014
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0625 } }
        add_ideas = rl_recruitable_population_tier_013
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0575 } }
        add_ideas = rl_recruitable_population_tier_012
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0525 } }
        add_ideas = rl_recruitable_population_tier_011
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0475 } }
        add_ideas = rl_recruitable_population_tier_010
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0425 } }
        add_ideas = rl_recruitable_population_tier_009
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0375 } }
        add_ideas = rl_recruitable_population_tier_008
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0325 } }
        add_ideas = rl_recruitable_population_tier_007
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0275 } }
        add_ideas = rl_recruitable_population_tier_006
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0225 } }
        add_ideas = rl_recruitable_population_tier_005
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0175 } }
        add_ideas = rl_recruitable_population_tier_004
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0125 } }
        add_ideas = rl_recruitable_population_tier_003
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0075 } }
        add_ideas = rl_recruitable_population_tier_002
    }
    else_if = {
        limit = { check_variable = { rl_mod_recruitable_population_factor > 0.0025 } }
        add_ideas = rl_recruitable_population_tier_001
    }
}


# Political-power fate market. The upgrade ID is fully random; only the rarity table changes by price tier.
rl_purchase_upgrade_100 = {
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    random_list = {
        70 = { set_variable = { rl_offer_1_rarity = 1 } }
        15 = { set_variable = { rl_offer_1_rarity = 2 } }
        10 = { set_variable = { rl_offer_1_rarity = 3 } }
        4 = { set_variable = { rl_offer_1_rarity = 4 } }
        1 = { set_variable = { rl_offer_1_rarity = 5 } }
    }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}

rl_purchase_upgrade_200 = {
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    random_list = {
        45 = { set_variable = { rl_offer_1_rarity = 1 } }
        25 = { set_variable = { rl_offer_1_rarity = 2 } }
        18 = { set_variable = { rl_offer_1_rarity = 3 } }
        9 = { set_variable = { rl_offer_1_rarity = 4 } }
        3 = { set_variable = { rl_offer_1_rarity = 5 } }
    }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}

rl_purchase_upgrade_500 = {
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    random_list = {
        20 = { set_variable = { rl_offer_1_rarity = 1 } }
        20 = { set_variable = { rl_offer_1_rarity = 2 } }
        25 = { set_variable = { rl_offer_1_rarity = 3 } }
        20 = { set_variable = { rl_offer_1_rarity = 4 } }
        15 = { set_variable = { rl_offer_1_rarity = 5 } }
    }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}

rl_purchase_upgrade_1000 = {
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    random_list = {
        5 = { set_variable = { rl_offer_1_rarity = 2 } }
        10 = { set_variable = { rl_offer_1_rarity = 3 } }
        40 = { set_variable = { rl_offer_1_rarity = 4 } }
        45 = { set_variable = { rl_offer_1_rarity = 5 } }
    }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}

rl_apply_selected_upgrade_v30 = {
    if = {
        limit = { check_variable = { rl_selected_rarity = 1 } }
        add_to_variable = { rl_fate_shards = 1 }
        add_to_variable = { rl_fusion_common_cores = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_selected_rarity = 2 } }
        add_to_variable = { rl_fate_shards = 2 }
        add_to_variable = { rl_fusion_rare_cores = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_selected_rarity = 3 } }
        add_to_variable = { rl_fate_shards = 4 }
        add_to_variable = { rl_fusion_epic_cores = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_selected_rarity = 4 } }
        add_to_variable = { rl_fate_shards = 8 }
        add_to_variable = { rl_fusion_legendary_cores = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_selected_rarity = 5 } }
        add_to_variable = { rl_fate_shards = 16 }
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 1 }
                check_variable = { rl_selected_id = 2 }
                check_variable = { rl_selected_id = 3 }
                check_variable = { rl_selected_id = 4 }
                check_variable = { rl_selected_id = 5 }
                check_variable = { rl_selected_id = 7 }
                check_variable = { rl_selected_id = 8 }
                check_variable = { rl_selected_id = 9 }
                check_variable = { rl_selected_id = 10 }
                check_variable = { rl_selected_id = 11 }
                check_variable = { rl_selected_id = 12 }
                check_variable = { rl_selected_id = 13 }
                check_variable = { rl_selected_id = 14 }
                check_variable = { rl_selected_id = 15 }
                check_variable = { rl_selected_id = 16 }
                check_variable = { rl_selected_id = 17 }
                check_variable = { rl_selected_id = 18 }
                check_variable = { rl_selected_id = 19 }
                check_variable = { rl_selected_id = 20 }
                check_variable = { rl_selected_id = 21 }
                check_variable = { rl_selected_id = 22 }
                check_variable = { rl_selected_id = 23 }
                check_variable = { rl_selected_id = 24 }
                check_variable = { rl_selected_id = 25 }
                check_variable = { rl_selected_id = 101 }
                check_variable = { rl_selected_id = 102 }
                check_variable = { rl_selected_id = 103 }
                check_variable = { rl_selected_id = 104 }
                check_variable = { rl_selected_id = 105 }
                check_variable = { rl_selected_id = 107 }
                check_variable = { rl_selected_id = 108 }
                check_variable = { rl_selected_id = 109 }
                check_variable = { rl_selected_id = 110 }
                check_variable = { rl_selected_id = 113 }
                check_variable = { rl_selected_id = 114 }
                check_variable = { rl_selected_id = 115 }
                check_variable = { rl_selected_id = 116 }
                check_variable = { rl_selected_id = 195 }
                check_variable = { rl_selected_id = 199 }
                check_variable = { rl_selected_id = 201 }
                check_variable = { rl_selected_id = 202 }
                check_variable = { rl_selected_id = 203 }
                check_variable = { rl_selected_id = 204 }
                check_variable = { rl_selected_id = 205 }
                check_variable = { rl_selected_id = 206 }
                check_variable = { rl_selected_id = 207 }
                check_variable = { rl_selected_id = 208 }
                check_variable = { rl_selected_id = 209 }
                check_variable = { rl_selected_id = 211 }
                check_variable = { rl_selected_id = 212 }
                check_variable = { rl_selected_id = 213 }
                check_variable = { rl_selected_id = 214 }
                check_variable = { rl_selected_id = 215 }
                check_variable = { rl_selected_id = 216 }
                check_variable = { rl_selected_id = 217 }
                check_variable = { rl_selected_id = 218 }
                check_variable = { rl_selected_id = 220 }
                check_variable = { rl_selected_id = 221 }
                check_variable = { rl_selected_id = 222 }
                check_variable = { rl_selected_id = 223 }
                check_variable = { rl_selected_id = 224 }
                check_variable = { rl_selected_id = 225 }
                check_variable = { rl_selected_id = 226 }
                check_variable = { rl_selected_id = 227 }
                check_variable = { rl_selected_id = 228 }
                check_variable = { rl_selected_id = 229 }
                check_variable = { rl_selected_id = 230 }
                check_variable = { rl_selected_id = 231 }
                check_variable = { rl_selected_id = 233 }
                check_variable = { rl_selected_id = 234 }
                check_variable = { rl_selected_id = 235 }
                check_variable = { rl_selected_id = 237 }
                check_variable = { rl_selected_id = 238 }
                check_variable = { rl_selected_id = 239 }
                check_variable = { rl_selected_id = 240 }
                check_variable = { rl_selected_id = 395 }
                check_variable = { rl_selected_id = 396 }
                check_variable = { rl_selected_id = 399 }
                check_variable = { rl_selected_id = 401 }
                check_variable = { rl_selected_id = 402 }
                check_variable = { rl_selected_id = 403 }
                check_variable = { rl_selected_id = 404 }
                check_variable = { rl_selected_id = 405 }
                check_variable = { rl_selected_id = 406 }
                check_variable = { rl_selected_id = 407 }
                check_variable = { rl_selected_id = 408 }
                check_variable = { rl_selected_id = 410 }
                check_variable = { rl_selected_id = 411 }
                check_variable = { rl_selected_id = 412 }
                check_variable = { rl_selected_id = 413 }
                check_variable = { rl_selected_id = 414 }
                check_variable = { rl_selected_id = 416 }
                check_variable = { rl_selected_id = 418 }
                check_variable = { rl_selected_id = 419 }
                check_variable = { rl_selected_id = 420 }
                check_variable = { rl_selected_id = 421 }
                check_variable = { rl_selected_id = 422 }
                check_variable = { rl_selected_id = 423 }
                check_variable = { rl_selected_id = 424 }
                check_variable = { rl_selected_id = 425 }
                check_variable = { rl_selected_id = 426 }
                check_variable = { rl_selected_id = 427 }
                check_variable = { rl_selected_id = 428 }
                check_variable = { rl_selected_id = 429 }
                check_variable = { rl_selected_id = 430 }
                check_variable = { rl_selected_id = 432 }
                check_variable = { rl_selected_id = 434 }
                check_variable = { rl_selected_id = 436 }
                check_variable = { rl_selected_id = 438 }
                check_variable = { rl_selected_id = 439 }
                check_variable = { rl_selected_id = 440 }
                check_variable = { rl_selected_id = 573 }
                check_variable = { rl_selected_id = 577 }
                check_variable = { rl_selected_id = 581 }
                check_variable = { rl_selected_id = 583 }
                check_variable = { rl_selected_id = 595 }
                check_variable = { rl_selected_id = 599 }
            }
        }
        add_to_variable = { rl_cat_industry = 1 }
        rl_check_set_industry = yes
    }
    else_if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 26 }
                check_variable = { rl_selected_id = 27 }
                check_variable = { rl_selected_id = 28 }
                check_variable = { rl_selected_id = 29 }
                check_variable = { rl_selected_id = 30 }
                check_variable = { rl_selected_id = 32 }
                check_variable = { rl_selected_id = 33 }
                check_variable = { rl_selected_id = 34 }
                check_variable = { rl_selected_id = 35 }
                check_variable = { rl_selected_id = 42 }
                check_variable = { rl_selected_id = 43 }
                check_variable = { rl_selected_id = 44 }
                check_variable = { rl_selected_id = 49 }
                check_variable = { rl_selected_id = 50 }
                check_variable = { rl_selected_id = 51 }
                check_variable = { rl_selected_id = 52 }
                check_variable = { rl_selected_id = 53 }
                check_variable = { rl_selected_id = 54 }
                check_variable = { rl_selected_id = 55 }
                check_variable = { rl_selected_id = 56 }
                check_variable = { rl_selected_id = 57 }
                check_variable = { rl_selected_id = 58 }
                check_variable = { rl_selected_id = 59 }
                check_variable = { rl_selected_id = 60 }
                check_variable = { rl_selected_id = 97 }
                check_variable = { rl_selected_id = 111 }
                check_variable = { rl_selected_id = 112 }
                check_variable = { rl_selected_id = 117 }
                check_variable = { rl_selected_id = 118 }
                check_variable = { rl_selected_id = 121 }
                check_variable = { rl_selected_id = 122 }
                check_variable = { rl_selected_id = 123 }
                check_variable = { rl_selected_id = 124 }
                check_variable = { rl_selected_id = 125 }
                check_variable = { rl_selected_id = 126 }
                check_variable = { rl_selected_id = 127 }
                check_variable = { rl_selected_id = 128 }
                check_variable = { rl_selected_id = 129 }
                check_variable = { rl_selected_id = 130 }
                check_variable = { rl_selected_id = 131 }
                check_variable = { rl_selected_id = 132 }
                check_variable = { rl_selected_id = 133 }
                check_variable = { rl_selected_id = 134 }
                check_variable = { rl_selected_id = 135 }
                check_variable = { rl_selected_id = 137 }
                check_variable = { rl_selected_id = 138 }
                check_variable = { rl_selected_id = 139 }
                check_variable = { rl_selected_id = 140 }
                check_variable = { rl_selected_id = 149 }
                check_variable = { rl_selected_id = 150 }
                check_variable = { rl_selected_id = 151 }
                check_variable = { rl_selected_id = 154 }
                check_variable = { rl_selected_id = 191 }
                check_variable = { rl_selected_id = 192 }
                check_variable = { rl_selected_id = 197 }
                check_variable = { rl_selected_id = 219 }
                check_variable = { rl_selected_id = 241 }
                check_variable = { rl_selected_id = 242 }
                check_variable = { rl_selected_id = 243 }
                check_variable = { rl_selected_id = 244 }
                check_variable = { rl_selected_id = 245 }
                check_variable = { rl_selected_id = 248 }
                check_variable = { rl_selected_id = 249 }
                check_variable = { rl_selected_id = 250 }
                check_variable = { rl_selected_id = 251 }
                check_variable = { rl_selected_id = 252 }
                check_variable = { rl_selected_id = 253 }
                check_variable = { rl_selected_id = 254 }
                check_variable = { rl_selected_id = 255 }
                check_variable = { rl_selected_id = 256 }
                check_variable = { rl_selected_id = 257 }
                check_variable = { rl_selected_id = 258 }
                check_variable = { rl_selected_id = 259 }
                check_variable = { rl_selected_id = 260 }
                check_variable = { rl_selected_id = 261 }
                check_variable = { rl_selected_id = 262 }
                check_variable = { rl_selected_id = 263 }
                check_variable = { rl_selected_id = 264 }
                check_variable = { rl_selected_id = 265 }
                check_variable = { rl_selected_id = 266 }
                check_variable = { rl_selected_id = 267 }
                check_variable = { rl_selected_id = 268 }
                check_variable = { rl_selected_id = 269 }
                check_variable = { rl_selected_id = 270 }
                check_variable = { rl_selected_id = 271 }
                check_variable = { rl_selected_id = 272 }
                check_variable = { rl_selected_id = 273 }
                check_variable = { rl_selected_id = 274 }
                check_variable = { rl_selected_id = 275 }
                check_variable = { rl_selected_id = 276 }
                check_variable = { rl_selected_id = 278 }
                check_variable = { rl_selected_id = 279 }
                check_variable = { rl_selected_id = 280 }
                check_variable = { rl_selected_id = 281 }
                check_variable = { rl_selected_id = 282 }
                check_variable = { rl_selected_id = 283 }
                check_variable = { rl_selected_id = 284 }
                check_variable = { rl_selected_id = 285 }
                check_variable = { rl_selected_id = 294 }
                check_variable = { rl_selected_id = 296 }
                check_variable = { rl_selected_id = 297 }
                check_variable = { rl_selected_id = 298 }
                check_variable = { rl_selected_id = 299 }
                check_variable = { rl_selected_id = 300 }
                check_variable = { rl_selected_id = 301 }
                check_variable = { rl_selected_id = 309 }
                check_variable = { rl_selected_id = 315 }
                check_variable = { rl_selected_id = 332 }
                check_variable = { rl_selected_id = 333 }
                check_variable = { rl_selected_id = 362 }
                check_variable = { rl_selected_id = 379 }
                check_variable = { rl_selected_id = 390 }
                check_variable = { rl_selected_id = 391 }
                check_variable = { rl_selected_id = 394 }
                check_variable = { rl_selected_id = 397 }
                check_variable = { rl_selected_id = 409 }
                check_variable = { rl_selected_id = 415 }
                check_variable = { rl_selected_id = 417 }
                check_variable = { rl_selected_id = 431 }
                check_variable = { rl_selected_id = 433 }
                check_variable = { rl_selected_id = 441 }
                check_variable = { rl_selected_id = 442 }
                check_variable = { rl_selected_id = 443 }
                check_variable = { rl_selected_id = 444 }
                check_variable = { rl_selected_id = 445 }
                check_variable = { rl_selected_id = 446 }
                check_variable = { rl_selected_id = 447 }
                check_variable = { rl_selected_id = 448 }
                check_variable = { rl_selected_id = 451 }
                check_variable = { rl_selected_id = 452 }
                check_variable = { rl_selected_id = 453 }
                check_variable = { rl_selected_id = 454 }
                check_variable = { rl_selected_id = 455 }
                check_variable = { rl_selected_id = 456 }
                check_variable = { rl_selected_id = 457 }
                check_variable = { rl_selected_id = 458 }
                check_variable = { rl_selected_id = 459 }
                check_variable = { rl_selected_id = 460 }
                check_variable = { rl_selected_id = 470 }
                check_variable = { rl_selected_id = 471 }
                check_variable = { rl_selected_id = 472 }
                check_variable = { rl_selected_id = 473 }
                check_variable = { rl_selected_id = 474 }
                check_variable = { rl_selected_id = 475 }
                check_variable = { rl_selected_id = 476 }
                check_variable = { rl_selected_id = 477 }
                check_variable = { rl_selected_id = 478 }
                check_variable = { rl_selected_id = 479 }
                check_variable = { rl_selected_id = 480 }
                check_variable = { rl_selected_id = 481 }
                check_variable = { rl_selected_id = 483 }
                check_variable = { rl_selected_id = 484 }
                check_variable = { rl_selected_id = 486 }
                check_variable = { rl_selected_id = 487 }
                check_variable = { rl_selected_id = 488 }
                check_variable = { rl_selected_id = 489 }
                check_variable = { rl_selected_id = 490 }
                check_variable = { rl_selected_id = 580 }
                check_variable = { rl_selected_id = 582 }
                check_variable = { rl_selected_id = 584 }
                check_variable = { rl_selected_id = 585 }
                check_variable = { rl_selected_id = 594 }
                check_variable = { rl_selected_id = 598 }
                check_variable = { rl_selected_id = 600 }
            }
        }
        add_to_variable = { rl_cat_army = 1 }
        rl_check_set_army = yes
    }
    else_if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 31 }
                check_variable = { rl_selected_id = 36 }
                check_variable = { rl_selected_id = 37 }
                check_variable = { rl_selected_id = 38 }
                check_variable = { rl_selected_id = 39 }
                check_variable = { rl_selected_id = 40 }
                check_variable = { rl_selected_id = 41 }
                check_variable = { rl_selected_id = 119 }
                check_variable = { rl_selected_id = 136 }
                check_variable = { rl_selected_id = 141 }
                check_variable = { rl_selected_id = 142 }
                check_variable = { rl_selected_id = 143 }
                check_variable = { rl_selected_id = 144 }
                check_variable = { rl_selected_id = 145 }
                check_variable = { rl_selected_id = 146 }
                check_variable = { rl_selected_id = 147 }
                check_variable = { rl_selected_id = 148 }
                check_variable = { rl_selected_id = 152 }
                check_variable = { rl_selected_id = 153 }
                check_variable = { rl_selected_id = 155 }
                check_variable = { rl_selected_id = 286 }
                check_variable = { rl_selected_id = 287 }
                check_variable = { rl_selected_id = 288 }
                check_variable = { rl_selected_id = 289 }
                check_variable = { rl_selected_id = 290 }
                check_variable = { rl_selected_id = 291 }
                check_variable = { rl_selected_id = 292 }
                check_variable = { rl_selected_id = 293 }
                check_variable = { rl_selected_id = 295 }
                check_variable = { rl_selected_id = 302 }
                check_variable = { rl_selected_id = 303 }
                check_variable = { rl_selected_id = 304 }
                check_variable = { rl_selected_id = 305 }
                check_variable = { rl_selected_id = 306 }
                check_variable = { rl_selected_id = 307 }
                check_variable = { rl_selected_id = 308 }
                check_variable = { rl_selected_id = 310 }
                check_variable = { rl_selected_id = 311 }
                check_variable = { rl_selected_id = 312 }
                check_variable = { rl_selected_id = 313 }
                check_variable = { rl_selected_id = 314 }
                check_variable = { rl_selected_id = 461 }
                check_variable = { rl_selected_id = 462 }
                check_variable = { rl_selected_id = 463 }
                check_variable = { rl_selected_id = 464 }
                check_variable = { rl_selected_id = 465 }
                check_variable = { rl_selected_id = 466 }
                check_variable = { rl_selected_id = 467 }
                check_variable = { rl_selected_id = 468 }
                check_variable = { rl_selected_id = 469 }
                check_variable = { rl_selected_id = 482 }
                check_variable = { rl_selected_id = 485 }
            }
        }
        add_to_variable = { rl_cat_armor = 1 }
        rl_check_set_armor = yes
    }
    else_if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 76 }
                check_variable = { rl_selected_id = 77 }
                check_variable = { rl_selected_id = 78 }
                check_variable = { rl_selected_id = 79 }
                check_variable = { rl_selected_id = 80 }
                check_variable = { rl_selected_id = 81 }
                check_variable = { rl_selected_id = 82 }
                check_variable = { rl_selected_id = 83 }
                check_variable = { rl_selected_id = 84 }
                check_variable = { rl_selected_id = 85 }
                check_variable = { rl_selected_id = 86 }
                check_variable = { rl_selected_id = 87 }
                check_variable = { rl_selected_id = 88 }
                check_variable = { rl_selected_id = 89 }
                check_variable = { rl_selected_id = 90 }
                check_variable = { rl_selected_id = 106 }
                check_variable = { rl_selected_id = 163 }
                check_variable = { rl_selected_id = 171 }
                check_variable = { rl_selected_id = 172 }
                check_variable = { rl_selected_id = 173 }
                check_variable = { rl_selected_id = 174 }
                check_variable = { rl_selected_id = 175 }
                check_variable = { rl_selected_id = 176 }
                check_variable = { rl_selected_id = 177 }
                check_variable = { rl_selected_id = 178 }
                check_variable = { rl_selected_id = 179 }
                check_variable = { rl_selected_id = 180 }
                check_variable = { rl_selected_id = 181 }
                check_variable = { rl_selected_id = 182 }
                check_variable = { rl_selected_id = 183 }
                check_variable = { rl_selected_id = 184 }
                check_variable = { rl_selected_id = 185 }
                check_variable = { rl_selected_id = 198 }
                check_variable = { rl_selected_id = 210 }
                check_variable = { rl_selected_id = 232 }
                check_variable = { rl_selected_id = 346 }
                check_variable = { rl_selected_id = 347 }
                check_variable = { rl_selected_id = 348 }
                check_variable = { rl_selected_id = 349 }
                check_variable = { rl_selected_id = 350 }
                check_variable = { rl_selected_id = 351 }
                check_variable = { rl_selected_id = 352 }
                check_variable = { rl_selected_id = 353 }
                check_variable = { rl_selected_id = 354 }
                check_variable = { rl_selected_id = 355 }
                check_variable = { rl_selected_id = 356 }
                check_variable = { rl_selected_id = 357 }
                check_variable = { rl_selected_id = 358 }
                check_variable = { rl_selected_id = 359 }
                check_variable = { rl_selected_id = 360 }
                check_variable = { rl_selected_id = 361 }
                check_variable = { rl_selected_id = 363 }
                check_variable = { rl_selected_id = 364 }
                check_variable = { rl_selected_id = 365 }
                check_variable = { rl_selected_id = 366 }
                check_variable = { rl_selected_id = 367 }
                check_variable = { rl_selected_id = 368 }
                check_variable = { rl_selected_id = 369 }
                check_variable = { rl_selected_id = 370 }
                check_variable = { rl_selected_id = 371 }
                check_variable = { rl_selected_id = 372 }
                check_variable = { rl_selected_id = 373 }
                check_variable = { rl_selected_id = 374 }
                check_variable = { rl_selected_id = 375 }
                check_variable = { rl_selected_id = 400 }
                check_variable = { rl_selected_id = 435 }
                check_variable = { rl_selected_id = 491 }
                check_variable = { rl_selected_id = 492 }
                check_variable = { rl_selected_id = 493 }
                check_variable = { rl_selected_id = 494 }
                check_variable = { rl_selected_id = 495 }
                check_variable = { rl_selected_id = 496 }
                check_variable = { rl_selected_id = 497 }
                check_variable = { rl_selected_id = 498 }
                check_variable = { rl_selected_id = 499 }
                check_variable = { rl_selected_id = 500 }
                check_variable = { rl_selected_id = 501 }
                check_variable = { rl_selected_id = 502 }
                check_variable = { rl_selected_id = 503 }
                check_variable = { rl_selected_id = 504 }
                check_variable = { rl_selected_id = 505 }
                check_variable = { rl_selected_id = 506 }
                check_variable = { rl_selected_id = 507 }
                check_variable = { rl_selected_id = 508 }
                check_variable = { rl_selected_id = 509 }
                check_variable = { rl_selected_id = 510 }
                check_variable = { rl_selected_id = 511 }
                check_variable = { rl_selected_id = 512 }
                check_variable = { rl_selected_id = 513 }
                check_variable = { rl_selected_id = 514 }
                check_variable = { rl_selected_id = 515 }
                check_variable = { rl_selected_id = 516 }
                check_variable = { rl_selected_id = 517 }
                check_variable = { rl_selected_id = 518 }
                check_variable = { rl_selected_id = 519 }
                check_variable = { rl_selected_id = 520 }
                check_variable = { rl_selected_id = 521 }
                check_variable = { rl_selected_id = 522 }
                check_variable = { rl_selected_id = 523 }
                check_variable = { rl_selected_id = 524 }
                check_variable = { rl_selected_id = 525 }
                check_variable = { rl_selected_id = 593 }
            }
        }
        add_to_variable = { rl_cat_air = 1 }
        rl_check_set_air = yes
    }
    else_if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 61 }
                check_variable = { rl_selected_id = 62 }
                check_variable = { rl_selected_id = 63 }
                check_variable = { rl_selected_id = 64 }
                check_variable = { rl_selected_id = 65 }
                check_variable = { rl_selected_id = 66 }
                check_variable = { rl_selected_id = 67 }
                check_variable = { rl_selected_id = 68 }
                check_variable = { rl_selected_id = 69 }
                check_variable = { rl_selected_id = 70 }
                check_variable = { rl_selected_id = 71 }
                check_variable = { rl_selected_id = 72 }
                check_variable = { rl_selected_id = 73 }
                check_variable = { rl_selected_id = 74 }
                check_variable = { rl_selected_id = 75 }
                check_variable = { rl_selected_id = 156 }
                check_variable = { rl_selected_id = 157 }
                check_variable = { rl_selected_id = 158 }
                check_variable = { rl_selected_id = 159 }
                check_variable = { rl_selected_id = 160 }
                check_variable = { rl_selected_id = 161 }
                check_variable = { rl_selected_id = 162 }
                check_variable = { rl_selected_id = 164 }
                check_variable = { rl_selected_id = 165 }
                check_variable = { rl_selected_id = 166 }
                check_variable = { rl_selected_id = 167 }
                check_variable = { rl_selected_id = 168 }
                check_variable = { rl_selected_id = 169 }
                check_variable = { rl_selected_id = 170 }
                check_variable = { rl_selected_id = 236 }
                check_variable = { rl_selected_id = 316 }
                check_variable = { rl_selected_id = 317 }
                check_variable = { rl_selected_id = 318 }
                check_variable = { rl_selected_id = 319 }
                check_variable = { rl_selected_id = 320 }
                check_variable = { rl_selected_id = 321 }
                check_variable = { rl_selected_id = 322 }
                check_variable = { rl_selected_id = 323 }
                check_variable = { rl_selected_id = 324 }
                check_variable = { rl_selected_id = 325 }
                check_variable = { rl_selected_id = 326 }
                check_variable = { rl_selected_id = 327 }
                check_variable = { rl_selected_id = 328 }
                check_variable = { rl_selected_id = 329 }
                check_variable = { rl_selected_id = 330 }
                check_variable = { rl_selected_id = 331 }
                check_variable = { rl_selected_id = 334 }
                check_variable = { rl_selected_id = 335 }
                check_variable = { rl_selected_id = 336 }
                check_variable = { rl_selected_id = 337 }
                check_variable = { rl_selected_id = 338 }
                check_variable = { rl_selected_id = 339 }
                check_variable = { rl_selected_id = 340 }
                check_variable = { rl_selected_id = 341 }
                check_variable = { rl_selected_id = 342 }
                check_variable = { rl_selected_id = 343 }
                check_variable = { rl_selected_id = 344 }
                check_variable = { rl_selected_id = 345 }
                check_variable = { rl_selected_id = 437 }
                check_variable = { rl_selected_id = 526 }
                check_variable = { rl_selected_id = 527 }
                check_variable = { rl_selected_id = 528 }
                check_variable = { rl_selected_id = 529 }
                check_variable = { rl_selected_id = 530 }
                check_variable = { rl_selected_id = 531 }
                check_variable = { rl_selected_id = 532 }
                check_variable = { rl_selected_id = 533 }
                check_variable = { rl_selected_id = 534 }
                check_variable = { rl_selected_id = 535 }
                check_variable = { rl_selected_id = 536 }
                check_variable = { rl_selected_id = 537 }
                check_variable = { rl_selected_id = 538 }
                check_variable = { rl_selected_id = 539 }
                check_variable = { rl_selected_id = 540 }
                check_variable = { rl_selected_id = 541 }
                check_variable = { rl_selected_id = 542 }
                check_variable = { rl_selected_id = 543 }
                check_variable = { rl_selected_id = 544 }
                check_variable = { rl_selected_id = 545 }
                check_variable = { rl_selected_id = 546 }
                check_variable = { rl_selected_id = 547 }
                check_variable = { rl_selected_id = 548 }
                check_variable = { rl_selected_id = 549 }
                check_variable = { rl_selected_id = 550 }
                check_variable = { rl_selected_id = 551 }
                check_variable = { rl_selected_id = 552 }
                check_variable = { rl_selected_id = 553 }
                check_variable = { rl_selected_id = 554 }
                check_variable = { rl_selected_id = 555 }
                check_variable = { rl_selected_id = 556 }
                check_variable = { rl_selected_id = 557 }
                check_variable = { rl_selected_id = 558 }
                check_variable = { rl_selected_id = 559 }
                check_variable = { rl_selected_id = 560 }
            }
        }
        add_to_variable = { rl_cat_navy = 1 }
        rl_check_set_navy = yes
    }
    else_if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 91 }
                check_variable = { rl_selected_id = 92 }
                check_variable = { rl_selected_id = 99 }
                check_variable = { rl_selected_id = 186 }
                check_variable = { rl_selected_id = 189 }
                check_variable = { rl_selected_id = 193 }
                check_variable = { rl_selected_id = 194 }
                check_variable = { rl_selected_id = 376 }
                check_variable = { rl_selected_id = 381 }
                check_variable = { rl_selected_id = 383 }
                check_variable = { rl_selected_id = 384 }
                check_variable = { rl_selected_id = 385 }
                check_variable = { rl_selected_id = 386 }
                check_variable = { rl_selected_id = 398 }
                check_variable = { rl_selected_id = 565 }
                check_variable = { rl_selected_id = 566 }
                check_variable = { rl_selected_id = 567 }
                check_variable = { rl_selected_id = 568 }
                check_variable = { rl_selected_id = 574 }
                check_variable = { rl_selected_id = 575 }
                check_variable = { rl_selected_id = 576 }
                check_variable = { rl_selected_id = 586 }
                check_variable = { rl_selected_id = 587 }
                check_variable = { rl_selected_id = 597 }
            }
        }
        add_to_variable = { rl_cat_research = 1 }
        rl_check_set_research = yes
    }
    else_if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 98 }
                check_variable = { rl_selected_id = 100 }
                check_variable = { rl_selected_id = 190 }
                check_variable = { rl_selected_id = 196 }
                check_variable = { rl_selected_id = 200 }
                check_variable = { rl_selected_id = 380 }
                check_variable = { rl_selected_id = 387 }
                check_variable = { rl_selected_id = 388 }
                check_variable = { rl_selected_id = 389 }
                check_variable = { rl_selected_id = 569 }
                check_variable = { rl_selected_id = 570 }
                check_variable = { rl_selected_id = 571 }
                check_variable = { rl_selected_id = 572 }
                check_variable = { rl_selected_id = 578 }
                check_variable = { rl_selected_id = 588 }
                check_variable = { rl_selected_id = 589 }
                check_variable = { rl_selected_id = 596 }
            }
        }
        add_to_variable = { rl_cat_occupation = 1 }
        rl_check_set_occupation = yes
    }
    else_if = {
        limit = {
            OR = {
                check_variable = { rl_selected_id = 6 }
                check_variable = { rl_selected_id = 45 }
                check_variable = { rl_selected_id = 46 }
                check_variable = { rl_selected_id = 47 }
                check_variable = { rl_selected_id = 48 }
                check_variable = { rl_selected_id = 93 }
                check_variable = { rl_selected_id = 94 }
                check_variable = { rl_selected_id = 95 }
                check_variable = { rl_selected_id = 96 }
                check_variable = { rl_selected_id = 120 }
                check_variable = { rl_selected_id = 187 }
                check_variable = { rl_selected_id = 188 }
                check_variable = { rl_selected_id = 246 }
                check_variable = { rl_selected_id = 247 }
                check_variable = { rl_selected_id = 277 }
                check_variable = { rl_selected_id = 377 }
                check_variable = { rl_selected_id = 378 }
                check_variable = { rl_selected_id = 382 }
                check_variable = { rl_selected_id = 392 }
                check_variable = { rl_selected_id = 393 }
                check_variable = { rl_selected_id = 449 }
                check_variable = { rl_selected_id = 450 }
                check_variable = { rl_selected_id = 561 }
                check_variable = { rl_selected_id = 562 }
                check_variable = { rl_selected_id = 563 }
                check_variable = { rl_selected_id = 564 }
                check_variable = { rl_selected_id = 579 }
                check_variable = { rl_selected_id = 590 }
                check_variable = { rl_selected_id = 591 }
                check_variable = { rl_selected_id = 592 }
            }
        }
        add_to_variable = { rl_cat_fate = 1 }
        rl_check_set_fate = yes
    }
    rl_apply_cross_category_curse = yes
    if = { limit = { check_variable = { rl_core_forge_chance > 100 } } set_variable = { rl_core_forge_chance = 100 } }
}


rl_apply_cross_category_curse = {
    if = {
        limit = { check_variable = { rl_selected_id = 97 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 98 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.005 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.01 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.02 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 99 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 198 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 199 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.03 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 200 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.005 }
            add_to_variable = { rl_mod_armor_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.01 }
            add_to_variable = { rl_mod_armor_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.02 }
            add_to_variable = { rl_mod_armor_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.04 }
            add_to_variable = { rl_mod_armor_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.08 }
            add_to_variable = { rl_mod_armor_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 224 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.03 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 229 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.03 }
            add_to_variable = { rl_mod_armor_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_armor_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_armor_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_armor_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_armor_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 261 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 266 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 270 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 274 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 277 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 280 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 286 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 290 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.96 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 302 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 306 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 312 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 331 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 379 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 383 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_mod_stability_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_mod_stability_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 389 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.005 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.01 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.02 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.04 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 393 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 395 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 397 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 400 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 420 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_army_attack_factor = -0.03 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_army_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_army_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_army_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_army_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 425 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 429 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.03 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 436 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.03 }
            add_to_variable = { rl_mod_armor_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_armor_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_armor_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_armor_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_armor_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 462 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 467 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 483 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 485 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.96 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 488 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 504 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 508 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 513 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 517 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_army_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 522 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 533 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_stability_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 538 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 542 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.08 }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.16 }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.32 }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.64 }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -1.28 }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 547 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 551 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_stability_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 556 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 560 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.08 }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.16 }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.32 }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.64 }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -1.28 }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 563 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 565 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 572 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.005 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.01 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.02 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.04 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 574 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 577 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.03 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 584 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 592 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 593 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 596 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_army_attack_factor = -0.005 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_army_attack_factor = -0.01 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_army_attack_factor = -0.02 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 597 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 599 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 600 } }
        add_to_variable = { rl_cursed_count = 1 }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_fate_shards = 3 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_fate_shards = 6 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_fate_shards = 12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_fate_shards = 24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_fate_shards = 48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
}

rl_remove_cross_category_curse = {
    if = {
        limit = { check_variable = { rl_selected_id = 97 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 98 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.005 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.01 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.02 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 99 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 198 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 199 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.03 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 200 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.005 }
            add_to_variable = { rl_mod_armor_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.01 }
            add_to_variable = { rl_mod_armor_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.02 }
            add_to_variable = { rl_mod_armor_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.04 }
            add_to_variable = { rl_mod_armor_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.08 }
            add_to_variable = { rl_mod_armor_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 224 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.03 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 229 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.03 }
            add_to_variable = { rl_mod_armor_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_armor_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_armor_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_armor_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_armor_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 261 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 266 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 270 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 274 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
            add_to_variable = { rl_mod_stability_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 277 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 280 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 286 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 290 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 302 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 306 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 312 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 331 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_army_attack_factor = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 379 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 383 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
            add_to_variable = { rl_mod_stability_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
            add_to_variable = { rl_mod_stability_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
            add_to_variable = { rl_mod_stability_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 389 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.005 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.01 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.02 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.04 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 393 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 395 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_political_power_factor = 0.03 }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
            add_to_variable = { rl_mod_stability_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 397 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 400 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_research_speed_factor = 1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 420 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 425 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_political_power_factor = 0.03 }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
            add_to_variable = { rl_mod_stability_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 429 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.03 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 436 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.03 }
            add_to_variable = { rl_mod_armor_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_armor_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_armor_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_armor_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_armor_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 462 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 467 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 483 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 485 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 488 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 504 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 508 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_research_speed_factor = 1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 513 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 517 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_army_attack_factor = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 522 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 533 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_stability_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_stability_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_stability_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 538 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_research_speed_factor = 1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 542 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.08 }
            add_to_variable = { rl_mod_armor_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.16 }
            add_to_variable = { rl_mod_armor_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.32 }
            add_to_variable = { rl_mod_armor_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.64 }
            add_to_variable = { rl_mod_armor_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 1.28 }
            add_to_variable = { rl_mod_armor_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 547 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_army_attack_factor = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_army_attack_factor = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_army_attack_factor = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_army_attack_factor = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 551 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_stability_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_stability_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_stability_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_stability_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_stability_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 556 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_research_speed_factor = 1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 560 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.08 }
            add_to_variable = { rl_mod_armor_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.16 }
            add_to_variable = { rl_mod_armor_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.32 }
            add_to_variable = { rl_mod_armor_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.64 }
            add_to_variable = { rl_mod_armor_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_army_armor_attack_factor = 1.28 }
            add_to_variable = { rl_mod_armor_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 563 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_research_speed_factor = 0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_research_speed_factor = 0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_research_speed_factor = 0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_research_speed_factor = 1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 565 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 572 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_research_speed_factor = 0.005 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = 0.01 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = 0.02 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = 0.04 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = 0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 574 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 577 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.03 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 584 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 592 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 593 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 596 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_army_attack_factor = 0.005 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_army_attack_factor = 0.01 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_army_attack_factor = 0.02 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_army_attack_factor = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_army_attack_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 597 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 599 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_political_power_factor = 0.03 }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_political_power_factor = 0.06 }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_political_power_factor = 0.12 }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_political_power_factor = 0.24 }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_political_power_factor = 0.48 }
            add_to_variable = { rl_mod_stability_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 600 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_political_power_factor = 0.05 }
            add_to_variable = { rl_mod_stability_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_political_power_factor = 0.1 }
            add_to_variable = { rl_mod_stability_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_political_power_factor = 0.2 }
            add_to_variable = { rl_mod_stability_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_political_power_factor = 0.4 }
            add_to_variable = { rl_mod_stability_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_political_power_factor = 0.8 }
            add_to_variable = { rl_mod_stability_factor = 0.48 }
        }
    }
}


rl_apply_cross_category_curse_values_only = {
    if = {
        limit = { check_variable = { rl_selected_id = 97 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 98 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.005 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.01 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.02 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 99 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 198 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 199 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.03 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 200 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.005 }
            add_to_variable = { rl_mod_armor_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.01 }
            add_to_variable = { rl_mod_armor_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.02 }
            add_to_variable = { rl_mod_armor_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.04 }
            add_to_variable = { rl_mod_armor_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.08 }
            add_to_variable = { rl_mod_armor_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 224 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.03 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 229 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.03 }
            add_to_variable = { rl_mod_armor_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_armor_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_armor_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_armor_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_armor_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 261 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 266 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 270 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 274 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 277 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 280 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 286 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 290 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.96 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 302 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 306 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 312 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 331 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 379 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 383 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_mod_stability_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_mod_stability_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 389 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.005 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.01 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.02 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.04 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 393 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 395 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 397 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 400 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 420 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_army_attack_factor = -0.03 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_army_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_army_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_army_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_army_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 425 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 429 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.03 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 436 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.03 }
            add_to_variable = { rl_mod_armor_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_armor_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_armor_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_armor_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_armor_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 462 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 467 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 483 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 485 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_speed_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_speed_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_speed_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_speed_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = 0.96 }
            add_to_variable = { rl_mod_army_speed_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.96 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 488 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 504 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 508 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 513 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 517 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_army_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 522 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 533 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_stability_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 538 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 542 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.08 }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.16 }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.32 }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.64 }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -1.28 }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 547 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 551 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_stability_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 556 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 560 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.04 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.08 }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.16 }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.32 }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.64 }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -1.28 }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 563 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 565 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 572 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_research_speed_factor = -0.005 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.01 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.02 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.04 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 574 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 577 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_air_attack_factor = -0.03 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 584 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 592 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = 0.08 }
            add_to_variable = { rl_mod_war_support_factor = 0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = 0.16 }
            add_to_variable = { rl_mod_war_support_factor = 0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = 0.32 }
            add_to_variable = { rl_mod_war_support_factor = 0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = 0.64 }
            add_to_variable = { rl_mod_war_support_factor = 0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = 1.28 }
            add_to_variable = { rl_mod_war_support_factor = 0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 593 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.05 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.1 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.2 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.4 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = 0.8 }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 596 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = 0.005 }
            add_to_variable = { rl_mod_resistance_target = -0.05 }
            add_to_variable = { rl_mod_army_attack_factor = -0.005 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = 0.01 }
            add_to_variable = { rl_mod_resistance_target = -0.1 }
            add_to_variable = { rl_mod_army_attack_factor = -0.01 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = 0.02 }
            add_to_variable = { rl_mod_resistance_target = -0.2 }
            add_to_variable = { rl_mod_army_attack_factor = -0.02 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = 0.04 }
            add_to_variable = { rl_mod_resistance_target = -0.4 }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = 0.08 }
            add_to_variable = { rl_mod_resistance_target = -0.8 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 597 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = 0.64 }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = 0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = 1.28 }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 599 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 600 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
}

rl_remove_legacy_cross_category_curse = {
    if = {
        limit = { check_variable = { rl_selected_id = 97 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 98 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.005 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.01 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.02 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 99 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 198 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 199 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 200 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.005 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.01 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.02 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 224 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 229 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 261 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 266 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 270 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 274 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 277 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 280 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 286 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 290 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 302 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 306 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 312 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 331 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 379 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 383 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 389 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.005 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.01 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.02 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 393 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 395 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 397 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 400 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 420 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 425 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 429 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 436 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 462 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 467 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 483 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 485 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.06 }
            add_to_variable = { rl_mod_air_defence_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 488 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 504 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 508 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 513 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 517 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 522 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 533 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 538 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 542 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 547 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 551 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 556 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 560 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = 0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = 0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = 0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = 0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = 1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 563 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 565 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 572 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.005 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.01 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.02 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 574 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 577 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 584 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 592 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 593 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.16 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.32 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.64 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 1.28 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 596 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.005 }
            add_to_variable = { rl_mod_army_org_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.01 }
            add_to_variable = { rl_mod_army_org_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.02 }
            add_to_variable = { rl_mod_army_org_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.04 }
            add_to_variable = { rl_mod_army_org_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.08 }
            add_to_variable = { rl_mod_army_org_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 597 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
            add_to_variable = { rl_mod_army_org_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 599 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = 0.03 }
            add_to_variable = { rl_mod_army_org_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = 0.06 }
            add_to_variable = { rl_mod_army_org_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = 0.12 }
            add_to_variable = { rl_mod_army_org_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = 0.24 }
            add_to_variable = { rl_mod_army_org_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = 0.48 }
            add_to_variable = { rl_mod_army_org_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 600 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_air_attack_factor = 0.05 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = 0.1 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = 0.2 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = 0.4 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = 0.8 }
            add_to_variable = { rl_mod_consumer_goods_factor = -0.48 }
        }
    }
}

rl_hc_migrate_existing_curses_v342 = {
    set_variable = { rl_v342_saved_selected_id = rl_selected_id }
    set_variable = { rl_v342_saved_selected_rarity = rl_selected_rarity }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_01_id = 97 }
                check_variable = { rl_hc_slot_01_id = 98 }
                check_variable = { rl_hc_slot_01_id = 99 }
                check_variable = { rl_hc_slot_01_id = 198 }
                check_variable = { rl_hc_slot_01_id = 199 }
                check_variable = { rl_hc_slot_01_id = 200 }
                check_variable = { rl_hc_slot_01_id = 224 }
                check_variable = { rl_hc_slot_01_id = 229 }
                check_variable = { rl_hc_slot_01_id = 261 }
                check_variable = { rl_hc_slot_01_id = 266 }
                check_variable = { rl_hc_slot_01_id = 270 }
                check_variable = { rl_hc_slot_01_id = 274 }
                check_variable = { rl_hc_slot_01_id = 277 }
                check_variable = { rl_hc_slot_01_id = 280 }
                check_variable = { rl_hc_slot_01_id = 286 }
                check_variable = { rl_hc_slot_01_id = 290 }
                check_variable = { rl_hc_slot_01_id = 302 }
                check_variable = { rl_hc_slot_01_id = 306 }
                check_variable = { rl_hc_slot_01_id = 312 }
                check_variable = { rl_hc_slot_01_id = 331 }
                check_variable = { rl_hc_slot_01_id = 379 }
                check_variable = { rl_hc_slot_01_id = 383 }
                check_variable = { rl_hc_slot_01_id = 389 }
                check_variable = { rl_hc_slot_01_id = 393 }
                check_variable = { rl_hc_slot_01_id = 395 }
                check_variable = { rl_hc_slot_01_id = 397 }
                check_variable = { rl_hc_slot_01_id = 400 }
                check_variable = { rl_hc_slot_01_id = 420 }
                check_variable = { rl_hc_slot_01_id = 425 }
                check_variable = { rl_hc_slot_01_id = 429 }
                check_variable = { rl_hc_slot_01_id = 436 }
                check_variable = { rl_hc_slot_01_id = 462 }
                check_variable = { rl_hc_slot_01_id = 467 }
                check_variable = { rl_hc_slot_01_id = 483 }
                check_variable = { rl_hc_slot_01_id = 485 }
                check_variable = { rl_hc_slot_01_id = 488 }
                check_variable = { rl_hc_slot_01_id = 504 }
                check_variable = { rl_hc_slot_01_id = 508 }
                check_variable = { rl_hc_slot_01_id = 513 }
                check_variable = { rl_hc_slot_01_id = 517 }
                check_variable = { rl_hc_slot_01_id = 522 }
                check_variable = { rl_hc_slot_01_id = 533 }
                check_variable = { rl_hc_slot_01_id = 538 }
                check_variable = { rl_hc_slot_01_id = 542 }
                check_variable = { rl_hc_slot_01_id = 547 }
                check_variable = { rl_hc_slot_01_id = 551 }
                check_variable = { rl_hc_slot_01_id = 556 }
                check_variable = { rl_hc_slot_01_id = 560 }
                check_variable = { rl_hc_slot_01_id = 563 }
                check_variable = { rl_hc_slot_01_id = 565 }
                check_variable = { rl_hc_slot_01_id = 572 }
                check_variable = { rl_hc_slot_01_id = 574 }
                check_variable = { rl_hc_slot_01_id = 577 }
                check_variable = { rl_hc_slot_01_id = 584 }
                check_variable = { rl_hc_slot_01_id = 592 }
                check_variable = { rl_hc_slot_01_id = 593 }
                check_variable = { rl_hc_slot_01_id = 596 }
                check_variable = { rl_hc_slot_01_id = 597 }
                check_variable = { rl_hc_slot_01_id = 599 }
                check_variable = { rl_hc_slot_01_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_01_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_01_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_02_id = 97 }
                check_variable = { rl_hc_slot_02_id = 98 }
                check_variable = { rl_hc_slot_02_id = 99 }
                check_variable = { rl_hc_slot_02_id = 198 }
                check_variable = { rl_hc_slot_02_id = 199 }
                check_variable = { rl_hc_slot_02_id = 200 }
                check_variable = { rl_hc_slot_02_id = 224 }
                check_variable = { rl_hc_slot_02_id = 229 }
                check_variable = { rl_hc_slot_02_id = 261 }
                check_variable = { rl_hc_slot_02_id = 266 }
                check_variable = { rl_hc_slot_02_id = 270 }
                check_variable = { rl_hc_slot_02_id = 274 }
                check_variable = { rl_hc_slot_02_id = 277 }
                check_variable = { rl_hc_slot_02_id = 280 }
                check_variable = { rl_hc_slot_02_id = 286 }
                check_variable = { rl_hc_slot_02_id = 290 }
                check_variable = { rl_hc_slot_02_id = 302 }
                check_variable = { rl_hc_slot_02_id = 306 }
                check_variable = { rl_hc_slot_02_id = 312 }
                check_variable = { rl_hc_slot_02_id = 331 }
                check_variable = { rl_hc_slot_02_id = 379 }
                check_variable = { rl_hc_slot_02_id = 383 }
                check_variable = { rl_hc_slot_02_id = 389 }
                check_variable = { rl_hc_slot_02_id = 393 }
                check_variable = { rl_hc_slot_02_id = 395 }
                check_variable = { rl_hc_slot_02_id = 397 }
                check_variable = { rl_hc_slot_02_id = 400 }
                check_variable = { rl_hc_slot_02_id = 420 }
                check_variable = { rl_hc_slot_02_id = 425 }
                check_variable = { rl_hc_slot_02_id = 429 }
                check_variable = { rl_hc_slot_02_id = 436 }
                check_variable = { rl_hc_slot_02_id = 462 }
                check_variable = { rl_hc_slot_02_id = 467 }
                check_variable = { rl_hc_slot_02_id = 483 }
                check_variable = { rl_hc_slot_02_id = 485 }
                check_variable = { rl_hc_slot_02_id = 488 }
                check_variable = { rl_hc_slot_02_id = 504 }
                check_variable = { rl_hc_slot_02_id = 508 }
                check_variable = { rl_hc_slot_02_id = 513 }
                check_variable = { rl_hc_slot_02_id = 517 }
                check_variable = { rl_hc_slot_02_id = 522 }
                check_variable = { rl_hc_slot_02_id = 533 }
                check_variable = { rl_hc_slot_02_id = 538 }
                check_variable = { rl_hc_slot_02_id = 542 }
                check_variable = { rl_hc_slot_02_id = 547 }
                check_variable = { rl_hc_slot_02_id = 551 }
                check_variable = { rl_hc_slot_02_id = 556 }
                check_variable = { rl_hc_slot_02_id = 560 }
                check_variable = { rl_hc_slot_02_id = 563 }
                check_variable = { rl_hc_slot_02_id = 565 }
                check_variable = { rl_hc_slot_02_id = 572 }
                check_variable = { rl_hc_slot_02_id = 574 }
                check_variable = { rl_hc_slot_02_id = 577 }
                check_variable = { rl_hc_slot_02_id = 584 }
                check_variable = { rl_hc_slot_02_id = 592 }
                check_variable = { rl_hc_slot_02_id = 593 }
                check_variable = { rl_hc_slot_02_id = 596 }
                check_variable = { rl_hc_slot_02_id = 597 }
                check_variable = { rl_hc_slot_02_id = 599 }
                check_variable = { rl_hc_slot_02_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_02_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_02_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_03_id = 97 }
                check_variable = { rl_hc_slot_03_id = 98 }
                check_variable = { rl_hc_slot_03_id = 99 }
                check_variable = { rl_hc_slot_03_id = 198 }
                check_variable = { rl_hc_slot_03_id = 199 }
                check_variable = { rl_hc_slot_03_id = 200 }
                check_variable = { rl_hc_slot_03_id = 224 }
                check_variable = { rl_hc_slot_03_id = 229 }
                check_variable = { rl_hc_slot_03_id = 261 }
                check_variable = { rl_hc_slot_03_id = 266 }
                check_variable = { rl_hc_slot_03_id = 270 }
                check_variable = { rl_hc_slot_03_id = 274 }
                check_variable = { rl_hc_slot_03_id = 277 }
                check_variable = { rl_hc_slot_03_id = 280 }
                check_variable = { rl_hc_slot_03_id = 286 }
                check_variable = { rl_hc_slot_03_id = 290 }
                check_variable = { rl_hc_slot_03_id = 302 }
                check_variable = { rl_hc_slot_03_id = 306 }
                check_variable = { rl_hc_slot_03_id = 312 }
                check_variable = { rl_hc_slot_03_id = 331 }
                check_variable = { rl_hc_slot_03_id = 379 }
                check_variable = { rl_hc_slot_03_id = 383 }
                check_variable = { rl_hc_slot_03_id = 389 }
                check_variable = { rl_hc_slot_03_id = 393 }
                check_variable = { rl_hc_slot_03_id = 395 }
                check_variable = { rl_hc_slot_03_id = 397 }
                check_variable = { rl_hc_slot_03_id = 400 }
                check_variable = { rl_hc_slot_03_id = 420 }
                check_variable = { rl_hc_slot_03_id = 425 }
                check_variable = { rl_hc_slot_03_id = 429 }
                check_variable = { rl_hc_slot_03_id = 436 }
                check_variable = { rl_hc_slot_03_id = 462 }
                check_variable = { rl_hc_slot_03_id = 467 }
                check_variable = { rl_hc_slot_03_id = 483 }
                check_variable = { rl_hc_slot_03_id = 485 }
                check_variable = { rl_hc_slot_03_id = 488 }
                check_variable = { rl_hc_slot_03_id = 504 }
                check_variable = { rl_hc_slot_03_id = 508 }
                check_variable = { rl_hc_slot_03_id = 513 }
                check_variable = { rl_hc_slot_03_id = 517 }
                check_variable = { rl_hc_slot_03_id = 522 }
                check_variable = { rl_hc_slot_03_id = 533 }
                check_variable = { rl_hc_slot_03_id = 538 }
                check_variable = { rl_hc_slot_03_id = 542 }
                check_variable = { rl_hc_slot_03_id = 547 }
                check_variable = { rl_hc_slot_03_id = 551 }
                check_variable = { rl_hc_slot_03_id = 556 }
                check_variable = { rl_hc_slot_03_id = 560 }
                check_variable = { rl_hc_slot_03_id = 563 }
                check_variable = { rl_hc_slot_03_id = 565 }
                check_variable = { rl_hc_slot_03_id = 572 }
                check_variable = { rl_hc_slot_03_id = 574 }
                check_variable = { rl_hc_slot_03_id = 577 }
                check_variable = { rl_hc_slot_03_id = 584 }
                check_variable = { rl_hc_slot_03_id = 592 }
                check_variable = { rl_hc_slot_03_id = 593 }
                check_variable = { rl_hc_slot_03_id = 596 }
                check_variable = { rl_hc_slot_03_id = 597 }
                check_variable = { rl_hc_slot_03_id = 599 }
                check_variable = { rl_hc_slot_03_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_03_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_03_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_04_id = 97 }
                check_variable = { rl_hc_slot_04_id = 98 }
                check_variable = { rl_hc_slot_04_id = 99 }
                check_variable = { rl_hc_slot_04_id = 198 }
                check_variable = { rl_hc_slot_04_id = 199 }
                check_variable = { rl_hc_slot_04_id = 200 }
                check_variable = { rl_hc_slot_04_id = 224 }
                check_variable = { rl_hc_slot_04_id = 229 }
                check_variable = { rl_hc_slot_04_id = 261 }
                check_variable = { rl_hc_slot_04_id = 266 }
                check_variable = { rl_hc_slot_04_id = 270 }
                check_variable = { rl_hc_slot_04_id = 274 }
                check_variable = { rl_hc_slot_04_id = 277 }
                check_variable = { rl_hc_slot_04_id = 280 }
                check_variable = { rl_hc_slot_04_id = 286 }
                check_variable = { rl_hc_slot_04_id = 290 }
                check_variable = { rl_hc_slot_04_id = 302 }
                check_variable = { rl_hc_slot_04_id = 306 }
                check_variable = { rl_hc_slot_04_id = 312 }
                check_variable = { rl_hc_slot_04_id = 331 }
                check_variable = { rl_hc_slot_04_id = 379 }
                check_variable = { rl_hc_slot_04_id = 383 }
                check_variable = { rl_hc_slot_04_id = 389 }
                check_variable = { rl_hc_slot_04_id = 393 }
                check_variable = { rl_hc_slot_04_id = 395 }
                check_variable = { rl_hc_slot_04_id = 397 }
                check_variable = { rl_hc_slot_04_id = 400 }
                check_variable = { rl_hc_slot_04_id = 420 }
                check_variable = { rl_hc_slot_04_id = 425 }
                check_variable = { rl_hc_slot_04_id = 429 }
                check_variable = { rl_hc_slot_04_id = 436 }
                check_variable = { rl_hc_slot_04_id = 462 }
                check_variable = { rl_hc_slot_04_id = 467 }
                check_variable = { rl_hc_slot_04_id = 483 }
                check_variable = { rl_hc_slot_04_id = 485 }
                check_variable = { rl_hc_slot_04_id = 488 }
                check_variable = { rl_hc_slot_04_id = 504 }
                check_variable = { rl_hc_slot_04_id = 508 }
                check_variable = { rl_hc_slot_04_id = 513 }
                check_variable = { rl_hc_slot_04_id = 517 }
                check_variable = { rl_hc_slot_04_id = 522 }
                check_variable = { rl_hc_slot_04_id = 533 }
                check_variable = { rl_hc_slot_04_id = 538 }
                check_variable = { rl_hc_slot_04_id = 542 }
                check_variable = { rl_hc_slot_04_id = 547 }
                check_variable = { rl_hc_slot_04_id = 551 }
                check_variable = { rl_hc_slot_04_id = 556 }
                check_variable = { rl_hc_slot_04_id = 560 }
                check_variable = { rl_hc_slot_04_id = 563 }
                check_variable = { rl_hc_slot_04_id = 565 }
                check_variable = { rl_hc_slot_04_id = 572 }
                check_variable = { rl_hc_slot_04_id = 574 }
                check_variable = { rl_hc_slot_04_id = 577 }
                check_variable = { rl_hc_slot_04_id = 584 }
                check_variable = { rl_hc_slot_04_id = 592 }
                check_variable = { rl_hc_slot_04_id = 593 }
                check_variable = { rl_hc_slot_04_id = 596 }
                check_variable = { rl_hc_slot_04_id = 597 }
                check_variable = { rl_hc_slot_04_id = 599 }
                check_variable = { rl_hc_slot_04_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_04_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_04_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_05_id = 97 }
                check_variable = { rl_hc_slot_05_id = 98 }
                check_variable = { rl_hc_slot_05_id = 99 }
                check_variable = { rl_hc_slot_05_id = 198 }
                check_variable = { rl_hc_slot_05_id = 199 }
                check_variable = { rl_hc_slot_05_id = 200 }
                check_variable = { rl_hc_slot_05_id = 224 }
                check_variable = { rl_hc_slot_05_id = 229 }
                check_variable = { rl_hc_slot_05_id = 261 }
                check_variable = { rl_hc_slot_05_id = 266 }
                check_variable = { rl_hc_slot_05_id = 270 }
                check_variable = { rl_hc_slot_05_id = 274 }
                check_variable = { rl_hc_slot_05_id = 277 }
                check_variable = { rl_hc_slot_05_id = 280 }
                check_variable = { rl_hc_slot_05_id = 286 }
                check_variable = { rl_hc_slot_05_id = 290 }
                check_variable = { rl_hc_slot_05_id = 302 }
                check_variable = { rl_hc_slot_05_id = 306 }
                check_variable = { rl_hc_slot_05_id = 312 }
                check_variable = { rl_hc_slot_05_id = 331 }
                check_variable = { rl_hc_slot_05_id = 379 }
                check_variable = { rl_hc_slot_05_id = 383 }
                check_variable = { rl_hc_slot_05_id = 389 }
                check_variable = { rl_hc_slot_05_id = 393 }
                check_variable = { rl_hc_slot_05_id = 395 }
                check_variable = { rl_hc_slot_05_id = 397 }
                check_variable = { rl_hc_slot_05_id = 400 }
                check_variable = { rl_hc_slot_05_id = 420 }
                check_variable = { rl_hc_slot_05_id = 425 }
                check_variable = { rl_hc_slot_05_id = 429 }
                check_variable = { rl_hc_slot_05_id = 436 }
                check_variable = { rl_hc_slot_05_id = 462 }
                check_variable = { rl_hc_slot_05_id = 467 }
                check_variable = { rl_hc_slot_05_id = 483 }
                check_variable = { rl_hc_slot_05_id = 485 }
                check_variable = { rl_hc_slot_05_id = 488 }
                check_variable = { rl_hc_slot_05_id = 504 }
                check_variable = { rl_hc_slot_05_id = 508 }
                check_variable = { rl_hc_slot_05_id = 513 }
                check_variable = { rl_hc_slot_05_id = 517 }
                check_variable = { rl_hc_slot_05_id = 522 }
                check_variable = { rl_hc_slot_05_id = 533 }
                check_variable = { rl_hc_slot_05_id = 538 }
                check_variable = { rl_hc_slot_05_id = 542 }
                check_variable = { rl_hc_slot_05_id = 547 }
                check_variable = { rl_hc_slot_05_id = 551 }
                check_variable = { rl_hc_slot_05_id = 556 }
                check_variable = { rl_hc_slot_05_id = 560 }
                check_variable = { rl_hc_slot_05_id = 563 }
                check_variable = { rl_hc_slot_05_id = 565 }
                check_variable = { rl_hc_slot_05_id = 572 }
                check_variable = { rl_hc_slot_05_id = 574 }
                check_variable = { rl_hc_slot_05_id = 577 }
                check_variable = { rl_hc_slot_05_id = 584 }
                check_variable = { rl_hc_slot_05_id = 592 }
                check_variable = { rl_hc_slot_05_id = 593 }
                check_variable = { rl_hc_slot_05_id = 596 }
                check_variable = { rl_hc_slot_05_id = 597 }
                check_variable = { rl_hc_slot_05_id = 599 }
                check_variable = { rl_hc_slot_05_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_05_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_05_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_06_id = 97 }
                check_variable = { rl_hc_slot_06_id = 98 }
                check_variable = { rl_hc_slot_06_id = 99 }
                check_variable = { rl_hc_slot_06_id = 198 }
                check_variable = { rl_hc_slot_06_id = 199 }
                check_variable = { rl_hc_slot_06_id = 200 }
                check_variable = { rl_hc_slot_06_id = 224 }
                check_variable = { rl_hc_slot_06_id = 229 }
                check_variable = { rl_hc_slot_06_id = 261 }
                check_variable = { rl_hc_slot_06_id = 266 }
                check_variable = { rl_hc_slot_06_id = 270 }
                check_variable = { rl_hc_slot_06_id = 274 }
                check_variable = { rl_hc_slot_06_id = 277 }
                check_variable = { rl_hc_slot_06_id = 280 }
                check_variable = { rl_hc_slot_06_id = 286 }
                check_variable = { rl_hc_slot_06_id = 290 }
                check_variable = { rl_hc_slot_06_id = 302 }
                check_variable = { rl_hc_slot_06_id = 306 }
                check_variable = { rl_hc_slot_06_id = 312 }
                check_variable = { rl_hc_slot_06_id = 331 }
                check_variable = { rl_hc_slot_06_id = 379 }
                check_variable = { rl_hc_slot_06_id = 383 }
                check_variable = { rl_hc_slot_06_id = 389 }
                check_variable = { rl_hc_slot_06_id = 393 }
                check_variable = { rl_hc_slot_06_id = 395 }
                check_variable = { rl_hc_slot_06_id = 397 }
                check_variable = { rl_hc_slot_06_id = 400 }
                check_variable = { rl_hc_slot_06_id = 420 }
                check_variable = { rl_hc_slot_06_id = 425 }
                check_variable = { rl_hc_slot_06_id = 429 }
                check_variable = { rl_hc_slot_06_id = 436 }
                check_variable = { rl_hc_slot_06_id = 462 }
                check_variable = { rl_hc_slot_06_id = 467 }
                check_variable = { rl_hc_slot_06_id = 483 }
                check_variable = { rl_hc_slot_06_id = 485 }
                check_variable = { rl_hc_slot_06_id = 488 }
                check_variable = { rl_hc_slot_06_id = 504 }
                check_variable = { rl_hc_slot_06_id = 508 }
                check_variable = { rl_hc_slot_06_id = 513 }
                check_variable = { rl_hc_slot_06_id = 517 }
                check_variable = { rl_hc_slot_06_id = 522 }
                check_variable = { rl_hc_slot_06_id = 533 }
                check_variable = { rl_hc_slot_06_id = 538 }
                check_variable = { rl_hc_slot_06_id = 542 }
                check_variable = { rl_hc_slot_06_id = 547 }
                check_variable = { rl_hc_slot_06_id = 551 }
                check_variable = { rl_hc_slot_06_id = 556 }
                check_variable = { rl_hc_slot_06_id = 560 }
                check_variable = { rl_hc_slot_06_id = 563 }
                check_variable = { rl_hc_slot_06_id = 565 }
                check_variable = { rl_hc_slot_06_id = 572 }
                check_variable = { rl_hc_slot_06_id = 574 }
                check_variable = { rl_hc_slot_06_id = 577 }
                check_variable = { rl_hc_slot_06_id = 584 }
                check_variable = { rl_hc_slot_06_id = 592 }
                check_variable = { rl_hc_slot_06_id = 593 }
                check_variable = { rl_hc_slot_06_id = 596 }
                check_variable = { rl_hc_slot_06_id = 597 }
                check_variable = { rl_hc_slot_06_id = 599 }
                check_variable = { rl_hc_slot_06_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_06_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_06_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_07_id = 97 }
                check_variable = { rl_hc_slot_07_id = 98 }
                check_variable = { rl_hc_slot_07_id = 99 }
                check_variable = { rl_hc_slot_07_id = 198 }
                check_variable = { rl_hc_slot_07_id = 199 }
                check_variable = { rl_hc_slot_07_id = 200 }
                check_variable = { rl_hc_slot_07_id = 224 }
                check_variable = { rl_hc_slot_07_id = 229 }
                check_variable = { rl_hc_slot_07_id = 261 }
                check_variable = { rl_hc_slot_07_id = 266 }
                check_variable = { rl_hc_slot_07_id = 270 }
                check_variable = { rl_hc_slot_07_id = 274 }
                check_variable = { rl_hc_slot_07_id = 277 }
                check_variable = { rl_hc_slot_07_id = 280 }
                check_variable = { rl_hc_slot_07_id = 286 }
                check_variable = { rl_hc_slot_07_id = 290 }
                check_variable = { rl_hc_slot_07_id = 302 }
                check_variable = { rl_hc_slot_07_id = 306 }
                check_variable = { rl_hc_slot_07_id = 312 }
                check_variable = { rl_hc_slot_07_id = 331 }
                check_variable = { rl_hc_slot_07_id = 379 }
                check_variable = { rl_hc_slot_07_id = 383 }
                check_variable = { rl_hc_slot_07_id = 389 }
                check_variable = { rl_hc_slot_07_id = 393 }
                check_variable = { rl_hc_slot_07_id = 395 }
                check_variable = { rl_hc_slot_07_id = 397 }
                check_variable = { rl_hc_slot_07_id = 400 }
                check_variable = { rl_hc_slot_07_id = 420 }
                check_variable = { rl_hc_slot_07_id = 425 }
                check_variable = { rl_hc_slot_07_id = 429 }
                check_variable = { rl_hc_slot_07_id = 436 }
                check_variable = { rl_hc_slot_07_id = 462 }
                check_variable = { rl_hc_slot_07_id = 467 }
                check_variable = { rl_hc_slot_07_id = 483 }
                check_variable = { rl_hc_slot_07_id = 485 }
                check_variable = { rl_hc_slot_07_id = 488 }
                check_variable = { rl_hc_slot_07_id = 504 }
                check_variable = { rl_hc_slot_07_id = 508 }
                check_variable = { rl_hc_slot_07_id = 513 }
                check_variable = { rl_hc_slot_07_id = 517 }
                check_variable = { rl_hc_slot_07_id = 522 }
                check_variable = { rl_hc_slot_07_id = 533 }
                check_variable = { rl_hc_slot_07_id = 538 }
                check_variable = { rl_hc_slot_07_id = 542 }
                check_variable = { rl_hc_slot_07_id = 547 }
                check_variable = { rl_hc_slot_07_id = 551 }
                check_variable = { rl_hc_slot_07_id = 556 }
                check_variable = { rl_hc_slot_07_id = 560 }
                check_variable = { rl_hc_slot_07_id = 563 }
                check_variable = { rl_hc_slot_07_id = 565 }
                check_variable = { rl_hc_slot_07_id = 572 }
                check_variable = { rl_hc_slot_07_id = 574 }
                check_variable = { rl_hc_slot_07_id = 577 }
                check_variable = { rl_hc_slot_07_id = 584 }
                check_variable = { rl_hc_slot_07_id = 592 }
                check_variable = { rl_hc_slot_07_id = 593 }
                check_variable = { rl_hc_slot_07_id = 596 }
                check_variable = { rl_hc_slot_07_id = 597 }
                check_variable = { rl_hc_slot_07_id = 599 }
                check_variable = { rl_hc_slot_07_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_07_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_07_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_08_id = 97 }
                check_variable = { rl_hc_slot_08_id = 98 }
                check_variable = { rl_hc_slot_08_id = 99 }
                check_variable = { rl_hc_slot_08_id = 198 }
                check_variable = { rl_hc_slot_08_id = 199 }
                check_variable = { rl_hc_slot_08_id = 200 }
                check_variable = { rl_hc_slot_08_id = 224 }
                check_variable = { rl_hc_slot_08_id = 229 }
                check_variable = { rl_hc_slot_08_id = 261 }
                check_variable = { rl_hc_slot_08_id = 266 }
                check_variable = { rl_hc_slot_08_id = 270 }
                check_variable = { rl_hc_slot_08_id = 274 }
                check_variable = { rl_hc_slot_08_id = 277 }
                check_variable = { rl_hc_slot_08_id = 280 }
                check_variable = { rl_hc_slot_08_id = 286 }
                check_variable = { rl_hc_slot_08_id = 290 }
                check_variable = { rl_hc_slot_08_id = 302 }
                check_variable = { rl_hc_slot_08_id = 306 }
                check_variable = { rl_hc_slot_08_id = 312 }
                check_variable = { rl_hc_slot_08_id = 331 }
                check_variable = { rl_hc_slot_08_id = 379 }
                check_variable = { rl_hc_slot_08_id = 383 }
                check_variable = { rl_hc_slot_08_id = 389 }
                check_variable = { rl_hc_slot_08_id = 393 }
                check_variable = { rl_hc_slot_08_id = 395 }
                check_variable = { rl_hc_slot_08_id = 397 }
                check_variable = { rl_hc_slot_08_id = 400 }
                check_variable = { rl_hc_slot_08_id = 420 }
                check_variable = { rl_hc_slot_08_id = 425 }
                check_variable = { rl_hc_slot_08_id = 429 }
                check_variable = { rl_hc_slot_08_id = 436 }
                check_variable = { rl_hc_slot_08_id = 462 }
                check_variable = { rl_hc_slot_08_id = 467 }
                check_variable = { rl_hc_slot_08_id = 483 }
                check_variable = { rl_hc_slot_08_id = 485 }
                check_variable = { rl_hc_slot_08_id = 488 }
                check_variable = { rl_hc_slot_08_id = 504 }
                check_variable = { rl_hc_slot_08_id = 508 }
                check_variable = { rl_hc_slot_08_id = 513 }
                check_variable = { rl_hc_slot_08_id = 517 }
                check_variable = { rl_hc_slot_08_id = 522 }
                check_variable = { rl_hc_slot_08_id = 533 }
                check_variable = { rl_hc_slot_08_id = 538 }
                check_variable = { rl_hc_slot_08_id = 542 }
                check_variable = { rl_hc_slot_08_id = 547 }
                check_variable = { rl_hc_slot_08_id = 551 }
                check_variable = { rl_hc_slot_08_id = 556 }
                check_variable = { rl_hc_slot_08_id = 560 }
                check_variable = { rl_hc_slot_08_id = 563 }
                check_variable = { rl_hc_slot_08_id = 565 }
                check_variable = { rl_hc_slot_08_id = 572 }
                check_variable = { rl_hc_slot_08_id = 574 }
                check_variable = { rl_hc_slot_08_id = 577 }
                check_variable = { rl_hc_slot_08_id = 584 }
                check_variable = { rl_hc_slot_08_id = 592 }
                check_variable = { rl_hc_slot_08_id = 593 }
                check_variable = { rl_hc_slot_08_id = 596 }
                check_variable = { rl_hc_slot_08_id = 597 }
                check_variable = { rl_hc_slot_08_id = 599 }
                check_variable = { rl_hc_slot_08_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_08_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_08_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_09_id = 97 }
                check_variable = { rl_hc_slot_09_id = 98 }
                check_variable = { rl_hc_slot_09_id = 99 }
                check_variable = { rl_hc_slot_09_id = 198 }
                check_variable = { rl_hc_slot_09_id = 199 }
                check_variable = { rl_hc_slot_09_id = 200 }
                check_variable = { rl_hc_slot_09_id = 224 }
                check_variable = { rl_hc_slot_09_id = 229 }
                check_variable = { rl_hc_slot_09_id = 261 }
                check_variable = { rl_hc_slot_09_id = 266 }
                check_variable = { rl_hc_slot_09_id = 270 }
                check_variable = { rl_hc_slot_09_id = 274 }
                check_variable = { rl_hc_slot_09_id = 277 }
                check_variable = { rl_hc_slot_09_id = 280 }
                check_variable = { rl_hc_slot_09_id = 286 }
                check_variable = { rl_hc_slot_09_id = 290 }
                check_variable = { rl_hc_slot_09_id = 302 }
                check_variable = { rl_hc_slot_09_id = 306 }
                check_variable = { rl_hc_slot_09_id = 312 }
                check_variable = { rl_hc_slot_09_id = 331 }
                check_variable = { rl_hc_slot_09_id = 379 }
                check_variable = { rl_hc_slot_09_id = 383 }
                check_variable = { rl_hc_slot_09_id = 389 }
                check_variable = { rl_hc_slot_09_id = 393 }
                check_variable = { rl_hc_slot_09_id = 395 }
                check_variable = { rl_hc_slot_09_id = 397 }
                check_variable = { rl_hc_slot_09_id = 400 }
                check_variable = { rl_hc_slot_09_id = 420 }
                check_variable = { rl_hc_slot_09_id = 425 }
                check_variable = { rl_hc_slot_09_id = 429 }
                check_variable = { rl_hc_slot_09_id = 436 }
                check_variable = { rl_hc_slot_09_id = 462 }
                check_variable = { rl_hc_slot_09_id = 467 }
                check_variable = { rl_hc_slot_09_id = 483 }
                check_variable = { rl_hc_slot_09_id = 485 }
                check_variable = { rl_hc_slot_09_id = 488 }
                check_variable = { rl_hc_slot_09_id = 504 }
                check_variable = { rl_hc_slot_09_id = 508 }
                check_variable = { rl_hc_slot_09_id = 513 }
                check_variable = { rl_hc_slot_09_id = 517 }
                check_variable = { rl_hc_slot_09_id = 522 }
                check_variable = { rl_hc_slot_09_id = 533 }
                check_variable = { rl_hc_slot_09_id = 538 }
                check_variable = { rl_hc_slot_09_id = 542 }
                check_variable = { rl_hc_slot_09_id = 547 }
                check_variable = { rl_hc_slot_09_id = 551 }
                check_variable = { rl_hc_slot_09_id = 556 }
                check_variable = { rl_hc_slot_09_id = 560 }
                check_variable = { rl_hc_slot_09_id = 563 }
                check_variable = { rl_hc_slot_09_id = 565 }
                check_variable = { rl_hc_slot_09_id = 572 }
                check_variable = { rl_hc_slot_09_id = 574 }
                check_variable = { rl_hc_slot_09_id = 577 }
                check_variable = { rl_hc_slot_09_id = 584 }
                check_variable = { rl_hc_slot_09_id = 592 }
                check_variable = { rl_hc_slot_09_id = 593 }
                check_variable = { rl_hc_slot_09_id = 596 }
                check_variable = { rl_hc_slot_09_id = 597 }
                check_variable = { rl_hc_slot_09_id = 599 }
                check_variable = { rl_hc_slot_09_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_09_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_09_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_10_id = 97 }
                check_variable = { rl_hc_slot_10_id = 98 }
                check_variable = { rl_hc_slot_10_id = 99 }
                check_variable = { rl_hc_slot_10_id = 198 }
                check_variable = { rl_hc_slot_10_id = 199 }
                check_variable = { rl_hc_slot_10_id = 200 }
                check_variable = { rl_hc_slot_10_id = 224 }
                check_variable = { rl_hc_slot_10_id = 229 }
                check_variable = { rl_hc_slot_10_id = 261 }
                check_variable = { rl_hc_slot_10_id = 266 }
                check_variable = { rl_hc_slot_10_id = 270 }
                check_variable = { rl_hc_slot_10_id = 274 }
                check_variable = { rl_hc_slot_10_id = 277 }
                check_variable = { rl_hc_slot_10_id = 280 }
                check_variable = { rl_hc_slot_10_id = 286 }
                check_variable = { rl_hc_slot_10_id = 290 }
                check_variable = { rl_hc_slot_10_id = 302 }
                check_variable = { rl_hc_slot_10_id = 306 }
                check_variable = { rl_hc_slot_10_id = 312 }
                check_variable = { rl_hc_slot_10_id = 331 }
                check_variable = { rl_hc_slot_10_id = 379 }
                check_variable = { rl_hc_slot_10_id = 383 }
                check_variable = { rl_hc_slot_10_id = 389 }
                check_variable = { rl_hc_slot_10_id = 393 }
                check_variable = { rl_hc_slot_10_id = 395 }
                check_variable = { rl_hc_slot_10_id = 397 }
                check_variable = { rl_hc_slot_10_id = 400 }
                check_variable = { rl_hc_slot_10_id = 420 }
                check_variable = { rl_hc_slot_10_id = 425 }
                check_variable = { rl_hc_slot_10_id = 429 }
                check_variable = { rl_hc_slot_10_id = 436 }
                check_variable = { rl_hc_slot_10_id = 462 }
                check_variable = { rl_hc_slot_10_id = 467 }
                check_variable = { rl_hc_slot_10_id = 483 }
                check_variable = { rl_hc_slot_10_id = 485 }
                check_variable = { rl_hc_slot_10_id = 488 }
                check_variable = { rl_hc_slot_10_id = 504 }
                check_variable = { rl_hc_slot_10_id = 508 }
                check_variable = { rl_hc_slot_10_id = 513 }
                check_variable = { rl_hc_slot_10_id = 517 }
                check_variable = { rl_hc_slot_10_id = 522 }
                check_variable = { rl_hc_slot_10_id = 533 }
                check_variable = { rl_hc_slot_10_id = 538 }
                check_variable = { rl_hc_slot_10_id = 542 }
                check_variable = { rl_hc_slot_10_id = 547 }
                check_variable = { rl_hc_slot_10_id = 551 }
                check_variable = { rl_hc_slot_10_id = 556 }
                check_variable = { rl_hc_slot_10_id = 560 }
                check_variable = { rl_hc_slot_10_id = 563 }
                check_variable = { rl_hc_slot_10_id = 565 }
                check_variable = { rl_hc_slot_10_id = 572 }
                check_variable = { rl_hc_slot_10_id = 574 }
                check_variable = { rl_hc_slot_10_id = 577 }
                check_variable = { rl_hc_slot_10_id = 584 }
                check_variable = { rl_hc_slot_10_id = 592 }
                check_variable = { rl_hc_slot_10_id = 593 }
                check_variable = { rl_hc_slot_10_id = 596 }
                check_variable = { rl_hc_slot_10_id = 597 }
                check_variable = { rl_hc_slot_10_id = 599 }
                check_variable = { rl_hc_slot_10_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_10_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_10_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_11_id = 97 }
                check_variable = { rl_hc_slot_11_id = 98 }
                check_variable = { rl_hc_slot_11_id = 99 }
                check_variable = { rl_hc_slot_11_id = 198 }
                check_variable = { rl_hc_slot_11_id = 199 }
                check_variable = { rl_hc_slot_11_id = 200 }
                check_variable = { rl_hc_slot_11_id = 224 }
                check_variable = { rl_hc_slot_11_id = 229 }
                check_variable = { rl_hc_slot_11_id = 261 }
                check_variable = { rl_hc_slot_11_id = 266 }
                check_variable = { rl_hc_slot_11_id = 270 }
                check_variable = { rl_hc_slot_11_id = 274 }
                check_variable = { rl_hc_slot_11_id = 277 }
                check_variable = { rl_hc_slot_11_id = 280 }
                check_variable = { rl_hc_slot_11_id = 286 }
                check_variable = { rl_hc_slot_11_id = 290 }
                check_variable = { rl_hc_slot_11_id = 302 }
                check_variable = { rl_hc_slot_11_id = 306 }
                check_variable = { rl_hc_slot_11_id = 312 }
                check_variable = { rl_hc_slot_11_id = 331 }
                check_variable = { rl_hc_slot_11_id = 379 }
                check_variable = { rl_hc_slot_11_id = 383 }
                check_variable = { rl_hc_slot_11_id = 389 }
                check_variable = { rl_hc_slot_11_id = 393 }
                check_variable = { rl_hc_slot_11_id = 395 }
                check_variable = { rl_hc_slot_11_id = 397 }
                check_variable = { rl_hc_slot_11_id = 400 }
                check_variable = { rl_hc_slot_11_id = 420 }
                check_variable = { rl_hc_slot_11_id = 425 }
                check_variable = { rl_hc_slot_11_id = 429 }
                check_variable = { rl_hc_slot_11_id = 436 }
                check_variable = { rl_hc_slot_11_id = 462 }
                check_variable = { rl_hc_slot_11_id = 467 }
                check_variable = { rl_hc_slot_11_id = 483 }
                check_variable = { rl_hc_slot_11_id = 485 }
                check_variable = { rl_hc_slot_11_id = 488 }
                check_variable = { rl_hc_slot_11_id = 504 }
                check_variable = { rl_hc_slot_11_id = 508 }
                check_variable = { rl_hc_slot_11_id = 513 }
                check_variable = { rl_hc_slot_11_id = 517 }
                check_variable = { rl_hc_slot_11_id = 522 }
                check_variable = { rl_hc_slot_11_id = 533 }
                check_variable = { rl_hc_slot_11_id = 538 }
                check_variable = { rl_hc_slot_11_id = 542 }
                check_variable = { rl_hc_slot_11_id = 547 }
                check_variable = { rl_hc_slot_11_id = 551 }
                check_variable = { rl_hc_slot_11_id = 556 }
                check_variable = { rl_hc_slot_11_id = 560 }
                check_variable = { rl_hc_slot_11_id = 563 }
                check_variable = { rl_hc_slot_11_id = 565 }
                check_variable = { rl_hc_slot_11_id = 572 }
                check_variable = { rl_hc_slot_11_id = 574 }
                check_variable = { rl_hc_slot_11_id = 577 }
                check_variable = { rl_hc_slot_11_id = 584 }
                check_variable = { rl_hc_slot_11_id = 592 }
                check_variable = { rl_hc_slot_11_id = 593 }
                check_variable = { rl_hc_slot_11_id = 596 }
                check_variable = { rl_hc_slot_11_id = 597 }
                check_variable = { rl_hc_slot_11_id = 599 }
                check_variable = { rl_hc_slot_11_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_11_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_11_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_12_id = 97 }
                check_variable = { rl_hc_slot_12_id = 98 }
                check_variable = { rl_hc_slot_12_id = 99 }
                check_variable = { rl_hc_slot_12_id = 198 }
                check_variable = { rl_hc_slot_12_id = 199 }
                check_variable = { rl_hc_slot_12_id = 200 }
                check_variable = { rl_hc_slot_12_id = 224 }
                check_variable = { rl_hc_slot_12_id = 229 }
                check_variable = { rl_hc_slot_12_id = 261 }
                check_variable = { rl_hc_slot_12_id = 266 }
                check_variable = { rl_hc_slot_12_id = 270 }
                check_variable = { rl_hc_slot_12_id = 274 }
                check_variable = { rl_hc_slot_12_id = 277 }
                check_variable = { rl_hc_slot_12_id = 280 }
                check_variable = { rl_hc_slot_12_id = 286 }
                check_variable = { rl_hc_slot_12_id = 290 }
                check_variable = { rl_hc_slot_12_id = 302 }
                check_variable = { rl_hc_slot_12_id = 306 }
                check_variable = { rl_hc_slot_12_id = 312 }
                check_variable = { rl_hc_slot_12_id = 331 }
                check_variable = { rl_hc_slot_12_id = 379 }
                check_variable = { rl_hc_slot_12_id = 383 }
                check_variable = { rl_hc_slot_12_id = 389 }
                check_variable = { rl_hc_slot_12_id = 393 }
                check_variable = { rl_hc_slot_12_id = 395 }
                check_variable = { rl_hc_slot_12_id = 397 }
                check_variable = { rl_hc_slot_12_id = 400 }
                check_variable = { rl_hc_slot_12_id = 420 }
                check_variable = { rl_hc_slot_12_id = 425 }
                check_variable = { rl_hc_slot_12_id = 429 }
                check_variable = { rl_hc_slot_12_id = 436 }
                check_variable = { rl_hc_slot_12_id = 462 }
                check_variable = { rl_hc_slot_12_id = 467 }
                check_variable = { rl_hc_slot_12_id = 483 }
                check_variable = { rl_hc_slot_12_id = 485 }
                check_variable = { rl_hc_slot_12_id = 488 }
                check_variable = { rl_hc_slot_12_id = 504 }
                check_variable = { rl_hc_slot_12_id = 508 }
                check_variable = { rl_hc_slot_12_id = 513 }
                check_variable = { rl_hc_slot_12_id = 517 }
                check_variable = { rl_hc_slot_12_id = 522 }
                check_variable = { rl_hc_slot_12_id = 533 }
                check_variable = { rl_hc_slot_12_id = 538 }
                check_variable = { rl_hc_slot_12_id = 542 }
                check_variable = { rl_hc_slot_12_id = 547 }
                check_variable = { rl_hc_slot_12_id = 551 }
                check_variable = { rl_hc_slot_12_id = 556 }
                check_variable = { rl_hc_slot_12_id = 560 }
                check_variable = { rl_hc_slot_12_id = 563 }
                check_variable = { rl_hc_slot_12_id = 565 }
                check_variable = { rl_hc_slot_12_id = 572 }
                check_variable = { rl_hc_slot_12_id = 574 }
                check_variable = { rl_hc_slot_12_id = 577 }
                check_variable = { rl_hc_slot_12_id = 584 }
                check_variable = { rl_hc_slot_12_id = 592 }
                check_variable = { rl_hc_slot_12_id = 593 }
                check_variable = { rl_hc_slot_12_id = 596 }
                check_variable = { rl_hc_slot_12_id = 597 }
                check_variable = { rl_hc_slot_12_id = 599 }
                check_variable = { rl_hc_slot_12_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_12_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_12_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_13_id = 97 }
                check_variable = { rl_hc_slot_13_id = 98 }
                check_variable = { rl_hc_slot_13_id = 99 }
                check_variable = { rl_hc_slot_13_id = 198 }
                check_variable = { rl_hc_slot_13_id = 199 }
                check_variable = { rl_hc_slot_13_id = 200 }
                check_variable = { rl_hc_slot_13_id = 224 }
                check_variable = { rl_hc_slot_13_id = 229 }
                check_variable = { rl_hc_slot_13_id = 261 }
                check_variable = { rl_hc_slot_13_id = 266 }
                check_variable = { rl_hc_slot_13_id = 270 }
                check_variable = { rl_hc_slot_13_id = 274 }
                check_variable = { rl_hc_slot_13_id = 277 }
                check_variable = { rl_hc_slot_13_id = 280 }
                check_variable = { rl_hc_slot_13_id = 286 }
                check_variable = { rl_hc_slot_13_id = 290 }
                check_variable = { rl_hc_slot_13_id = 302 }
                check_variable = { rl_hc_slot_13_id = 306 }
                check_variable = { rl_hc_slot_13_id = 312 }
                check_variable = { rl_hc_slot_13_id = 331 }
                check_variable = { rl_hc_slot_13_id = 379 }
                check_variable = { rl_hc_slot_13_id = 383 }
                check_variable = { rl_hc_slot_13_id = 389 }
                check_variable = { rl_hc_slot_13_id = 393 }
                check_variable = { rl_hc_slot_13_id = 395 }
                check_variable = { rl_hc_slot_13_id = 397 }
                check_variable = { rl_hc_slot_13_id = 400 }
                check_variable = { rl_hc_slot_13_id = 420 }
                check_variable = { rl_hc_slot_13_id = 425 }
                check_variable = { rl_hc_slot_13_id = 429 }
                check_variable = { rl_hc_slot_13_id = 436 }
                check_variable = { rl_hc_slot_13_id = 462 }
                check_variable = { rl_hc_slot_13_id = 467 }
                check_variable = { rl_hc_slot_13_id = 483 }
                check_variable = { rl_hc_slot_13_id = 485 }
                check_variable = { rl_hc_slot_13_id = 488 }
                check_variable = { rl_hc_slot_13_id = 504 }
                check_variable = { rl_hc_slot_13_id = 508 }
                check_variable = { rl_hc_slot_13_id = 513 }
                check_variable = { rl_hc_slot_13_id = 517 }
                check_variable = { rl_hc_slot_13_id = 522 }
                check_variable = { rl_hc_slot_13_id = 533 }
                check_variable = { rl_hc_slot_13_id = 538 }
                check_variable = { rl_hc_slot_13_id = 542 }
                check_variable = { rl_hc_slot_13_id = 547 }
                check_variable = { rl_hc_slot_13_id = 551 }
                check_variable = { rl_hc_slot_13_id = 556 }
                check_variable = { rl_hc_slot_13_id = 560 }
                check_variable = { rl_hc_slot_13_id = 563 }
                check_variable = { rl_hc_slot_13_id = 565 }
                check_variable = { rl_hc_slot_13_id = 572 }
                check_variable = { rl_hc_slot_13_id = 574 }
                check_variable = { rl_hc_slot_13_id = 577 }
                check_variable = { rl_hc_slot_13_id = 584 }
                check_variable = { rl_hc_slot_13_id = 592 }
                check_variable = { rl_hc_slot_13_id = 593 }
                check_variable = { rl_hc_slot_13_id = 596 }
                check_variable = { rl_hc_slot_13_id = 597 }
                check_variable = { rl_hc_slot_13_id = 599 }
                check_variable = { rl_hc_slot_13_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_13_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_13_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_14_id = 97 }
                check_variable = { rl_hc_slot_14_id = 98 }
                check_variable = { rl_hc_slot_14_id = 99 }
                check_variable = { rl_hc_slot_14_id = 198 }
                check_variable = { rl_hc_slot_14_id = 199 }
                check_variable = { rl_hc_slot_14_id = 200 }
                check_variable = { rl_hc_slot_14_id = 224 }
                check_variable = { rl_hc_slot_14_id = 229 }
                check_variable = { rl_hc_slot_14_id = 261 }
                check_variable = { rl_hc_slot_14_id = 266 }
                check_variable = { rl_hc_slot_14_id = 270 }
                check_variable = { rl_hc_slot_14_id = 274 }
                check_variable = { rl_hc_slot_14_id = 277 }
                check_variable = { rl_hc_slot_14_id = 280 }
                check_variable = { rl_hc_slot_14_id = 286 }
                check_variable = { rl_hc_slot_14_id = 290 }
                check_variable = { rl_hc_slot_14_id = 302 }
                check_variable = { rl_hc_slot_14_id = 306 }
                check_variable = { rl_hc_slot_14_id = 312 }
                check_variable = { rl_hc_slot_14_id = 331 }
                check_variable = { rl_hc_slot_14_id = 379 }
                check_variable = { rl_hc_slot_14_id = 383 }
                check_variable = { rl_hc_slot_14_id = 389 }
                check_variable = { rl_hc_slot_14_id = 393 }
                check_variable = { rl_hc_slot_14_id = 395 }
                check_variable = { rl_hc_slot_14_id = 397 }
                check_variable = { rl_hc_slot_14_id = 400 }
                check_variable = { rl_hc_slot_14_id = 420 }
                check_variable = { rl_hc_slot_14_id = 425 }
                check_variable = { rl_hc_slot_14_id = 429 }
                check_variable = { rl_hc_slot_14_id = 436 }
                check_variable = { rl_hc_slot_14_id = 462 }
                check_variable = { rl_hc_slot_14_id = 467 }
                check_variable = { rl_hc_slot_14_id = 483 }
                check_variable = { rl_hc_slot_14_id = 485 }
                check_variable = { rl_hc_slot_14_id = 488 }
                check_variable = { rl_hc_slot_14_id = 504 }
                check_variable = { rl_hc_slot_14_id = 508 }
                check_variable = { rl_hc_slot_14_id = 513 }
                check_variable = { rl_hc_slot_14_id = 517 }
                check_variable = { rl_hc_slot_14_id = 522 }
                check_variable = { rl_hc_slot_14_id = 533 }
                check_variable = { rl_hc_slot_14_id = 538 }
                check_variable = { rl_hc_slot_14_id = 542 }
                check_variable = { rl_hc_slot_14_id = 547 }
                check_variable = { rl_hc_slot_14_id = 551 }
                check_variable = { rl_hc_slot_14_id = 556 }
                check_variable = { rl_hc_slot_14_id = 560 }
                check_variable = { rl_hc_slot_14_id = 563 }
                check_variable = { rl_hc_slot_14_id = 565 }
                check_variable = { rl_hc_slot_14_id = 572 }
                check_variable = { rl_hc_slot_14_id = 574 }
                check_variable = { rl_hc_slot_14_id = 577 }
                check_variable = { rl_hc_slot_14_id = 584 }
                check_variable = { rl_hc_slot_14_id = 592 }
                check_variable = { rl_hc_slot_14_id = 593 }
                check_variable = { rl_hc_slot_14_id = 596 }
                check_variable = { rl_hc_slot_14_id = 597 }
                check_variable = { rl_hc_slot_14_id = 599 }
                check_variable = { rl_hc_slot_14_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_14_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_14_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_15_id = 97 }
                check_variable = { rl_hc_slot_15_id = 98 }
                check_variable = { rl_hc_slot_15_id = 99 }
                check_variable = { rl_hc_slot_15_id = 198 }
                check_variable = { rl_hc_slot_15_id = 199 }
                check_variable = { rl_hc_slot_15_id = 200 }
                check_variable = { rl_hc_slot_15_id = 224 }
                check_variable = { rl_hc_slot_15_id = 229 }
                check_variable = { rl_hc_slot_15_id = 261 }
                check_variable = { rl_hc_slot_15_id = 266 }
                check_variable = { rl_hc_slot_15_id = 270 }
                check_variable = { rl_hc_slot_15_id = 274 }
                check_variable = { rl_hc_slot_15_id = 277 }
                check_variable = { rl_hc_slot_15_id = 280 }
                check_variable = { rl_hc_slot_15_id = 286 }
                check_variable = { rl_hc_slot_15_id = 290 }
                check_variable = { rl_hc_slot_15_id = 302 }
                check_variable = { rl_hc_slot_15_id = 306 }
                check_variable = { rl_hc_slot_15_id = 312 }
                check_variable = { rl_hc_slot_15_id = 331 }
                check_variable = { rl_hc_slot_15_id = 379 }
                check_variable = { rl_hc_slot_15_id = 383 }
                check_variable = { rl_hc_slot_15_id = 389 }
                check_variable = { rl_hc_slot_15_id = 393 }
                check_variable = { rl_hc_slot_15_id = 395 }
                check_variable = { rl_hc_slot_15_id = 397 }
                check_variable = { rl_hc_slot_15_id = 400 }
                check_variable = { rl_hc_slot_15_id = 420 }
                check_variable = { rl_hc_slot_15_id = 425 }
                check_variable = { rl_hc_slot_15_id = 429 }
                check_variable = { rl_hc_slot_15_id = 436 }
                check_variable = { rl_hc_slot_15_id = 462 }
                check_variable = { rl_hc_slot_15_id = 467 }
                check_variable = { rl_hc_slot_15_id = 483 }
                check_variable = { rl_hc_slot_15_id = 485 }
                check_variable = { rl_hc_slot_15_id = 488 }
                check_variable = { rl_hc_slot_15_id = 504 }
                check_variable = { rl_hc_slot_15_id = 508 }
                check_variable = { rl_hc_slot_15_id = 513 }
                check_variable = { rl_hc_slot_15_id = 517 }
                check_variable = { rl_hc_slot_15_id = 522 }
                check_variable = { rl_hc_slot_15_id = 533 }
                check_variable = { rl_hc_slot_15_id = 538 }
                check_variable = { rl_hc_slot_15_id = 542 }
                check_variable = { rl_hc_slot_15_id = 547 }
                check_variable = { rl_hc_slot_15_id = 551 }
                check_variable = { rl_hc_slot_15_id = 556 }
                check_variable = { rl_hc_slot_15_id = 560 }
                check_variable = { rl_hc_slot_15_id = 563 }
                check_variable = { rl_hc_slot_15_id = 565 }
                check_variable = { rl_hc_slot_15_id = 572 }
                check_variable = { rl_hc_slot_15_id = 574 }
                check_variable = { rl_hc_slot_15_id = 577 }
                check_variable = { rl_hc_slot_15_id = 584 }
                check_variable = { rl_hc_slot_15_id = 592 }
                check_variable = { rl_hc_slot_15_id = 593 }
                check_variable = { rl_hc_slot_15_id = 596 }
                check_variable = { rl_hc_slot_15_id = 597 }
                check_variable = { rl_hc_slot_15_id = 599 }
                check_variable = { rl_hc_slot_15_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_15_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_15_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_16_id = 97 }
                check_variable = { rl_hc_slot_16_id = 98 }
                check_variable = { rl_hc_slot_16_id = 99 }
                check_variable = { rl_hc_slot_16_id = 198 }
                check_variable = { rl_hc_slot_16_id = 199 }
                check_variable = { rl_hc_slot_16_id = 200 }
                check_variable = { rl_hc_slot_16_id = 224 }
                check_variable = { rl_hc_slot_16_id = 229 }
                check_variable = { rl_hc_slot_16_id = 261 }
                check_variable = { rl_hc_slot_16_id = 266 }
                check_variable = { rl_hc_slot_16_id = 270 }
                check_variable = { rl_hc_slot_16_id = 274 }
                check_variable = { rl_hc_slot_16_id = 277 }
                check_variable = { rl_hc_slot_16_id = 280 }
                check_variable = { rl_hc_slot_16_id = 286 }
                check_variable = { rl_hc_slot_16_id = 290 }
                check_variable = { rl_hc_slot_16_id = 302 }
                check_variable = { rl_hc_slot_16_id = 306 }
                check_variable = { rl_hc_slot_16_id = 312 }
                check_variable = { rl_hc_slot_16_id = 331 }
                check_variable = { rl_hc_slot_16_id = 379 }
                check_variable = { rl_hc_slot_16_id = 383 }
                check_variable = { rl_hc_slot_16_id = 389 }
                check_variable = { rl_hc_slot_16_id = 393 }
                check_variable = { rl_hc_slot_16_id = 395 }
                check_variable = { rl_hc_slot_16_id = 397 }
                check_variable = { rl_hc_slot_16_id = 400 }
                check_variable = { rl_hc_slot_16_id = 420 }
                check_variable = { rl_hc_slot_16_id = 425 }
                check_variable = { rl_hc_slot_16_id = 429 }
                check_variable = { rl_hc_slot_16_id = 436 }
                check_variable = { rl_hc_slot_16_id = 462 }
                check_variable = { rl_hc_slot_16_id = 467 }
                check_variable = { rl_hc_slot_16_id = 483 }
                check_variable = { rl_hc_slot_16_id = 485 }
                check_variable = { rl_hc_slot_16_id = 488 }
                check_variable = { rl_hc_slot_16_id = 504 }
                check_variable = { rl_hc_slot_16_id = 508 }
                check_variable = { rl_hc_slot_16_id = 513 }
                check_variable = { rl_hc_slot_16_id = 517 }
                check_variable = { rl_hc_slot_16_id = 522 }
                check_variable = { rl_hc_slot_16_id = 533 }
                check_variable = { rl_hc_slot_16_id = 538 }
                check_variable = { rl_hc_slot_16_id = 542 }
                check_variable = { rl_hc_slot_16_id = 547 }
                check_variable = { rl_hc_slot_16_id = 551 }
                check_variable = { rl_hc_slot_16_id = 556 }
                check_variable = { rl_hc_slot_16_id = 560 }
                check_variable = { rl_hc_slot_16_id = 563 }
                check_variable = { rl_hc_slot_16_id = 565 }
                check_variable = { rl_hc_slot_16_id = 572 }
                check_variable = { rl_hc_slot_16_id = 574 }
                check_variable = { rl_hc_slot_16_id = 577 }
                check_variable = { rl_hc_slot_16_id = 584 }
                check_variable = { rl_hc_slot_16_id = 592 }
                check_variable = { rl_hc_slot_16_id = 593 }
                check_variable = { rl_hc_slot_16_id = 596 }
                check_variable = { rl_hc_slot_16_id = 597 }
                check_variable = { rl_hc_slot_16_id = 599 }
                check_variable = { rl_hc_slot_16_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_16_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_16_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_17_id = 97 }
                check_variable = { rl_hc_slot_17_id = 98 }
                check_variable = { rl_hc_slot_17_id = 99 }
                check_variable = { rl_hc_slot_17_id = 198 }
                check_variable = { rl_hc_slot_17_id = 199 }
                check_variable = { rl_hc_slot_17_id = 200 }
                check_variable = { rl_hc_slot_17_id = 224 }
                check_variable = { rl_hc_slot_17_id = 229 }
                check_variable = { rl_hc_slot_17_id = 261 }
                check_variable = { rl_hc_slot_17_id = 266 }
                check_variable = { rl_hc_slot_17_id = 270 }
                check_variable = { rl_hc_slot_17_id = 274 }
                check_variable = { rl_hc_slot_17_id = 277 }
                check_variable = { rl_hc_slot_17_id = 280 }
                check_variable = { rl_hc_slot_17_id = 286 }
                check_variable = { rl_hc_slot_17_id = 290 }
                check_variable = { rl_hc_slot_17_id = 302 }
                check_variable = { rl_hc_slot_17_id = 306 }
                check_variable = { rl_hc_slot_17_id = 312 }
                check_variable = { rl_hc_slot_17_id = 331 }
                check_variable = { rl_hc_slot_17_id = 379 }
                check_variable = { rl_hc_slot_17_id = 383 }
                check_variable = { rl_hc_slot_17_id = 389 }
                check_variable = { rl_hc_slot_17_id = 393 }
                check_variable = { rl_hc_slot_17_id = 395 }
                check_variable = { rl_hc_slot_17_id = 397 }
                check_variable = { rl_hc_slot_17_id = 400 }
                check_variable = { rl_hc_slot_17_id = 420 }
                check_variable = { rl_hc_slot_17_id = 425 }
                check_variable = { rl_hc_slot_17_id = 429 }
                check_variable = { rl_hc_slot_17_id = 436 }
                check_variable = { rl_hc_slot_17_id = 462 }
                check_variable = { rl_hc_slot_17_id = 467 }
                check_variable = { rl_hc_slot_17_id = 483 }
                check_variable = { rl_hc_slot_17_id = 485 }
                check_variable = { rl_hc_slot_17_id = 488 }
                check_variable = { rl_hc_slot_17_id = 504 }
                check_variable = { rl_hc_slot_17_id = 508 }
                check_variable = { rl_hc_slot_17_id = 513 }
                check_variable = { rl_hc_slot_17_id = 517 }
                check_variable = { rl_hc_slot_17_id = 522 }
                check_variable = { rl_hc_slot_17_id = 533 }
                check_variable = { rl_hc_slot_17_id = 538 }
                check_variable = { rl_hc_slot_17_id = 542 }
                check_variable = { rl_hc_slot_17_id = 547 }
                check_variable = { rl_hc_slot_17_id = 551 }
                check_variable = { rl_hc_slot_17_id = 556 }
                check_variable = { rl_hc_slot_17_id = 560 }
                check_variable = { rl_hc_slot_17_id = 563 }
                check_variable = { rl_hc_slot_17_id = 565 }
                check_variable = { rl_hc_slot_17_id = 572 }
                check_variable = { rl_hc_slot_17_id = 574 }
                check_variable = { rl_hc_slot_17_id = 577 }
                check_variable = { rl_hc_slot_17_id = 584 }
                check_variable = { rl_hc_slot_17_id = 592 }
                check_variable = { rl_hc_slot_17_id = 593 }
                check_variable = { rl_hc_slot_17_id = 596 }
                check_variable = { rl_hc_slot_17_id = 597 }
                check_variable = { rl_hc_slot_17_id = 599 }
                check_variable = { rl_hc_slot_17_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_17_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_17_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_18_id = 97 }
                check_variable = { rl_hc_slot_18_id = 98 }
                check_variable = { rl_hc_slot_18_id = 99 }
                check_variable = { rl_hc_slot_18_id = 198 }
                check_variable = { rl_hc_slot_18_id = 199 }
                check_variable = { rl_hc_slot_18_id = 200 }
                check_variable = { rl_hc_slot_18_id = 224 }
                check_variable = { rl_hc_slot_18_id = 229 }
                check_variable = { rl_hc_slot_18_id = 261 }
                check_variable = { rl_hc_slot_18_id = 266 }
                check_variable = { rl_hc_slot_18_id = 270 }
                check_variable = { rl_hc_slot_18_id = 274 }
                check_variable = { rl_hc_slot_18_id = 277 }
                check_variable = { rl_hc_slot_18_id = 280 }
                check_variable = { rl_hc_slot_18_id = 286 }
                check_variable = { rl_hc_slot_18_id = 290 }
                check_variable = { rl_hc_slot_18_id = 302 }
                check_variable = { rl_hc_slot_18_id = 306 }
                check_variable = { rl_hc_slot_18_id = 312 }
                check_variable = { rl_hc_slot_18_id = 331 }
                check_variable = { rl_hc_slot_18_id = 379 }
                check_variable = { rl_hc_slot_18_id = 383 }
                check_variable = { rl_hc_slot_18_id = 389 }
                check_variable = { rl_hc_slot_18_id = 393 }
                check_variable = { rl_hc_slot_18_id = 395 }
                check_variable = { rl_hc_slot_18_id = 397 }
                check_variable = { rl_hc_slot_18_id = 400 }
                check_variable = { rl_hc_slot_18_id = 420 }
                check_variable = { rl_hc_slot_18_id = 425 }
                check_variable = { rl_hc_slot_18_id = 429 }
                check_variable = { rl_hc_slot_18_id = 436 }
                check_variable = { rl_hc_slot_18_id = 462 }
                check_variable = { rl_hc_slot_18_id = 467 }
                check_variable = { rl_hc_slot_18_id = 483 }
                check_variable = { rl_hc_slot_18_id = 485 }
                check_variable = { rl_hc_slot_18_id = 488 }
                check_variable = { rl_hc_slot_18_id = 504 }
                check_variable = { rl_hc_slot_18_id = 508 }
                check_variable = { rl_hc_slot_18_id = 513 }
                check_variable = { rl_hc_slot_18_id = 517 }
                check_variable = { rl_hc_slot_18_id = 522 }
                check_variable = { rl_hc_slot_18_id = 533 }
                check_variable = { rl_hc_slot_18_id = 538 }
                check_variable = { rl_hc_slot_18_id = 542 }
                check_variable = { rl_hc_slot_18_id = 547 }
                check_variable = { rl_hc_slot_18_id = 551 }
                check_variable = { rl_hc_slot_18_id = 556 }
                check_variable = { rl_hc_slot_18_id = 560 }
                check_variable = { rl_hc_slot_18_id = 563 }
                check_variable = { rl_hc_slot_18_id = 565 }
                check_variable = { rl_hc_slot_18_id = 572 }
                check_variable = { rl_hc_slot_18_id = 574 }
                check_variable = { rl_hc_slot_18_id = 577 }
                check_variable = { rl_hc_slot_18_id = 584 }
                check_variable = { rl_hc_slot_18_id = 592 }
                check_variable = { rl_hc_slot_18_id = 593 }
                check_variable = { rl_hc_slot_18_id = 596 }
                check_variable = { rl_hc_slot_18_id = 597 }
                check_variable = { rl_hc_slot_18_id = 599 }
                check_variable = { rl_hc_slot_18_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_18_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_18_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_19_id = 97 }
                check_variable = { rl_hc_slot_19_id = 98 }
                check_variable = { rl_hc_slot_19_id = 99 }
                check_variable = { rl_hc_slot_19_id = 198 }
                check_variable = { rl_hc_slot_19_id = 199 }
                check_variable = { rl_hc_slot_19_id = 200 }
                check_variable = { rl_hc_slot_19_id = 224 }
                check_variable = { rl_hc_slot_19_id = 229 }
                check_variable = { rl_hc_slot_19_id = 261 }
                check_variable = { rl_hc_slot_19_id = 266 }
                check_variable = { rl_hc_slot_19_id = 270 }
                check_variable = { rl_hc_slot_19_id = 274 }
                check_variable = { rl_hc_slot_19_id = 277 }
                check_variable = { rl_hc_slot_19_id = 280 }
                check_variable = { rl_hc_slot_19_id = 286 }
                check_variable = { rl_hc_slot_19_id = 290 }
                check_variable = { rl_hc_slot_19_id = 302 }
                check_variable = { rl_hc_slot_19_id = 306 }
                check_variable = { rl_hc_slot_19_id = 312 }
                check_variable = { rl_hc_slot_19_id = 331 }
                check_variable = { rl_hc_slot_19_id = 379 }
                check_variable = { rl_hc_slot_19_id = 383 }
                check_variable = { rl_hc_slot_19_id = 389 }
                check_variable = { rl_hc_slot_19_id = 393 }
                check_variable = { rl_hc_slot_19_id = 395 }
                check_variable = { rl_hc_slot_19_id = 397 }
                check_variable = { rl_hc_slot_19_id = 400 }
                check_variable = { rl_hc_slot_19_id = 420 }
                check_variable = { rl_hc_slot_19_id = 425 }
                check_variable = { rl_hc_slot_19_id = 429 }
                check_variable = { rl_hc_slot_19_id = 436 }
                check_variable = { rl_hc_slot_19_id = 462 }
                check_variable = { rl_hc_slot_19_id = 467 }
                check_variable = { rl_hc_slot_19_id = 483 }
                check_variable = { rl_hc_slot_19_id = 485 }
                check_variable = { rl_hc_slot_19_id = 488 }
                check_variable = { rl_hc_slot_19_id = 504 }
                check_variable = { rl_hc_slot_19_id = 508 }
                check_variable = { rl_hc_slot_19_id = 513 }
                check_variable = { rl_hc_slot_19_id = 517 }
                check_variable = { rl_hc_slot_19_id = 522 }
                check_variable = { rl_hc_slot_19_id = 533 }
                check_variable = { rl_hc_slot_19_id = 538 }
                check_variable = { rl_hc_slot_19_id = 542 }
                check_variable = { rl_hc_slot_19_id = 547 }
                check_variable = { rl_hc_slot_19_id = 551 }
                check_variable = { rl_hc_slot_19_id = 556 }
                check_variable = { rl_hc_slot_19_id = 560 }
                check_variable = { rl_hc_slot_19_id = 563 }
                check_variable = { rl_hc_slot_19_id = 565 }
                check_variable = { rl_hc_slot_19_id = 572 }
                check_variable = { rl_hc_slot_19_id = 574 }
                check_variable = { rl_hc_slot_19_id = 577 }
                check_variable = { rl_hc_slot_19_id = 584 }
                check_variable = { rl_hc_slot_19_id = 592 }
                check_variable = { rl_hc_slot_19_id = 593 }
                check_variable = { rl_hc_slot_19_id = 596 }
                check_variable = { rl_hc_slot_19_id = 597 }
                check_variable = { rl_hc_slot_19_id = 599 }
                check_variable = { rl_hc_slot_19_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_19_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_19_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    if = {
        limit = {
            OR = {
                check_variable = { rl_hc_slot_20_id = 97 }
                check_variable = { rl_hc_slot_20_id = 98 }
                check_variable = { rl_hc_slot_20_id = 99 }
                check_variable = { rl_hc_slot_20_id = 198 }
                check_variable = { rl_hc_slot_20_id = 199 }
                check_variable = { rl_hc_slot_20_id = 200 }
                check_variable = { rl_hc_slot_20_id = 224 }
                check_variable = { rl_hc_slot_20_id = 229 }
                check_variable = { rl_hc_slot_20_id = 261 }
                check_variable = { rl_hc_slot_20_id = 266 }
                check_variable = { rl_hc_slot_20_id = 270 }
                check_variable = { rl_hc_slot_20_id = 274 }
                check_variable = { rl_hc_slot_20_id = 277 }
                check_variable = { rl_hc_slot_20_id = 280 }
                check_variable = { rl_hc_slot_20_id = 286 }
                check_variable = { rl_hc_slot_20_id = 290 }
                check_variable = { rl_hc_slot_20_id = 302 }
                check_variable = { rl_hc_slot_20_id = 306 }
                check_variable = { rl_hc_slot_20_id = 312 }
                check_variable = { rl_hc_slot_20_id = 331 }
                check_variable = { rl_hc_slot_20_id = 379 }
                check_variable = { rl_hc_slot_20_id = 383 }
                check_variable = { rl_hc_slot_20_id = 389 }
                check_variable = { rl_hc_slot_20_id = 393 }
                check_variable = { rl_hc_slot_20_id = 395 }
                check_variable = { rl_hc_slot_20_id = 397 }
                check_variable = { rl_hc_slot_20_id = 400 }
                check_variable = { rl_hc_slot_20_id = 420 }
                check_variable = { rl_hc_slot_20_id = 425 }
                check_variable = { rl_hc_slot_20_id = 429 }
                check_variable = { rl_hc_slot_20_id = 436 }
                check_variable = { rl_hc_slot_20_id = 462 }
                check_variable = { rl_hc_slot_20_id = 467 }
                check_variable = { rl_hc_slot_20_id = 483 }
                check_variable = { rl_hc_slot_20_id = 485 }
                check_variable = { rl_hc_slot_20_id = 488 }
                check_variable = { rl_hc_slot_20_id = 504 }
                check_variable = { rl_hc_slot_20_id = 508 }
                check_variable = { rl_hc_slot_20_id = 513 }
                check_variable = { rl_hc_slot_20_id = 517 }
                check_variable = { rl_hc_slot_20_id = 522 }
                check_variable = { rl_hc_slot_20_id = 533 }
                check_variable = { rl_hc_slot_20_id = 538 }
                check_variable = { rl_hc_slot_20_id = 542 }
                check_variable = { rl_hc_slot_20_id = 547 }
                check_variable = { rl_hc_slot_20_id = 551 }
                check_variable = { rl_hc_slot_20_id = 556 }
                check_variable = { rl_hc_slot_20_id = 560 }
                check_variable = { rl_hc_slot_20_id = 563 }
                check_variable = { rl_hc_slot_20_id = 565 }
                check_variable = { rl_hc_slot_20_id = 572 }
                check_variable = { rl_hc_slot_20_id = 574 }
                check_variable = { rl_hc_slot_20_id = 577 }
                check_variable = { rl_hc_slot_20_id = 584 }
                check_variable = { rl_hc_slot_20_id = 592 }
                check_variable = { rl_hc_slot_20_id = 593 }
                check_variable = { rl_hc_slot_20_id = 596 }
                check_variable = { rl_hc_slot_20_id = 597 }
                check_variable = { rl_hc_slot_20_id = 599 }
                check_variable = { rl_hc_slot_20_id = 600 }
            }
        }
        set_variable = { rl_selected_id = rl_hc_slot_20_id }
        set_variable = { rl_selected_rarity = rl_hc_slot_20_rarity }
        rl_remove_legacy_cross_category_curse = yes
        rl_apply_cross_category_curse_values_only = yes
    }
    set_variable = { rl_selected_id = rl_v342_saved_selected_id }
    set_variable = { rl_selected_rarity = rl_v342_saved_selected_rarity }
    force_update_dynamic_modifier = yes
}

rl_check_set_industry = {
    if = {
        limit = {
            check_variable = { rl_cat_industry > 4 }
            NOT = { has_country_flag = rl_set_industry_1 }
        }
        set_country_flag = rl_set_industry_1
        add_to_variable = { rl_mod_industrial_capacity_factory = 0.05 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 1 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_industry > 9 }
            NOT = { has_country_flag = rl_set_industry_2 }
        }
        set_country_flag = rl_set_industry_2
        add_to_variable = { rl_mod_production_speed_buildings_factor = 0.08 }
        add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 1 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_industry > 19 }
            NOT = { has_country_flag = rl_set_industry_3 }
        }
        set_country_flag = rl_set_industry_3
        add_offsite_building = { type = arms_factory level = 3 }
        add_offsite_building = { type = industrial_complex level = 3 }
        add_to_variable = { rl_factories_added = 6 }
        add_to_variable = { rl_mod_production_factory_max_efficiency_factor = 0.10 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 1 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_check_set_army = {
    if = {
        limit = {
            check_variable = { rl_cat_army > 4 }
            NOT = { has_country_flag = rl_set_army_1 }
        }
        set_country_flag = rl_set_army_1
        add_to_variable = { rl_mod_army_org_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 2 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_army > 9 }
            NOT = { has_country_flag = rl_set_army_2 }
        }
        set_country_flag = rl_set_army_2
        add_to_variable = { rl_mod_army_attack_factor = 0.05 }
        add_to_variable = { rl_mod_army_defence_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 2 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_army > 19 }
            NOT = { has_country_flag = rl_set_army_3 }
        }
        set_country_flag = rl_set_army_3
        add_to_variable = { rl_mod_max_planning_factor = 0.10 }
        add_to_variable = { rl_mod_training_time_army_factor = -0.15 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 2 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_check_set_armor = {
    if = {
        limit = {
            check_variable = { rl_cat_armor > 4 }
            NOT = { has_country_flag = rl_set_armor_1 }
        }
        set_country_flag = rl_set_armor_1
        add_to_variable = { rl_mod_army_armor_attack_factor = 0.05 }
        add_to_variable = { rl_mod_army_armor_defence_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 3 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_armor > 9 }
            NOT = { has_country_flag = rl_set_armor_2 }
        }
        set_country_flag = rl_set_armor_2
        add_to_variable = { rl_mod_motorized_attack_factor = 0.08 }
        add_to_variable = { rl_mod_motorized_defence_factor = 0.08 }
        add_to_variable = { rl_mod_mechanized_attack_factor = 0.08 }
        add_to_variable = { rl_mod_mechanized_defence_factor = 0.08 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 3 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_armor > 19 }
            NOT = { has_country_flag = rl_set_armor_3 }
        }
        set_country_flag = rl_set_armor_3
        add_to_variable = { rl_mod_armor_factor = 0.10 }
        add_to_variable = { rl_mod_army_speed_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 3 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_check_set_air = {
    if = {
        limit = {
            check_variable = { rl_cat_air > 4 }
            NOT = { has_country_flag = rl_set_air_1 }
        }
        set_country_flag = rl_set_air_1
        add_to_variable = { rl_mod_air_mission_efficiency = 0.05 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 4 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_air > 9 }
            NOT = { has_country_flag = rl_set_air_2 }
        }
        set_country_flag = rl_set_air_2
        add_to_variable = { rl_mod_air_attack_factor = 0.08 }
        add_to_variable = { rl_mod_air_defence_factor = 0.08 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 4 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_air > 19 }
            NOT = { has_country_flag = rl_set_air_3 }
        }
        set_country_flag = rl_set_air_3
        add_to_variable = { rl_mod_air_range_factor = 0.10 }
        add_to_variable = { rl_mod_air_agility_factor = 0.10 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 4 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_check_set_navy = {
    if = {
        limit = {
            check_variable = { rl_cat_navy > 4 }
            NOT = { has_country_flag = rl_set_navy_1 }
        }
        set_country_flag = rl_set_navy_1
        add_to_variable = { rl_mod_navy_org_factor = 0.05 }
        add_to_variable = { rl_mod_naval_morale_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 5 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_navy > 9 }
            NOT = { has_country_flag = rl_set_navy_2 }
        }
        set_country_flag = rl_set_navy_2
        add_to_variable = { rl_mod_naval_damage_factor = 0.08 }
        add_to_variable = { rl_mod_naval_defense_factor = 0.08 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 5 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_navy > 19 }
            NOT = { has_country_flag = rl_set_navy_3 }
        }
        set_country_flag = rl_set_navy_3
        add_to_variable = { rl_mod_positioning = 0.10 }
        add_to_variable = { rl_mod_screening_efficiency = 0.10 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 5 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_check_set_research = {
    if = {
        limit = {
            check_variable = { rl_cat_research > 4 }
            NOT = { has_country_flag = rl_set_research_1 }
        }
        set_country_flag = rl_set_research_1
        add_to_variable = { rl_mod_research_speed_factor = 0.03 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 6 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_research > 9 }
            NOT = { has_country_flag = rl_set_research_2 }
        }
        set_country_flag = rl_set_research_2
        add_to_variable = { rl_mod_special_project_speed_factor = 0.08 }
        add_to_variable = { rl_mod_encryption = 1 }
        add_to_variable = { rl_mod_decryption = 1 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 6 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_research > 19 }
            NOT = { has_country_flag = rl_set_research_3 }
        }
        set_country_flag = rl_set_research_3
        add_research_slot = 1
        add_to_variable = { rl_research_slots_granted = 1 }
        add_to_variable = { rl_mod_research_speed_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 6 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_check_set_occupation = {
    if = {
        limit = {
            check_variable = { rl_cat_occupation > 4 }
            NOT = { has_country_flag = rl_set_occupation_1 }
        }
        set_country_flag = rl_set_occupation_1
        add_to_variable = { rl_mod_compliance_gain = 0.003 }
        add_to_variable = { rl_mod_resistance_target = -0.05 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 7 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_occupation > 9 }
            NOT = { has_country_flag = rl_set_occupation_2 }
        }
        set_country_flag = rl_set_occupation_2
        add_to_variable = { rl_mod_compliance_gain = 0.005 }
        add_to_variable = { rl_mod_resistance_target = -0.10 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 7 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_occupation > 19 }
            NOT = { has_country_flag = rl_set_occupation_3 }
        }
        set_country_flag = rl_set_occupation_3
        add_to_variable = { rl_core_forge_chance = 5 }
        add_to_variable = { rl_mod_compliance_gain = 0.01 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 7 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_check_set_fate = {
    if = {
        limit = {
            check_variable = { rl_cat_fate > 4 }
            NOT = { has_country_flag = rl_set_fate_1 }
        }
        set_country_flag = rl_set_fate_1
        add_to_variable = { rl_mod_political_power_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 5 }
        set_variable = { rl_last_set_category = 8 }
        set_variable = { rl_last_set_tier = 1 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_fate > 9 }
            NOT = { has_country_flag = rl_set_fate_2 }
        }
        set_country_flag = rl_set_fate_2
        add_to_variable = { rl_mod_stability_factor = 0.05 }
        add_to_variable = { rl_mod_war_support_factor = 0.05 }
        add_to_variable = { rl_fate_shards = 10 }
        set_variable = { rl_last_set_category = 8 }
        set_variable = { rl_last_set_tier = 2 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
    if = {
        limit = {
            check_variable = { rl_cat_fate > 19 }
            NOT = { has_country_flag = rl_set_fate_3 }
        }
        set_country_flag = rl_set_fate_3
        add_to_variable = { rl_mod_consumer_goods_factor = -0.05 }
        add_to_variable = { rl_fate_shards = 25 }
        add_to_variable = { rl_fate_shards = 20 }
        set_variable = { rl_last_set_category = 8 }
        set_variable = { rl_last_set_tier = 3 }
        if = { limit = { is_ai = no } country_event = { id = rl.30 hours = 2 } }
    }
}

rl_reroll_current_offers = {
    add_to_variable = { rl_fate_shards = -5 }
    add_to_variable = { rl_reroll_count = 1 }
    clr_country_flag = rl_offers_ready
    rl_generate_three_offers = yes
}
rl_lock_offer_1 = {
    add_to_variable = { rl_fate_shards = -8 }
    add_to_variable = { rl_lock_count = 1 }
    set_variable = { rl_locked_offer_id = rl_offer_1_id }
    set_variable = { rl_locked_offer_rarity = rl_offer_1_rarity }
    set_country_flag = rl_has_locked_offer
}
rl_lock_offer_2 = {
    add_to_variable = { rl_fate_shards = -8 }
    add_to_variable = { rl_lock_count = 1 }
    set_variable = { rl_locked_offer_id = rl_offer_2_id }
    set_variable = { rl_locked_offer_rarity = rl_offer_2_rarity }
    set_country_flag = rl_has_locked_offer
}
rl_lock_offer_3 = {
    add_to_variable = { rl_fate_shards = -8 }
    add_to_variable = { rl_lock_count = 1 }
    set_variable = { rl_locked_offer_id = rl_offer_3_id }
    set_variable = { rl_locked_offer_rarity = rl_offer_3_rarity }
    set_country_flag = rl_has_locked_offer
}
rl_banish_selected_id = {
    if = {
        limit = { check_variable = { rl_banish_target_id = 1 } }
        set_country_flag = rl_banned_1
        if = {
            limit = { check_variable = { rl_locked_offer_id = 1 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 2 } }
        set_country_flag = rl_banned_2
        if = {
            limit = { check_variable = { rl_locked_offer_id = 2 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 3 } }
        set_country_flag = rl_banned_3
        if = {
            limit = { check_variable = { rl_locked_offer_id = 3 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 4 } }
        set_country_flag = rl_banned_4
        if = {
            limit = { check_variable = { rl_locked_offer_id = 4 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 5 } }
        set_country_flag = rl_banned_5
        if = {
            limit = { check_variable = { rl_locked_offer_id = 5 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 6 } }
        set_country_flag = rl_banned_6
        if = {
            limit = { check_variable = { rl_locked_offer_id = 6 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 7 } }
        set_country_flag = rl_banned_7
        if = {
            limit = { check_variable = { rl_locked_offer_id = 7 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 8 } }
        set_country_flag = rl_banned_8
        if = {
            limit = { check_variable = { rl_locked_offer_id = 8 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 9 } }
        set_country_flag = rl_banned_9
        if = {
            limit = { check_variable = { rl_locked_offer_id = 9 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 10 } }
        set_country_flag = rl_banned_10
        if = {
            limit = { check_variable = { rl_locked_offer_id = 10 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 11 } }
        set_country_flag = rl_banned_11
        if = {
            limit = { check_variable = { rl_locked_offer_id = 11 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 12 } }
        set_country_flag = rl_banned_12
        if = {
            limit = { check_variable = { rl_locked_offer_id = 12 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 13 } }
        set_country_flag = rl_banned_13
        if = {
            limit = { check_variable = { rl_locked_offer_id = 13 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 14 } }
        set_country_flag = rl_banned_14
        if = {
            limit = { check_variable = { rl_locked_offer_id = 14 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 15 } }
        set_country_flag = rl_banned_15
        if = {
            limit = { check_variable = { rl_locked_offer_id = 15 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 16 } }
        set_country_flag = rl_banned_16
        if = {
            limit = { check_variable = { rl_locked_offer_id = 16 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 17 } }
        set_country_flag = rl_banned_17
        if = {
            limit = { check_variable = { rl_locked_offer_id = 17 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 18 } }
        set_country_flag = rl_banned_18
        if = {
            limit = { check_variable = { rl_locked_offer_id = 18 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 19 } }
        set_country_flag = rl_banned_19
        if = {
            limit = { check_variable = { rl_locked_offer_id = 19 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 20 } }
        set_country_flag = rl_banned_20
        if = {
            limit = { check_variable = { rl_locked_offer_id = 20 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 21 } }
        set_country_flag = rl_banned_21
        if = {
            limit = { check_variable = { rl_locked_offer_id = 21 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 22 } }
        set_country_flag = rl_banned_22
        if = {
            limit = { check_variable = { rl_locked_offer_id = 22 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 23 } }
        set_country_flag = rl_banned_23
        if = {
            limit = { check_variable = { rl_locked_offer_id = 23 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 24 } }
        set_country_flag = rl_banned_24
        if = {
            limit = { check_variable = { rl_locked_offer_id = 24 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 25 } }
        set_country_flag = rl_banned_25
        if = {
            limit = { check_variable = { rl_locked_offer_id = 25 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 26 } }
        set_country_flag = rl_banned_26
        if = {
            limit = { check_variable = { rl_locked_offer_id = 26 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 27 } }
        set_country_flag = rl_banned_27
        if = {
            limit = { check_variable = { rl_locked_offer_id = 27 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 28 } }
        set_country_flag = rl_banned_28
        if = {
            limit = { check_variable = { rl_locked_offer_id = 28 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 29 } }
        set_country_flag = rl_banned_29
        if = {
            limit = { check_variable = { rl_locked_offer_id = 29 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 30 } }
        set_country_flag = rl_banned_30
        if = {
            limit = { check_variable = { rl_locked_offer_id = 30 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 31 } }
        set_country_flag = rl_banned_31
        if = {
            limit = { check_variable = { rl_locked_offer_id = 31 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 32 } }
        set_country_flag = rl_banned_32
        if = {
            limit = { check_variable = { rl_locked_offer_id = 32 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 33 } }
        set_country_flag = rl_banned_33
        if = {
            limit = { check_variable = { rl_locked_offer_id = 33 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 34 } }
        set_country_flag = rl_banned_34
        if = {
            limit = { check_variable = { rl_locked_offer_id = 34 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 35 } }
        set_country_flag = rl_banned_35
        if = {
            limit = { check_variable = { rl_locked_offer_id = 35 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 36 } }
        set_country_flag = rl_banned_36
        if = {
            limit = { check_variable = { rl_locked_offer_id = 36 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 37 } }
        set_country_flag = rl_banned_37
        if = {
            limit = { check_variable = { rl_locked_offer_id = 37 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 38 } }
        set_country_flag = rl_banned_38
        if = {
            limit = { check_variable = { rl_locked_offer_id = 38 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 39 } }
        set_country_flag = rl_banned_39
        if = {
            limit = { check_variable = { rl_locked_offer_id = 39 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 40 } }
        set_country_flag = rl_banned_40
        if = {
            limit = { check_variable = { rl_locked_offer_id = 40 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 41 } }
        set_country_flag = rl_banned_41
        if = {
            limit = { check_variable = { rl_locked_offer_id = 41 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 42 } }
        set_country_flag = rl_banned_42
        if = {
            limit = { check_variable = { rl_locked_offer_id = 42 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 43 } }
        set_country_flag = rl_banned_43
        if = {
            limit = { check_variable = { rl_locked_offer_id = 43 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 44 } }
        set_country_flag = rl_banned_44
        if = {
            limit = { check_variable = { rl_locked_offer_id = 44 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 45 } }
        set_country_flag = rl_banned_45
        if = {
            limit = { check_variable = { rl_locked_offer_id = 45 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 46 } }
        set_country_flag = rl_banned_46
        if = {
            limit = { check_variable = { rl_locked_offer_id = 46 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 47 } }
        set_country_flag = rl_banned_47
        if = {
            limit = { check_variable = { rl_locked_offer_id = 47 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 48 } }
        set_country_flag = rl_banned_48
        if = {
            limit = { check_variable = { rl_locked_offer_id = 48 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 49 } }
        set_country_flag = rl_banned_49
        if = {
            limit = { check_variable = { rl_locked_offer_id = 49 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 50 } }
        set_country_flag = rl_banned_50
        if = {
            limit = { check_variable = { rl_locked_offer_id = 50 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 51 } }
        set_country_flag = rl_banned_51
        if = {
            limit = { check_variable = { rl_locked_offer_id = 51 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 52 } }
        set_country_flag = rl_banned_52
        if = {
            limit = { check_variable = { rl_locked_offer_id = 52 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 53 } }
        set_country_flag = rl_banned_53
        if = {
            limit = { check_variable = { rl_locked_offer_id = 53 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 54 } }
        set_country_flag = rl_banned_54
        if = {
            limit = { check_variable = { rl_locked_offer_id = 54 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 55 } }
        set_country_flag = rl_banned_55
        if = {
            limit = { check_variable = { rl_locked_offer_id = 55 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 56 } }
        set_country_flag = rl_banned_56
        if = {
            limit = { check_variable = { rl_locked_offer_id = 56 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 57 } }
        set_country_flag = rl_banned_57
        if = {
            limit = { check_variable = { rl_locked_offer_id = 57 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 58 } }
        set_country_flag = rl_banned_58
        if = {
            limit = { check_variable = { rl_locked_offer_id = 58 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 59 } }
        set_country_flag = rl_banned_59
        if = {
            limit = { check_variable = { rl_locked_offer_id = 59 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 60 } }
        set_country_flag = rl_banned_60
        if = {
            limit = { check_variable = { rl_locked_offer_id = 60 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 61 } }
        set_country_flag = rl_banned_61
        if = {
            limit = { check_variable = { rl_locked_offer_id = 61 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 62 } }
        set_country_flag = rl_banned_62
        if = {
            limit = { check_variable = { rl_locked_offer_id = 62 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 63 } }
        set_country_flag = rl_banned_63
        if = {
            limit = { check_variable = { rl_locked_offer_id = 63 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 64 } }
        set_country_flag = rl_banned_64
        if = {
            limit = { check_variable = { rl_locked_offer_id = 64 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 65 } }
        set_country_flag = rl_banned_65
        if = {
            limit = { check_variable = { rl_locked_offer_id = 65 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 66 } }
        set_country_flag = rl_banned_66
        if = {
            limit = { check_variable = { rl_locked_offer_id = 66 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 67 } }
        set_country_flag = rl_banned_67
        if = {
            limit = { check_variable = { rl_locked_offer_id = 67 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 68 } }
        set_country_flag = rl_banned_68
        if = {
            limit = { check_variable = { rl_locked_offer_id = 68 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 69 } }
        set_country_flag = rl_banned_69
        if = {
            limit = { check_variable = { rl_locked_offer_id = 69 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 70 } }
        set_country_flag = rl_banned_70
        if = {
            limit = { check_variable = { rl_locked_offer_id = 70 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 71 } }
        set_country_flag = rl_banned_71
        if = {
            limit = { check_variable = { rl_locked_offer_id = 71 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 72 } }
        set_country_flag = rl_banned_72
        if = {
            limit = { check_variable = { rl_locked_offer_id = 72 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 73 } }
        set_country_flag = rl_banned_73
        if = {
            limit = { check_variable = { rl_locked_offer_id = 73 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 74 } }
        set_country_flag = rl_banned_74
        if = {
            limit = { check_variable = { rl_locked_offer_id = 74 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 75 } }
        set_country_flag = rl_banned_75
        if = {
            limit = { check_variable = { rl_locked_offer_id = 75 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 76 } }
        set_country_flag = rl_banned_76
        if = {
            limit = { check_variable = { rl_locked_offer_id = 76 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 77 } }
        set_country_flag = rl_banned_77
        if = {
            limit = { check_variable = { rl_locked_offer_id = 77 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 78 } }
        set_country_flag = rl_banned_78
        if = {
            limit = { check_variable = { rl_locked_offer_id = 78 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 79 } }
        set_country_flag = rl_banned_79
        if = {
            limit = { check_variable = { rl_locked_offer_id = 79 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 80 } }
        set_country_flag = rl_banned_80
        if = {
            limit = { check_variable = { rl_locked_offer_id = 80 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 81 } }
        set_country_flag = rl_banned_81
        if = {
            limit = { check_variable = { rl_locked_offer_id = 81 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 82 } }
        set_country_flag = rl_banned_82
        if = {
            limit = { check_variable = { rl_locked_offer_id = 82 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 83 } }
        set_country_flag = rl_banned_83
        if = {
            limit = { check_variable = { rl_locked_offer_id = 83 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 84 } }
        set_country_flag = rl_banned_84
        if = {
            limit = { check_variable = { rl_locked_offer_id = 84 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 85 } }
        set_country_flag = rl_banned_85
        if = {
            limit = { check_variable = { rl_locked_offer_id = 85 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 86 } }
        set_country_flag = rl_banned_86
        if = {
            limit = { check_variable = { rl_locked_offer_id = 86 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 87 } }
        set_country_flag = rl_banned_87
        if = {
            limit = { check_variable = { rl_locked_offer_id = 87 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 88 } }
        set_country_flag = rl_banned_88
        if = {
            limit = { check_variable = { rl_locked_offer_id = 88 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 89 } }
        set_country_flag = rl_banned_89
        if = {
            limit = { check_variable = { rl_locked_offer_id = 89 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 90 } }
        set_country_flag = rl_banned_90
        if = {
            limit = { check_variable = { rl_locked_offer_id = 90 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 91 } }
        set_country_flag = rl_banned_91
        if = {
            limit = { check_variable = { rl_locked_offer_id = 91 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 92 } }
        set_country_flag = rl_banned_92
        if = {
            limit = { check_variable = { rl_locked_offer_id = 92 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 93 } }
        set_country_flag = rl_banned_93
        if = {
            limit = { check_variable = { rl_locked_offer_id = 93 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 94 } }
        set_country_flag = rl_banned_94
        if = {
            limit = { check_variable = { rl_locked_offer_id = 94 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 95 } }
        set_country_flag = rl_banned_95
        if = {
            limit = { check_variable = { rl_locked_offer_id = 95 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 96 } }
        set_country_flag = rl_banned_96
        if = {
            limit = { check_variable = { rl_locked_offer_id = 96 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 97 } }
        set_country_flag = rl_banned_97
        if = {
            limit = { check_variable = { rl_locked_offer_id = 97 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 98 } }
        set_country_flag = rl_banned_98
        if = {
            limit = { check_variable = { rl_locked_offer_id = 98 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 99 } }
        set_country_flag = rl_banned_99
        if = {
            limit = { check_variable = { rl_locked_offer_id = 99 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 100 } }
        set_country_flag = rl_banned_100
        if = {
            limit = { check_variable = { rl_locked_offer_id = 100 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 101 } }
        set_country_flag = rl_banned_101
        if = {
            limit = { check_variable = { rl_locked_offer_id = 101 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 102 } }
        set_country_flag = rl_banned_102
        if = {
            limit = { check_variable = { rl_locked_offer_id = 102 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 103 } }
        set_country_flag = rl_banned_103
        if = {
            limit = { check_variable = { rl_locked_offer_id = 103 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 104 } }
        set_country_flag = rl_banned_104
        if = {
            limit = { check_variable = { rl_locked_offer_id = 104 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 105 } }
        set_country_flag = rl_banned_105
        if = {
            limit = { check_variable = { rl_locked_offer_id = 105 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 106 } }
        set_country_flag = rl_banned_106
        if = {
            limit = { check_variable = { rl_locked_offer_id = 106 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 107 } }
        set_country_flag = rl_banned_107
        if = {
            limit = { check_variable = { rl_locked_offer_id = 107 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 108 } }
        set_country_flag = rl_banned_108
        if = {
            limit = { check_variable = { rl_locked_offer_id = 108 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 109 } }
        set_country_flag = rl_banned_109
        if = {
            limit = { check_variable = { rl_locked_offer_id = 109 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 110 } }
        set_country_flag = rl_banned_110
        if = {
            limit = { check_variable = { rl_locked_offer_id = 110 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 111 } }
        set_country_flag = rl_banned_111
        if = {
            limit = { check_variable = { rl_locked_offer_id = 111 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 112 } }
        set_country_flag = rl_banned_112
        if = {
            limit = { check_variable = { rl_locked_offer_id = 112 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 113 } }
        set_country_flag = rl_banned_113
        if = {
            limit = { check_variable = { rl_locked_offer_id = 113 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 114 } }
        set_country_flag = rl_banned_114
        if = {
            limit = { check_variable = { rl_locked_offer_id = 114 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 115 } }
        set_country_flag = rl_banned_115
        if = {
            limit = { check_variable = { rl_locked_offer_id = 115 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 116 } }
        set_country_flag = rl_banned_116
        if = {
            limit = { check_variable = { rl_locked_offer_id = 116 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 117 } }
        set_country_flag = rl_banned_117
        if = {
            limit = { check_variable = { rl_locked_offer_id = 117 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 118 } }
        set_country_flag = rl_banned_118
        if = {
            limit = { check_variable = { rl_locked_offer_id = 118 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 119 } }
        set_country_flag = rl_banned_119
        if = {
            limit = { check_variable = { rl_locked_offer_id = 119 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 120 } }
        set_country_flag = rl_banned_120
        if = {
            limit = { check_variable = { rl_locked_offer_id = 120 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 121 } }
        set_country_flag = rl_banned_121
        if = {
            limit = { check_variable = { rl_locked_offer_id = 121 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 122 } }
        set_country_flag = rl_banned_122
        if = {
            limit = { check_variable = { rl_locked_offer_id = 122 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 123 } }
        set_country_flag = rl_banned_123
        if = {
            limit = { check_variable = { rl_locked_offer_id = 123 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 124 } }
        set_country_flag = rl_banned_124
        if = {
            limit = { check_variable = { rl_locked_offer_id = 124 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 125 } }
        set_country_flag = rl_banned_125
        if = {
            limit = { check_variable = { rl_locked_offer_id = 125 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 126 } }
        set_country_flag = rl_banned_126
        if = {
            limit = { check_variable = { rl_locked_offer_id = 126 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 127 } }
        set_country_flag = rl_banned_127
        if = {
            limit = { check_variable = { rl_locked_offer_id = 127 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 128 } }
        set_country_flag = rl_banned_128
        if = {
            limit = { check_variable = { rl_locked_offer_id = 128 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 129 } }
        set_country_flag = rl_banned_129
        if = {
            limit = { check_variable = { rl_locked_offer_id = 129 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 130 } }
        set_country_flag = rl_banned_130
        if = {
            limit = { check_variable = { rl_locked_offer_id = 130 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 131 } }
        set_country_flag = rl_banned_131
        if = {
            limit = { check_variable = { rl_locked_offer_id = 131 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 132 } }
        set_country_flag = rl_banned_132
        if = {
            limit = { check_variable = { rl_locked_offer_id = 132 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 133 } }
        set_country_flag = rl_banned_133
        if = {
            limit = { check_variable = { rl_locked_offer_id = 133 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 134 } }
        set_country_flag = rl_banned_134
        if = {
            limit = { check_variable = { rl_locked_offer_id = 134 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 135 } }
        set_country_flag = rl_banned_135
        if = {
            limit = { check_variable = { rl_locked_offer_id = 135 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 136 } }
        set_country_flag = rl_banned_136
        if = {
            limit = { check_variable = { rl_locked_offer_id = 136 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 137 } }
        set_country_flag = rl_banned_137
        if = {
            limit = { check_variable = { rl_locked_offer_id = 137 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 138 } }
        set_country_flag = rl_banned_138
        if = {
            limit = { check_variable = { rl_locked_offer_id = 138 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 139 } }
        set_country_flag = rl_banned_139
        if = {
            limit = { check_variable = { rl_locked_offer_id = 139 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 140 } }
        set_country_flag = rl_banned_140
        if = {
            limit = { check_variable = { rl_locked_offer_id = 140 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 141 } }
        set_country_flag = rl_banned_141
        if = {
            limit = { check_variable = { rl_locked_offer_id = 141 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 142 } }
        set_country_flag = rl_banned_142
        if = {
            limit = { check_variable = { rl_locked_offer_id = 142 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 143 } }
        set_country_flag = rl_banned_143
        if = {
            limit = { check_variable = { rl_locked_offer_id = 143 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 144 } }
        set_country_flag = rl_banned_144
        if = {
            limit = { check_variable = { rl_locked_offer_id = 144 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 145 } }
        set_country_flag = rl_banned_145
        if = {
            limit = { check_variable = { rl_locked_offer_id = 145 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 146 } }
        set_country_flag = rl_banned_146
        if = {
            limit = { check_variable = { rl_locked_offer_id = 146 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 147 } }
        set_country_flag = rl_banned_147
        if = {
            limit = { check_variable = { rl_locked_offer_id = 147 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 148 } }
        set_country_flag = rl_banned_148
        if = {
            limit = { check_variable = { rl_locked_offer_id = 148 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 149 } }
        set_country_flag = rl_banned_149
        if = {
            limit = { check_variable = { rl_locked_offer_id = 149 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 150 } }
        set_country_flag = rl_banned_150
        if = {
            limit = { check_variable = { rl_locked_offer_id = 150 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 151 } }
        set_country_flag = rl_banned_151
        if = {
            limit = { check_variable = { rl_locked_offer_id = 151 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 152 } }
        set_country_flag = rl_banned_152
        if = {
            limit = { check_variable = { rl_locked_offer_id = 152 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 153 } }
        set_country_flag = rl_banned_153
        if = {
            limit = { check_variable = { rl_locked_offer_id = 153 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 154 } }
        set_country_flag = rl_banned_154
        if = {
            limit = { check_variable = { rl_locked_offer_id = 154 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 155 } }
        set_country_flag = rl_banned_155
        if = {
            limit = { check_variable = { rl_locked_offer_id = 155 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 156 } }
        set_country_flag = rl_banned_156
        if = {
            limit = { check_variable = { rl_locked_offer_id = 156 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 157 } }
        set_country_flag = rl_banned_157
        if = {
            limit = { check_variable = { rl_locked_offer_id = 157 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 158 } }
        set_country_flag = rl_banned_158
        if = {
            limit = { check_variable = { rl_locked_offer_id = 158 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 159 } }
        set_country_flag = rl_banned_159
        if = {
            limit = { check_variable = { rl_locked_offer_id = 159 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 160 } }
        set_country_flag = rl_banned_160
        if = {
            limit = { check_variable = { rl_locked_offer_id = 160 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 161 } }
        set_country_flag = rl_banned_161
        if = {
            limit = { check_variable = { rl_locked_offer_id = 161 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 162 } }
        set_country_flag = rl_banned_162
        if = {
            limit = { check_variable = { rl_locked_offer_id = 162 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 163 } }
        set_country_flag = rl_banned_163
        if = {
            limit = { check_variable = { rl_locked_offer_id = 163 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 164 } }
        set_country_flag = rl_banned_164
        if = {
            limit = { check_variable = { rl_locked_offer_id = 164 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 165 } }
        set_country_flag = rl_banned_165
        if = {
            limit = { check_variable = { rl_locked_offer_id = 165 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 166 } }
        set_country_flag = rl_banned_166
        if = {
            limit = { check_variable = { rl_locked_offer_id = 166 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 167 } }
        set_country_flag = rl_banned_167
        if = {
            limit = { check_variable = { rl_locked_offer_id = 167 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 168 } }
        set_country_flag = rl_banned_168
        if = {
            limit = { check_variable = { rl_locked_offer_id = 168 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 169 } }
        set_country_flag = rl_banned_169
        if = {
            limit = { check_variable = { rl_locked_offer_id = 169 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 170 } }
        set_country_flag = rl_banned_170
        if = {
            limit = { check_variable = { rl_locked_offer_id = 170 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 171 } }
        set_country_flag = rl_banned_171
        if = {
            limit = { check_variable = { rl_locked_offer_id = 171 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 172 } }
        set_country_flag = rl_banned_172
        if = {
            limit = { check_variable = { rl_locked_offer_id = 172 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 173 } }
        set_country_flag = rl_banned_173
        if = {
            limit = { check_variable = { rl_locked_offer_id = 173 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 174 } }
        set_country_flag = rl_banned_174
        if = {
            limit = { check_variable = { rl_locked_offer_id = 174 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 175 } }
        set_country_flag = rl_banned_175
        if = {
            limit = { check_variable = { rl_locked_offer_id = 175 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 176 } }
        set_country_flag = rl_banned_176
        if = {
            limit = { check_variable = { rl_locked_offer_id = 176 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 177 } }
        set_country_flag = rl_banned_177
        if = {
            limit = { check_variable = { rl_locked_offer_id = 177 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 178 } }
        set_country_flag = rl_banned_178
        if = {
            limit = { check_variable = { rl_locked_offer_id = 178 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 179 } }
        set_country_flag = rl_banned_179
        if = {
            limit = { check_variable = { rl_locked_offer_id = 179 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 180 } }
        set_country_flag = rl_banned_180
        if = {
            limit = { check_variable = { rl_locked_offer_id = 180 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 181 } }
        set_country_flag = rl_banned_181
        if = {
            limit = { check_variable = { rl_locked_offer_id = 181 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 182 } }
        set_country_flag = rl_banned_182
        if = {
            limit = { check_variable = { rl_locked_offer_id = 182 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 183 } }
        set_country_flag = rl_banned_183
        if = {
            limit = { check_variable = { rl_locked_offer_id = 183 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 184 } }
        set_country_flag = rl_banned_184
        if = {
            limit = { check_variable = { rl_locked_offer_id = 184 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 185 } }
        set_country_flag = rl_banned_185
        if = {
            limit = { check_variable = { rl_locked_offer_id = 185 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 186 } }
        set_country_flag = rl_banned_186
        if = {
            limit = { check_variable = { rl_locked_offer_id = 186 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 187 } }
        set_country_flag = rl_banned_187
        if = {
            limit = { check_variable = { rl_locked_offer_id = 187 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 188 } }
        set_country_flag = rl_banned_188
        if = {
            limit = { check_variable = { rl_locked_offer_id = 188 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 189 } }
        set_country_flag = rl_banned_189
        if = {
            limit = { check_variable = { rl_locked_offer_id = 189 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 190 } }
        set_country_flag = rl_banned_190
        if = {
            limit = { check_variable = { rl_locked_offer_id = 190 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 191 } }
        set_country_flag = rl_banned_191
        if = {
            limit = { check_variable = { rl_locked_offer_id = 191 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 192 } }
        set_country_flag = rl_banned_192
        if = {
            limit = { check_variable = { rl_locked_offer_id = 192 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 193 } }
        set_country_flag = rl_banned_193
        if = {
            limit = { check_variable = { rl_locked_offer_id = 193 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 194 } }
        set_country_flag = rl_banned_194
        if = {
            limit = { check_variable = { rl_locked_offer_id = 194 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 195 } }
        set_country_flag = rl_banned_195
        if = {
            limit = { check_variable = { rl_locked_offer_id = 195 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 196 } }
        set_country_flag = rl_banned_196
        if = {
            limit = { check_variable = { rl_locked_offer_id = 196 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 197 } }
        set_country_flag = rl_banned_197
        if = {
            limit = { check_variable = { rl_locked_offer_id = 197 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 198 } }
        set_country_flag = rl_banned_198
        if = {
            limit = { check_variable = { rl_locked_offer_id = 198 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 199 } }
        set_country_flag = rl_banned_199
        if = {
            limit = { check_variable = { rl_locked_offer_id = 199 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 200 } }
        set_country_flag = rl_banned_200
        if = {
            limit = { check_variable = { rl_locked_offer_id = 200 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 201 } }
        set_country_flag = rl_banned_201
        if = {
            limit = { check_variable = { rl_locked_offer_id = 201 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 202 } }
        set_country_flag = rl_banned_202
        if = {
            limit = { check_variable = { rl_locked_offer_id = 202 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 203 } }
        set_country_flag = rl_banned_203
        if = {
            limit = { check_variable = { rl_locked_offer_id = 203 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 204 } }
        set_country_flag = rl_banned_204
        if = {
            limit = { check_variable = { rl_locked_offer_id = 204 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 205 } }
        set_country_flag = rl_banned_205
        if = {
            limit = { check_variable = { rl_locked_offer_id = 205 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 206 } }
        set_country_flag = rl_banned_206
        if = {
            limit = { check_variable = { rl_locked_offer_id = 206 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 207 } }
        set_country_flag = rl_banned_207
        if = {
            limit = { check_variable = { rl_locked_offer_id = 207 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 208 } }
        set_country_flag = rl_banned_208
        if = {
            limit = { check_variable = { rl_locked_offer_id = 208 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 209 } }
        set_country_flag = rl_banned_209
        if = {
            limit = { check_variable = { rl_locked_offer_id = 209 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 210 } }
        set_country_flag = rl_banned_210
        if = {
            limit = { check_variable = { rl_locked_offer_id = 210 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 211 } }
        set_country_flag = rl_banned_211
        if = {
            limit = { check_variable = { rl_locked_offer_id = 211 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 212 } }
        set_country_flag = rl_banned_212
        if = {
            limit = { check_variable = { rl_locked_offer_id = 212 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 213 } }
        set_country_flag = rl_banned_213
        if = {
            limit = { check_variable = { rl_locked_offer_id = 213 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 214 } }
        set_country_flag = rl_banned_214
        if = {
            limit = { check_variable = { rl_locked_offer_id = 214 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 215 } }
        set_country_flag = rl_banned_215
        if = {
            limit = { check_variable = { rl_locked_offer_id = 215 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 216 } }
        set_country_flag = rl_banned_216
        if = {
            limit = { check_variable = { rl_locked_offer_id = 216 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 217 } }
        set_country_flag = rl_banned_217
        if = {
            limit = { check_variable = { rl_locked_offer_id = 217 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 218 } }
        set_country_flag = rl_banned_218
        if = {
            limit = { check_variable = { rl_locked_offer_id = 218 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 219 } }
        set_country_flag = rl_banned_219
        if = {
            limit = { check_variable = { rl_locked_offer_id = 219 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 220 } }
        set_country_flag = rl_banned_220
        if = {
            limit = { check_variable = { rl_locked_offer_id = 220 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 221 } }
        set_country_flag = rl_banned_221
        if = {
            limit = { check_variable = { rl_locked_offer_id = 221 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 222 } }
        set_country_flag = rl_banned_222
        if = {
            limit = { check_variable = { rl_locked_offer_id = 222 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 223 } }
        set_country_flag = rl_banned_223
        if = {
            limit = { check_variable = { rl_locked_offer_id = 223 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 224 } }
        set_country_flag = rl_banned_224
        if = {
            limit = { check_variable = { rl_locked_offer_id = 224 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 225 } }
        set_country_flag = rl_banned_225
        if = {
            limit = { check_variable = { rl_locked_offer_id = 225 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 226 } }
        set_country_flag = rl_banned_226
        if = {
            limit = { check_variable = { rl_locked_offer_id = 226 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 227 } }
        set_country_flag = rl_banned_227
        if = {
            limit = { check_variable = { rl_locked_offer_id = 227 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 228 } }
        set_country_flag = rl_banned_228
        if = {
            limit = { check_variable = { rl_locked_offer_id = 228 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 229 } }
        set_country_flag = rl_banned_229
        if = {
            limit = { check_variable = { rl_locked_offer_id = 229 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 230 } }
        set_country_flag = rl_banned_230
        if = {
            limit = { check_variable = { rl_locked_offer_id = 230 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 231 } }
        set_country_flag = rl_banned_231
        if = {
            limit = { check_variable = { rl_locked_offer_id = 231 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 232 } }
        set_country_flag = rl_banned_232
        if = {
            limit = { check_variable = { rl_locked_offer_id = 232 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 233 } }
        set_country_flag = rl_banned_233
        if = {
            limit = { check_variable = { rl_locked_offer_id = 233 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 234 } }
        set_country_flag = rl_banned_234
        if = {
            limit = { check_variable = { rl_locked_offer_id = 234 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 235 } }
        set_country_flag = rl_banned_235
        if = {
            limit = { check_variable = { rl_locked_offer_id = 235 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 236 } }
        set_country_flag = rl_banned_236
        if = {
            limit = { check_variable = { rl_locked_offer_id = 236 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 237 } }
        set_country_flag = rl_banned_237
        if = {
            limit = { check_variable = { rl_locked_offer_id = 237 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 238 } }
        set_country_flag = rl_banned_238
        if = {
            limit = { check_variable = { rl_locked_offer_id = 238 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 239 } }
        set_country_flag = rl_banned_239
        if = {
            limit = { check_variable = { rl_locked_offer_id = 239 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 240 } }
        set_country_flag = rl_banned_240
        if = {
            limit = { check_variable = { rl_locked_offer_id = 240 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 241 } }
        set_country_flag = rl_banned_241
        if = {
            limit = { check_variable = { rl_locked_offer_id = 241 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 242 } }
        set_country_flag = rl_banned_242
        if = {
            limit = { check_variable = { rl_locked_offer_id = 242 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 243 } }
        set_country_flag = rl_banned_243
        if = {
            limit = { check_variable = { rl_locked_offer_id = 243 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 244 } }
        set_country_flag = rl_banned_244
        if = {
            limit = { check_variable = { rl_locked_offer_id = 244 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 245 } }
        set_country_flag = rl_banned_245
        if = {
            limit = { check_variable = { rl_locked_offer_id = 245 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 246 } }
        set_country_flag = rl_banned_246
        if = {
            limit = { check_variable = { rl_locked_offer_id = 246 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 247 } }
        set_country_flag = rl_banned_247
        if = {
            limit = { check_variable = { rl_locked_offer_id = 247 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 248 } }
        set_country_flag = rl_banned_248
        if = {
            limit = { check_variable = { rl_locked_offer_id = 248 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 249 } }
        set_country_flag = rl_banned_249
        if = {
            limit = { check_variable = { rl_locked_offer_id = 249 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 250 } }
        set_country_flag = rl_banned_250
        if = {
            limit = { check_variable = { rl_locked_offer_id = 250 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 251 } }
        set_country_flag = rl_banned_251
        if = {
            limit = { check_variable = { rl_locked_offer_id = 251 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 252 } }
        set_country_flag = rl_banned_252
        if = {
            limit = { check_variable = { rl_locked_offer_id = 252 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 253 } }
        set_country_flag = rl_banned_253
        if = {
            limit = { check_variable = { rl_locked_offer_id = 253 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 254 } }
        set_country_flag = rl_banned_254
        if = {
            limit = { check_variable = { rl_locked_offer_id = 254 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 255 } }
        set_country_flag = rl_banned_255
        if = {
            limit = { check_variable = { rl_locked_offer_id = 255 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 256 } }
        set_country_flag = rl_banned_256
        if = {
            limit = { check_variable = { rl_locked_offer_id = 256 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 257 } }
        set_country_flag = rl_banned_257
        if = {
            limit = { check_variable = { rl_locked_offer_id = 257 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 258 } }
        set_country_flag = rl_banned_258
        if = {
            limit = { check_variable = { rl_locked_offer_id = 258 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 259 } }
        set_country_flag = rl_banned_259
        if = {
            limit = { check_variable = { rl_locked_offer_id = 259 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 260 } }
        set_country_flag = rl_banned_260
        if = {
            limit = { check_variable = { rl_locked_offer_id = 260 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 261 } }
        set_country_flag = rl_banned_261
        if = {
            limit = { check_variable = { rl_locked_offer_id = 261 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 262 } }
        set_country_flag = rl_banned_262
        if = {
            limit = { check_variable = { rl_locked_offer_id = 262 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 263 } }
        set_country_flag = rl_banned_263
        if = {
            limit = { check_variable = { rl_locked_offer_id = 263 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 264 } }
        set_country_flag = rl_banned_264
        if = {
            limit = { check_variable = { rl_locked_offer_id = 264 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 265 } }
        set_country_flag = rl_banned_265
        if = {
            limit = { check_variable = { rl_locked_offer_id = 265 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 266 } }
        set_country_flag = rl_banned_266
        if = {
            limit = { check_variable = { rl_locked_offer_id = 266 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 267 } }
        set_country_flag = rl_banned_267
        if = {
            limit = { check_variable = { rl_locked_offer_id = 267 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 268 } }
        set_country_flag = rl_banned_268
        if = {
            limit = { check_variable = { rl_locked_offer_id = 268 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 269 } }
        set_country_flag = rl_banned_269
        if = {
            limit = { check_variable = { rl_locked_offer_id = 269 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 270 } }
        set_country_flag = rl_banned_270
        if = {
            limit = { check_variable = { rl_locked_offer_id = 270 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 271 } }
        set_country_flag = rl_banned_271
        if = {
            limit = { check_variable = { rl_locked_offer_id = 271 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 272 } }
        set_country_flag = rl_banned_272
        if = {
            limit = { check_variable = { rl_locked_offer_id = 272 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 273 } }
        set_country_flag = rl_banned_273
        if = {
            limit = { check_variable = { rl_locked_offer_id = 273 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 274 } }
        set_country_flag = rl_banned_274
        if = {
            limit = { check_variable = { rl_locked_offer_id = 274 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 275 } }
        set_country_flag = rl_banned_275
        if = {
            limit = { check_variable = { rl_locked_offer_id = 275 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 276 } }
        set_country_flag = rl_banned_276
        if = {
            limit = { check_variable = { rl_locked_offer_id = 276 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 277 } }
        set_country_flag = rl_banned_277
        if = {
            limit = { check_variable = { rl_locked_offer_id = 277 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 278 } }
        set_country_flag = rl_banned_278
        if = {
            limit = { check_variable = { rl_locked_offer_id = 278 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 279 } }
        set_country_flag = rl_banned_279
        if = {
            limit = { check_variable = { rl_locked_offer_id = 279 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 280 } }
        set_country_flag = rl_banned_280
        if = {
            limit = { check_variable = { rl_locked_offer_id = 280 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 281 } }
        set_country_flag = rl_banned_281
        if = {
            limit = { check_variable = { rl_locked_offer_id = 281 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 282 } }
        set_country_flag = rl_banned_282
        if = {
            limit = { check_variable = { rl_locked_offer_id = 282 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 283 } }
        set_country_flag = rl_banned_283
        if = {
            limit = { check_variable = { rl_locked_offer_id = 283 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 284 } }
        set_country_flag = rl_banned_284
        if = {
            limit = { check_variable = { rl_locked_offer_id = 284 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 285 } }
        set_country_flag = rl_banned_285
        if = {
            limit = { check_variable = { rl_locked_offer_id = 285 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 286 } }
        set_country_flag = rl_banned_286
        if = {
            limit = { check_variable = { rl_locked_offer_id = 286 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 287 } }
        set_country_flag = rl_banned_287
        if = {
            limit = { check_variable = { rl_locked_offer_id = 287 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 288 } }
        set_country_flag = rl_banned_288
        if = {
            limit = { check_variable = { rl_locked_offer_id = 288 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 289 } }
        set_country_flag = rl_banned_289
        if = {
            limit = { check_variable = { rl_locked_offer_id = 289 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 290 } }
        set_country_flag = rl_banned_290
        if = {
            limit = { check_variable = { rl_locked_offer_id = 290 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 291 } }
        set_country_flag = rl_banned_291
        if = {
            limit = { check_variable = { rl_locked_offer_id = 291 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 292 } }
        set_country_flag = rl_banned_292
        if = {
            limit = { check_variable = { rl_locked_offer_id = 292 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 293 } }
        set_country_flag = rl_banned_293
        if = {
            limit = { check_variable = { rl_locked_offer_id = 293 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 294 } }
        set_country_flag = rl_banned_294
        if = {
            limit = { check_variable = { rl_locked_offer_id = 294 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 295 } }
        set_country_flag = rl_banned_295
        if = {
            limit = { check_variable = { rl_locked_offer_id = 295 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 296 } }
        set_country_flag = rl_banned_296
        if = {
            limit = { check_variable = { rl_locked_offer_id = 296 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 297 } }
        set_country_flag = rl_banned_297
        if = {
            limit = { check_variable = { rl_locked_offer_id = 297 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 298 } }
        set_country_flag = rl_banned_298
        if = {
            limit = { check_variable = { rl_locked_offer_id = 298 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 299 } }
        set_country_flag = rl_banned_299
        if = {
            limit = { check_variable = { rl_locked_offer_id = 299 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 300 } }
        set_country_flag = rl_banned_300
        if = {
            limit = { check_variable = { rl_locked_offer_id = 300 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 301 } }
        set_country_flag = rl_banned_301
        if = {
            limit = { check_variable = { rl_locked_offer_id = 301 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 302 } }
        set_country_flag = rl_banned_302
        if = {
            limit = { check_variable = { rl_locked_offer_id = 302 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 303 } }
        set_country_flag = rl_banned_303
        if = {
            limit = { check_variable = { rl_locked_offer_id = 303 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 304 } }
        set_country_flag = rl_banned_304
        if = {
            limit = { check_variable = { rl_locked_offer_id = 304 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 305 } }
        set_country_flag = rl_banned_305
        if = {
            limit = { check_variable = { rl_locked_offer_id = 305 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 306 } }
        set_country_flag = rl_banned_306
        if = {
            limit = { check_variable = { rl_locked_offer_id = 306 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 307 } }
        set_country_flag = rl_banned_307
        if = {
            limit = { check_variable = { rl_locked_offer_id = 307 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 308 } }
        set_country_flag = rl_banned_308
        if = {
            limit = { check_variable = { rl_locked_offer_id = 308 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 309 } }
        set_country_flag = rl_banned_309
        if = {
            limit = { check_variable = { rl_locked_offer_id = 309 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 310 } }
        set_country_flag = rl_banned_310
        if = {
            limit = { check_variable = { rl_locked_offer_id = 310 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 311 } }
        set_country_flag = rl_banned_311
        if = {
            limit = { check_variable = { rl_locked_offer_id = 311 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 312 } }
        set_country_flag = rl_banned_312
        if = {
            limit = { check_variable = { rl_locked_offer_id = 312 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 313 } }
        set_country_flag = rl_banned_313
        if = {
            limit = { check_variable = { rl_locked_offer_id = 313 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 314 } }
        set_country_flag = rl_banned_314
        if = {
            limit = { check_variable = { rl_locked_offer_id = 314 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 315 } }
        set_country_flag = rl_banned_315
        if = {
            limit = { check_variable = { rl_locked_offer_id = 315 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 316 } }
        set_country_flag = rl_banned_316
        if = {
            limit = { check_variable = { rl_locked_offer_id = 316 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 317 } }
        set_country_flag = rl_banned_317
        if = {
            limit = { check_variable = { rl_locked_offer_id = 317 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 318 } }
        set_country_flag = rl_banned_318
        if = {
            limit = { check_variable = { rl_locked_offer_id = 318 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 319 } }
        set_country_flag = rl_banned_319
        if = {
            limit = { check_variable = { rl_locked_offer_id = 319 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 320 } }
        set_country_flag = rl_banned_320
        if = {
            limit = { check_variable = { rl_locked_offer_id = 320 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 321 } }
        set_country_flag = rl_banned_321
        if = {
            limit = { check_variable = { rl_locked_offer_id = 321 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 322 } }
        set_country_flag = rl_banned_322
        if = {
            limit = { check_variable = { rl_locked_offer_id = 322 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 323 } }
        set_country_flag = rl_banned_323
        if = {
            limit = { check_variable = { rl_locked_offer_id = 323 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 324 } }
        set_country_flag = rl_banned_324
        if = {
            limit = { check_variable = { rl_locked_offer_id = 324 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 325 } }
        set_country_flag = rl_banned_325
        if = {
            limit = { check_variable = { rl_locked_offer_id = 325 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 326 } }
        set_country_flag = rl_banned_326
        if = {
            limit = { check_variable = { rl_locked_offer_id = 326 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 327 } }
        set_country_flag = rl_banned_327
        if = {
            limit = { check_variable = { rl_locked_offer_id = 327 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 328 } }
        set_country_flag = rl_banned_328
        if = {
            limit = { check_variable = { rl_locked_offer_id = 328 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 329 } }
        set_country_flag = rl_banned_329
        if = {
            limit = { check_variable = { rl_locked_offer_id = 329 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 330 } }
        set_country_flag = rl_banned_330
        if = {
            limit = { check_variable = { rl_locked_offer_id = 330 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 331 } }
        set_country_flag = rl_banned_331
        if = {
            limit = { check_variable = { rl_locked_offer_id = 331 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 332 } }
        set_country_flag = rl_banned_332
        if = {
            limit = { check_variable = { rl_locked_offer_id = 332 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 333 } }
        set_country_flag = rl_banned_333
        if = {
            limit = { check_variable = { rl_locked_offer_id = 333 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 334 } }
        set_country_flag = rl_banned_334
        if = {
            limit = { check_variable = { rl_locked_offer_id = 334 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 335 } }
        set_country_flag = rl_banned_335
        if = {
            limit = { check_variable = { rl_locked_offer_id = 335 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 336 } }
        set_country_flag = rl_banned_336
        if = {
            limit = { check_variable = { rl_locked_offer_id = 336 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 337 } }
        set_country_flag = rl_banned_337
        if = {
            limit = { check_variable = { rl_locked_offer_id = 337 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 338 } }
        set_country_flag = rl_banned_338
        if = {
            limit = { check_variable = { rl_locked_offer_id = 338 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 339 } }
        set_country_flag = rl_banned_339
        if = {
            limit = { check_variable = { rl_locked_offer_id = 339 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 340 } }
        set_country_flag = rl_banned_340
        if = {
            limit = { check_variable = { rl_locked_offer_id = 340 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 341 } }
        set_country_flag = rl_banned_341
        if = {
            limit = { check_variable = { rl_locked_offer_id = 341 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 342 } }
        set_country_flag = rl_banned_342
        if = {
            limit = { check_variable = { rl_locked_offer_id = 342 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 343 } }
        set_country_flag = rl_banned_343
        if = {
            limit = { check_variable = { rl_locked_offer_id = 343 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 344 } }
        set_country_flag = rl_banned_344
        if = {
            limit = { check_variable = { rl_locked_offer_id = 344 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 345 } }
        set_country_flag = rl_banned_345
        if = {
            limit = { check_variable = { rl_locked_offer_id = 345 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 346 } }
        set_country_flag = rl_banned_346
        if = {
            limit = { check_variable = { rl_locked_offer_id = 346 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 347 } }
        set_country_flag = rl_banned_347
        if = {
            limit = { check_variable = { rl_locked_offer_id = 347 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 348 } }
        set_country_flag = rl_banned_348
        if = {
            limit = { check_variable = { rl_locked_offer_id = 348 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 349 } }
        set_country_flag = rl_banned_349
        if = {
            limit = { check_variable = { rl_locked_offer_id = 349 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 350 } }
        set_country_flag = rl_banned_350
        if = {
            limit = { check_variable = { rl_locked_offer_id = 350 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 351 } }
        set_country_flag = rl_banned_351
        if = {
            limit = { check_variable = { rl_locked_offer_id = 351 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 352 } }
        set_country_flag = rl_banned_352
        if = {
            limit = { check_variable = { rl_locked_offer_id = 352 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 353 } }
        set_country_flag = rl_banned_353
        if = {
            limit = { check_variable = { rl_locked_offer_id = 353 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 354 } }
        set_country_flag = rl_banned_354
        if = {
            limit = { check_variable = { rl_locked_offer_id = 354 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 355 } }
        set_country_flag = rl_banned_355
        if = {
            limit = { check_variable = { rl_locked_offer_id = 355 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 356 } }
        set_country_flag = rl_banned_356
        if = {
            limit = { check_variable = { rl_locked_offer_id = 356 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 357 } }
        set_country_flag = rl_banned_357
        if = {
            limit = { check_variable = { rl_locked_offer_id = 357 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 358 } }
        set_country_flag = rl_banned_358
        if = {
            limit = { check_variable = { rl_locked_offer_id = 358 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 359 } }
        set_country_flag = rl_banned_359
        if = {
            limit = { check_variable = { rl_locked_offer_id = 359 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 360 } }
        set_country_flag = rl_banned_360
        if = {
            limit = { check_variable = { rl_locked_offer_id = 360 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 361 } }
        set_country_flag = rl_banned_361
        if = {
            limit = { check_variable = { rl_locked_offer_id = 361 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 362 } }
        set_country_flag = rl_banned_362
        if = {
            limit = { check_variable = { rl_locked_offer_id = 362 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 363 } }
        set_country_flag = rl_banned_363
        if = {
            limit = { check_variable = { rl_locked_offer_id = 363 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 364 } }
        set_country_flag = rl_banned_364
        if = {
            limit = { check_variable = { rl_locked_offer_id = 364 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 365 } }
        set_country_flag = rl_banned_365
        if = {
            limit = { check_variable = { rl_locked_offer_id = 365 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 366 } }
        set_country_flag = rl_banned_366
        if = {
            limit = { check_variable = { rl_locked_offer_id = 366 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 367 } }
        set_country_flag = rl_banned_367
        if = {
            limit = { check_variable = { rl_locked_offer_id = 367 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 368 } }
        set_country_flag = rl_banned_368
        if = {
            limit = { check_variable = { rl_locked_offer_id = 368 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 369 } }
        set_country_flag = rl_banned_369
        if = {
            limit = { check_variable = { rl_locked_offer_id = 369 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 370 } }
        set_country_flag = rl_banned_370
        if = {
            limit = { check_variable = { rl_locked_offer_id = 370 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 371 } }
        set_country_flag = rl_banned_371
        if = {
            limit = { check_variable = { rl_locked_offer_id = 371 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 372 } }
        set_country_flag = rl_banned_372
        if = {
            limit = { check_variable = { rl_locked_offer_id = 372 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 373 } }
        set_country_flag = rl_banned_373
        if = {
            limit = { check_variable = { rl_locked_offer_id = 373 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 374 } }
        set_country_flag = rl_banned_374
        if = {
            limit = { check_variable = { rl_locked_offer_id = 374 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 375 } }
        set_country_flag = rl_banned_375
        if = {
            limit = { check_variable = { rl_locked_offer_id = 375 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 376 } }
        set_country_flag = rl_banned_376
        if = {
            limit = { check_variable = { rl_locked_offer_id = 376 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 377 } }
        set_country_flag = rl_banned_377
        if = {
            limit = { check_variable = { rl_locked_offer_id = 377 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 378 } }
        set_country_flag = rl_banned_378
        if = {
            limit = { check_variable = { rl_locked_offer_id = 378 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 379 } }
        set_country_flag = rl_banned_379
        if = {
            limit = { check_variable = { rl_locked_offer_id = 379 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 380 } }
        set_country_flag = rl_banned_380
        if = {
            limit = { check_variable = { rl_locked_offer_id = 380 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 381 } }
        set_country_flag = rl_banned_381
        if = {
            limit = { check_variable = { rl_locked_offer_id = 381 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 382 } }
        set_country_flag = rl_banned_382
        if = {
            limit = { check_variable = { rl_locked_offer_id = 382 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 383 } }
        set_country_flag = rl_banned_383
        if = {
            limit = { check_variable = { rl_locked_offer_id = 383 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 384 } }
        set_country_flag = rl_banned_384
        if = {
            limit = { check_variable = { rl_locked_offer_id = 384 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 385 } }
        set_country_flag = rl_banned_385
        if = {
            limit = { check_variable = { rl_locked_offer_id = 385 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 386 } }
        set_country_flag = rl_banned_386
        if = {
            limit = { check_variable = { rl_locked_offer_id = 386 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 387 } }
        set_country_flag = rl_banned_387
        if = {
            limit = { check_variable = { rl_locked_offer_id = 387 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 388 } }
        set_country_flag = rl_banned_388
        if = {
            limit = { check_variable = { rl_locked_offer_id = 388 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 389 } }
        set_country_flag = rl_banned_389
        if = {
            limit = { check_variable = { rl_locked_offer_id = 389 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 390 } }
        set_country_flag = rl_banned_390
        if = {
            limit = { check_variable = { rl_locked_offer_id = 390 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 391 } }
        set_country_flag = rl_banned_391
        if = {
            limit = { check_variable = { rl_locked_offer_id = 391 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 392 } }
        set_country_flag = rl_banned_392
        if = {
            limit = { check_variable = { rl_locked_offer_id = 392 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 393 } }
        set_country_flag = rl_banned_393
        if = {
            limit = { check_variable = { rl_locked_offer_id = 393 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 394 } }
        set_country_flag = rl_banned_394
        if = {
            limit = { check_variable = { rl_locked_offer_id = 394 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 395 } }
        set_country_flag = rl_banned_395
        if = {
            limit = { check_variable = { rl_locked_offer_id = 395 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 396 } }
        set_country_flag = rl_banned_396
        if = {
            limit = { check_variable = { rl_locked_offer_id = 396 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 397 } }
        set_country_flag = rl_banned_397
        if = {
            limit = { check_variable = { rl_locked_offer_id = 397 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 398 } }
        set_country_flag = rl_banned_398
        if = {
            limit = { check_variable = { rl_locked_offer_id = 398 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 399 } }
        set_country_flag = rl_banned_399
        if = {
            limit = { check_variable = { rl_locked_offer_id = 399 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 400 } }
        set_country_flag = rl_banned_400
        if = {
            limit = { check_variable = { rl_locked_offer_id = 400 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 401 } }
        set_country_flag = rl_banned_401
        if = {
            limit = { check_variable = { rl_locked_offer_id = 401 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 402 } }
        set_country_flag = rl_banned_402
        if = {
            limit = { check_variable = { rl_locked_offer_id = 402 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 403 } }
        set_country_flag = rl_banned_403
        if = {
            limit = { check_variable = { rl_locked_offer_id = 403 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 404 } }
        set_country_flag = rl_banned_404
        if = {
            limit = { check_variable = { rl_locked_offer_id = 404 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 405 } }
        set_country_flag = rl_banned_405
        if = {
            limit = { check_variable = { rl_locked_offer_id = 405 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 406 } }
        set_country_flag = rl_banned_406
        if = {
            limit = { check_variable = { rl_locked_offer_id = 406 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 407 } }
        set_country_flag = rl_banned_407
        if = {
            limit = { check_variable = { rl_locked_offer_id = 407 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 408 } }
        set_country_flag = rl_banned_408
        if = {
            limit = { check_variable = { rl_locked_offer_id = 408 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 409 } }
        set_country_flag = rl_banned_409
        if = {
            limit = { check_variable = { rl_locked_offer_id = 409 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 410 } }
        set_country_flag = rl_banned_410
        if = {
            limit = { check_variable = { rl_locked_offer_id = 410 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 411 } }
        set_country_flag = rl_banned_411
        if = {
            limit = { check_variable = { rl_locked_offer_id = 411 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 412 } }
        set_country_flag = rl_banned_412
        if = {
            limit = { check_variable = { rl_locked_offer_id = 412 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 413 } }
        set_country_flag = rl_banned_413
        if = {
            limit = { check_variable = { rl_locked_offer_id = 413 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 414 } }
        set_country_flag = rl_banned_414
        if = {
            limit = { check_variable = { rl_locked_offer_id = 414 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 415 } }
        set_country_flag = rl_banned_415
        if = {
            limit = { check_variable = { rl_locked_offer_id = 415 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 416 } }
        set_country_flag = rl_banned_416
        if = {
            limit = { check_variable = { rl_locked_offer_id = 416 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 417 } }
        set_country_flag = rl_banned_417
        if = {
            limit = { check_variable = { rl_locked_offer_id = 417 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 418 } }
        set_country_flag = rl_banned_418
        if = {
            limit = { check_variable = { rl_locked_offer_id = 418 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 419 } }
        set_country_flag = rl_banned_419
        if = {
            limit = { check_variable = { rl_locked_offer_id = 419 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 420 } }
        set_country_flag = rl_banned_420
        if = {
            limit = { check_variable = { rl_locked_offer_id = 420 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 421 } }
        set_country_flag = rl_banned_421
        if = {
            limit = { check_variable = { rl_locked_offer_id = 421 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 422 } }
        set_country_flag = rl_banned_422
        if = {
            limit = { check_variable = { rl_locked_offer_id = 422 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 423 } }
        set_country_flag = rl_banned_423
        if = {
            limit = { check_variable = { rl_locked_offer_id = 423 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 424 } }
        set_country_flag = rl_banned_424
        if = {
            limit = { check_variable = { rl_locked_offer_id = 424 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 425 } }
        set_country_flag = rl_banned_425
        if = {
            limit = { check_variable = { rl_locked_offer_id = 425 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 426 } }
        set_country_flag = rl_banned_426
        if = {
            limit = { check_variable = { rl_locked_offer_id = 426 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 427 } }
        set_country_flag = rl_banned_427
        if = {
            limit = { check_variable = { rl_locked_offer_id = 427 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 428 } }
        set_country_flag = rl_banned_428
        if = {
            limit = { check_variable = { rl_locked_offer_id = 428 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 429 } }
        set_country_flag = rl_banned_429
        if = {
            limit = { check_variable = { rl_locked_offer_id = 429 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 430 } }
        set_country_flag = rl_banned_430
        if = {
            limit = { check_variable = { rl_locked_offer_id = 430 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 431 } }
        set_country_flag = rl_banned_431
        if = {
            limit = { check_variable = { rl_locked_offer_id = 431 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 432 } }
        set_country_flag = rl_banned_432
        if = {
            limit = { check_variable = { rl_locked_offer_id = 432 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 433 } }
        set_country_flag = rl_banned_433
        if = {
            limit = { check_variable = { rl_locked_offer_id = 433 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 434 } }
        set_country_flag = rl_banned_434
        if = {
            limit = { check_variable = { rl_locked_offer_id = 434 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 435 } }
        set_country_flag = rl_banned_435
        if = {
            limit = { check_variable = { rl_locked_offer_id = 435 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 436 } }
        set_country_flag = rl_banned_436
        if = {
            limit = { check_variable = { rl_locked_offer_id = 436 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 437 } }
        set_country_flag = rl_banned_437
        if = {
            limit = { check_variable = { rl_locked_offer_id = 437 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 438 } }
        set_country_flag = rl_banned_438
        if = {
            limit = { check_variable = { rl_locked_offer_id = 438 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 439 } }
        set_country_flag = rl_banned_439
        if = {
            limit = { check_variable = { rl_locked_offer_id = 439 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 440 } }
        set_country_flag = rl_banned_440
        if = {
            limit = { check_variable = { rl_locked_offer_id = 440 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 441 } }
        set_country_flag = rl_banned_441
        if = {
            limit = { check_variable = { rl_locked_offer_id = 441 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 442 } }
        set_country_flag = rl_banned_442
        if = {
            limit = { check_variable = { rl_locked_offer_id = 442 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 443 } }
        set_country_flag = rl_banned_443
        if = {
            limit = { check_variable = { rl_locked_offer_id = 443 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 444 } }
        set_country_flag = rl_banned_444
        if = {
            limit = { check_variable = { rl_locked_offer_id = 444 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 445 } }
        set_country_flag = rl_banned_445
        if = {
            limit = { check_variable = { rl_locked_offer_id = 445 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 446 } }
        set_country_flag = rl_banned_446
        if = {
            limit = { check_variable = { rl_locked_offer_id = 446 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 447 } }
        set_country_flag = rl_banned_447
        if = {
            limit = { check_variable = { rl_locked_offer_id = 447 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 448 } }
        set_country_flag = rl_banned_448
        if = {
            limit = { check_variable = { rl_locked_offer_id = 448 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 449 } }
        set_country_flag = rl_banned_449
        if = {
            limit = { check_variable = { rl_locked_offer_id = 449 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 450 } }
        set_country_flag = rl_banned_450
        if = {
            limit = { check_variable = { rl_locked_offer_id = 450 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 451 } }
        set_country_flag = rl_banned_451
        if = {
            limit = { check_variable = { rl_locked_offer_id = 451 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 452 } }
        set_country_flag = rl_banned_452
        if = {
            limit = { check_variable = { rl_locked_offer_id = 452 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 453 } }
        set_country_flag = rl_banned_453
        if = {
            limit = { check_variable = { rl_locked_offer_id = 453 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 454 } }
        set_country_flag = rl_banned_454
        if = {
            limit = { check_variable = { rl_locked_offer_id = 454 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 455 } }
        set_country_flag = rl_banned_455
        if = {
            limit = { check_variable = { rl_locked_offer_id = 455 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 456 } }
        set_country_flag = rl_banned_456
        if = {
            limit = { check_variable = { rl_locked_offer_id = 456 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 457 } }
        set_country_flag = rl_banned_457
        if = {
            limit = { check_variable = { rl_locked_offer_id = 457 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 458 } }
        set_country_flag = rl_banned_458
        if = {
            limit = { check_variable = { rl_locked_offer_id = 458 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 459 } }
        set_country_flag = rl_banned_459
        if = {
            limit = { check_variable = { rl_locked_offer_id = 459 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 460 } }
        set_country_flag = rl_banned_460
        if = {
            limit = { check_variable = { rl_locked_offer_id = 460 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 461 } }
        set_country_flag = rl_banned_461
        if = {
            limit = { check_variable = { rl_locked_offer_id = 461 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 462 } }
        set_country_flag = rl_banned_462
        if = {
            limit = { check_variable = { rl_locked_offer_id = 462 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 463 } }
        set_country_flag = rl_banned_463
        if = {
            limit = { check_variable = { rl_locked_offer_id = 463 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 464 } }
        set_country_flag = rl_banned_464
        if = {
            limit = { check_variable = { rl_locked_offer_id = 464 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 465 } }
        set_country_flag = rl_banned_465
        if = {
            limit = { check_variable = { rl_locked_offer_id = 465 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 466 } }
        set_country_flag = rl_banned_466
        if = {
            limit = { check_variable = { rl_locked_offer_id = 466 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 467 } }
        set_country_flag = rl_banned_467
        if = {
            limit = { check_variable = { rl_locked_offer_id = 467 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 468 } }
        set_country_flag = rl_banned_468
        if = {
            limit = { check_variable = { rl_locked_offer_id = 468 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 469 } }
        set_country_flag = rl_banned_469
        if = {
            limit = { check_variable = { rl_locked_offer_id = 469 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 470 } }
        set_country_flag = rl_banned_470
        if = {
            limit = { check_variable = { rl_locked_offer_id = 470 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 471 } }
        set_country_flag = rl_banned_471
        if = {
            limit = { check_variable = { rl_locked_offer_id = 471 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 472 } }
        set_country_flag = rl_banned_472
        if = {
            limit = { check_variable = { rl_locked_offer_id = 472 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 473 } }
        set_country_flag = rl_banned_473
        if = {
            limit = { check_variable = { rl_locked_offer_id = 473 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 474 } }
        set_country_flag = rl_banned_474
        if = {
            limit = { check_variable = { rl_locked_offer_id = 474 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 475 } }
        set_country_flag = rl_banned_475
        if = {
            limit = { check_variable = { rl_locked_offer_id = 475 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 476 } }
        set_country_flag = rl_banned_476
        if = {
            limit = { check_variable = { rl_locked_offer_id = 476 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 477 } }
        set_country_flag = rl_banned_477
        if = {
            limit = { check_variable = { rl_locked_offer_id = 477 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 478 } }
        set_country_flag = rl_banned_478
        if = {
            limit = { check_variable = { rl_locked_offer_id = 478 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 479 } }
        set_country_flag = rl_banned_479
        if = {
            limit = { check_variable = { rl_locked_offer_id = 479 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 480 } }
        set_country_flag = rl_banned_480
        if = {
            limit = { check_variable = { rl_locked_offer_id = 480 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 481 } }
        set_country_flag = rl_banned_481
        if = {
            limit = { check_variable = { rl_locked_offer_id = 481 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 482 } }
        set_country_flag = rl_banned_482
        if = {
            limit = { check_variable = { rl_locked_offer_id = 482 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 483 } }
        set_country_flag = rl_banned_483
        if = {
            limit = { check_variable = { rl_locked_offer_id = 483 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 484 } }
        set_country_flag = rl_banned_484
        if = {
            limit = { check_variable = { rl_locked_offer_id = 484 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 485 } }
        set_country_flag = rl_banned_485
        if = {
            limit = { check_variable = { rl_locked_offer_id = 485 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 486 } }
        set_country_flag = rl_banned_486
        if = {
            limit = { check_variable = { rl_locked_offer_id = 486 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 487 } }
        set_country_flag = rl_banned_487
        if = {
            limit = { check_variable = { rl_locked_offer_id = 487 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 488 } }
        set_country_flag = rl_banned_488
        if = {
            limit = { check_variable = { rl_locked_offer_id = 488 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 489 } }
        set_country_flag = rl_banned_489
        if = {
            limit = { check_variable = { rl_locked_offer_id = 489 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 490 } }
        set_country_flag = rl_banned_490
        if = {
            limit = { check_variable = { rl_locked_offer_id = 490 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 491 } }
        set_country_flag = rl_banned_491
        if = {
            limit = { check_variable = { rl_locked_offer_id = 491 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 492 } }
        set_country_flag = rl_banned_492
        if = {
            limit = { check_variable = { rl_locked_offer_id = 492 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 493 } }
        set_country_flag = rl_banned_493
        if = {
            limit = { check_variable = { rl_locked_offer_id = 493 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 494 } }
        set_country_flag = rl_banned_494
        if = {
            limit = { check_variable = { rl_locked_offer_id = 494 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 495 } }
        set_country_flag = rl_banned_495
        if = {
            limit = { check_variable = { rl_locked_offer_id = 495 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 496 } }
        set_country_flag = rl_banned_496
        if = {
            limit = { check_variable = { rl_locked_offer_id = 496 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 497 } }
        set_country_flag = rl_banned_497
        if = {
            limit = { check_variable = { rl_locked_offer_id = 497 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 498 } }
        set_country_flag = rl_banned_498
        if = {
            limit = { check_variable = { rl_locked_offer_id = 498 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 499 } }
        set_country_flag = rl_banned_499
        if = {
            limit = { check_variable = { rl_locked_offer_id = 499 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 500 } }
        set_country_flag = rl_banned_500
        if = {
            limit = { check_variable = { rl_locked_offer_id = 500 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 501 } }
        set_country_flag = rl_banned_501
        if = {
            limit = { check_variable = { rl_locked_offer_id = 501 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 502 } }
        set_country_flag = rl_banned_502
        if = {
            limit = { check_variable = { rl_locked_offer_id = 502 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 503 } }
        set_country_flag = rl_banned_503
        if = {
            limit = { check_variable = { rl_locked_offer_id = 503 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 504 } }
        set_country_flag = rl_banned_504
        if = {
            limit = { check_variable = { rl_locked_offer_id = 504 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 505 } }
        set_country_flag = rl_banned_505
        if = {
            limit = { check_variable = { rl_locked_offer_id = 505 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 506 } }
        set_country_flag = rl_banned_506
        if = {
            limit = { check_variable = { rl_locked_offer_id = 506 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 507 } }
        set_country_flag = rl_banned_507
        if = {
            limit = { check_variable = { rl_locked_offer_id = 507 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 508 } }
        set_country_flag = rl_banned_508
        if = {
            limit = { check_variable = { rl_locked_offer_id = 508 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 509 } }
        set_country_flag = rl_banned_509
        if = {
            limit = { check_variable = { rl_locked_offer_id = 509 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 510 } }
        set_country_flag = rl_banned_510
        if = {
            limit = { check_variable = { rl_locked_offer_id = 510 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 511 } }
        set_country_flag = rl_banned_511
        if = {
            limit = { check_variable = { rl_locked_offer_id = 511 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 512 } }
        set_country_flag = rl_banned_512
        if = {
            limit = { check_variable = { rl_locked_offer_id = 512 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 513 } }
        set_country_flag = rl_banned_513
        if = {
            limit = { check_variable = { rl_locked_offer_id = 513 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 514 } }
        set_country_flag = rl_banned_514
        if = {
            limit = { check_variable = { rl_locked_offer_id = 514 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 515 } }
        set_country_flag = rl_banned_515
        if = {
            limit = { check_variable = { rl_locked_offer_id = 515 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 516 } }
        set_country_flag = rl_banned_516
        if = {
            limit = { check_variable = { rl_locked_offer_id = 516 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 517 } }
        set_country_flag = rl_banned_517
        if = {
            limit = { check_variable = { rl_locked_offer_id = 517 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 518 } }
        set_country_flag = rl_banned_518
        if = {
            limit = { check_variable = { rl_locked_offer_id = 518 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 519 } }
        set_country_flag = rl_banned_519
        if = {
            limit = { check_variable = { rl_locked_offer_id = 519 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 520 } }
        set_country_flag = rl_banned_520
        if = {
            limit = { check_variable = { rl_locked_offer_id = 520 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 521 } }
        set_country_flag = rl_banned_521
        if = {
            limit = { check_variable = { rl_locked_offer_id = 521 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 522 } }
        set_country_flag = rl_banned_522
        if = {
            limit = { check_variable = { rl_locked_offer_id = 522 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 523 } }
        set_country_flag = rl_banned_523
        if = {
            limit = { check_variable = { rl_locked_offer_id = 523 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 524 } }
        set_country_flag = rl_banned_524
        if = {
            limit = { check_variable = { rl_locked_offer_id = 524 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 525 } }
        set_country_flag = rl_banned_525
        if = {
            limit = { check_variable = { rl_locked_offer_id = 525 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 526 } }
        set_country_flag = rl_banned_526
        if = {
            limit = { check_variable = { rl_locked_offer_id = 526 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 527 } }
        set_country_flag = rl_banned_527
        if = {
            limit = { check_variable = { rl_locked_offer_id = 527 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 528 } }
        set_country_flag = rl_banned_528
        if = {
            limit = { check_variable = { rl_locked_offer_id = 528 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 529 } }
        set_country_flag = rl_banned_529
        if = {
            limit = { check_variable = { rl_locked_offer_id = 529 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 530 } }
        set_country_flag = rl_banned_530
        if = {
            limit = { check_variable = { rl_locked_offer_id = 530 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 531 } }
        set_country_flag = rl_banned_531
        if = {
            limit = { check_variable = { rl_locked_offer_id = 531 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 532 } }
        set_country_flag = rl_banned_532
        if = {
            limit = { check_variable = { rl_locked_offer_id = 532 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 533 } }
        set_country_flag = rl_banned_533
        if = {
            limit = { check_variable = { rl_locked_offer_id = 533 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 534 } }
        set_country_flag = rl_banned_534
        if = {
            limit = { check_variable = { rl_locked_offer_id = 534 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 535 } }
        set_country_flag = rl_banned_535
        if = {
            limit = { check_variable = { rl_locked_offer_id = 535 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 536 } }
        set_country_flag = rl_banned_536
        if = {
            limit = { check_variable = { rl_locked_offer_id = 536 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 537 } }
        set_country_flag = rl_banned_537
        if = {
            limit = { check_variable = { rl_locked_offer_id = 537 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 538 } }
        set_country_flag = rl_banned_538
        if = {
            limit = { check_variable = { rl_locked_offer_id = 538 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 539 } }
        set_country_flag = rl_banned_539
        if = {
            limit = { check_variable = { rl_locked_offer_id = 539 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 540 } }
        set_country_flag = rl_banned_540
        if = {
            limit = { check_variable = { rl_locked_offer_id = 540 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 541 } }
        set_country_flag = rl_banned_541
        if = {
            limit = { check_variable = { rl_locked_offer_id = 541 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 542 } }
        set_country_flag = rl_banned_542
        if = {
            limit = { check_variable = { rl_locked_offer_id = 542 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 543 } }
        set_country_flag = rl_banned_543
        if = {
            limit = { check_variable = { rl_locked_offer_id = 543 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 544 } }
        set_country_flag = rl_banned_544
        if = {
            limit = { check_variable = { rl_locked_offer_id = 544 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 545 } }
        set_country_flag = rl_banned_545
        if = {
            limit = { check_variable = { rl_locked_offer_id = 545 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 546 } }
        set_country_flag = rl_banned_546
        if = {
            limit = { check_variable = { rl_locked_offer_id = 546 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 547 } }
        set_country_flag = rl_banned_547
        if = {
            limit = { check_variable = { rl_locked_offer_id = 547 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 548 } }
        set_country_flag = rl_banned_548
        if = {
            limit = { check_variable = { rl_locked_offer_id = 548 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 549 } }
        set_country_flag = rl_banned_549
        if = {
            limit = { check_variable = { rl_locked_offer_id = 549 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 550 } }
        set_country_flag = rl_banned_550
        if = {
            limit = { check_variable = { rl_locked_offer_id = 550 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 551 } }
        set_country_flag = rl_banned_551
        if = {
            limit = { check_variable = { rl_locked_offer_id = 551 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 552 } }
        set_country_flag = rl_banned_552
        if = {
            limit = { check_variable = { rl_locked_offer_id = 552 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 553 } }
        set_country_flag = rl_banned_553
        if = {
            limit = { check_variable = { rl_locked_offer_id = 553 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 554 } }
        set_country_flag = rl_banned_554
        if = {
            limit = { check_variable = { rl_locked_offer_id = 554 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 555 } }
        set_country_flag = rl_banned_555
        if = {
            limit = { check_variable = { rl_locked_offer_id = 555 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 556 } }
        set_country_flag = rl_banned_556
        if = {
            limit = { check_variable = { rl_locked_offer_id = 556 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 557 } }
        set_country_flag = rl_banned_557
        if = {
            limit = { check_variable = { rl_locked_offer_id = 557 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 558 } }
        set_country_flag = rl_banned_558
        if = {
            limit = { check_variable = { rl_locked_offer_id = 558 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 559 } }
        set_country_flag = rl_banned_559
        if = {
            limit = { check_variable = { rl_locked_offer_id = 559 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 560 } }
        set_country_flag = rl_banned_560
        if = {
            limit = { check_variable = { rl_locked_offer_id = 560 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 561 } }
        set_country_flag = rl_banned_561
        if = {
            limit = { check_variable = { rl_locked_offer_id = 561 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 562 } }
        set_country_flag = rl_banned_562
        if = {
            limit = { check_variable = { rl_locked_offer_id = 562 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 563 } }
        set_country_flag = rl_banned_563
        if = {
            limit = { check_variable = { rl_locked_offer_id = 563 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 564 } }
        set_country_flag = rl_banned_564
        if = {
            limit = { check_variable = { rl_locked_offer_id = 564 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 565 } }
        set_country_flag = rl_banned_565
        if = {
            limit = { check_variable = { rl_locked_offer_id = 565 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 566 } }
        set_country_flag = rl_banned_566
        if = {
            limit = { check_variable = { rl_locked_offer_id = 566 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 567 } }
        set_country_flag = rl_banned_567
        if = {
            limit = { check_variable = { rl_locked_offer_id = 567 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 568 } }
        set_country_flag = rl_banned_568
        if = {
            limit = { check_variable = { rl_locked_offer_id = 568 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 569 } }
        set_country_flag = rl_banned_569
        if = {
            limit = { check_variable = { rl_locked_offer_id = 569 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 570 } }
        set_country_flag = rl_banned_570
        if = {
            limit = { check_variable = { rl_locked_offer_id = 570 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 571 } }
        set_country_flag = rl_banned_571
        if = {
            limit = { check_variable = { rl_locked_offer_id = 571 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 572 } }
        set_country_flag = rl_banned_572
        if = {
            limit = { check_variable = { rl_locked_offer_id = 572 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 573 } }
        set_country_flag = rl_banned_573
        if = {
            limit = { check_variable = { rl_locked_offer_id = 573 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 574 } }
        set_country_flag = rl_banned_574
        if = {
            limit = { check_variable = { rl_locked_offer_id = 574 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 575 } }
        set_country_flag = rl_banned_575
        if = {
            limit = { check_variable = { rl_locked_offer_id = 575 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 576 } }
        set_country_flag = rl_banned_576
        if = {
            limit = { check_variable = { rl_locked_offer_id = 576 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 577 } }
        set_country_flag = rl_banned_577
        if = {
            limit = { check_variable = { rl_locked_offer_id = 577 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 578 } }
        set_country_flag = rl_banned_578
        if = {
            limit = { check_variable = { rl_locked_offer_id = 578 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 579 } }
        set_country_flag = rl_banned_579
        if = {
            limit = { check_variable = { rl_locked_offer_id = 579 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 580 } }
        set_country_flag = rl_banned_580
        if = {
            limit = { check_variable = { rl_locked_offer_id = 580 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 581 } }
        set_country_flag = rl_banned_581
        if = {
            limit = { check_variable = { rl_locked_offer_id = 581 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 582 } }
        set_country_flag = rl_banned_582
        if = {
            limit = { check_variable = { rl_locked_offer_id = 582 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 583 } }
        set_country_flag = rl_banned_583
        if = {
            limit = { check_variable = { rl_locked_offer_id = 583 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 584 } }
        set_country_flag = rl_banned_584
        if = {
            limit = { check_variable = { rl_locked_offer_id = 584 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 585 } }
        set_country_flag = rl_banned_585
        if = {
            limit = { check_variable = { rl_locked_offer_id = 585 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 586 } }
        set_country_flag = rl_banned_586
        if = {
            limit = { check_variable = { rl_locked_offer_id = 586 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 587 } }
        set_country_flag = rl_banned_587
        if = {
            limit = { check_variable = { rl_locked_offer_id = 587 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 588 } }
        set_country_flag = rl_banned_588
        if = {
            limit = { check_variable = { rl_locked_offer_id = 588 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 589 } }
        set_country_flag = rl_banned_589
        if = {
            limit = { check_variable = { rl_locked_offer_id = 589 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 590 } }
        set_country_flag = rl_banned_590
        if = {
            limit = { check_variable = { rl_locked_offer_id = 590 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 591 } }
        set_country_flag = rl_banned_591
        if = {
            limit = { check_variable = { rl_locked_offer_id = 591 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 592 } }
        set_country_flag = rl_banned_592
        if = {
            limit = { check_variable = { rl_locked_offer_id = 592 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 593 } }
        set_country_flag = rl_banned_593
        if = {
            limit = { check_variable = { rl_locked_offer_id = 593 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 594 } }
        set_country_flag = rl_banned_594
        if = {
            limit = { check_variable = { rl_locked_offer_id = 594 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 595 } }
        set_country_flag = rl_banned_595
        if = {
            limit = { check_variable = { rl_locked_offer_id = 595 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 596 } }
        set_country_flag = rl_banned_596
        if = {
            limit = { check_variable = { rl_locked_offer_id = 596 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 597 } }
        set_country_flag = rl_banned_597
        if = {
            limit = { check_variable = { rl_locked_offer_id = 597 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 598 } }
        set_country_flag = rl_banned_598
        if = {
            limit = { check_variable = { rl_locked_offer_id = 598 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 599 } }
        set_country_flag = rl_banned_599
        if = {
            limit = { check_variable = { rl_locked_offer_id = 599 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_banish_target_id = 600 } }
        set_country_flag = rl_banned_600
        if = {
            limit = { check_variable = { rl_locked_offer_id = 600 } }
            clr_country_flag = rl_has_locked_offer
            set_variable = { rl_locked_offer_id = 0 }
            set_variable = { rl_locked_offer_rarity = 0 }
        }
    }
}

rl_banish_offer_1 = {
    add_to_variable = { rl_fate_shards = -12 }
    add_to_variable = { rl_banish_count = 1 }
    set_variable = { rl_banish_target_id = rl_offer_1_id }
    rl_banish_selected_id = yes
    clr_country_flag = rl_offers_ready
    rl_generate_three_offers = yes
}

rl_banish_offer_2 = {
    add_to_variable = { rl_fate_shards = -12 }
    add_to_variable = { rl_banish_count = 1 }
    set_variable = { rl_banish_target_id = rl_offer_2_id }
    rl_banish_selected_id = yes
    clr_country_flag = rl_offers_ready
    rl_generate_three_offers = yes
}

rl_banish_offer_3 = {
    add_to_variable = { rl_fate_shards = -12 }
    add_to_variable = { rl_banish_count = 1 }
    set_variable = { rl_banish_target_id = rl_offer_3_id }
    rl_banish_selected_id = yes
    clr_country_flag = rl_offers_ready
    rl_generate_three_offers = yes
}

rl_fuse_common = {
    add_to_variable = { rl_fusion_common_cores = -3 }
    add_to_variable = { rl_fate_shards = -3 }
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    set_variable = { rl_offer_1_rarity = 2 }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}

rl_fuse_rare = {
    add_to_variable = { rl_fusion_rare_cores = -3 }
    add_to_variable = { rl_fate_shards = -6 }
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    set_variable = { rl_offer_1_rarity = 3 }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}

rl_fuse_epic = {
    add_to_variable = { rl_fusion_epic_cores = -3 }
    add_to_variable = { rl_fate_shards = -12 }
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    set_variable = { rl_offer_1_rarity = 4 }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}

rl_fuse_legendary = {
    add_to_variable = { rl_fusion_legendary_cores = -3 }
    add_to_variable = { rl_fate_shards = -24 }
    rl_clear_offer_variables = yes
    rl_roll_offer_1 = yes
    set_variable = { rl_offer_1_rarity = 5 }
    set_country_flag = rl_fate_purchase_in_progress
    set_variable = { rl_selected_id = rl_offer_1_id }
    set_variable = { rl_selected_rarity = rl_offer_1_rarity }
    rl_apply_selected_upgrade = yes
    clr_country_flag = rl_fate_purchase_in_progress
    if = { limit = { NOT = { has_country_flag = rl_hc_replacement_mode } } country_event = { id = rl.3 hours = 1 } }
}


rl_hc_remove_selected_persistent = {
    if = {
        limit = { check_variable = { rl_selected_id = 1 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 2 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 3 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 4 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 5 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 6 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 7 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 8 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 9 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 10 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 11 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 12 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 13 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 14 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 15 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 16 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 17 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 18 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_min_export = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_min_export = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_min_export = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_min_export = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_min_export = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 19 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 20 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_fuel_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_fuel_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 21 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 22 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 23 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 24 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -3.2 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 25 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 26 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 27 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 28 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 29 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 30 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 31 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 32 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 33 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 34 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 35 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 36 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.15 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.3 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 1.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 2.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 37 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 38 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 39 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 40 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 41 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 42 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 43 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 44 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 45 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_planning_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 46 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_planning_speed = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_planning_speed = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_planning_speed = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_planning_speed = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_planning_speed = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 47 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 48 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 49 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 50 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 51 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 52 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_out_of_supply_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 53 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 54 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 55 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_loss_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_loss_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 56 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -1.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -3.2 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 57 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_command_power = -10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_command_power = -20 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_command_power = -40 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_command_power = -80 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_command_power = -160 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 58 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 59 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 60 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 61 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 62 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 63 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 64 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_org_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 65 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 66 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 67 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 68 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 69 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 70 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 71 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 72 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 73 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 74 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 75 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 76 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 77 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 78 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 79 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = -0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = -1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 80 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 81 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 82 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 83 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 84 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 85 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 86 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 87 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.15 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.3 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = 1.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = 2.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 88 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = 1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 89 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = 1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 90 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 91 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 92 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 93 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 94 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_gain = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_gain = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_gain = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_gain = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_gain = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 95 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 96 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 98 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 99 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = -1 }
            add_to_variable = { rl_mod_decryption = -1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = -2 }
            add_to_variable = { rl_mod_decryption = -2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = -4 }
            add_to_variable = { rl_mod_decryption = -4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = -8 }
            add_to_variable = { rl_mod_decryption = -8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = -16 }
            add_to_variable = { rl_mod_decryption = -16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 100 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_core_forge_chance = -1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_core_forge_chance = -2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_core_forge_chance = -4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_core_forge_chance = -8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_core_forge_chance = -16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 101 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 102 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.05 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.1 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.2 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.4 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.8 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 103 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.04 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.08 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.16 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.32 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.64 }
            add_to_variable = { rl_mod_repair_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 104 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.08 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.16 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.32 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.64 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -1.28 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 105 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.1 }
            add_to_variable = { rl_mod_local_resources_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.2 }
            add_to_variable = { rl_mod_local_resources_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.4 }
            add_to_variable = { rl_mod_local_resources_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.8 }
            add_to_variable = { rl_mod_local_resources_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -1.6 }
            add_to_variable = { rl_mod_local_resources_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 106 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.12 }
            add_to_variable = { rl_mod_air_range_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.24 }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.48 }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.96 }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -1.92 }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 107 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -1.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 108 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_min_export = 0.03 }
            add_to_variable = { rl_mod_local_resources_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_min_export = 0.06 }
            add_to_variable = { rl_mod_local_resources_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_min_export = 0.12 }
            add_to_variable = { rl_mod_local_resources_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_min_export = 0.24 }
            add_to_variable = { rl_mod_local_resources_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_min_export = 0.48 }
            add_to_variable = { rl_mod_local_resources_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 109 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.02 }
            add_to_variable = { rl_mod_political_power_gain = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_gain = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_gain = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_gain = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_gain = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 110 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.1 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.2 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.4 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.8 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = -1.6 }
            add_to_variable = { rl_mod_fuel_gain_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 111 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.8 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_fuel_factor = -1.6 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 112 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.12 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.24 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.48 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.96 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.92 }
            add_to_variable = { rl_mod_equipment_capture_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 113 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.08 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.16 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.32 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.64 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 1.28 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 114 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.1 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.2 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.4 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.8 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_free_repair_factor = -1.6 }
            add_to_variable = { rl_mod_repair_speed_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 115 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.08 }
            add_to_variable = { rl_mod_stability_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.16 }
            add_to_variable = { rl_mod_stability_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.32 }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.64 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 1.28 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 116 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 1.6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 117 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.06 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.12 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.24 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.48 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.96 }
            add_to_variable = { rl_mod_out_of_supply_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 118 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
            add_to_variable = { rl_mod_max_planning_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
            add_to_variable = { rl_mod_max_planning_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
            add_to_variable = { rl_mod_max_planning_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
            add_to_variable = { rl_mod_max_planning_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
            add_to_variable = { rl_mod_max_planning_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 119 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.1 }
            add_to_variable = { rl_mod_armor_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.2 }
            add_to_variable = { rl_mod_armor_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.4 }
            add_to_variable = { rl_mod_armor_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.8 }
            add_to_variable = { rl_mod_armor_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 1.6 }
            add_to_variable = { rl_mod_armor_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 120 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_mod_war_support_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_mod_war_support_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_mod_war_support_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_mod_war_support_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_mod_war_support_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 121 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.03 }
            add_to_variable = { rl_mod_max_planning_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.06 }
            add_to_variable = { rl_mod_max_planning_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.12 }
            add_to_variable = { rl_mod_max_planning_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.24 }
            add_to_variable = { rl_mod_max_planning_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.48 }
            add_to_variable = { rl_mod_max_planning_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 122 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.04 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 123 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_planning_speed = -0.08 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_planning_speed = -0.16 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_planning_speed = -0.32 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_planning_speed = -0.64 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_planning_speed = -1.28 }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 124 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.04 }
            add_to_variable = { rl_mod_army_org_regain = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.08 }
            add_to_variable = { rl_mod_army_org_regain = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.16 }
            add_to_variable = { rl_mod_army_org_regain = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.32 }
            add_to_variable = { rl_mod_army_org_regain = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.64 }
            add_to_variable = { rl_mod_army_org_regain = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 125 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = 1.28 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 126 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_loss_factor = 1.6 }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 127 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.15 }
            add_to_variable = { rl_mod_max_command_power = -5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.3 }
            add_to_variable = { rl_mod_max_command_power = -10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.6 }
            add_to_variable = { rl_mod_max_command_power = -20 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -1.2 }
            add_to_variable = { rl_mod_max_command_power = -40 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -2.4 }
            add_to_variable = { rl_mod_max_command_power = -80 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 128 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.08 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.16 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.32 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.64 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 1.28 }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 129 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 130 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 131 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.02 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 132 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.03 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.06 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.12 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.24 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.48 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 133 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_planning_speed = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_planning_speed = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_planning_speed = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_planning_speed = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_planning_speed = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 134 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.06 }
            add_to_variable = { rl_mod_special_forces_cap = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.12 }
            add_to_variable = { rl_mod_special_forces_cap = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.24 }
            add_to_variable = { rl_mod_special_forces_cap = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.48 }
            add_to_variable = { rl_mod_special_forces_cap = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.96 }
            add_to_variable = { rl_mod_special_forces_cap = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 135 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.05 }
            add_to_variable = { rl_mod_max_planning_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.1 }
            add_to_variable = { rl_mod_max_planning_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.2 }
            add_to_variable = { rl_mod_max_planning_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.4 }
            add_to_variable = { rl_mod_max_planning_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.8 }
            add_to_variable = { rl_mod_max_planning_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 136 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.48 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 137 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = -0.06 }
            add_to_variable = { rl_mod_army_defence_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = -0.12 }
            add_to_variable = { rl_mod_army_defence_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = -0.24 }
            add_to_variable = { rl_mod_army_defence_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = -0.48 }
            add_to_variable = { rl_mod_army_defence_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = -0.96 }
            add_to_variable = { rl_mod_army_defence_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 138 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.05 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.1 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.2 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.4 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.8 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 139 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.03 }
            add_to_variable = { rl_mod_army_defence_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_defence_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_defence_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_defence_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_defence_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 140 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 141 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 142 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.07 }
            add_to_variable = { rl_mod_army_speed_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.14 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.28 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.56 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -1.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 143 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.05 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.1 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.2 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.4 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.8 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 144 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.05 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.1 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.2 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.4 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.8 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 145 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_attack_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 146 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.04 }
            add_to_variable = { rl_mod_army_org_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 147 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 148 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.06 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.24 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.48 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.96 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 149 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.05 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.1 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.2 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.4 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.8 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 150 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.06 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.24 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.48 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.96 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 151 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.04 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 152 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.05 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.1 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.2 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.4 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.8 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 153 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.05 }
            add_to_variable = { rl_mod_planning_speed = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.1 }
            add_to_variable = { rl_mod_planning_speed = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.2 }
            add_to_variable = { rl_mod_planning_speed = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.4 }
            add_to_variable = { rl_mod_planning_speed = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.8 }
            add_to_variable = { rl_mod_planning_speed = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 154 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.02 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.04 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.08 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.16 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.32 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 155 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 156 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.05 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.1 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.2 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.4 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.8 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 157 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.08 }
            add_to_variable = { rl_mod_positioning = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.16 }
            add_to_variable = { rl_mod_positioning = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.32 }
            add_to_variable = { rl_mod_positioning = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.64 }
            add_to_variable = { rl_mod_positioning = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.28 }
            add_to_variable = { rl_mod_positioning = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 158 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.08 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.16 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.32 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.64 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.28 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 159 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.06 }
            add_to_variable = { rl_mod_screening_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.12 }
            add_to_variable = { rl_mod_screening_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.24 }
            add_to_variable = { rl_mod_screening_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.48 }
            add_to_variable = { rl_mod_screening_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.96 }
            add_to_variable = { rl_mod_screening_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 160 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.06 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.12 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.24 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.48 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.96 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 161 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 162 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.1 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.2 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.4 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.8 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.6 }
            add_to_variable = { rl_mod_navy_max_range_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 163 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -1.6 }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 164 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.06 }
            add_to_variable = { rl_mod_screening_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.12 }
            add_to_variable = { rl_mod_screening_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.24 }
            add_to_variable = { rl_mod_screening_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.48 }
            add_to_variable = { rl_mod_screening_efficiency = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.96 }
            add_to_variable = { rl_mod_screening_efficiency = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 165 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.07 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.14 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.28 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.56 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -1.12 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 166 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.05 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.1 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.2 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.4 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.8 }
            add_to_variable = { rl_mod_naval_morale_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 167 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.1 }
            add_to_variable = { rl_mod_spotting_chance = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.2 }
            add_to_variable = { rl_mod_spotting_chance = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.4 }
            add_to_variable = { rl_mod_spotting_chance = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.8 }
            add_to_variable = { rl_mod_spotting_chance = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.6 }
            add_to_variable = { rl_mod_spotting_chance = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 168 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -1.6 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 169 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.03 }
            add_to_variable = { rl_mod_navy_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.06 }
            add_to_variable = { rl_mod_navy_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.12 }
            add_to_variable = { rl_mod_navy_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.24 }
            add_to_variable = { rl_mod_navy_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.48 }
            add_to_variable = { rl_mod_navy_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 170 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.06 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 171 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 172 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.05 }
            add_to_variable = { rl_mod_air_agility_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.1 }
            add_to_variable = { rl_mod_air_agility_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.2 }
            add_to_variable = { rl_mod_air_agility_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.4 }
            add_to_variable = { rl_mod_air_agility_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.8 }
            add_to_variable = { rl_mod_air_agility_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 173 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.06 }
            add_to_variable = { rl_mod_air_range_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.12 }
            add_to_variable = { rl_mod_air_range_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.24 }
            add_to_variable = { rl_mod_air_range_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.48 }
            add_to_variable = { rl_mod_air_range_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.96 }
            add_to_variable = { rl_mod_air_range_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 174 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.96 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 175 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.08 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.16 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.32 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.64 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -1.28 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 176 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.08 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.16 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.32 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.64 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -1.28 }
            add_to_variable = { rl_mod_ground_attack_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 177 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.08 }
            add_to_variable = { rl_mod_air_range_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.16 }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.32 }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.64 }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -1.28 }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 178 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.1 }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.2 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.4 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.8 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -1.6 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 179 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.08 }
            add_to_variable = { rl_mod_air_night_penalty = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.16 }
            add_to_variable = { rl_mod_air_night_penalty = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.32 }
            add_to_variable = { rl_mod_air_night_penalty = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.64 }
            add_to_variable = { rl_mod_air_night_penalty = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = 1.28 }
            add_to_variable = { rl_mod_air_night_penalty = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 180 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.1 }
            add_to_variable = { rl_mod_air_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.2 }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.4 }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.8 }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = 1.6 }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 181 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.08 }
            add_to_variable = { rl_mod_air_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.16 }
            add_to_variable = { rl_mod_air_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.32 }
            add_to_variable = { rl_mod_air_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.64 }
            add_to_variable = { rl_mod_air_range_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -1.28 }
            add_to_variable = { rl_mod_air_range_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 182 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_agility_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_agility_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_agility_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_agility_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.28 }
            add_to_variable = { rl_mod_air_agility_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 183 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = -1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 184 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 185 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
            add_to_variable = { rl_mod_air_defence_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
            add_to_variable = { rl_mod_air_defence_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
            add_to_variable = { rl_mod_air_defence_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
            add_to_variable = { rl_mod_air_defence_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = -1.6 }
            add_to_variable = { rl_mod_air_defence_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 186 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.04 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 187 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_political_power_gain = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_political_power_gain = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_political_power_gain = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_political_power_gain = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -0.96 }
            add_to_variable = { rl_mod_political_power_gain = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 188 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = -0.02 }
            add_to_variable = { rl_mod_war_support_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
            add_to_variable = { rl_mod_war_support_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
            add_to_variable = { rl_mod_war_support_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
            add_to_variable = { rl_mod_war_support_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
            add_to_variable = { rl_mod_war_support_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 189 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = -1 }
            add_to_variable = { rl_mod_decryption = -1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = -2 }
            add_to_variable = { rl_mod_decryption = -2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = -4 }
            add_to_variable = { rl_mod_decryption = -4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = -8 }
            add_to_variable = { rl_mod_decryption = -8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = -16 }
            add_to_variable = { rl_mod_decryption = -16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 190 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.003 }
            add_to_variable = { rl_mod_resistance_target = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.006 }
            add_to_variable = { rl_mod_resistance_target = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.012 }
            add_to_variable = { rl_mod_resistance_target = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.024 }
            add_to_variable = { rl_mod_resistance_target = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.048 }
            add_to_variable = { rl_mod_resistance_target = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 191 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 192 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.06 }
            add_to_variable = { rl_mod_political_power_gain = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.12 }
            add_to_variable = { rl_mod_political_power_gain = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.24 }
            add_to_variable = { rl_mod_political_power_gain = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.48 }
            add_to_variable = { rl_mod_political_power_gain = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.96 }
            add_to_variable = { rl_mod_political_power_gain = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 193 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = -1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = -2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = -4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = -8 }
            add_to_variable = { rl_mod_research_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = -16 }
            add_to_variable = { rl_mod_research_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 194 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_decryption = -2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_decryption = -4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_decryption = -8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_decryption = -16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_decryption = -32 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 195 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.02 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 196 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.003 }
            add_to_variable = { rl_core_forge_chance = -1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.006 }
            add_to_variable = { rl_core_forge_chance = -2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.012 }
            add_to_variable = { rl_core_forge_chance = -4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.024 }
            add_to_variable = { rl_core_forge_chance = -8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.048 }
            add_to_variable = { rl_core_forge_chance = -16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 197 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = -0.02 }
            add_to_variable = { rl_mod_stability_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = -0.04 }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = -0.08 }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = -0.16 }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = -0.32 }
            add_to_variable = { rl_mod_stability_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 198 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.02 }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 199 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_army_attack_factor = -0.03 }
            add_to_variable = { rl_mod_research_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_army_attack_factor = -0.06 }
            add_to_variable = { rl_mod_research_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = -0.12 }
            add_to_variable = { rl_mod_research_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = -0.24 }
            add_to_variable = { rl_mod_research_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = -0.48 }
            add_to_variable = { rl_mod_research_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 200 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
            add_to_variable = { rl_core_forge_chance = -2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
            add_to_variable = { rl_core_forge_chance = -4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
            add_to_variable = { rl_core_forge_chance = -8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
            add_to_variable = { rl_core_forge_chance = -16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
            add_to_variable = { rl_core_forge_chance = -32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 201 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 202 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.06 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.12 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.24 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.48 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.96 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 203 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 204 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.05 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.1 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.2 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.4 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.8 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 205 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.04 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.08 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.16 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.32 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.64 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 206 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.08 }
            add_to_variable = { rl_mod_local_resources_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.16 }
            add_to_variable = { rl_mod_local_resources_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.32 }
            add_to_variable = { rl_mod_local_resources_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.64 }
            add_to_variable = { rl_mod_local_resources_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -1.28 }
            add_to_variable = { rl_mod_local_resources_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 207 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 208 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.1 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.2 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.4 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.8 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -1.6 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 209 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -1.92 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 210 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -1.92 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 211 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -1.6 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 212 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.12 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.24 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.48 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.96 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = -1.92 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 213 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 214 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.1 }
            add_to_variable = { rl_mod_min_export = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.2 }
            add_to_variable = { rl_mod_min_export = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.4 }
            add_to_variable = { rl_mod_min_export = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.8 }
            add_to_variable = { rl_mod_min_export = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = -1.6 }
            add_to_variable = { rl_mod_min_export = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 215 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.12 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.24 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.48 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.96 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -1.92 }
            add_to_variable = { rl_mod_max_fuel_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 216 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.12 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.24 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.48 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.96 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = -1.92 }
            add_to_variable = { rl_mod_fuel_gain_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 217 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.02 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.04 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 218 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.12 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.24 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.48 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.96 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 1.92 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 219 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.15 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.3 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.6 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.2 }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -2.4 }
            add_to_variable = { rl_mod_equipment_capture_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 220 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 230 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.03 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.06 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.12 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.24 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.48 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 231 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.08 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.16 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.32 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.64 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = -1.28 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 232 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.05 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.05 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.1 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.1 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.2 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.2 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.8 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.4 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.4 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -1.6 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.8 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.8 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 233 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.18 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.36 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.72 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.44 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -2.88 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 234 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.12 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.24 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.48 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.96 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -1.92 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 235 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 236 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.05 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.1 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.2 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.4 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.8 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 237 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.09 }
            add_to_variable = { rl_mod_min_export = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.18 }
            add_to_variable = { rl_mod_min_export = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.36 }
            add_to_variable = { rl_mod_min_export = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.72 }
            add_to_variable = { rl_mod_min_export = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = -1.44 }
            add_to_variable = { rl_mod_min_export = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 238 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.015 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.035 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.03 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.07 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.06 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.14 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.12 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.28 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.24 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.56 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 239 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.15 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.3 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.6 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = -1.2 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = -2.4 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 240 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.05 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.06 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.1 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.12 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.2 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.24 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.4 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.48 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.8 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.96 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 241 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_planning_speed = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_planning_speed = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_planning_speed = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_planning_speed = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_planning_speed = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 242 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.04 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 243 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
            add_to_variable = { rl_mod_army_org_regain = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_regain = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_regain = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_regain = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_regain = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 244 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.025 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.05 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.1 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.2 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.4 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 245 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.04 }
            add_to_variable = { rl_mod_army_defence_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.08 }
            add_to_variable = { rl_mod_army_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.16 }
            add_to_variable = { rl_mod_army_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.32 }
            add_to_variable = { rl_mod_army_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.64 }
            add_to_variable = { rl_mod_army_defence_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 246 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.06 }
            add_to_variable = { rl_mod_planning_speed = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.12 }
            add_to_variable = { rl_mod_planning_speed = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.24 }
            add_to_variable = { rl_mod_planning_speed = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.48 }
            add_to_variable = { rl_mod_planning_speed = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.96 }
            add_to_variable = { rl_mod_planning_speed = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 247 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.06 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.12 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.24 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.48 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.96 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 248 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = 1.28 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 249 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.12 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.24 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.48 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.96 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.92 }
            add_to_variable = { rl_mod_experience_loss_factor = 1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 250 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.15 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.3 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.6 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -1.2 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -2.4 }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 251 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_command_power = -8 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_command_power = -16 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_command_power = -32 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_command_power = -64 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.96 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_command_power = -128 }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.92 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 252 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.08 }
            add_to_variable = { rl_mod_max_planning_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.16 }
            add_to_variable = { rl_mod_max_planning_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.32 }
            add_to_variable = { rl_mod_max_planning_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.64 }
            add_to_variable = { rl_mod_max_planning_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 1.28 }
            add_to_variable = { rl_mod_max_planning_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 253 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.12 }
            add_to_variable = { rl_mod_army_attack_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.24 }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.48 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.96 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -1.92 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 254 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 255 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.07 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.14 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.56 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -1.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 256 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.07 }
            add_to_variable = { rl_mod_planning_speed = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.14 }
            add_to_variable = { rl_mod_planning_speed = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.28 }
            add_to_variable = { rl_mod_planning_speed = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.56 }
            add_to_variable = { rl_mod_planning_speed = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -1.12 }
            add_to_variable = { rl_mod_planning_speed = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 257 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.07 }
            add_to_variable = { rl_mod_army_defence_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.14 }
            add_to_variable = { rl_mod_army_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.28 }
            add_to_variable = { rl_mod_army_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.56 }
            add_to_variable = { rl_mod_army_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -1.12 }
            add_to_variable = { rl_mod_army_defence_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 258 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.07 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.14 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.28 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.56 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 1.12 }
            add_to_variable = { rl_mod_out_of_supply_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 259 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.08 }
            add_to_variable = { rl_mod_army_speed_factor = -0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.16 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.32 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.64 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 1.28 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 260 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = -0.07 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = -0.14 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = -0.28 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = -0.56 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = -1.12 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 272 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 273 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 276 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 277 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.03 }
            add_to_variable = { rl_mod_war_support_factor = -0.025 }
            add_to_variable = { rl_mod_stability_factor = -0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.06 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.12 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.24 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.48 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 278 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.03 }
            add_to_variable = { rl_mod_army_org_factor = -0.025 }
            add_to_variable = { rl_mod_army_speed_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 279 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.1 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.2 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.4 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.8 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -1.6 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 280 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 281 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.96 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 282 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 283 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.08 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.16 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.32 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.64 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -1.28 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 284 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.08 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.16 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.32 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.64 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.28 }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -1.6 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 285 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_regain = -0.08 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_regain = -0.16 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_regain = -0.32 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_regain = -0.64 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_regain = -1.28 }
            add_to_variable = { rl_mod_experience_loss_factor = 1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 286 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 287 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.07 }
            add_to_variable = { rl_mod_armor_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.14 }
            add_to_variable = { rl_mod_armor_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.28 }
            add_to_variable = { rl_mod_armor_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.56 }
            add_to_variable = { rl_mod_armor_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -1.12 }
            add_to_variable = { rl_mod_armor_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 288 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
            add_to_variable = { rl_mod_planning_speed = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
            add_to_variable = { rl_mod_planning_speed = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
            add_to_variable = { rl_mod_planning_speed = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
            add_to_variable = { rl_mod_planning_speed = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
            add_to_variable = { rl_mod_planning_speed = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 289 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.1 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.025 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.2 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.4 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.8 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 1.6 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 290 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.06 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.12 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.24 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.48 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.96 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 291 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.07 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.14 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.28 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.56 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -1.12 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 292 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.07 }
            add_to_variable = { rl_mod_army_org_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.14 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.56 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -1.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 293 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.07 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.14 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.56 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -1.12 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 294 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.025 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.05 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 295 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_speed_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_speed_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 296 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.07 }
            add_to_variable = { rl_mod_special_forces_cap = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.14 }
            add_to_variable = { rl_mod_special_forces_cap = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.28 }
            add_to_variable = { rl_mod_special_forces_cap = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.56 }
            add_to_variable = { rl_mod_special_forces_cap = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -1.12 }
            add_to_variable = { rl_mod_special_forces_cap = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 297 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.07 }
            add_to_variable = { rl_mod_special_forces_cap = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.14 }
            add_to_variable = { rl_mod_special_forces_cap = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.28 }
            add_to_variable = { rl_mod_special_forces_cap = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.56 }
            add_to_variable = { rl_mod_special_forces_cap = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -1.12 }
            add_to_variable = { rl_mod_special_forces_cap = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 298 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.03 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.06 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.12 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.24 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.48 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 299 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.05 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.1 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.2 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.4 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.8 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 300 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_regain = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_regain = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_regain = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_regain = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_org_regain = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 301 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.06 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.12 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.24 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.48 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.96 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 302 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.04 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 303 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.05 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.1 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.2 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.4 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.8 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 304 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.07 }
            add_to_variable = { rl_mod_army_attack_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.14 }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.28 }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.56 }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -1.12 }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 305 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.06 }
            add_to_variable = { rl_mod_army_defence_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.12 }
            add_to_variable = { rl_mod_army_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.24 }
            add_to_variable = { rl_mod_army_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.48 }
            add_to_variable = { rl_mod_army_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.96 }
            add_to_variable = { rl_mod_army_defence_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 306 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = -0.06 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = -0.12 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = -0.24 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = -0.48 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = -0.96 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 307 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_max_planning_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_max_planning_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_max_planning_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_max_planning_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_max_planning_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 308 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.04 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.05 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.08 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.1 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.16 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.2 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.32 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.4 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.64 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.8 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 309 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.02 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.06 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.04 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.12 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.08 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.24 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.16 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.48 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.32 }
            add_to_variable = { rl_mod_training_time_army_factor = 0.96 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 310 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.1 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.2 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.4 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.8 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -1.6 }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 311 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.06 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.12 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.24 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.48 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.96 }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 312 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.07 }
            add_to_variable = { rl_mod_planning_speed = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.14 }
            add_to_variable = { rl_mod_planning_speed = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.28 }
            add_to_variable = { rl_mod_planning_speed = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.56 }
            add_to_variable = { rl_mod_planning_speed = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -1.12 }
            add_to_variable = { rl_mod_planning_speed = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 313 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_factor = -0.025 }
            add_to_variable = { rl_mod_army_speed_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 314 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.05 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.1 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.2 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.4 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.8 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 315 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.04 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.08 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.16 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.32 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.64 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 316 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 317 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.07 }
            add_to_variable = { rl_mod_navy_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.14 }
            add_to_variable = { rl_mod_navy_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.28 }
            add_to_variable = { rl_mod_navy_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.56 }
            add_to_variable = { rl_mod_navy_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = -1.12 }
            add_to_variable = { rl_mod_navy_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 318 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_navy_max_range_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 319 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.08 }
            add_to_variable = { rl_mod_navy_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.16 }
            add_to_variable = { rl_mod_navy_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.32 }
            add_to_variable = { rl_mod_navy_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.64 }
            add_to_variable = { rl_mod_navy_org_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = -1.28 }
            add_to_variable = { rl_mod_navy_org_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 320 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.1 }
            add_to_variable = { rl_mod_positioning = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.2 }
            add_to_variable = { rl_mod_positioning = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.4 }
            add_to_variable = { rl_mod_positioning = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.8 }
            add_to_variable = { rl_mod_positioning = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.6 }
            add_to_variable = { rl_mod_positioning = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 321 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = -0.08 }
            add_to_variable = { rl_mod_screening_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = -0.16 }
            add_to_variable = { rl_mod_screening_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = -0.32 }
            add_to_variable = { rl_mod_screening_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = -0.64 }
            add_to_variable = { rl_mod_screening_efficiency = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = -1.28 }
            add_to_variable = { rl_mod_screening_efficiency = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 322 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.07 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.14 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.56 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -1.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 323 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 324 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.08 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.16 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.32 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.64 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.28 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 325 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.1 }
            add_to_variable = { rl_mod_spotting_chance = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.2 }
            add_to_variable = { rl_mod_spotting_chance = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.4 }
            add_to_variable = { rl_mod_spotting_chance = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.8 }
            add_to_variable = { rl_mod_spotting_chance = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.6 }
            add_to_variable = { rl_mod_spotting_chance = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 326 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -1.92 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 327 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.12 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.24 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.48 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.96 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -1.92 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 328 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 329 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.08 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.16 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.32 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.64 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = -1.28 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 330 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = -0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = -0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = -0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = -0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = -1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 334 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 335 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 336 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.06 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 337 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.07 }
            add_to_variable = { rl_mod_screening_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.14 }
            add_to_variable = { rl_mod_screening_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.28 }
            add_to_variable = { rl_mod_screening_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.56 }
            add_to_variable = { rl_mod_screening_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -1.12 }
            add_to_variable = { rl_mod_screening_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 338 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.12 }
            add_to_variable = { rl_mod_positioning = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.24 }
            add_to_variable = { rl_mod_positioning = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.48 }
            add_to_variable = { rl_mod_positioning = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.96 }
            add_to_variable = { rl_mod_positioning = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.92 }
            add_to_variable = { rl_mod_positioning = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 339 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.1 }
            add_to_variable = { rl_mod_navy_org_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.2 }
            add_to_variable = { rl_mod_navy_org_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.4 }
            add_to_variable = { rl_mod_navy_org_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.8 }
            add_to_variable = { rl_mod_navy_org_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = -1.6 }
            add_to_variable = { rl_mod_navy_org_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 340 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.06 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.12 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.24 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.48 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.96 }
            add_to_variable = { rl_mod_navy_max_range_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 341 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
            add_to_variable = { rl_mod_positioning = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
            add_to_variable = { rl_mod_positioning = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
            add_to_variable = { rl_mod_positioning = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
            add_to_variable = { rl_mod_positioning = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.8 }
            add_to_variable = { rl_mod_positioning = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 342 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.08 }
            add_to_variable = { rl_mod_navy_org_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.16 }
            add_to_variable = { rl_mod_navy_org_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.32 }
            add_to_variable = { rl_mod_navy_org_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.64 }
            add_to_variable = { rl_mod_navy_org_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = -1.28 }
            add_to_variable = { rl_mod_navy_org_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 343 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.04 }
            add_to_variable = { rl_mod_spotting_chance = -0.06 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_spotting_chance = -0.12 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_spotting_chance = -0.24 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_spotting_chance = -0.48 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_spotting_chance = -0.96 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 344 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.14 }
            add_to_variable = { rl_mod_screening_efficiency = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.28 }
            add_to_variable = { rl_mod_screening_efficiency = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.56 }
            add_to_variable = { rl_mod_screening_efficiency = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -1.12 }
            add_to_variable = { rl_mod_screening_efficiency = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -2.24 }
            add_to_variable = { rl_mod_screening_efficiency = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 345 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = -0.06 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.06 }
            add_to_variable = { rl_mod_spotting_chance = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = -0.12 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.12 }
            add_to_variable = { rl_mod_spotting_chance = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = -0.24 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.24 }
            add_to_variable = { rl_mod_spotting_chance = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = -0.48 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.48 }
            add_to_variable = { rl_mod_spotting_chance = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = -0.96 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.96 }
            add_to_variable = { rl_mod_spotting_chance = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 346 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_agility_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_agility_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_agility_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_agility_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_air_agility_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 347 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.07 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.14 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.56 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = -1.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 348 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.07 }
            add_to_variable = { rl_mod_air_attack_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.14 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.28 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.56 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = -1.12 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 349 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.07 }
            add_to_variable = { rl_mod_air_range_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.14 }
            add_to_variable = { rl_mod_air_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.28 }
            add_to_variable = { rl_mod_air_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.56 }
            add_to_variable = { rl_mod_air_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.12 }
            add_to_variable = { rl_mod_air_range_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 350 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = -1.6 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 351 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.08 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.16 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.32 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.64 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -1.28 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 352 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.1 }
            add_to_variable = { rl_mod_air_attack_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.2 }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.4 }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.8 }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -1.6 }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 353 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.1 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.2 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.4 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.8 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -1.6 }
            add_to_variable = { rl_mod_ground_attack_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 354 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = -1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 355 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.1 }
            add_to_variable = { rl_mod_air_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.2 }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.4 }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.8 }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -1.6 }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 356 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.1 }
            add_to_variable = { rl_mod_air_range_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.2 }
            add_to_variable = { rl_mod_air_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.4 }
            add_to_variable = { rl_mod_air_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.8 }
            add_to_variable = { rl_mod_air_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -1.6 }
            add_to_variable = { rl_mod_air_range_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 357 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = 1.92 }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 358 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = 1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 359 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.1 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.2 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.4 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.8 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = 1.6 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 360 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.08 }
            add_to_variable = { rl_mod_air_range_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.16 }
            add_to_variable = { rl_mod_air_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.32 }
            add_to_variable = { rl_mod_air_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.64 }
            add_to_variable = { rl_mod_air_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 1.28 }
            add_to_variable = { rl_mod_air_range_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 363 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 364 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.05 }
            add_to_variable = { rl_mod_air_night_penalty = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.1 }
            add_to_variable = { rl_mod_air_night_penalty = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.2 }
            add_to_variable = { rl_mod_air_night_penalty = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.4 }
            add_to_variable = { rl_mod_air_night_penalty = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.8 }
            add_to_variable = { rl_mod_air_night_penalty = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 365 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = -0.08 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = -0.16 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = -0.32 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = -0.64 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = -1.28 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 366 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.06 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.24 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.48 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.96 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 367 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = -1.28 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 368 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 369 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_cas_efficiency = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 370 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.1 }
            add_to_variable = { rl_mod_air_range_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.2 }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.4 }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.8 }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -1.6 }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 371 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.1 }
            add_to_variable = { rl_mod_air_agility_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.2 }
            add_to_variable = { rl_mod_air_agility_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.4 }
            add_to_variable = { rl_mod_air_agility_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.8 }
            add_to_variable = { rl_mod_air_agility_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = 1.6 }
            add_to_variable = { rl_mod_air_agility_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 372 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 373 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.64 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = 1.28 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 374 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.08 }
            add_to_variable = { rl_mod_air_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.16 }
            add_to_variable = { rl_mod_air_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.32 }
            add_to_variable = { rl_mod_air_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.64 }
            add_to_variable = { rl_mod_air_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -1.28 }
            add_to_variable = { rl_mod_air_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 375 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
            add_to_variable = { rl_mod_air_defence_factor = -0.04 }
            add_to_variable = { rl_mod_air_agility_factor = -0.04 }
            add_to_variable = { rl_mod_air_range_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
            add_to_variable = { rl_mod_air_agility_factor = -0.08 }
            add_to_variable = { rl_mod_air_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
            add_to_variable = { rl_mod_air_agility_factor = -0.16 }
            add_to_variable = { rl_mod_air_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
            add_to_variable = { rl_mod_air_agility_factor = -0.32 }
            add_to_variable = { rl_mod_air_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
            add_to_variable = { rl_mod_air_agility_factor = -0.64 }
            add_to_variable = { rl_mod_air_range_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 376 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 377 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.07 }
            add_to_variable = { rl_mod_political_power_gain = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.14 }
            add_to_variable = { rl_mod_political_power_gain = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.28 }
            add_to_variable = { rl_mod_political_power_gain = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.56 }
            add_to_variable = { rl_mod_political_power_gain = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.12 }
            add_to_variable = { rl_mod_political_power_gain = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 378 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = -0.025 }
            add_to_variable = { rl_mod_war_support_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = -0.05 }
            add_to_variable = { rl_mod_war_support_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = -0.1 }
            add_to_variable = { rl_mod_war_support_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = -0.2 }
            add_to_variable = { rl_mod_war_support_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = -0.4 }
            add_to_variable = { rl_mod_war_support_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 379 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = -0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = -0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 380 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.004 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.008 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.016 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.032 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.064 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 381 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = -1 }
            add_to_variable = { rl_mod_decryption = -1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = -2 }
            add_to_variable = { rl_mod_decryption = -2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = -4 }
            add_to_variable = { rl_mod_decryption = -4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = -8 }
            add_to_variable = { rl_mod_decryption = -8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = -16 }
            add_to_variable = { rl_mod_decryption = -16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 384 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 385 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 386 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 388 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.003 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.006 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.012 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.024 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.048 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 389 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_core_forge_chance = -2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_core_forge_chance = -4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_core_forge_chance = -8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_core_forge_chance = -16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_core_forge_chance = -32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 397 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 398 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 399 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.05 }
            add_to_variable = { rl_mod_local_resources_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.1 }
            add_to_variable = { rl_mod_local_resources_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.2 }
            add_to_variable = { rl_mod_local_resources_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.4 }
            add_to_variable = { rl_mod_local_resources_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.8 }
            add_to_variable = { rl_mod_local_resources_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 400 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 401 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.035 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.07 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.14 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.28 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.56 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 402 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.04 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.08 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.16 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.32 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.64 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 403 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.06 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.12 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.24 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.48 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.96 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 404 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 405 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.05 }
            add_to_variable = { rl_mod_min_export = 0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.1 }
            add_to_variable = { rl_mod_min_export = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.2 }
            add_to_variable = { rl_mod_min_export = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.4 }
            add_to_variable = { rl_mod_min_export = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.8 }
            add_to_variable = { rl_mod_min_export = 0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 406 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 407 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.04 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.08 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.16 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.32 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.64 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 408 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.045 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.09 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.18 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.36 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.72 }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 409 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.08 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.16 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.32 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.64 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.28 }
            add_to_variable = { rl_mod_equipment_upgrade_xp_cost = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 410 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.05 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.1 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.2 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.4 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.8 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 411 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.08 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.16 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.32 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.64 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = -1.28 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 412 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.07 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.14 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.28 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.56 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = -1.12 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 413 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.08 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.16 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.32 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.64 }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = -1.28 }
            add_to_variable = { rl_mod_fuel_gain_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 414 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.1 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.2 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.4 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -0.8 }
            add_to_variable = { rl_mod_max_fuel_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_fuel_gain_factor = -1.6 }
            add_to_variable = { rl_mod_max_fuel_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 415 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.04 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.08 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.16 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.32 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.64 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 416 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.08 }
            add_to_variable = { rl_mod_army_speed_factor = -0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.16 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.32 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.64 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -1.28 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 417 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.05 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.1 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.2 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.4 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.8 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 418 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.1 }
            add_to_variable = { rl_mod_local_resources_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.2 }
            add_to_variable = { rl_mod_local_resources_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.4 }
            add_to_variable = { rl_mod_local_resources_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -0.8 }
            add_to_variable = { rl_mod_local_resources_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_infrastructure_factor = -1.6 }
            add_to_variable = { rl_mod_local_resources_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 419 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.05 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.1 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.2 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.4 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.8 }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 420 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.08 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.01 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.16 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.32 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.64 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -1.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 421 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.09 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.18 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.36 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.72 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -1.44 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 422 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.05 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.1 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.2 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.4 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_factory_start_efficiency_factor = -0.8 }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 423 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.1 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.2 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.4 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.8 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.6 }
            add_to_variable = { rl_mod_conversion_cost_civ_to_mil_factor = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 424 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.07 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.14 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.28 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.56 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 1.12 }
            add_to_variable = { rl_mod_repair_speed_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 425 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_min_export = 0.035 }
            add_to_variable = { rl_mod_local_resources_factor = -0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_min_export = 0.07 }
            add_to_variable = { rl_mod_local_resources_factor = -0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_min_export = 0.14 }
            add_to_variable = { rl_mod_local_resources_factor = -0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_min_export = 0.28 }
            add_to_variable = { rl_mod_local_resources_factor = -0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_min_export = 0.56 }
            add_to_variable = { rl_mod_local_resources_factor = -0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 426 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.018 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.036 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.072 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.144 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.288 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 427 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.05 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.1 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.2 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.4 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.8 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 428 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.06 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.12 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.24 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.48 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industry_air_damage_factor = 0.96 }
            add_to_variable = { rl_mod_production_speed_arms_factory_factor = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 429 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_production_speed_industrial_complex_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 430 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.045 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.09 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.18 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.36 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.72 }
            add_to_variable = { rl_mod_production_factory_efficiency_gain_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 431 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.12 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.24 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.48 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_fuel_factor = -0.96 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_fuel_factor = -1.92 }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 432 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.1 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.2 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.4 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_oil_factor = -0.8 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_oil_factor = -1.6 }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 433 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.08 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.16 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.32 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.64 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -1.28 }
            add_to_variable = { rl_mod_equipment_conversion_speed = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 434 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.1 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.2 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.4 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_repair_speed_factor = -0.8 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_repair_speed_factor = -1.6 }
            add_to_variable = { rl_mod_industry_free_repair_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 435 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -1.92 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 436 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_facility_factor = -1.6 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 437 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.1 }
            add_to_variable = { rl_mod_navy_org_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.2 }
            add_to_variable = { rl_mod_navy_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.4 }
            add_to_variable = { rl_mod_navy_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -0.8 }
            add_to_variable = { rl_mod_navy_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_dockyard_factor = -1.6 }
            add_to_variable = { rl_mod_navy_org_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 438 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.08 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.16 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.32 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -0.64 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_line_change_production_efficiency_factor = -1.28 }
            add_to_variable = { rl_mod_production_factory_max_efficiency_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 439 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_lack_of_resource_penalty_factor = 1.28 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 440 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.04 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.08 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.16 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.32 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.64 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 441 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.025 }
            add_to_variable = { rl_mod_army_defence_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_defence_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 442 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_planning_speed = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_planning_speed = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_planning_speed = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_planning_speed = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_planning_speed = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 443 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.96 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 444 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_speed_factor = -0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_speed_factor = -0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 445 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.045 }
            add_to_variable = { rl_mod_army_defence_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.09 }
            add_to_variable = { rl_mod_army_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.18 }
            add_to_variable = { rl_mod_army_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.36 }
            add_to_variable = { rl_mod_army_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.72 }
            add_to_variable = { rl_mod_army_defence_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 446 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.07 }
            add_to_variable = { rl_mod_max_planning_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.14 }
            add_to_variable = { rl_mod_max_planning_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.28 }
            add_to_variable = { rl_mod_max_planning_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.56 }
            add_to_variable = { rl_mod_max_planning_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -1.12 }
            add_to_variable = { rl_mod_max_planning_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 447 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.055 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.11 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.22 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.44 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.88 }
            add_to_variable = { rl_mod_army_artillery_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 448 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.05 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.1 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.2 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.4 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.8 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 449 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_dig_in_speed_factor = -1.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 450 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.06 }
            add_to_variable = { rl_mod_planning_speed = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.12 }
            add_to_variable = { rl_mod_planning_speed = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.24 }
            add_to_variable = { rl_mod_planning_speed = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.48 }
            add_to_variable = { rl_mod_planning_speed = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_max_planning_factor = -0.96 }
            add_to_variable = { rl_mod_planning_speed = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 451 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.12 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.24 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.48 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.96 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -1.92 }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 452 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.06 }
            add_to_variable = { rl_mod_max_command_power = -5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.12 }
            add_to_variable = { rl_mod_max_command_power = -10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.24 }
            add_to_variable = { rl_mod_max_command_power = -20 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.48 }
            add_to_variable = { rl_mod_max_command_power = -40 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.96 }
            add_to_variable = { rl_mod_max_command_power = -80 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 453 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.035 }
            add_to_variable = { rl_mod_army_org_regain = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.07 }
            add_to_variable = { rl_mod_army_org_regain = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.14 }
            add_to_variable = { rl_mod_army_org_regain = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.28 }
            add_to_variable = { rl_mod_army_org_regain = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.56 }
            add_to_variable = { rl_mod_army_org_regain = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 454 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
            add_to_variable = { rl_mod_army_org_regain = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
            add_to_variable = { rl_mod_army_org_regain = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
            add_to_variable = { rl_mod_army_org_regain = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
            add_to_variable = { rl_mod_army_org_regain = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = -0.8 }
            add_to_variable = { rl_mod_army_org_regain = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 455 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.045 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.09 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.18 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.36 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.72 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 456 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.035 }
            add_to_variable = { rl_mod_planning_speed = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.07 }
            add_to_variable = { rl_mod_planning_speed = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.14 }
            add_to_variable = { rl_mod_planning_speed = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.28 }
            add_to_variable = { rl_mod_planning_speed = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.56 }
            add_to_variable = { rl_mod_planning_speed = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 457 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.06 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.12 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.24 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.48 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.96 }
            add_to_variable = { rl_mod_out_of_supply_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 458 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.1 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.2 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.4 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.8 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.6 }
            add_to_variable = { rl_mod_experience_loss_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 459 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.08 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.16 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.32 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.64 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -0.64 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = 1.28 }
            add_to_variable = { rl_mod_experience_gain_army_unit_factor = -1.28 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 460 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.08 }
            add_to_variable = { rl_mod_army_org_regain = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.16 }
            add_to_variable = { rl_mod_army_org_regain = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.32 }
            add_to_variable = { rl_mod_army_org_regain = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_experience_loss_factor = 0.64 }
            add_to_variable = { rl_mod_army_org_regain = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_experience_loss_factor = 1.28 }
            add_to_variable = { rl_mod_army_org_regain = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 461 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.07 }
            add_to_variable = { rl_mod_max_planning_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.14 }
            add_to_variable = { rl_mod_max_planning_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.28 }
            add_to_variable = { rl_mod_max_planning_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.56 }
            add_to_variable = { rl_mod_max_planning_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -1.12 }
            add_to_variable = { rl_mod_max_planning_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 462 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.07 }
            add_to_variable = { rl_mod_armor_factor = -0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.14 }
            add_to_variable = { rl_mod_armor_factor = -0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.28 }
            add_to_variable = { rl_mod_armor_factor = -0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.56 }
            add_to_variable = { rl_mod_armor_factor = -0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -1.12 }
            add_to_variable = { rl_mod_armor_factor = -0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 463 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.055 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.11 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.22 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.44 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.88 }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 464 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.96 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 465 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.06 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.12 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.24 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.48 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.96 }
            add_to_variable = { rl_mod_mechanized_defence_factor = -0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 466 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.06 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.12 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.24 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.48 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.96 }
            add_to_variable = { rl_mod_motorized_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 467 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.05 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.04 }
            add_to_variable = { rl_mod_planning_speed = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.1 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.08 }
            add_to_variable = { rl_mod_planning_speed = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.2 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.16 }
            add_to_variable = { rl_mod_planning_speed = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.4 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.32 }
            add_to_variable = { rl_mod_planning_speed = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.8 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.64 }
            add_to_variable = { rl_mod_planning_speed = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 468 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_armor_factor = -0.06 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_armor_factor = -0.12 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_armor_factor = -0.24 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_armor_factor = -0.48 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_armor_factor = -0.96 }
            add_to_variable = { rl_mod_army_armor_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 469 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.06 }
            add_to_variable = { rl_mod_army_org_regain = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.12 }
            add_to_variable = { rl_mod_army_org_regain = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.24 }
            add_to_variable = { rl_mod_army_org_regain = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.48 }
            add_to_variable = { rl_mod_army_org_regain = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.96 }
            add_to_variable = { rl_mod_army_org_regain = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 470 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.07 }
            add_to_variable = { rl_mod_army_speed_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.14 }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.28 }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 0.56 }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_fuel_consumption_factor = 1.12 }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 471 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.07 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.14 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.28 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.56 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -1.12 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 472 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.08 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.16 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.32 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.64 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -1.28 }
            add_to_variable = { rl_mod_max_dig_in_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 473 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.065 }
            add_to_variable = { rl_mod_army_speed_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.13 }
            add_to_variable = { rl_mod_army_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.26 }
            add_to_variable = { rl_mod_army_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.52 }
            add_to_variable = { rl_mod_army_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -1.04 }
            add_to_variable = { rl_mod_army_speed_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 474 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.055 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.11 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.22 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.44 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.88 }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 475 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.06 }
            add_to_variable = { rl_mod_planning_speed = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.12 }
            add_to_variable = { rl_mod_planning_speed = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.24 }
            add_to_variable = { rl_mod_planning_speed = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.48 }
            add_to_variable = { rl_mod_planning_speed = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.96 }
            add_to_variable = { rl_mod_planning_speed = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 476 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.06 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.12 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.24 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.48 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_training_time_army_factor = 0.96 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 477 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.025 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.05 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.1 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.2 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_cap = -0.4 }
            add_to_variable = { rl_mod_special_forces_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 478 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.06 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.12 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.24 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.48 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_forces_defence_factor = -0.96 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 479 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_planning_speed = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_planning_speed = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_planning_speed = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_planning_speed = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_planning_speed = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 480 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_army_defence_factor = -0.04 }
            add_to_variable = { rl_mod_army_org_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_defence_factor = -0.08 }
            add_to_variable = { rl_mod_army_org_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_defence_factor = -0.16 }
            add_to_variable = { rl_mod_army_org_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_defence_factor = -0.32 }
            add_to_variable = { rl_mod_army_org_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_defence_factor = -0.64 }
            add_to_variable = { rl_mod_army_org_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 481 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.05 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.1 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.2 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.4 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_attack_factor = -0.8 }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 482 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.05 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.1 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.2 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.4 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_armor_attack_factor = -0.8 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 483 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.055 }
            add_to_variable = { rl_mod_army_org_regain = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.11 }
            add_to_variable = { rl_mod_army_org_regain = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.22 }
            add_to_variable = { rl_mod_army_org_regain = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.44 }
            add_to_variable = { rl_mod_army_org_regain = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_defence_factor = -0.88 }
            add_to_variable = { rl_mod_army_org_regain = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 484 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.055 }
            add_to_variable = { rl_mod_max_planning_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.11 }
            add_to_variable = { rl_mod_max_planning_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.22 }
            add_to_variable = { rl_mod_max_planning_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.44 }
            add_to_variable = { rl_mod_max_planning_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.88 }
            add_to_variable = { rl_mod_max_planning_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 485 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.035 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.045 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.07 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.09 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.14 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.18 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.28 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.36 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.56 }
            add_to_variable = { rl_mod_motorized_attack_factor = -0.72 }
            add_to_variable = { rl_mod_mechanized_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 486 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_attack_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_attack_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_attack_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_attack_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_artillery_attack_factor = -1.28 }
            add_to_variable = { rl_mod_army_attack_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 487 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.07 }
            add_to_variable = { rl_mod_army_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.14 }
            add_to_variable = { rl_mod_army_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.28 }
            add_to_variable = { rl_mod_army_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -0.56 }
            add_to_variable = { rl_mod_army_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_infantry_defence_factor = -1.12 }
            add_to_variable = { rl_mod_army_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 488 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.15 }
            add_to_variable = { rl_mod_max_command_power = -6 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.3 }
            add_to_variable = { rl_mod_max_command_power = -12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -0.6 }
            add_to_variable = { rl_mod_max_command_power = -24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -1.2 }
            add_to_variable = { rl_mod_max_command_power = -48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_terrain_trait_xp_gain_factor = -2.4 }
            add_to_variable = { rl_mod_max_command_power = -96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 489 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.1 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.2 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.4 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.8 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.6 }
            add_to_variable = { rl_mod_command_abilities_cost_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 490 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.04 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.025 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.08 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.05 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.16 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.1 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.32 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.2 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_speed_factor = -0.64 }
            add_to_variable = { rl_mod_land_reinforce_rate = -0.4 }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 491 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_agility_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_agility_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_agility_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_agility_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_air_agility_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 492 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.06 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.12 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.24 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.48 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.96 }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 493 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.055 }
            add_to_variable = { rl_mod_air_defence_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.11 }
            add_to_variable = { rl_mod_air_defence_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.22 }
            add_to_variable = { rl_mod_air_defence_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.44 }
            add_to_variable = { rl_mod_air_defence_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.88 }
            add_to_variable = { rl_mod_air_defence_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 494 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.06 }
            add_to_variable = { rl_mod_air_defence_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.12 }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.24 }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.48 }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.96 }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 495 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = -1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 496 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.07 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.14 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.28 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.56 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.12 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 497 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.075 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.15 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.3 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_agility_factor = -0.6 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_agility_factor = -1.2 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 498 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.09 }
            add_to_variable = { rl_mod_air_attack_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.18 }
            add_to_variable = { rl_mod_air_attack_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.36 }
            add_to_variable = { rl_mod_air_attack_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.72 }
            add_to_variable = { rl_mod_air_attack_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -1.44 }
            add_to_variable = { rl_mod_air_attack_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 499 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.09 }
            add_to_variable = { rl_mod_air_range_factor = -0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.18 }
            add_to_variable = { rl_mod_air_range_factor = -0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.36 }
            add_to_variable = { rl_mod_air_range_factor = -0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -0.72 }
            add_to_variable = { rl_mod_air_range_factor = -0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_escort_efficiency = -1.44 }
            add_to_variable = { rl_mod_air_range_factor = -0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 500 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.09 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.18 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.36 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.72 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_cas_efficiency = -1.44 }
            add_to_variable = { rl_mod_ground_attack_factor = -1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 501 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = -1.6 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 502 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.09 }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.18 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.36 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.72 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -1.44 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 503 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.08 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.16 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.32 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.64 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = 1.28 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 504 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.09 }
            add_to_variable = { rl_mod_air_agility_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.18 }
            add_to_variable = { rl_mod_air_agility_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.36 }
            add_to_variable = { rl_mod_air_agility_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.72 }
            add_to_variable = { rl_mod_air_agility_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = 1.44 }
            add_to_variable = { rl_mod_air_agility_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 505 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.12 }
            add_to_variable = { rl_mod_air_defence_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.24 }
            add_to_variable = { rl_mod_air_defence_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.48 }
            add_to_variable = { rl_mod_air_defence_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_accidents_factor = 0.96 }
            add_to_variable = { rl_mod_air_defence_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_accidents_factor = 1.92 }
            add_to_variable = { rl_mod_air_defence_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 506 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.08 }
            add_to_variable = { rl_mod_air_range_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.16 }
            add_to_variable = { rl_mod_air_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.32 }
            add_to_variable = { rl_mod_air_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.64 }
            add_to_variable = { rl_mod_air_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 1.28 }
            add_to_variable = { rl_mod_air_range_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 507 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.1 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.2 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.4 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.8 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -1.6 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 508 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.08 }
            add_to_variable = { rl_mod_air_defence_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.16 }
            add_to_variable = { rl_mod_air_defence_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.32 }
            add_to_variable = { rl_mod_air_defence_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.64 }
            add_to_variable = { rl_mod_air_defence_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = -1.28 }
            add_to_variable = { rl_mod_air_defence_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 509 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.07 }
            add_to_variable = { rl_mod_air_range_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.14 }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.28 }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.56 }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = -1.12 }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 510 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.07 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.14 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.28 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.56 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -1.12 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 511 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.06 }
            add_to_variable = { rl_mod_air_range_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.12 }
            add_to_variable = { rl_mod_air_range_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.24 }
            add_to_variable = { rl_mod_air_range_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.48 }
            add_to_variable = { rl_mod_air_range_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.96 }
            add_to_variable = { rl_mod_air_range_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 512 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.08 }
            add_to_variable = { rl_mod_air_agility_factor = -0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.16 }
            add_to_variable = { rl_mod_air_agility_factor = -0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.32 }
            add_to_variable = { rl_mod_air_agility_factor = -0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.64 }
            add_to_variable = { rl_mod_air_agility_factor = -0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -1.28 }
            add_to_variable = { rl_mod_air_agility_factor = -0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 513 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.07 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.14 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.28 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.56 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -1.12 }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 514 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.11 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.22 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.44 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_ground_attack_factor = -0.88 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_ground_attack_factor = -1.76 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 515 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_air_defence_factor = -0.05 }
            add_to_variable = { rl_mod_air_agility_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_air_defence_factor = -0.1 }
            add_to_variable = { rl_mod_air_agility_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_air_defence_factor = -0.2 }
            add_to_variable = { rl_mod_air_agility_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_air_defence_factor = -0.4 }
            add_to_variable = { rl_mod_air_agility_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_air_defence_factor = -0.8 }
            add_to_variable = { rl_mod_air_agility_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 516 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.08 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.16 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.32 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_defence_factor = -0.64 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_defence_factor = -1.28 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 517 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_range_factor = -0.12 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_range_factor = -0.24 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_range_factor = -0.48 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_range_factor = -0.96 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_range_factor = -1.92 }
            add_to_variable = { rl_mod_air_fuel_consumption_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 518 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.07 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.14 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.28 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.56 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_mission_efficiency = -1.12 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 519 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.07 }
            add_to_variable = { rl_mod_air_night_penalty = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.14 }
            add_to_variable = { rl_mod_air_night_penalty = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.28 }
            add_to_variable = { rl_mod_air_night_penalty = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_weather_penalty = 0.56 }
            add_to_variable = { rl_mod_air_night_penalty = 0.56 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_weather_penalty = 1.12 }
            add_to_variable = { rl_mod_air_night_penalty = 1.12 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 520 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.1 }
            add_to_variable = { rl_mod_air_range_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.2 }
            add_to_variable = { rl_mod_air_range_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.4 }
            add_to_variable = { rl_mod_air_range_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -0.8 }
            add_to_variable = { rl_mod_air_range_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_superiority_efficiency = -1.6 }
            add_to_variable = { rl_mod_air_range_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 521 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.24 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.48 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -0.96 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_production_speed_air_base_factor = -1.92 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 522 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.07 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.14 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.28 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -0.56 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_intercept_efficiency = -1.12 }
            add_to_variable = { rl_mod_air_maximum_speed_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 523 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.05 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.07 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.1 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.14 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.2 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.28 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.4 }
            add_to_variable = { rl_mod_ground_attack_factor = -0.56 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.8 }
            add_to_variable = { rl_mod_ground_attack_factor = -1.12 }
            add_to_variable = { rl_mod_air_cas_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 524 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.08 }
            add_to_variable = { rl_mod_air_weather_penalty = 0.08 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.16 }
            add_to_variable = { rl_mod_air_weather_penalty = 0.16 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.32 }
            add_to_variable = { rl_mod_air_weather_penalty = 0.32 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_night_penalty = 0.64 }
            add_to_variable = { rl_mod_air_weather_penalty = 0.64 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_night_penalty = 1.28 }
            add_to_variable = { rl_mod_air_weather_penalty = 1.28 }
            add_to_variable = { rl_mod_air_accidents_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 525 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.06 }
            add_to_variable = { rl_mod_air_defence_factor = -0.06 }
            add_to_variable = { rl_mod_air_range_factor = -0.07 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_air_defence_factor = -0.12 }
            add_to_variable = { rl_mod_air_range_factor = -0.14 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_air_defence_factor = -0.24 }
            add_to_variable = { rl_mod_air_range_factor = -0.28 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_air_defence_factor = -0.48 }
            add_to_variable = { rl_mod_air_range_factor = -0.56 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_air_defence_factor = -0.96 }
            add_to_variable = { rl_mod_air_range_factor = -1.12 }
            add_to_variable = { rl_mod_air_mission_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 526 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.08 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.16 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.32 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.64 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.28 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 527 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.055 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.11 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.22 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.44 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.88 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 528 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.09 }
            add_to_variable = { rl_mod_spotting_chance = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.18 }
            add_to_variable = { rl_mod_spotting_chance = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.36 }
            add_to_variable = { rl_mod_spotting_chance = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.72 }
            add_to_variable = { rl_mod_spotting_chance = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.44 }
            add_to_variable = { rl_mod_spotting_chance = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 529 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.08 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.16 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.32 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.64 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -1.28 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 530 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 531 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.06 }
            add_to_variable = { rl_mod_positioning = -0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.12 }
            add_to_variable = { rl_mod_positioning = -0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.24 }
            add_to_variable = { rl_mod_positioning = -0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.48 }
            add_to_variable = { rl_mod_positioning = -0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.96 }
            add_to_variable = { rl_mod_positioning = -0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 532 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.08 }
            add_to_variable = { rl_mod_screening_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.16 }
            add_to_variable = { rl_mod_screening_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.32 }
            add_to_variable = { rl_mod_screening_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.64 }
            add_to_variable = { rl_mod_screening_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -1.28 }
            add_to_variable = { rl_mod_screening_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 533 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.06 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.12 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.24 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.48 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.96 }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 534 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_positioning = -0.08 }
            add_to_variable = { rl_mod_screening_efficiency = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_positioning = -0.16 }
            add_to_variable = { rl_mod_screening_efficiency = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_positioning = -0.32 }
            add_to_variable = { rl_mod_screening_efficiency = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_positioning = -0.64 }
            add_to_variable = { rl_mod_screening_efficiency = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_positioning = -1.28 }
            add_to_variable = { rl_mod_screening_efficiency = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 535 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.11 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.22 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.44 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.88 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.76 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 536 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.07 }
            add_to_variable = { rl_mod_spotting_chance = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.14 }
            add_to_variable = { rl_mod_spotting_chance = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.28 }
            add_to_variable = { rl_mod_spotting_chance = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.56 }
            add_to_variable = { rl_mod_spotting_chance = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.12 }
            add_to_variable = { rl_mod_spotting_chance = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 537 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 538 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.12 }
            add_to_variable = { rl_mod_spotting_chance = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.24 }
            add_to_variable = { rl_mod_spotting_chance = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.48 }
            add_to_variable = { rl_mod_spotting_chance = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.96 }
            add_to_variable = { rl_mod_spotting_chance = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_max_range_factor = -1.92 }
            add_to_variable = { rl_mod_spotting_chance = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 539 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.09 }
            add_to_variable = { rl_mod_navy_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.18 }
            add_to_variable = { rl_mod_navy_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.36 }
            add_to_variable = { rl_mod_navy_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.72 }
            add_to_variable = { rl_mod_navy_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = -1.44 }
            add_to_variable = { rl_mod_navy_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 540 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.08 }
            add_to_variable = { rl_mod_navy_org_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.16 }
            add_to_variable = { rl_mod_navy_org_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.32 }
            add_to_variable = { rl_mod_navy_org_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.64 }
            add_to_variable = { rl_mod_navy_org_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = -1.28 }
            add_to_variable = { rl_mod_navy_org_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 541 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_anti_air_attack_factor = -1.92 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 542 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.09 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.045 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.18 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.09 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.36 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.18 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.72 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.36 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = -1.44 }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.72 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 543 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.09 }
            add_to_variable = { rl_mod_positioning = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.18 }
            add_to_variable = { rl_mod_positioning = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.36 }
            add_to_variable = { rl_mod_positioning = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.72 }
            add_to_variable = { rl_mod_positioning = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -1.44 }
            add_to_variable = { rl_mod_positioning = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 544 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.09 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.18 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.36 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.72 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -1.44 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 545 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.1 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.2 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.4 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.8 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.6 }
            add_to_variable = { rl_mod_navy_submarine_defence_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 546 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.055 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.11 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.22 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.44 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_speed_factor = -0.88 }
            add_to_variable = { rl_mod_navy_fuel_consumption_factor = 0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 547 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.12 }
            add_to_variable = { rl_mod_positioning = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.24 }
            add_to_variable = { rl_mod_positioning = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.48 }
            add_to_variable = { rl_mod_positioning = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.96 }
            add_to_variable = { rl_mod_positioning = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.92 }
            add_to_variable = { rl_mod_positioning = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 548 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.07 }
            add_to_variable = { rl_mod_navy_org_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.14 }
            add_to_variable = { rl_mod_navy_org_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.28 }
            add_to_variable = { rl_mod_navy_org_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.56 }
            add_to_variable = { rl_mod_navy_org_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.12 }
            add_to_variable = { rl_mod_navy_org_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 549 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.07 }
            add_to_variable = { rl_mod_positioning = -0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.14 }
            add_to_variable = { rl_mod_positioning = -0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.28 }
            add_to_variable = { rl_mod_positioning = -0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_morale_factor = -0.56 }
            add_to_variable = { rl_mod_positioning = -0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_morale_factor = -1.12 }
            add_to_variable = { rl_mod_positioning = -0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 550 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_org_factor = -0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_org_factor = -1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 551 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.07 }
            add_to_variable = { rl_mod_screening_efficiency = -0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.14 }
            add_to_variable = { rl_mod_screening_efficiency = -0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.28 }
            add_to_variable = { rl_mod_screening_efficiency = -0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.56 }
            add_to_variable = { rl_mod_screening_efficiency = -0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -1.12 }
            add_to_variable = { rl_mod_screening_efficiency = -0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 552 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.06 }
            add_to_variable = { rl_mod_spotting_chance = -0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.12 }
            add_to_variable = { rl_mod_spotting_chance = -0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.24 }
            add_to_variable = { rl_mod_spotting_chance = -0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.48 }
            add_to_variable = { rl_mod_spotting_chance = -0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_screen_attack_factor = -0.96 }
            add_to_variable = { rl_mod_spotting_chance = -0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 553 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.11 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.22 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.44 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.88 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.76 }
            add_to_variable = { rl_mod_navy_max_range_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 554 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_submarine_attack_factor = -1.28 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 555 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_spotting_chance = -0.08 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.04 }
            add_to_variable = { rl_mod_positioning = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_spotting_chance = -0.16 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.08 }
            add_to_variable = { rl_mod_positioning = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_spotting_chance = -0.32 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.16 }
            add_to_variable = { rl_mod_positioning = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_spotting_chance = -0.64 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.32 }
            add_to_variable = { rl_mod_positioning = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_spotting_chance = -1.28 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.64 }
            add_to_variable = { rl_mod_positioning = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 556 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.07 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.055 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.14 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.11 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.28 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.22 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_defense_factor = -0.56 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.44 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_defense_factor = -1.12 }
            add_to_variable = { rl_mod_naval_morale_factor = -0.88 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 557 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.1 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.2 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.4 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -0.8 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_navy_capital_ship_attack_factor = -1.6 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 558 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.065 }
            add_to_variable = { rl_mod_spotting_chance = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.13 }
            add_to_variable = { rl_mod_spotting_chance = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.26 }
            add_to_variable = { rl_mod_spotting_chance = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.52 }
            add_to_variable = { rl_mod_spotting_chance = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -1.04 }
            add_to_variable = { rl_mod_spotting_chance = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 559 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.1 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.2 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.4 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_screening_efficiency = -0.8 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_screening_efficiency = -1.6 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 560 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.06 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.06 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.035 }
            add_to_variable = { rl_mod_positioning = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.12 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.12 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.07 }
            add_to_variable = { rl_mod_positioning = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.24 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.24 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.14 }
            add_to_variable = { rl_mod_positioning = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.48 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.48 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.28 }
            add_to_variable = { rl_mod_positioning = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_naval_damage_factor = -0.96 }
            add_to_variable = { rl_mod_naval_defense_factor = -0.96 }
            add_to_variable = { rl_mod_naval_speed_factor = -0.56 }
            add_to_variable = { rl_mod_positioning = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 561 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
            add_to_variable = { rl_mod_political_power_gain = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
            add_to_variable = { rl_mod_political_power_gain = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
            add_to_variable = { rl_mod_political_power_gain = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
            add_to_variable = { rl_mod_political_power_gain = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -0.96 }
            add_to_variable = { rl_mod_political_power_gain = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 562 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
            add_to_variable = { rl_mod_stability_factor = -0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
            add_to_variable = { rl_mod_stability_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
            add_to_variable = { rl_mod_stability_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
            add_to_variable = { rl_mod_stability_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.28 }
            add_to_variable = { rl_mod_stability_factor = -0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 563 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = -0.035 }
            add_to_variable = { rl_mod_war_support_factor = -0.015 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = -0.07 }
            add_to_variable = { rl_mod_war_support_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = -0.14 }
            add_to_variable = { rl_mod_war_support_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = -0.28 }
            add_to_variable = { rl_mod_war_support_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = -0.56 }
            add_to_variable = { rl_mod_war_support_factor = -0.24 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 564 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = -0.04 }
            add_to_variable = { rl_mod_political_power_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = -0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = -0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = -0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = -0.64 }
            add_to_variable = { rl_mod_political_power_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 565 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.1 }
            add_to_variable = { rl_mod_decryption = -1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.2 }
            add_to_variable = { rl_mod_decryption = -2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.4 }
            add_to_variable = { rl_mod_decryption = -4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.8 }
            add_to_variable = { rl_mod_decryption = -8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -1.6 }
            add_to_variable = { rl_mod_decryption = -16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 566 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = -1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = -2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = -4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = -8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = -16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 567 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_decryption = -1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_decryption = -2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_decryption = -4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_decryption = -8 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_decryption = -16 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 568 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.12 }
            add_to_variable = { rl_mod_encryption = -1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.24 }
            add_to_variable = { rl_mod_encryption = -2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.48 }
            add_to_variable = { rl_mod_encryption = -4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.96 }
            add_to_variable = { rl_mod_encryption = -8 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -1.92 }
            add_to_variable = { rl_mod_encryption = -16 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 569 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.006 }
            add_to_variable = { rl_mod_resistance_target = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.012 }
            add_to_variable = { rl_mod_resistance_target = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.024 }
            add_to_variable = { rl_mod_resistance_target = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.048 }
            add_to_variable = { rl_mod_resistance_target = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.096 }
            add_to_variable = { rl_mod_resistance_target = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 570 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_resistance_target = 0.08 }
            add_to_variable = { rl_mod_compliance_gain = -0.003 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_resistance_target = 0.16 }
            add_to_variable = { rl_mod_compliance_gain = -0.006 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_resistance_target = 0.32 }
            add_to_variable = { rl_mod_compliance_gain = -0.012 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_resistance_target = 0.64 }
            add_to_variable = { rl_mod_compliance_gain = -0.024 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_resistance_target = 1.28 }
            add_to_variable = { rl_mod_compliance_gain = -0.048 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 571 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.008 }
            add_to_variable = { rl_mod_political_power_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.016 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.032 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.064 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.128 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 572 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.005 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.01 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.02 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.04 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.08 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 573 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.055 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.11 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.22 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.44 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.88 }
            add_to_variable = { rl_mod_production_speed_facility_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 574 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.1 }
            add_to_variable = { rl_mod_research_speed_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.2 }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.4 }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.8 }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -1.6 }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 575 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.07 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.14 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.28 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.56 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -1.12 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 576 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_encryption = -1 }
            add_to_variable = { rl_mod_decryption = -1 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_encryption = -2 }
            add_to_variable = { rl_mod_decryption = -2 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_encryption = -4 }
            add_to_variable = { rl_mod_decryption = -4 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_encryption = -8 }
            add_to_variable = { rl_mod_decryption = -8 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_encryption = -16 }
            add_to_variable = { rl_mod_decryption = -16 }
            add_to_variable = { rl_mod_intel_from_operatives_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 577 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.07 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.012 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.14 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.024 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.28 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.048 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.56 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.096 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -1.12 }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.192 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 578 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_stability_factor = -0.025 }
            add_to_variable = { rl_mod_resistance_target = 0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_stability_factor = -0.05 }
            add_to_variable = { rl_mod_resistance_target = 0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_stability_factor = -0.1 }
            add_to_variable = { rl_mod_resistance_target = 0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_stability_factor = -0.2 }
            add_to_variable = { rl_mod_resistance_target = 0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_stability_factor = -0.4 }
            add_to_variable = { rl_mod_resistance_target = 0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 579 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = -0.035 }
            add_to_variable = { rl_mod_stability_factor = -0.025 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = -0.07 }
            add_to_variable = { rl_mod_stability_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = -0.14 }
            add_to_variable = { rl_mod_stability_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = -0.28 }
            add_to_variable = { rl_mod_stability_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = -0.56 }
            add_to_variable = { rl_mod_stability_factor = -0.4 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 580 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.08 }
            add_to_variable = { rl_mod_political_power_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.16 }
            add_to_variable = { rl_mod_political_power_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.32 }
            add_to_variable = { rl_mod_political_power_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.64 }
            add_to_variable = { rl_mod_political_power_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -1.28 }
            add_to_variable = { rl_mod_political_power_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 581 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 582 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_equipment_capture_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 583 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.05 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.1 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.4 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_local_resources_factor = -0.8 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 584 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_war_support_factor = -0.02 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_war_support_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_war_support_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_war_support_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_war_support_factor = -0.32 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 585 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_org_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_org_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_org_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_org_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_org_factor = -0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 586 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 587 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.05 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.1 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.2 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.4 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.8 }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 588 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.004 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.008 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.016 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.032 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.064 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 589 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_resistance_target = 0.04 }
            add_to_variable = { rl_core_forge_chance = -2 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_resistance_target = 0.08 }
            add_to_variable = { rl_core_forge_chance = -5 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_resistance_target = 0.16 }
            add_to_variable = { rl_core_forge_chance = -10 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_resistance_target = 0.32 }
            add_to_variable = { rl_core_forge_chance = -25 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_resistance_target = 0.64 }
            add_to_variable = { rl_core_forge_chance = -60 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 590 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_special_project_speed_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 591 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_command_power_gain_mult = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 592 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_political_power_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_political_power_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_political_power_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_political_power_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_political_power_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 593 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 594 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_supply_consumption_factor = 0.48 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 595 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_industrial_capacity_dockyard = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 596 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_compliance_gain = -0.006 }
            add_to_variable = { rl_mod_resistance_target = 0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_compliance_gain = -0.012 }
            add_to_variable = { rl_mod_resistance_target = 0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_compliance_gain = -0.024 }
            add_to_variable = { rl_mod_resistance_target = 0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_compliance_gain = -0.048 }
            add_to_variable = { rl_mod_resistance_target = 0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_compliance_gain = -0.096 }
            add_to_variable = { rl_mod_resistance_target = 0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 597 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.48 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_research_speed_factor = -0.96 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 598 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.035 }
            add_to_variable = { rl_mod_army_defence_factor = -0.035 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.07 }
            add_to_variable = { rl_mod_army_defence_factor = -0.07 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.14 }
            add_to_variable = { rl_mod_army_defence_factor = -0.14 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.28 }
            add_to_variable = { rl_mod_army_defence_factor = -0.28 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.56 }
            add_to_variable = { rl_mod_army_defence_factor = -0.56 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 599 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.02 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.04 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.04 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.08 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.08 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.16 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.16 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.32 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_consumer_goods_factor = 0.32 }
            add_to_variable = { rl_mod_production_speed_buildings_factor = -0.64 }
        }
    }
    else_if = {
        limit = { check_variable = { rl_selected_id = 600 } }
        if = {
            limit = { check_variable = { rl_selected_rarity = 1 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.04 }
            add_to_variable = { rl_mod_army_defence_factor = -0.04 }
            add_to_variable = { rl_mod_air_attack_factor = -0.04 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.04 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.04 }
            add_to_variable = { rl_mod_research_speed_factor = -0.03 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 2 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.08 }
            add_to_variable = { rl_mod_army_defence_factor = -0.08 }
            add_to_variable = { rl_mod_air_attack_factor = -0.08 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.08 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.08 }
            add_to_variable = { rl_mod_research_speed_factor = -0.06 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 3 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.16 }
            add_to_variable = { rl_mod_army_defence_factor = -0.16 }
            add_to_variable = { rl_mod_air_attack_factor = -0.16 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.16 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.16 }
            add_to_variable = { rl_mod_research_speed_factor = -0.12 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 4 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.32 }
            add_to_variable = { rl_mod_army_defence_factor = -0.32 }
            add_to_variable = { rl_mod_air_attack_factor = -0.32 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.32 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.32 }
            add_to_variable = { rl_mod_research_speed_factor = -0.24 }
        }
        else_if = {
            limit = { check_variable = { rl_selected_rarity = 5 } }
            add_to_variable = { rl_mod_army_attack_factor = -0.64 }
            add_to_variable = { rl_mod_army_defence_factor = -0.64 }
            add_to_variable = { rl_mod_air_attack_factor = -0.64 }
            add_to_variable = { rl_mod_naval_damage_factor = -0.64 }
            add_to_variable = { rl_mod_industrial_capacity_factory = -0.64 }
            add_to_variable = { rl_mod_research_speed_factor = -0.48 }
        }
    }
    rl_remove_cross_category_curse = yes
    if = { limit = { check_variable = { rl_core_forge_chance < 0 } } set_variable = { rl_core_forge_chance = 0 } }
    force_update_dynamic_modifier = yes
}

rl_hc_decrement_selected_category = {
    if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 1 }
            check_variable = { rl_selected_id = 2 }
            check_variable = { rl_selected_id = 3 }
            check_variable = { rl_selected_id = 4 }
            check_variable = { rl_selected_id = 5 }
            check_variable = { rl_selected_id = 7 }
            check_variable = { rl_selected_id = 8 }
            check_variable = { rl_selected_id = 9 }
            check_variable = { rl_selected_id = 10 }
            check_variable = { rl_selected_id = 11 }
            check_variable = { rl_selected_id = 12 }
            check_variable = { rl_selected_id = 13 }
            check_variable = { rl_selected_id = 14 }
            check_variable = { rl_selected_id = 15 }
            check_variable = { rl_selected_id = 16 }
            check_variable = { rl_selected_id = 17 }
            check_variable = { rl_selected_id = 18 }
            check_variable = { rl_selected_id = 19 }
            check_variable = { rl_selected_id = 20 }
            check_variable = { rl_selected_id = 21 }
            check_variable = { rl_selected_id = 22 }
            check_variable = { rl_selected_id = 23 }
            check_variable = { rl_selected_id = 24 }
            check_variable = { rl_selected_id = 25 }
            check_variable = { rl_selected_id = 101 }
            check_variable = { rl_selected_id = 102 }
            check_variable = { rl_selected_id = 103 }
            check_variable = { rl_selected_id = 104 }
            check_variable = { rl_selected_id = 105 }
            check_variable = { rl_selected_id = 107 }
            check_variable = { rl_selected_id = 108 }
            check_variable = { rl_selected_id = 109 }
            check_variable = { rl_selected_id = 110 }
            check_variable = { rl_selected_id = 113 }
            check_variable = { rl_selected_id = 114 }
            check_variable = { rl_selected_id = 115 }
            check_variable = { rl_selected_id = 116 }
            check_variable = { rl_selected_id = 195 }
            check_variable = { rl_selected_id = 199 }
            check_variable = { rl_selected_id = 201 }
            check_variable = { rl_selected_id = 202 }
            check_variable = { rl_selected_id = 203 }
            check_variable = { rl_selected_id = 204 }
            check_variable = { rl_selected_id = 205 }
            check_variable = { rl_selected_id = 206 }
            check_variable = { rl_selected_id = 207 }
            check_variable = { rl_selected_id = 208 }
            check_variable = { rl_selected_id = 209 }
            check_variable = { rl_selected_id = 211 }
            check_variable = { rl_selected_id = 212 }
            check_variable = { rl_selected_id = 213 }
            check_variable = { rl_selected_id = 214 }
            check_variable = { rl_selected_id = 215 }
            check_variable = { rl_selected_id = 216 }
            check_variable = { rl_selected_id = 217 }
            check_variable = { rl_selected_id = 218 }
            check_variable = { rl_selected_id = 220 }
            check_variable = { rl_selected_id = 221 }
            check_variable = { rl_selected_id = 222 }
            check_variable = { rl_selected_id = 223 }
            check_variable = { rl_selected_id = 224 }
            check_variable = { rl_selected_id = 225 }
            check_variable = { rl_selected_id = 226 }
            check_variable = { rl_selected_id = 227 }
            check_variable = { rl_selected_id = 228 }
            check_variable = { rl_selected_id = 229 }
            check_variable = { rl_selected_id = 230 }
            check_variable = { rl_selected_id = 231 }
            check_variable = { rl_selected_id = 233 }
            check_variable = { rl_selected_id = 234 }
            check_variable = { rl_selected_id = 235 }
            check_variable = { rl_selected_id = 237 }
            check_variable = { rl_selected_id = 238 }
            check_variable = { rl_selected_id = 239 }
            check_variable = { rl_selected_id = 240 }
            check_variable = { rl_selected_id = 395 }
            check_variable = { rl_selected_id = 396 }
            check_variable = { rl_selected_id = 399 }
            check_variable = { rl_selected_id = 401 }
            check_variable = { rl_selected_id = 402 }
            check_variable = { rl_selected_id = 403 }
            check_variable = { rl_selected_id = 404 }
            check_variable = { rl_selected_id = 405 }
            check_variable = { rl_selected_id = 406 }
            check_variable = { rl_selected_id = 407 }
            check_variable = { rl_selected_id = 408 }
            check_variable = { rl_selected_id = 410 }
            check_variable = { rl_selected_id = 411 }
            check_variable = { rl_selected_id = 412 }
            check_variable = { rl_selected_id = 413 }
            check_variable = { rl_selected_id = 414 }
            check_variable = { rl_selected_id = 416 }
            check_variable = { rl_selected_id = 418 }
            check_variable = { rl_selected_id = 419 }
            check_variable = { rl_selected_id = 420 }
            check_variable = { rl_selected_id = 421 }
            check_variable = { rl_selected_id = 422 }
            check_variable = { rl_selected_id = 423 }
            check_variable = { rl_selected_id = 424 }
            check_variable = { rl_selected_id = 425 }
            check_variable = { rl_selected_id = 426 }
            check_variable = { rl_selected_id = 427 }
            check_variable = { rl_selected_id = 428 }
            check_variable = { rl_selected_id = 429 }
            check_variable = { rl_selected_id = 430 }
            check_variable = { rl_selected_id = 432 }
            check_variable = { rl_selected_id = 434 }
            check_variable = { rl_selected_id = 436 }
            check_variable = { rl_selected_id = 438 }
            check_variable = { rl_selected_id = 439 }
            check_variable = { rl_selected_id = 440 }
            check_variable = { rl_selected_id = 573 }
            check_variable = { rl_selected_id = 577 }
            check_variable = { rl_selected_id = 581 }
            check_variable = { rl_selected_id = 583 }
            check_variable = { rl_selected_id = 595 }
            check_variable = { rl_selected_id = 599 }
        } }
        add_to_variable = { rl_cat_industry = -1 }
        if = { limit = { check_variable = { rl_cat_industry < 0 } } set_variable = { rl_cat_industry = 0 } }
    }
    else_if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 26 }
            check_variable = { rl_selected_id = 27 }
            check_variable = { rl_selected_id = 28 }
            check_variable = { rl_selected_id = 29 }
            check_variable = { rl_selected_id = 30 }
            check_variable = { rl_selected_id = 32 }
            check_variable = { rl_selected_id = 33 }
            check_variable = { rl_selected_id = 34 }
            check_variable = { rl_selected_id = 35 }
            check_variable = { rl_selected_id = 42 }
            check_variable = { rl_selected_id = 43 }
            check_variable = { rl_selected_id = 44 }
            check_variable = { rl_selected_id = 49 }
            check_variable = { rl_selected_id = 50 }
            check_variable = { rl_selected_id = 51 }
            check_variable = { rl_selected_id = 52 }
            check_variable = { rl_selected_id = 53 }
            check_variable = { rl_selected_id = 54 }
            check_variable = { rl_selected_id = 55 }
            check_variable = { rl_selected_id = 56 }
            check_variable = { rl_selected_id = 57 }
            check_variable = { rl_selected_id = 58 }
            check_variable = { rl_selected_id = 59 }
            check_variable = { rl_selected_id = 60 }
            check_variable = { rl_selected_id = 97 }
            check_variable = { rl_selected_id = 111 }
            check_variable = { rl_selected_id = 112 }
            check_variable = { rl_selected_id = 117 }
            check_variable = { rl_selected_id = 118 }
            check_variable = { rl_selected_id = 121 }
            check_variable = { rl_selected_id = 122 }
            check_variable = { rl_selected_id = 123 }
            check_variable = { rl_selected_id = 124 }
            check_variable = { rl_selected_id = 125 }
            check_variable = { rl_selected_id = 126 }
            check_variable = { rl_selected_id = 127 }
            check_variable = { rl_selected_id = 128 }
            check_variable = { rl_selected_id = 129 }
            check_variable = { rl_selected_id = 130 }
            check_variable = { rl_selected_id = 131 }
            check_variable = { rl_selected_id = 132 }
            check_variable = { rl_selected_id = 133 }
            check_variable = { rl_selected_id = 134 }
            check_variable = { rl_selected_id = 135 }
            check_variable = { rl_selected_id = 137 }
            check_variable = { rl_selected_id = 138 }
            check_variable = { rl_selected_id = 139 }
            check_variable = { rl_selected_id = 140 }
            check_variable = { rl_selected_id = 149 }
            check_variable = { rl_selected_id = 150 }
            check_variable = { rl_selected_id = 151 }
            check_variable = { rl_selected_id = 154 }
            check_variable = { rl_selected_id = 191 }
            check_variable = { rl_selected_id = 192 }
            check_variable = { rl_selected_id = 197 }
            check_variable = { rl_selected_id = 219 }
            check_variable = { rl_selected_id = 241 }
            check_variable = { rl_selected_id = 242 }
            check_variable = { rl_selected_id = 243 }
            check_variable = { rl_selected_id = 244 }
            check_variable = { rl_selected_id = 245 }
            check_variable = { rl_selected_id = 248 }
            check_variable = { rl_selected_id = 249 }
            check_variable = { rl_selected_id = 250 }
            check_variable = { rl_selected_id = 251 }
            check_variable = { rl_selected_id = 252 }
            check_variable = { rl_selected_id = 253 }
            check_variable = { rl_selected_id = 254 }
            check_variable = { rl_selected_id = 255 }
            check_variable = { rl_selected_id = 256 }
            check_variable = { rl_selected_id = 257 }
            check_variable = { rl_selected_id = 258 }
            check_variable = { rl_selected_id = 259 }
            check_variable = { rl_selected_id = 260 }
            check_variable = { rl_selected_id = 261 }
            check_variable = { rl_selected_id = 262 }
            check_variable = { rl_selected_id = 263 }
            check_variable = { rl_selected_id = 264 }
            check_variable = { rl_selected_id = 265 }
            check_variable = { rl_selected_id = 266 }
            check_variable = { rl_selected_id = 267 }
            check_variable = { rl_selected_id = 268 }
            check_variable = { rl_selected_id = 269 }
            check_variable = { rl_selected_id = 270 }
            check_variable = { rl_selected_id = 271 }
            check_variable = { rl_selected_id = 272 }
            check_variable = { rl_selected_id = 273 }
            check_variable = { rl_selected_id = 274 }
            check_variable = { rl_selected_id = 275 }
            check_variable = { rl_selected_id = 276 }
            check_variable = { rl_selected_id = 278 }
            check_variable = { rl_selected_id = 279 }
            check_variable = { rl_selected_id = 280 }
            check_variable = { rl_selected_id = 281 }
            check_variable = { rl_selected_id = 282 }
            check_variable = { rl_selected_id = 283 }
            check_variable = { rl_selected_id = 284 }
            check_variable = { rl_selected_id = 285 }
            check_variable = { rl_selected_id = 294 }
            check_variable = { rl_selected_id = 296 }
            check_variable = { rl_selected_id = 297 }
            check_variable = { rl_selected_id = 298 }
            check_variable = { rl_selected_id = 299 }
            check_variable = { rl_selected_id = 300 }
            check_variable = { rl_selected_id = 301 }
            check_variable = { rl_selected_id = 309 }
            check_variable = { rl_selected_id = 315 }
            check_variable = { rl_selected_id = 332 }
            check_variable = { rl_selected_id = 333 }
            check_variable = { rl_selected_id = 362 }
            check_variable = { rl_selected_id = 379 }
            check_variable = { rl_selected_id = 390 }
            check_variable = { rl_selected_id = 391 }
            check_variable = { rl_selected_id = 394 }
            check_variable = { rl_selected_id = 397 }
            check_variable = { rl_selected_id = 409 }
            check_variable = { rl_selected_id = 415 }
            check_variable = { rl_selected_id = 417 }
            check_variable = { rl_selected_id = 431 }
            check_variable = { rl_selected_id = 433 }
            check_variable = { rl_selected_id = 441 }
            check_variable = { rl_selected_id = 442 }
            check_variable = { rl_selected_id = 443 }
            check_variable = { rl_selected_id = 444 }
            check_variable = { rl_selected_id = 445 }
            check_variable = { rl_selected_id = 446 }
            check_variable = { rl_selected_id = 447 }
            check_variable = { rl_selected_id = 448 }
            check_variable = { rl_selected_id = 451 }
            check_variable = { rl_selected_id = 452 }
            check_variable = { rl_selected_id = 453 }
            check_variable = { rl_selected_id = 454 }
            check_variable = { rl_selected_id = 455 }
            check_variable = { rl_selected_id = 456 }
            check_variable = { rl_selected_id = 457 }
            check_variable = { rl_selected_id = 458 }
            check_variable = { rl_selected_id = 459 }
            check_variable = { rl_selected_id = 460 }
            check_variable = { rl_selected_id = 470 }
            check_variable = { rl_selected_id = 471 }
            check_variable = { rl_selected_id = 472 }
            check_variable = { rl_selected_id = 473 }
            check_variable = { rl_selected_id = 474 }
            check_variable = { rl_selected_id = 475 }
            check_variable = { rl_selected_id = 476 }
            check_variable = { rl_selected_id = 477 }
            check_variable = { rl_selected_id = 478 }
            check_variable = { rl_selected_id = 479 }
            check_variable = { rl_selected_id = 480 }
            check_variable = { rl_selected_id = 481 }
            check_variable = { rl_selected_id = 483 }
            check_variable = { rl_selected_id = 484 }
            check_variable = { rl_selected_id = 486 }
            check_variable = { rl_selected_id = 487 }
            check_variable = { rl_selected_id = 488 }
            check_variable = { rl_selected_id = 489 }
            check_variable = { rl_selected_id = 490 }
            check_variable = { rl_selected_id = 580 }
            check_variable = { rl_selected_id = 582 }
            check_variable = { rl_selected_id = 584 }
            check_variable = { rl_selected_id = 585 }
            check_variable = { rl_selected_id = 594 }
            check_variable = { rl_selected_id = 598 }
            check_variable = { rl_selected_id = 600 }
        } }
        add_to_variable = { rl_cat_army = -1 }
        if = { limit = { check_variable = { rl_cat_army < 0 } } set_variable = { rl_cat_army = 0 } }
    }
    else_if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 31 }
            check_variable = { rl_selected_id = 36 }
            check_variable = { rl_selected_id = 37 }
            check_variable = { rl_selected_id = 38 }
            check_variable = { rl_selected_id = 39 }
            check_variable = { rl_selected_id = 40 }
            check_variable = { rl_selected_id = 41 }
            check_variable = { rl_selected_id = 119 }
            check_variable = { rl_selected_id = 136 }
            check_variable = { rl_selected_id = 141 }
            check_variable = { rl_selected_id = 142 }
            check_variable = { rl_selected_id = 143 }
            check_variable = { rl_selected_id = 144 }
            check_variable = { rl_selected_id = 145 }
            check_variable = { rl_selected_id = 146 }
            check_variable = { rl_selected_id = 147 }
            check_variable = { rl_selected_id = 148 }
            check_variable = { rl_selected_id = 152 }
            check_variable = { rl_selected_id = 153 }
            check_variable = { rl_selected_id = 155 }
            check_variable = { rl_selected_id = 286 }
            check_variable = { rl_selected_id = 287 }
            check_variable = { rl_selected_id = 288 }
            check_variable = { rl_selected_id = 289 }
            check_variable = { rl_selected_id = 290 }
            check_variable = { rl_selected_id = 291 }
            check_variable = { rl_selected_id = 292 }
            check_variable = { rl_selected_id = 293 }
            check_variable = { rl_selected_id = 295 }
            check_variable = { rl_selected_id = 302 }
            check_variable = { rl_selected_id = 303 }
            check_variable = { rl_selected_id = 304 }
            check_variable = { rl_selected_id = 305 }
            check_variable = { rl_selected_id = 306 }
            check_variable = { rl_selected_id = 307 }
            check_variable = { rl_selected_id = 308 }
            check_variable = { rl_selected_id = 310 }
            check_variable = { rl_selected_id = 311 }
            check_variable = { rl_selected_id = 312 }
            check_variable = { rl_selected_id = 313 }
            check_variable = { rl_selected_id = 314 }
            check_variable = { rl_selected_id = 461 }
            check_variable = { rl_selected_id = 462 }
            check_variable = { rl_selected_id = 463 }
            check_variable = { rl_selected_id = 464 }
            check_variable = { rl_selected_id = 465 }
            check_variable = { rl_selected_id = 466 }
            check_variable = { rl_selected_id = 467 }
            check_variable = { rl_selected_id = 468 }
            check_variable = { rl_selected_id = 469 }
            check_variable = { rl_selected_id = 482 }
            check_variable = { rl_selected_id = 485 }
        } }
        add_to_variable = { rl_cat_armor = -1 }
        if = { limit = { check_variable = { rl_cat_armor < 0 } } set_variable = { rl_cat_armor = 0 } }
    }
    else_if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 76 }
            check_variable = { rl_selected_id = 77 }
            check_variable = { rl_selected_id = 78 }
            check_variable = { rl_selected_id = 79 }
            check_variable = { rl_selected_id = 80 }
            check_variable = { rl_selected_id = 81 }
            check_variable = { rl_selected_id = 82 }
            check_variable = { rl_selected_id = 83 }
            check_variable = { rl_selected_id = 84 }
            check_variable = { rl_selected_id = 85 }
            check_variable = { rl_selected_id = 86 }
            check_variable = { rl_selected_id = 87 }
            check_variable = { rl_selected_id = 88 }
            check_variable = { rl_selected_id = 89 }
            check_variable = { rl_selected_id = 90 }
            check_variable = { rl_selected_id = 106 }
            check_variable = { rl_selected_id = 163 }
            check_variable = { rl_selected_id = 171 }
            check_variable = { rl_selected_id = 172 }
            check_variable = { rl_selected_id = 173 }
            check_variable = { rl_selected_id = 174 }
            check_variable = { rl_selected_id = 175 }
            check_variable = { rl_selected_id = 176 }
            check_variable = { rl_selected_id = 177 }
            check_variable = { rl_selected_id = 178 }
            check_variable = { rl_selected_id = 179 }
            check_variable = { rl_selected_id = 180 }
            check_variable = { rl_selected_id = 181 }
            check_variable = { rl_selected_id = 182 }
            check_variable = { rl_selected_id = 183 }
            check_variable = { rl_selected_id = 184 }
            check_variable = { rl_selected_id = 185 }
            check_variable = { rl_selected_id = 198 }
            check_variable = { rl_selected_id = 210 }
            check_variable = { rl_selected_id = 232 }
            check_variable = { rl_selected_id = 346 }
            check_variable = { rl_selected_id = 347 }
            check_variable = { rl_selected_id = 348 }
            check_variable = { rl_selected_id = 349 }
            check_variable = { rl_selected_id = 350 }
            check_variable = { rl_selected_id = 351 }
            check_variable = { rl_selected_id = 352 }
            check_variable = { rl_selected_id = 353 }
            check_variable = { rl_selected_id = 354 }
            check_variable = { rl_selected_id = 355 }
            check_variable = { rl_selected_id = 356 }
            check_variable = { rl_selected_id = 357 }
            check_variable = { rl_selected_id = 358 }
            check_variable = { rl_selected_id = 359 }
            check_variable = { rl_selected_id = 360 }
            check_variable = { rl_selected_id = 361 }
            check_variable = { rl_selected_id = 363 }
            check_variable = { rl_selected_id = 364 }
            check_variable = { rl_selected_id = 365 }
            check_variable = { rl_selected_id = 366 }
            check_variable = { rl_selected_id = 367 }
            check_variable = { rl_selected_id = 368 }
            check_variable = { rl_selected_id = 369 }
            check_variable = { rl_selected_id = 370 }
            check_variable = { rl_selected_id = 371 }
            check_variable = { rl_selected_id = 372 }
            check_variable = { rl_selected_id = 373 }
            check_variable = { rl_selected_id = 374 }
            check_variable = { rl_selected_id = 375 }
            check_variable = { rl_selected_id = 400 }
            check_variable = { rl_selected_id = 435 }
            check_variable = { rl_selected_id = 491 }
            check_variable = { rl_selected_id = 492 }
            check_variable = { rl_selected_id = 493 }
            check_variable = { rl_selected_id = 494 }
            check_variable = { rl_selected_id = 495 }
            check_variable = { rl_selected_id = 496 }
            check_variable = { rl_selected_id = 497 }
            check_variable = { rl_selected_id = 498 }
            check_variable = { rl_selected_id = 499 }
            check_variable = { rl_selected_id = 500 }
            check_variable = { rl_selected_id = 501 }
            check_variable = { rl_selected_id = 502 }
            check_variable = { rl_selected_id = 503 }
            check_variable = { rl_selected_id = 504 }
            check_variable = { rl_selected_id = 505 }
            check_variable = { rl_selected_id = 506 }
            check_variable = { rl_selected_id = 507 }
            check_variable = { rl_selected_id = 508 }
            check_variable = { rl_selected_id = 509 }
            check_variable = { rl_selected_id = 510 }
            check_variable = { rl_selected_id = 511 }
            check_variable = { rl_selected_id = 512 }
            check_variable = { rl_selected_id = 513 }
            check_variable = { rl_selected_id = 514 }
            check_variable = { rl_selected_id = 515 }
            check_variable = { rl_selected_id = 516 }
            check_variable = { rl_selected_id = 517 }
            check_variable = { rl_selected_id = 518 }
            check_variable = { rl_selected_id = 519 }
            check_variable = { rl_selected_id = 520 }
            check_variable = { rl_selected_id = 521 }
            check_variable = { rl_selected_id = 522 }
            check_variable = { rl_selected_id = 523 }
            check_variable = { rl_selected_id = 524 }
            check_variable = { rl_selected_id = 525 }
            check_variable = { rl_selected_id = 593 }
        } }
        add_to_variable = { rl_cat_air = -1 }
        if = { limit = { check_variable = { rl_cat_air < 0 } } set_variable = { rl_cat_air = 0 } }
    }
    else_if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 61 }
            check_variable = { rl_selected_id = 62 }
            check_variable = { rl_selected_id = 63 }
            check_variable = { rl_selected_id = 64 }
            check_variable = { rl_selected_id = 65 }
            check_variable = { rl_selected_id = 66 }
            check_variable = { rl_selected_id = 67 }
            check_variable = { rl_selected_id = 68 }
            check_variable = { rl_selected_id = 69 }
            check_variable = { rl_selected_id = 70 }
            check_variable = { rl_selected_id = 71 }
            check_variable = { rl_selected_id = 72 }
            check_variable = { rl_selected_id = 73 }
            check_variable = { rl_selected_id = 74 }
            check_variable = { rl_selected_id = 75 }
            check_variable = { rl_selected_id = 156 }
            check_variable = { rl_selected_id = 157 }
            check_variable = { rl_selected_id = 158 }
            check_variable = { rl_selected_id = 159 }
            check_variable = { rl_selected_id = 160 }
            check_variable = { rl_selected_id = 161 }
            check_variable = { rl_selected_id = 162 }
            check_variable = { rl_selected_id = 164 }
            check_variable = { rl_selected_id = 165 }
            check_variable = { rl_selected_id = 166 }
            check_variable = { rl_selected_id = 167 }
            check_variable = { rl_selected_id = 168 }
            check_variable = { rl_selected_id = 169 }
            check_variable = { rl_selected_id = 170 }
            check_variable = { rl_selected_id = 236 }
            check_variable = { rl_selected_id = 316 }
            check_variable = { rl_selected_id = 317 }
            check_variable = { rl_selected_id = 318 }
            check_variable = { rl_selected_id = 319 }
            check_variable = { rl_selected_id = 320 }
            check_variable = { rl_selected_id = 321 }
            check_variable = { rl_selected_id = 322 }
            check_variable = { rl_selected_id = 323 }
            check_variable = { rl_selected_id = 324 }
            check_variable = { rl_selected_id = 325 }
            check_variable = { rl_selected_id = 326 }
            check_variable = { rl_selected_id = 327 }
            check_variable = { rl_selected_id = 328 }
            check_variable = { rl_selected_id = 329 }
            check_variable = { rl_selected_id = 330 }
            check_variable = { rl_selected_id = 331 }
            check_variable = { rl_selected_id = 334 }
            check_variable = { rl_selected_id = 335 }
            check_variable = { rl_selected_id = 336 }
            check_variable = { rl_selected_id = 337 }
            check_variable = { rl_selected_id = 338 }
            check_variable = { rl_selected_id = 339 }
            check_variable = { rl_selected_id = 340 }
            check_variable = { rl_selected_id = 341 }
            check_variable = { rl_selected_id = 342 }
            check_variable = { rl_selected_id = 343 }
            check_variable = { rl_selected_id = 344 }
            check_variable = { rl_selected_id = 345 }
            check_variable = { rl_selected_id = 437 }
            check_variable = { rl_selected_id = 526 }
            check_variable = { rl_selected_id = 527 }
            check_variable = { rl_selected_id = 528 }
            check_variable = { rl_selected_id = 529 }
            check_variable = { rl_selected_id = 530 }
            check_variable = { rl_selected_id = 531 }
            check_variable = { rl_selected_id = 532 }
            check_variable = { rl_selected_id = 533 }
            check_variable = { rl_selected_id = 534 }
            check_variable = { rl_selected_id = 535 }
            check_variable = { rl_selected_id = 536 }
            check_variable = { rl_selected_id = 537 }
            check_variable = { rl_selected_id = 538 }
            check_variable = { rl_selected_id = 539 }
            check_variable = { rl_selected_id = 540 }
            check_variable = { rl_selected_id = 541 }
            check_variable = { rl_selected_id = 542 }
            check_variable = { rl_selected_id = 543 }
            check_variable = { rl_selected_id = 544 }
            check_variable = { rl_selected_id = 545 }
            check_variable = { rl_selected_id = 546 }
            check_variable = { rl_selected_id = 547 }
            check_variable = { rl_selected_id = 548 }
            check_variable = { rl_selected_id = 549 }
            check_variable = { rl_selected_id = 550 }
            check_variable = { rl_selected_id = 551 }
            check_variable = { rl_selected_id = 552 }
            check_variable = { rl_selected_id = 553 }
            check_variable = { rl_selected_id = 554 }
            check_variable = { rl_selected_id = 555 }
            check_variable = { rl_selected_id = 556 }
            check_variable = { rl_selected_id = 557 }
            check_variable = { rl_selected_id = 558 }
            check_variable = { rl_selected_id = 559 }
            check_variable = { rl_selected_id = 560 }
        } }
        add_to_variable = { rl_cat_navy = -1 }
        if = { limit = { check_variable = { rl_cat_navy < 0 } } set_variable = { rl_cat_navy = 0 } }
    }
    else_if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 91 }
            check_variable = { rl_selected_id = 92 }
            check_variable = { rl_selected_id = 99 }
            check_variable = { rl_selected_id = 186 }
            check_variable = { rl_selected_id = 189 }
            check_variable = { rl_selected_id = 193 }
            check_variable = { rl_selected_id = 194 }
            check_variable = { rl_selected_id = 376 }
            check_variable = { rl_selected_id = 381 }
            check_variable = { rl_selected_id = 383 }
            check_variable = { rl_selected_id = 384 }
            check_variable = { rl_selected_id = 385 }
            check_variable = { rl_selected_id = 386 }
            check_variable = { rl_selected_id = 398 }
            check_variable = { rl_selected_id = 565 }
            check_variable = { rl_selected_id = 566 }
            check_variable = { rl_selected_id = 567 }
            check_variable = { rl_selected_id = 568 }
            check_variable = { rl_selected_id = 574 }
            check_variable = { rl_selected_id = 575 }
            check_variable = { rl_selected_id = 576 }
            check_variable = { rl_selected_id = 586 }
            check_variable = { rl_selected_id = 587 }
            check_variable = { rl_selected_id = 597 }
        } }
        add_to_variable = { rl_cat_research = -1 }
        if = { limit = { check_variable = { rl_cat_research < 0 } } set_variable = { rl_cat_research = 0 } }
    }
    else_if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 98 }
            check_variable = { rl_selected_id = 100 }
            check_variable = { rl_selected_id = 190 }
            check_variable = { rl_selected_id = 196 }
            check_variable = { rl_selected_id = 200 }
            check_variable = { rl_selected_id = 380 }
            check_variable = { rl_selected_id = 387 }
            check_variable = { rl_selected_id = 388 }
            check_variable = { rl_selected_id = 389 }
            check_variable = { rl_selected_id = 569 }
            check_variable = { rl_selected_id = 570 }
            check_variable = { rl_selected_id = 571 }
            check_variable = { rl_selected_id = 572 }
            check_variable = { rl_selected_id = 578 }
            check_variable = { rl_selected_id = 588 }
            check_variable = { rl_selected_id = 589 }
            check_variable = { rl_selected_id = 596 }
        } }
        add_to_variable = { rl_cat_occupation = -1 }
        if = { limit = { check_variable = { rl_cat_occupation < 0 } } set_variable = { rl_cat_occupation = 0 } }
    }
    else_if = {
        limit = { OR = {
            check_variable = { rl_selected_id = 6 }
            check_variable = { rl_selected_id = 45 }
            check_variable = { rl_selected_id = 46 }
            check_variable = { rl_selected_id = 47 }
            check_variable = { rl_selected_id = 48 }
            check_variable = { rl_selected_id = 93 }
            check_variable = { rl_selected_id = 94 }
            check_variable = { rl_selected_id = 95 }
            check_variable = { rl_selected_id = 96 }
            check_variable = { rl_selected_id = 120 }
            check_variable = { rl_selected_id = 187 }
            check_variable = { rl_selected_id = 188 }
            check_variable = { rl_selected_id = 246 }
            check_variable = { rl_selected_id = 247 }
            check_variable = { rl_selected_id = 277 }
            check_variable = { rl_selected_id = 377 }
            check_variable = { rl_selected_id = 378 }
            check_variable = { rl_selected_id = 382 }
            check_variable = { rl_selected_id = 392 }
            check_variable = { rl_selected_id = 393 }
            check_variable = { rl_selected_id = 449 }
            check_variable = { rl_selected_id = 450 }
            check_variable = { rl_selected_id = 561 }
            check_variable = { rl_selected_id = 562 }
            check_variable = { rl_selected_id = 563 }
            check_variable = { rl_selected_id = 564 }
            check_variable = { rl_selected_id = 579 }
            check_variable = { rl_selected_id = 590 }
            check_variable = { rl_selected_id = 591 }
            check_variable = { rl_selected_id = 592 }
        } }
        add_to_variable = { rl_cat_fate = -1 }
        if = { limit = { check_variable = { rl_cat_fate < 0 } } set_variable = { rl_cat_fate = 0 } }
    }
}

rl_hc_try_grant_selected_upgrade = {
    if = {
        limit = { NOT = { OR = {
            check_variable = { rl_selected_id = 1 }
            check_variable = { rl_selected_id = 2 }
            check_variable = { rl_selected_id = 3 }
            check_variable = { rl_selected_id = 4 }
            check_variable = { rl_selected_id = 5 }
            check_variable = { rl_selected_id = 6 }
            check_variable = { rl_selected_id = 7 }
            check_variable = { rl_selected_id = 8 }
            check_variable = { rl_selected_id = 9 }
            check_variable = { rl_selected_id = 10 }
            check_variable = { rl_selected_id = 11 }
            check_variable = { rl_selected_id = 12 }
            check_variable = { rl_selected_id = 13 }
            check_variable = { rl_selected_id = 14 }
            check_variable = { rl_selected_id = 15 }
            check_variable = { rl_selected_id = 16 }
            check_variable = { rl_selected_id = 17 }
            check_variable = { rl_selected_id = 18 }
            check_variable = { rl_selected_id = 19 }
            check_variable = { rl_selected_id = 20 }
            check_variable = { rl_selected_id = 21 }
            check_variable = { rl_selected_id = 22 }
            check_variable = { rl_selected_id = 23 }
            check_variable = { rl_selected_id = 24 }
            check_variable = { rl_selected_id = 25 }
            check_variable = { rl_selected_id = 26 }
            check_variable = { rl_selected_id = 27 }
            check_variable = { rl_selected_id = 28 }
            check_variable = { rl_selected_id = 29 }
            check_variable = { rl_selected_id = 30 }
            check_variable = { rl_selected_id = 31 }
            check_variable = { rl_selected_id = 32 }
            check_variable = { rl_selected_id = 33 }
            check_variable = { rl_selected_id = 34 }
            check_variable = { rl_selected_id = 35 }
            check_variable = { rl_selected_id = 36 }
            check_variable = { rl_selected_id = 37 }
            check_variable = { rl_selected_id = 38 }
            check_variable = { rl_selected_id = 39 }
            check_variable = { rl_selected_id = 40 }
            check_variable = { rl_selected_id = 41 }
            check_variable = { rl_selected_id = 42 }
            check_variable = { rl_selected_id = 43 }
            check_variable = { rl_selected_id = 44 }
            check_variable = { rl_selected_id = 45 }
            check_variable = { rl_selected_id = 46 }
            check_variable = { rl_selected_id = 47 }
            check_variable = { rl_selected_id = 48 }
            check_variable = { rl_selected_id = 49 }
            check_variable = { rl_selected_id = 50 }
            check_variable = { rl_selected_id = 51 }
            check_variable = { rl_selected_id = 52 }
            check_variable = { rl_selected_id = 53 }
            check_variable = { rl_selected_id = 54 }
            check_variable = { rl_selected_id = 55 }
            check_variable = { rl_selected_id = 56 }
            check_variable = { rl_selected_id = 57 }
            check_variable = { rl_selected_id = 58 }
            check_variable = { rl_selected_id = 59 }
            check_variable = { rl_selected_id = 60 }
            check_variable = { rl_selected_id = 61 }
            check_variable = { rl_selected_id = 62 }
            check_variable = { rl_selected_id = 63 }
            check_variable = { rl_selected_id = 64 }
            check_variable = { rl_selected_id = 65 }
            check_variable = { rl_selected_id = 66 }
            check_variable = { rl_selected_id = 67 }
            check_variable = { rl_selected_id = 68 }
            check_variable = { rl_selected_id = 69 }
            check_variable = { rl_selected_id = 70 }
            check_variable = { rl_selected_id = 71 }
            check_variable = { rl_selected_id = 72 }
            check_variable = { rl_selected_id = 73 }
            check_variable = { rl_selected_id = 74 }
            check_variable = { rl_selected_id = 75 }
            check_variable = { rl_selected_id = 76 }
            check_variable = { rl_selected_id = 77 }
            check_variable = { rl_selected_id = 78 }
            check_variable = { rl_selected_id = 79 }
            check_variable = { rl_selected_id = 80 }
            check_variable = { rl_selected_id = 81 }
            check_variable = { rl_selected_id = 82 }
            check_variable = { rl_selected_id = 83 }
            check_variable = { rl_selected_id = 84 }
            check_variable = { rl_selected_id = 85 }
            check_variable = { rl_selected_id = 86 }
            check_variable = { rl_selected_id = 87 }
            check_variable = { rl_selected_id = 88 }
            check_variable = { rl_selected_id = 89 }
            check_variable = { rl_selected_id = 90 }
            check_variable = { rl_selected_id = 91 }
            check_variable = { rl_selected_id = 92 }
            check_variable = { rl_selected_id = 93 }
            check_variable = { rl_selected_id = 94 }
            check_variable = { rl_selected_id = 95 }
            check_variable = { rl_selected_id = 96 }
            check_variable = { rl_selected_id = 98 }
            check_variable = { rl_selected_id = 99 }
            check_variable = { rl_selected_id = 100 }
            check_variable = { rl_selected_id = 101 }
            check_variable = { rl_selected_id = 102 }
            check_variable = { rl_selected_id = 103 }
            check_variable = { rl_selected_id = 104 }
            check_variable = { rl_selected_id = 105 }
            check_variable = { rl_selected_id = 106 }
            check_variable = { rl_selected_id = 107 }
            check_variable = { rl_selected_id = 108 }
            check_variable = { rl_selected_id = 109 }
            check_variable = { rl_selected_id = 110 }
            check_variable = { rl_selected_id = 111 }
            check_variable = { rl_selected_id = 112 }
            check_variable = { rl_selected_id = 113 }
            check_variable = { rl_selected_id = 114 }
            check_variable = { rl_selected_id = 115 }
            check_variable = { rl_selected_id = 116 }
            check_variable = { rl_selected_id = 117 }
            check_variable = { rl_selected_id = 118 }
            check_variable = { rl_selected_id = 119 }
            check_variable = { rl_selected_id = 120 }
            check_variable = { rl_selected_id = 121 }
            check_variable = { rl_selected_id = 122 }
            check_variable = { rl_selected_id = 123 }
            check_variable = { rl_selected_id = 124 }
            check_variable = { rl_selected_id = 125 }
            check_variable = { rl_selected_id = 126 }
            check_variable = { rl_selected_id = 127 }
            check_variable = { rl_selected_id = 128 }
            check_variable = { rl_selected_id = 129 }
            check_variable = { rl_selected_id = 130 }
            check_variable = { rl_selected_id = 131 }
            check_variable = { rl_selected_id = 132 }
            check_variable = { rl_selected_id = 133 }
            check_variable = { rl_selected_id = 134 }
            check_variable = { rl_selected_id = 135 }
            check_variable = { rl_selected_id = 136 }
            check_variable = { rl_selected_id = 137 }
            check_variable = { rl_selected_id = 138 }
            check_variable = { rl_selected_id = 139 }
            check_variable = { rl_selected_id = 140 }
            check_variable = { rl_selected_id = 141 }
            check_variable = { rl_selected_id = 142 }
            check_variable = { rl_selected_id = 143 }
            check_variable = { rl_selected_id = 144 }
            check_variable = { rl_selected_id = 145 }
            check_variable = { rl_selected_id = 146 }
            check_variable = { rl_selected_id = 147 }
            check_variable = { rl_selected_id = 148 }
            check_variable = { rl_selected_id = 149 }
            check_variable = { rl_selected_id = 150 }
            check_variable = { rl_selected_id = 151 }
            check_variable = { rl_selected_id = 152 }
            check_variable = { rl_selected_id = 153 }
            check_variable = { rl_selected_id = 154 }
            check_variable = { rl_selected_id = 155 }
            check_variable = { rl_selected_id = 156 }
            check_variable = { rl_selected_id = 157 }
            check_variable = { rl_selected_id = 158 }
            check_variable = { rl_selected_id = 159 }
            check_variable = { rl_selected_id = 160 }
            check_variable = { rl_selected_id = 161 }
            check_variable = { rl_selected_id = 162 }
            check_variable = { rl_selected_id = 163 }
            check_variable = { rl_selected_id = 164 }
            check_variable = { rl_selected_id = 165 }
            check_variable = { rl_selected_id = 166 }
            check_variable = { rl_selected_id = 167 }
            check_variable = { rl_selected_id = 168 }
            check_variable = { rl_selected_id = 169 }
            check_variable = { rl_selected_id = 170 }
            check_variable = { rl_selected_id = 171 }
            check_variable = { rl_selected_id = 172 }
            check_variable = { rl_selected_id = 173 }
            check_variable = { rl_selected_id = 174 }
            check_variable = { rl_selected_id = 175 }
            check_variable = { rl_selected_id = 176 }
            check_variable = { rl_selected_id = 177 }
            check_variable = { rl_selected_id = 178 }
            check_variable = { rl_selected_id = 179 }
            check_variable = { rl_selected_id = 180 }
            check_variable = { rl_selected_id = 181 }
            check_variable = { rl_selected_id = 182 }
            check_variable = { rl_selected_id = 183 }
            check_variable = { rl_selected_id = 184 }
            check_variable = { rl_selected_id = 185 }
            check_variable = { rl_selected_id = 186 }
            check_variable = { rl_selected_id = 187 }
            check_variable = { rl_selected_id = 188 }
            check_variable = { rl_selected_id = 189 }
            check_variable = { rl_selected_id = 190 }
            check_variable = { rl_selected_id = 191 }
            check_variable = { rl_selected_id = 192 }
            check_variable = { rl_selected_id = 193 }
            check_variable = { rl_selected_id = 194 }
            check_variable = { rl_selected_id = 195 }
            check_variable = { rl_selected_id = 196 }
            check_variable = { rl_selected_id = 197 }
            check_variable = { rl_selected_id = 198 }
            check_variable = { rl_selected_id = 199 }
            check_variable = { rl_selected_id = 200 }
            check_variable = { rl_selected_id = 201 }
            check_variable = { rl_selected_id = 202 }
            check_variable = { rl_selected_id = 203 }
            check_variable = { rl_selected_id = 204 }
            check_variable = { rl_selected_id = 205 }
            check_variable = { rl_selected_id = 206 }
            check_variable = { rl_selected_id = 207 }
            check_variable = { rl_selected_id = 208 }
            check_variable = { rl_selected_id = 209 }
            check_variable = { rl_selected_id = 210 }
            check_variable = { rl_selected_id = 211 }
            check_variable = { rl_selected_id = 212 }
            check_variable = { rl_selected_id = 213 }
            check_variable = { rl_selected_id = 214 }
            check_variable = { rl_selected_id = 215 }
            check_variable = { rl_selected_id = 216 }
            check_variable = { rl_selected_id = 217 }
            check_variable = { rl_selected_id = 218 }
            check_variable = { rl_selected_id = 219 }
            check_variable = { rl_selected_id = 220 }
            check_variable = { rl_selected_id = 230 }
            check_variable = { rl_selected_id = 231 }
            check_variable = { rl_selected_id = 232 }
            check_variable = { rl_selected_id = 233 }
            check_variable = { rl_selected_id = 234 }
            check_variable = { rl_selected_id = 235 }
            check_variable = { rl_selected_id = 236 }
            check_variable = { rl_selected_id = 237 }
            check_variable = { rl_selected_id = 238 }
            check_variable = { rl_selected_id = 239 }
            check_variable = { rl_selected_id = 240 }
            check_variable = { rl_selected_id = 241 }
            check_variable = { rl_selected_id = 242 }
            check_variable = { rl_selected_id = 243 }
            check_variable = { rl_selected_id = 244 }
            check_variable = { rl_selected_id = 245 }
            check_variable = { rl_selected_id = 246 }
            check_variable = { rl_selected_id = 247 }
            check_variable = { rl_selected_id = 248 }
            check_variable = { rl_selected_id = 249 }
            check_variable = { rl_selected_id = 250 }
            check_variable = { rl_selected_id = 251 }
            check_variable = { rl_selected_id = 252 }
            check_variable = { rl_selected_id = 253 }
            check_variable = { rl_selected_id = 254 }
            check_variable = { rl_selected_id = 255 }
            check_variable = { rl_selected_id = 256 }
            check_variable = { rl_selected_id = 257 }
            check_variable = { rl_selected_id = 258 }
            check_variable = { rl_selected_id = 259 }
            check_variable = { rl_selected_id = 260 }
            check_variable = { rl_selected_id = 272 }
            check_variable = { rl_selected_id = 273 }
            check_variable = { rl_selected_id = 276 }
            check_variable = { rl_selected_id = 277 }
            check_variable = { rl_selected_id = 278 }
            check_variable = { rl_selected_id = 279 }
            check_variable = { rl_selected_id = 280 }
            check_variable = { rl_selected_id = 281 }
            check_variable = { rl_selected_id = 282 }
            check_variable = { rl_selected_id = 283 }
            check_variable = { rl_selected_id = 284 }
            check_variable = { rl_selected_id = 285 }
            check_variable = { rl_selected_id = 286 }
            check_variable = { rl_selected_id = 287 }
            check_variable = { rl_selected_id = 288 }
            check_variable = { rl_selected_id = 289 }
            check_variable = { rl_selected_id = 290 }
            check_variable = { rl_selected_id = 291 }
            check_variable = { rl_selected_id = 292 }
            check_variable = { rl_selected_id = 293 }
            check_variable = { rl_selected_id = 294 }
            check_variable = { rl_selected_id = 295 }
            check_variable = { rl_selected_id = 296 }
            check_variable = { rl_selected_id = 297 }
            check_variable = { rl_selected_id = 298 }
            check_variable = { rl_selected_id = 299 }
            check_variable = { rl_selected_id = 300 }
            check_variable = { rl_selected_id = 301 }
            check_variable = { rl_selected_id = 302 }
            check_variable = { rl_selected_id = 303 }
            check_variable = { rl_selected_id = 304 }
            check_variable = { rl_selected_id = 305 }
            check_variable = { rl_selected_id = 306 }
            check_variable = { rl_selected_id = 307 }
            check_variable = { rl_selected_id = 308 }
            check_variable = { rl_selected_id = 309 }
            check_variable = { rl_selected_id = 310 }
            check_variable = { rl_selected_id = 311 }
            check_variable = { rl_selected_id = 312 }
            check_variable = { rl_selected_id = 313 }
            check_variable = { rl_selected_id = 314 }
            check_variable = { rl_selected_id = 315 }
            check_variable = { rl_selected_id = 316 }
            check_variable = { rl_selected_id = 317 }
            check_variable = { rl_selected_id = 318 }
            check_variable = { rl_selected_id = 319 }
            check_variable = { rl_selected_id = 320 }
            check_variable = { rl_selected_id = 321 }
            check_variable = { rl_selected_id = 322 }
            check_variable = { rl_selected_id = 323 }
            check_variable = { rl_selected_id = 324 }
            check_variable = { rl_selected_id = 325 }
            check_variable = { rl_selected_id = 326 }
            check_variable = { rl_selected_id = 327 }
            check_variable = { rl_selected_id = 328 }
            check_variable = { rl_selected_id = 329 }
            check_variable = { rl_selected_id = 330 }
            check_variable = { rl_selected_id = 334 }
            check_variable = { rl_selected_id = 335 }
            check_variable = { rl_selected_id = 336 }
            check_variable = { rl_selected_id = 337 }
            check_variable = { rl_selected_id = 338 }
            check_variable = { rl_selected_id = 339 }
            check_variable = { rl_selected_id = 340 }
            check_variable = { rl_selected_id = 341 }
            check_variable = { rl_selected_id = 342 }
            check_variable = { rl_selected_id = 343 }
            check_variable = { rl_selected_id = 344 }
            check_variable = { rl_selected_id = 345 }
            check_variable = { rl_selected_id = 346 }
            check_variable = { rl_selected_id = 347 }
            check_variable = { rl_selected_id = 348 }
            check_variable = { rl_selected_id = 349 }
            check_variable = { rl_selected_id = 350 }
            check_variable = { rl_selected_id = 351 }
            check_variable = { rl_selected_id = 352 }
            check_variable = { rl_selected_id = 353 }
            check_variable = { rl_selected_id = 354 }
            check_variable = { rl_selected_id = 355 }
            check_variable = { rl_selected_id = 356 }
            check_variable = { rl_selected_id = 357 }
            check_variable = { rl_selected_id = 358 }
            check_variable = { rl_selected_id = 359 }
            check_variable = { rl_selected_id = 360 }
            check_variable = { rl_selected_id = 363 }
            check_variable = { rl_selected_id = 364 }
            check_variable = { rl_selected_id = 365 }
            check_variable = { rl_selected_id = 366 }
            check_variable = { rl_selected_id = 367 }
            check_variable = { rl_selected_id = 368 }
            check_variable = { rl_selected_id = 369 }
            check_variable = { rl_selected_id = 370 }
            check_variable = { rl_selected_id = 371 }
            check_variable = { rl_selected_id = 372 }
            check_variable = { rl_selected_id = 373 }
            check_variable = { rl_selected_id = 374 }
            check_variable = { rl_selected_id = 375 }
            check_variable = { rl_selected_id = 376 }
            check_variable = { rl_selected_id = 377 }
            check_variable = { rl_selected_id = 378 }
            check_variable = { rl_selected_id = 379 }
            check_variable = { rl_selected_id = 380 }
            check_variable = { rl_selected_id = 381 }
            check_variable = { rl_selected_id = 384 }
            check_variable = { rl_selected_id = 385 }
            check_variable = { rl_selected_id = 386 }
            check_variable = { rl_selected_id = 388 }
            check_variable = { rl_selected_id = 389 }
            check_variable = { rl_selected_id = 397 }
            check_variable = { rl_selected_id = 398 }
            check_variable = { rl_selected_id = 399 }
            check_variable = { rl_selected_id = 400 }
            check_variable = { rl_selected_id = 401 }
            check_variable = { rl_selected_id = 402 }
            check_variable = { rl_selected_id = 403 }
            check_variable = { rl_selected_id = 404 }
            check_variable = { rl_selected_id = 405 }
            check_variable = { rl_selected_id = 406 }
            check_variable = { rl_selected_id = 407 }
            check_variable = { rl_selected_id = 408 }
            check_variable = { rl_selected_id = 409 }
            check_variable = { rl_selected_id = 410 }
            check_variable = { rl_selected_id = 411 }
            check_variable = { rl_selected_id = 412 }
            check_variable = { rl_selected_id = 413 }
            check_variable = { rl_selected_id = 414 }
            check_variable = { rl_selected_id = 415 }
            check_variable = { rl_selected_id = 416 }
            check_variable = { rl_selected_id = 417 }
            check_variable = { rl_selected_id = 418 }
            check_variable = { rl_selected_id = 419 }
            check_variable = { rl_selected_id = 420 }
            check_variable = { rl_selected_id = 421 }
            check_variable = { rl_selected_id = 422 }
            check_variable = { rl_selected_id = 423 }
            check_variable = { rl_selected_id = 424 }
            check_variable = { rl_selected_id = 425 }
            check_variable = { rl_selected_id = 426 }
            check_variable = { rl_selected_id = 427 }
            check_variable = { rl_selected_id = 428 }
            check_variable = { rl_selected_id = 429 }
            check_variable = { rl_selected_id = 430 }
            check_variable = { rl_selected_id = 431 }
            check_variable = { rl_selected_id = 432 }
            check_variable = { rl_selected_id = 433 }
            check_variable = { rl_selected_id = 434 }
            check_variable = { rl_selected_id = 435 }
            check_variable = { rl_selected_id = 436 }
            check_variable = { rl_selected_id = 437 }
            check_variable = { rl_selected_id = 438 }
            check_variable = { rl_selected_id = 439 }
            check_variable = { rl_selected_id = 440 }
            check_variable = { rl_selected_id = 441 }
            check_variable = { rl_selected_id = 442 }
            check_variable = { rl_selected_id = 443 }
            check_variable = { rl_selected_id = 444 }
            check_variable = { rl_selected_id = 445 }
            check_variable = { rl_selected_id = 446 }
            check_variable = { rl_selected_id = 447 }
            check_variable = { rl_selected_id = 448 }
            check_variable = { rl_selected_id = 449 }
            check_variable = { rl_selected_id = 450 }
            check_variable = { rl_selected_id = 451 }
            check_variable = { rl_selected_id = 452 }
            check_variable = { rl_selected_id = 453 }
            check_variable = { rl_selected_id = 454 }
            check_variable = { rl_selected_id = 455 }
            check_variable = { rl_selected_id = 456 }
            check_variable = { rl_selected_id = 457 }
            check_variable = { rl_selected_id = 458 }
            check_variable = { rl_selected_id = 459 }
            check_variable = { rl_selected_id = 460 }
            check_variable = { rl_selected_id = 461 }
            check_variable = { rl_selected_id = 462 }
            check_variable = { rl_selected_id = 463 }
            check_variable = { rl_selected_id = 464 }
            check_variable = { rl_selected_id = 465 }
            check_variable = { rl_selected_id = 466 }
            check_variable = { rl_selected_id = 467 }
            check_variable = { rl_selected_id = 468 }
            check_variable = { rl_selected_id = 469 }
            check_variable = { rl_selected_id = 470 }
            check_variable = { rl_selected_id = 471 }
            check_variable = { rl_selected_id = 472 }
            check_variable = { rl_selected_id = 473 }
            check_variable = { rl_selected_id = 474 }
            check_variable = { rl_selected_id = 475 }
            check_variable = { rl_selected_id = 476 }
            check_variable = { rl_selected_id = 477 }
            check_variable = { rl_selected_id = 478 }
            check_variable = { rl_selected_id = 479 }
            check_variable = { rl_selected_id = 480 }
            check_variable = { rl_selected_id = 481 }
            check_variable = { rl_selected_id = 482 }
            check_variable = { rl_selected_id = 483 }
            check_variable = { rl_selected_id = 484 }
            check_variable = { rl_selected_id = 485 }
            check_variable = { rl_selected_id = 486 }
            check_variable = { rl_selected_id = 487 }
            check_variable = { rl_selected_id = 488 }
            check_variable = { rl_selected_id = 489 }
            check_variable = { rl_selected_id = 490 }
            check_variable = { rl_selected_id = 491 }
            check_variable = { rl_selected_id = 492 }
            check_variable = { rl_selected_id = 493 }
            check_variable = { rl_selected_id = 494 }
            check_variable = { rl_selected_id = 495 }
            check_variable = { rl_selected_id = 496 }
            check_variable = { rl_selected_id = 497 }
            check_variable = { rl_selected_id = 498 }
            check_variable = { rl_selected_id = 499 }
            check_variable = { rl_selected_id = 500 }
            check_variable = { rl_selected_id = 501 }
            check_variable = { rl_selected_id = 502 }
            check_variable = { rl_selected_id = 503 }
            check_variable = { rl_selected_id = 504 }
            check_variable = { rl_selected_id = 505 }
            check_variable = { rl_selected_id = 506 }
            check_variable = { rl_selected_id = 507 }
            check_variable = { rl_selected_id = 508 }
            check_variable = { rl_selected_id = 509 }
            check_variable = { rl_selected_id = 510 }
            check_variable = { rl_selected_id = 511 }
            check_variable = { rl_selected_id = 512 }
            check_variable = { rl_selected_id = 513 }
            check_variable = { rl_selected_id = 514 }
            check_variable = { rl_selected_id = 515 }
            check_variable = { rl_selected_id = 516 }
            check_variable = { rl_selected_id = 517 }
            check_variable = { rl_selected_id = 518 }
            check_variable = { rl_selected_id = 519 }
            check_variable = { rl_selected_id = 520 }
            check_variable = { rl_selected_id = 521 }
            check_variable = { rl_selected_id = 522 }
            check_variable = { rl_selected_id = 523 }
            check_variable = { rl_selected_id = 524 }
            check_variable = { rl_selected_id = 525 }
            check_variable = { rl_selected_id = 526 }
            check_variable = { rl_selected_id = 527 }
            check_variable = { rl_selected_id = 528 }
            check_variable = { rl_selected_id = 529 }
            check_variable = { rl_selected_id = 530 }
            check_variable = { rl_selected_id = 531 }
            check_variable = { rl_selected_id = 532 }
            check_variable = { rl_selected_id = 533 }
            check_variable = { rl_selected_id = 534 }
            check_variable = { rl_selected_id = 535 }
            check_variable = { rl_selected_id = 536 }
            check_variable = { rl_selected_id = 537 }
            check_variable = { rl_selected_id = 538 }
            check_variable = { rl_selected_id = 539 }
            check_variable = { rl_selected_id = 540 }
            check_variable = { rl_selected_id = 541 }
            check_variable = { rl_selected_id = 542 }
            check_variable = { rl_selected_id = 543 }
            check_variable = { rl_selected_id = 544 }
            check_variable = { rl_selected_id = 545 }
            check_variable = { rl_selected_id = 546 }
            check_variable = { rl_selected_id = 547 }
            check_variable = { rl_selected_id = 548 }
            check_variable = { rl_selected_id = 549 }
            check_variable = { rl_selected_id = 550 }
            check_variable = { rl_selected_id = 551 }
            check_variable = { rl_selected_id = 552 }
            check_variable = { rl_selected_id = 553 }
            check_variable = { rl_selected_id = 554 }
            check_variable = { rl_selected_id = 555 }
            check_variable = { rl_selected_id = 556 }
            check_variable = { rl_selected_id = 557 }
            check_variable = { rl_selected_id = 558 }
            check_variable = { rl_selected_id = 559 }
            check_variable = { rl_selected_id = 560 }
            check_variable = { rl_selected_id = 561 }
            check_variable = { rl_selected_id = 562 }
            check_variable = { rl_selected_id = 563 }
            check_variable = { rl_selected_id = 564 }
            check_variable = { rl_selected_id = 565 }
            check_variable = { rl_selected_id = 566 }
            check_variable = { rl_selected_id = 567 }
            check_variable = { rl_selected_id = 568 }
            check_variable = { rl_selected_id = 569 }
            check_variable = { rl_selected_id = 570 }
            check_variable = { rl_selected_id = 571 }
            check_variable = { rl_selected_id = 572 }
            check_variable = { rl_selected_id = 573 }
            check_variable = { rl_selected_id = 574 }
            check_variable = { rl_selected_id = 575 }
            check_variable = { rl_selected_id = 576 }
            check_variable = { rl_selected_id = 577 }
            check_variable = { rl_selected_id = 578 }
            check_variable = { rl_selected_id = 579 }
            check_variable = { rl_selected_id = 580 }
            check_variable = { rl_selected_id = 581 }
            check_variable = { rl_selected_id = 582 }
            check_variable = { rl_selected_id = 583 }
            check_variable = { rl_selected_id = 584 }
            check_variable = { rl_selected_id = 585 }
            check_variable = { rl_selected_id = 586 }
            check_variable = { rl_selected_id = 587 }
            check_variable = { rl_selected_id = 588 }
            check_variable = { rl_selected_id = 589 }
            check_variable = { rl_selected_id = 590 }
            check_variable = { rl_selected_id = 591 }
            check_variable = { rl_selected_id = 592 }
            check_variable = { rl_selected_id = 593 }
            check_variable = { rl_selected_id = 594 }
            check_variable = { rl_selected_id = 595 }
            check_variable = { rl_selected_id = 596 }
            check_variable = { rl_selected_id = 597 }
            check_variable = { rl_selected_id = 598 }
            check_variable = { rl_selected_id = 599 }
            check_variable = { rl_selected_id = 600 }
        } } }
        rl_apply_selected_upgrade_direct = yes
    }
    else = {
        set_variable = { rl_hc_pending_id = rl_selected_id }
        set_variable = { rl_hc_pending_rarity = rl_selected_rarity }
        if = { limit = { check_variable = { rl_selected_rarity = 5 } } set_variable = { rl_hc_pending_cost = 2 } }
        else = { set_variable = { rl_hc_pending_cost = 1 } }
        if = {
            limit = { OR = {
                AND = { check_variable = { rl_hc_pending_cost = 1 } check_variable = { rl_hc_slots_used < 20 } }
                AND = { check_variable = { rl_hc_pending_cost = 2 } check_variable = { rl_hc_slots_used < 19 } }
            } }
            rl_hc_apply_pending_upgrade = yes
        }
        else_if = {
            limit = { is_ai = yes }
            rl_hc_auto_replace_weakest_pending = yes
        }
        else_if = {
            limit = {
                is_ai = no
                has_global_flag = rl_rarity_chaos
                has_global_flag = rl_hc_auto_replace_weakest
            }
            rl_hc_auto_replace_weakest_pending = yes
        }
        else = {
            set_country_flag = rl_hc_replacement_mode
            if = { limit = { has_country_flag = rl_fate_purchase_in_progress } set_country_flag = rl_hc_show_result_after_pending }
            country_event = { id = rl.50 }
        }
    }
}

rl_hc_apply_pending_upgrade = {
    set_variable = { rl_selected_id = rl_hc_pending_id }
    set_variable = { rl_selected_rarity = rl_hc_pending_rarity }
    rl_apply_selected_upgrade_direct = yes
    rl_hc_record_selected_upgrade = yes
    set_variable = { rl_hc_pending_id = 0 }
    set_variable = { rl_hc_pending_rarity = 0 }
    set_variable = { rl_hc_pending_cost = 0 }
    clr_country_flag = rl_hc_replacement_mode
    if = { limit = { has_country_flag = rl_hc_show_result_after_pending } clr_country_flag = rl_hc_show_result_after_pending country_event = { id = rl.3 hours = 1 } }
}

rl_hc_reject_pending_upgrade = {
    set_variable = { rl_hc_pending_id = 0 }
    set_variable = { rl_hc_pending_rarity = 0 }
    set_variable = { rl_hc_pending_cost = 0 }
    clr_country_flag = rl_hc_replacement_mode
    clr_country_flag = rl_hc_show_result_after_pending
}

rl_hc_record_selected_upgrade = {
    if = {
        limit = { check_variable = { rl_hc_pending_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = 2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = 1 } }
    add_to_variable = { rl_hc_active_upgrade_count = 1 }
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = 1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_01_id = 0 } }
        set_variable = { rl_hc_slot_01_id = rl_selected_id }
        set_variable = { rl_hc_slot_01_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_01_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_02_id = 0 } }
        set_variable = { rl_hc_slot_02_id = rl_selected_id }
        set_variable = { rl_hc_slot_02_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_02_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_03_id = 0 } }
        set_variable = { rl_hc_slot_03_id = rl_selected_id }
        set_variable = { rl_hc_slot_03_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_03_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_04_id = 0 } }
        set_variable = { rl_hc_slot_04_id = rl_selected_id }
        set_variable = { rl_hc_slot_04_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_04_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_05_id = 0 } }
        set_variable = { rl_hc_slot_05_id = rl_selected_id }
        set_variable = { rl_hc_slot_05_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_05_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_06_id = 0 } }
        set_variable = { rl_hc_slot_06_id = rl_selected_id }
        set_variable = { rl_hc_slot_06_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_06_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_07_id = 0 } }
        set_variable = { rl_hc_slot_07_id = rl_selected_id }
        set_variable = { rl_hc_slot_07_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_07_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_08_id = 0 } }
        set_variable = { rl_hc_slot_08_id = rl_selected_id }
        set_variable = { rl_hc_slot_08_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_08_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_09_id = 0 } }
        set_variable = { rl_hc_slot_09_id = rl_selected_id }
        set_variable = { rl_hc_slot_09_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_09_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_10_id = 0 } }
        set_variable = { rl_hc_slot_10_id = rl_selected_id }
        set_variable = { rl_hc_slot_10_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_10_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_11_id = 0 } }
        set_variable = { rl_hc_slot_11_id = rl_selected_id }
        set_variable = { rl_hc_slot_11_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_11_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_12_id = 0 } }
        set_variable = { rl_hc_slot_12_id = rl_selected_id }
        set_variable = { rl_hc_slot_12_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_12_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_13_id = 0 } }
        set_variable = { rl_hc_slot_13_id = rl_selected_id }
        set_variable = { rl_hc_slot_13_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_13_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_14_id = 0 } }
        set_variable = { rl_hc_slot_14_id = rl_selected_id }
        set_variable = { rl_hc_slot_14_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_14_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_15_id = 0 } }
        set_variable = { rl_hc_slot_15_id = rl_selected_id }
        set_variable = { rl_hc_slot_15_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_15_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_16_id = 0 } }
        set_variable = { rl_hc_slot_16_id = rl_selected_id }
        set_variable = { rl_hc_slot_16_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_16_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_17_id = 0 } }
        set_variable = { rl_hc_slot_17_id = rl_selected_id }
        set_variable = { rl_hc_slot_17_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_17_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_18_id = 0 } }
        set_variable = { rl_hc_slot_18_id = rl_selected_id }
        set_variable = { rl_hc_slot_18_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_18_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_19_id = 0 } }
        set_variable = { rl_hc_slot_19_id = rl_selected_id }
        set_variable = { rl_hc_slot_19_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_19_cost = rl_hc_pending_cost }
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_20_id = 0 } }
        set_variable = { rl_hc_slot_20_id = rl_selected_id }
        set_variable = { rl_hc_slot_20_rarity = rl_selected_rarity }
        set_variable = { rl_hc_slot_20_cost = rl_hc_pending_cost }
    }
}

rl_hc_remove_slot_01 = {
    set_variable = { rl_selected_id = rl_hc_slot_01_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_01_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_01_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_01_id = 0 }
    set_variable = { rl_hc_slot_01_rarity = 0 }
    set_variable = { rl_hc_slot_01_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_02 = {
    set_variable = { rl_selected_id = rl_hc_slot_02_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_02_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_02_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_02_id = 0 }
    set_variable = { rl_hc_slot_02_rarity = 0 }
    set_variable = { rl_hc_slot_02_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_03 = {
    set_variable = { rl_selected_id = rl_hc_slot_03_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_03_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_03_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_03_id = 0 }
    set_variable = { rl_hc_slot_03_rarity = 0 }
    set_variable = { rl_hc_slot_03_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_04 = {
    set_variable = { rl_selected_id = rl_hc_slot_04_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_04_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_04_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_04_id = 0 }
    set_variable = { rl_hc_slot_04_rarity = 0 }
    set_variable = { rl_hc_slot_04_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_05 = {
    set_variable = { rl_selected_id = rl_hc_slot_05_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_05_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_05_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_05_id = 0 }
    set_variable = { rl_hc_slot_05_rarity = 0 }
    set_variable = { rl_hc_slot_05_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_06 = {
    set_variable = { rl_selected_id = rl_hc_slot_06_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_06_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_06_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_06_id = 0 }
    set_variable = { rl_hc_slot_06_rarity = 0 }
    set_variable = { rl_hc_slot_06_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_07 = {
    set_variable = { rl_selected_id = rl_hc_slot_07_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_07_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_07_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_07_id = 0 }
    set_variable = { rl_hc_slot_07_rarity = 0 }
    set_variable = { rl_hc_slot_07_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_08 = {
    set_variable = { rl_selected_id = rl_hc_slot_08_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_08_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_08_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_08_id = 0 }
    set_variable = { rl_hc_slot_08_rarity = 0 }
    set_variable = { rl_hc_slot_08_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_09 = {
    set_variable = { rl_selected_id = rl_hc_slot_09_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_09_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_09_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_09_id = 0 }
    set_variable = { rl_hc_slot_09_rarity = 0 }
    set_variable = { rl_hc_slot_09_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_10 = {
    set_variable = { rl_selected_id = rl_hc_slot_10_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_10_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_10_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_10_id = 0 }
    set_variable = { rl_hc_slot_10_rarity = 0 }
    set_variable = { rl_hc_slot_10_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_11 = {
    set_variable = { rl_selected_id = rl_hc_slot_11_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_11_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_11_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_11_id = 0 }
    set_variable = { rl_hc_slot_11_rarity = 0 }
    set_variable = { rl_hc_slot_11_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_12 = {
    set_variable = { rl_selected_id = rl_hc_slot_12_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_12_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_12_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_12_id = 0 }
    set_variable = { rl_hc_slot_12_rarity = 0 }
    set_variable = { rl_hc_slot_12_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_13 = {
    set_variable = { rl_selected_id = rl_hc_slot_13_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_13_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_13_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_13_id = 0 }
    set_variable = { rl_hc_slot_13_rarity = 0 }
    set_variable = { rl_hc_slot_13_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_14 = {
    set_variable = { rl_selected_id = rl_hc_slot_14_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_14_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_14_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_14_id = 0 }
    set_variable = { rl_hc_slot_14_rarity = 0 }
    set_variable = { rl_hc_slot_14_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_15 = {
    set_variable = { rl_selected_id = rl_hc_slot_15_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_15_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_15_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_15_id = 0 }
    set_variable = { rl_hc_slot_15_rarity = 0 }
    set_variable = { rl_hc_slot_15_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_16 = {
    set_variable = { rl_selected_id = rl_hc_slot_16_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_16_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_16_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_16_id = 0 }
    set_variable = { rl_hc_slot_16_rarity = 0 }
    set_variable = { rl_hc_slot_16_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_17 = {
    set_variable = { rl_selected_id = rl_hc_slot_17_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_17_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_17_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_17_id = 0 }
    set_variable = { rl_hc_slot_17_rarity = 0 }
    set_variable = { rl_hc_slot_17_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_18 = {
    set_variable = { rl_selected_id = rl_hc_slot_18_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_18_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_18_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_18_id = 0 }
    set_variable = { rl_hc_slot_18_rarity = 0 }
    set_variable = { rl_hc_slot_18_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_19 = {
    set_variable = { rl_selected_id = rl_hc_slot_19_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_19_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_19_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_19_id = 0 }
    set_variable = { rl_hc_slot_19_rarity = 0 }
    set_variable = { rl_hc_slot_19_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_slot_20 = {
    set_variable = { rl_selected_id = rl_hc_slot_20_id }
    set_variable = { rl_selected_rarity = rl_hc_slot_20_rarity }
    rl_hc_remove_selected_persistent = yes
    rl_hc_decrement_selected_category = yes
    if = { limit = { OR = {
        check_variable = { rl_selected_id = 97 }
        check_variable = { rl_selected_id = 98 }
        check_variable = { rl_selected_id = 99 }
        check_variable = { rl_selected_id = 198 }
        check_variable = { rl_selected_id = 199 }
        check_variable = { rl_selected_id = 200 }
        check_variable = { rl_selected_id = 224 }
        check_variable = { rl_selected_id = 229 }
        check_variable = { rl_selected_id = 261 }
        check_variable = { rl_selected_id = 266 }
        check_variable = { rl_selected_id = 270 }
        check_variable = { rl_selected_id = 274 }
        check_variable = { rl_selected_id = 277 }
        check_variable = { rl_selected_id = 280 }
        check_variable = { rl_selected_id = 286 }
        check_variable = { rl_selected_id = 290 }
        check_variable = { rl_selected_id = 302 }
        check_variable = { rl_selected_id = 306 }
        check_variable = { rl_selected_id = 312 }
        check_variable = { rl_selected_id = 331 }
        check_variable = { rl_selected_id = 379 }
        check_variable = { rl_selected_id = 383 }
        check_variable = { rl_selected_id = 389 }
        check_variable = { rl_selected_id = 393 }
        check_variable = { rl_selected_id = 395 }
        check_variable = { rl_selected_id = 397 }
        check_variable = { rl_selected_id = 400 }
        check_variable = { rl_selected_id = 420 }
        check_variable = { rl_selected_id = 425 }
        check_variable = { rl_selected_id = 429 }
        check_variable = { rl_selected_id = 436 }
        check_variable = { rl_selected_id = 462 }
        check_variable = { rl_selected_id = 467 }
        check_variable = { rl_selected_id = 483 }
        check_variable = { rl_selected_id = 485 }
        check_variable = { rl_selected_id = 488 }
        check_variable = { rl_selected_id = 504 }
        check_variable = { rl_selected_id = 508 }
        check_variable = { rl_selected_id = 513 }
        check_variable = { rl_selected_id = 517 }
        check_variable = { rl_selected_id = 522 }
        check_variable = { rl_selected_id = 533 }
        check_variable = { rl_selected_id = 538 }
        check_variable = { rl_selected_id = 542 }
        check_variable = { rl_selected_id = 547 }
        check_variable = { rl_selected_id = 551 }
        check_variable = { rl_selected_id = 556 }
        check_variable = { rl_selected_id = 560 }
        check_variable = { rl_selected_id = 563 }
        check_variable = { rl_selected_id = 565 }
        check_variable = { rl_selected_id = 572 }
        check_variable = { rl_selected_id = 574 }
        check_variable = { rl_selected_id = 577 }
        check_variable = { rl_selected_id = 584 }
        check_variable = { rl_selected_id = 592 }
        check_variable = { rl_selected_id = 593 }
        check_variable = { rl_selected_id = 596 }
        check_variable = { rl_selected_id = 597 }
        check_variable = { rl_selected_id = 599 }
        check_variable = { rl_selected_id = 600 }
    } } add_to_variable = { rl_hc_active_cursed_count = -1 } }
    if = {
        limit = { check_variable = { rl_hc_slot_20_cost = 2 } }
        add_to_variable = { rl_hc_slots_used = -2 }
    }
    else = { add_to_variable = { rl_hc_slots_used = -1 } }
    add_to_variable = { rl_hc_active_upgrade_count = -1 }
    add_to_variable = { rl_hc_removed_count = 1 }
    set_variable = { rl_hc_slot_20_id = 0 }
    set_variable = { rl_hc_slot_20_rarity = 0 }
    set_variable = { rl_hc_slot_20_cost = 0 }
    if = { limit = { check_variable = { rl_hc_slots_used < 0 } } set_variable = { rl_hc_slots_used = 0 } }
}

rl_hc_remove_target_slot = {
    if = {
        limit = { check_variable = { rl_hc_target_slot = 1 } }
        rl_hc_remove_slot_01 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 2 } }
        rl_hc_remove_slot_02 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 3 } }
        rl_hc_remove_slot_03 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 4 } }
        rl_hc_remove_slot_04 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 5 } }
        rl_hc_remove_slot_05 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 6 } }
        rl_hc_remove_slot_06 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 7 } }
        rl_hc_remove_slot_07 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 8 } }
        rl_hc_remove_slot_08 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 9 } }
        rl_hc_remove_slot_09 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 10 } }
        rl_hc_remove_slot_10 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 11 } }
        rl_hc_remove_slot_11 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 12 } }
        rl_hc_remove_slot_12 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 13 } }
        rl_hc_remove_slot_13 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 14 } }
        rl_hc_remove_slot_14 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 15 } }
        rl_hc_remove_slot_15 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 16 } }
        rl_hc_remove_slot_16 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 17 } }
        rl_hc_remove_slot_17 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 18 } }
        rl_hc_remove_slot_18 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 19 } }
        rl_hc_remove_slot_19 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_target_slot = 20 } }
        rl_hc_remove_slot_20 = yes
    }
}

rl_hc_ai_remove_weakest = {
    if = {
        limit = { check_variable = { rl_hc_slot_01_rarity = 1 } }
        rl_hc_remove_slot_01 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_02_rarity = 1 } }
        rl_hc_remove_slot_02 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_03_rarity = 1 } }
        rl_hc_remove_slot_03 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_04_rarity = 1 } }
        rl_hc_remove_slot_04 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_05_rarity = 1 } }
        rl_hc_remove_slot_05 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_06_rarity = 1 } }
        rl_hc_remove_slot_06 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_07_rarity = 1 } }
        rl_hc_remove_slot_07 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_08_rarity = 1 } }
        rl_hc_remove_slot_08 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_09_rarity = 1 } }
        rl_hc_remove_slot_09 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_10_rarity = 1 } }
        rl_hc_remove_slot_10 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_11_rarity = 1 } }
        rl_hc_remove_slot_11 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_12_rarity = 1 } }
        rl_hc_remove_slot_12 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_13_rarity = 1 } }
        rl_hc_remove_slot_13 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_14_rarity = 1 } }
        rl_hc_remove_slot_14 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_15_rarity = 1 } }
        rl_hc_remove_slot_15 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_16_rarity = 1 } }
        rl_hc_remove_slot_16 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_17_rarity = 1 } }
        rl_hc_remove_slot_17 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_18_rarity = 1 } }
        rl_hc_remove_slot_18 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_19_rarity = 1 } }
        rl_hc_remove_slot_19 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_20_rarity = 1 } }
        rl_hc_remove_slot_20 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_01_rarity = 2 } }
        rl_hc_remove_slot_01 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_02_rarity = 2 } }
        rl_hc_remove_slot_02 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_03_rarity = 2 } }
        rl_hc_remove_slot_03 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_04_rarity = 2 } }
        rl_hc_remove_slot_04 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_05_rarity = 2 } }
        rl_hc_remove_slot_05 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_06_rarity = 2 } }
        rl_hc_remove_slot_06 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_07_rarity = 2 } }
        rl_hc_remove_slot_07 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_08_rarity = 2 } }
        rl_hc_remove_slot_08 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_09_rarity = 2 } }
        rl_hc_remove_slot_09 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_10_rarity = 2 } }
        rl_hc_remove_slot_10 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_11_rarity = 2 } }
        rl_hc_remove_slot_11 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_12_rarity = 2 } }
        rl_hc_remove_slot_12 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_13_rarity = 2 } }
        rl_hc_remove_slot_13 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_14_rarity = 2 } }
        rl_hc_remove_slot_14 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_15_rarity = 2 } }
        rl_hc_remove_slot_15 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_16_rarity = 2 } }
        rl_hc_remove_slot_16 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_17_rarity = 2 } }
        rl_hc_remove_slot_17 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_18_rarity = 2 } }
        rl_hc_remove_slot_18 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_19_rarity = 2 } }
        rl_hc_remove_slot_19 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_20_rarity = 2 } }
        rl_hc_remove_slot_20 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_01_rarity = 3 } }
        rl_hc_remove_slot_01 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_02_rarity = 3 } }
        rl_hc_remove_slot_02 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_03_rarity = 3 } }
        rl_hc_remove_slot_03 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_04_rarity = 3 } }
        rl_hc_remove_slot_04 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_05_rarity = 3 } }
        rl_hc_remove_slot_05 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_06_rarity = 3 } }
        rl_hc_remove_slot_06 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_07_rarity = 3 } }
        rl_hc_remove_slot_07 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_08_rarity = 3 } }
        rl_hc_remove_slot_08 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_09_rarity = 3 } }
        rl_hc_remove_slot_09 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_10_rarity = 3 } }
        rl_hc_remove_slot_10 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_11_rarity = 3 } }
        rl_hc_remove_slot_11 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_12_rarity = 3 } }
        rl_hc_remove_slot_12 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_13_rarity = 3 } }
        rl_hc_remove_slot_13 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_14_rarity = 3 } }
        rl_hc_remove_slot_14 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_15_rarity = 3 } }
        rl_hc_remove_slot_15 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_16_rarity = 3 } }
        rl_hc_remove_slot_16 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_17_rarity = 3 } }
        rl_hc_remove_slot_17 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_18_rarity = 3 } }
        rl_hc_remove_slot_18 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_19_rarity = 3 } }
        rl_hc_remove_slot_19 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_20_rarity = 3 } }
        rl_hc_remove_slot_20 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_01_rarity = 4 } }
        rl_hc_remove_slot_01 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_02_rarity = 4 } }
        rl_hc_remove_slot_02 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_03_rarity = 4 } }
        rl_hc_remove_slot_03 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_04_rarity = 4 } }
        rl_hc_remove_slot_04 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_05_rarity = 4 } }
        rl_hc_remove_slot_05 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_06_rarity = 4 } }
        rl_hc_remove_slot_06 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_07_rarity = 4 } }
        rl_hc_remove_slot_07 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_08_rarity = 4 } }
        rl_hc_remove_slot_08 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_09_rarity = 4 } }
        rl_hc_remove_slot_09 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_10_rarity = 4 } }
        rl_hc_remove_slot_10 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_11_rarity = 4 } }
        rl_hc_remove_slot_11 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_12_rarity = 4 } }
        rl_hc_remove_slot_12 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_13_rarity = 4 } }
        rl_hc_remove_slot_13 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_14_rarity = 4 } }
        rl_hc_remove_slot_14 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_15_rarity = 4 } }
        rl_hc_remove_slot_15 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_16_rarity = 4 } }
        rl_hc_remove_slot_16 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_17_rarity = 4 } }
        rl_hc_remove_slot_17 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_18_rarity = 4 } }
        rl_hc_remove_slot_18 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_19_rarity = 4 } }
        rl_hc_remove_slot_19 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_20_rarity = 4 } }
        rl_hc_remove_slot_20 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_01_rarity = 5 } }
        rl_hc_remove_slot_01 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_02_rarity = 5 } }
        rl_hc_remove_slot_02 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_03_rarity = 5 } }
        rl_hc_remove_slot_03 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_04_rarity = 5 } }
        rl_hc_remove_slot_04 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_05_rarity = 5 } }
        rl_hc_remove_slot_05 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_06_rarity = 5 } }
        rl_hc_remove_slot_06 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_07_rarity = 5 } }
        rl_hc_remove_slot_07 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_08_rarity = 5 } }
        rl_hc_remove_slot_08 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_09_rarity = 5 } }
        rl_hc_remove_slot_09 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_10_rarity = 5 } }
        rl_hc_remove_slot_10 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_11_rarity = 5 } }
        rl_hc_remove_slot_11 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_12_rarity = 5 } }
        rl_hc_remove_slot_12 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_13_rarity = 5 } }
        rl_hc_remove_slot_13 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_14_rarity = 5 } }
        rl_hc_remove_slot_14 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_15_rarity = 5 } }
        rl_hc_remove_slot_15 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_16_rarity = 5 } }
        rl_hc_remove_slot_16 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_17_rarity = 5 } }
        rl_hc_remove_slot_17 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_18_rarity = 5 } }
        rl_hc_remove_slot_18 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_19_rarity = 5 } }
        rl_hc_remove_slot_19 = yes
    }
    else_if = {
        limit = { check_variable = { rl_hc_slot_20_rarity = 5 } }
        rl_hc_remove_slot_20 = yes
    }
}

rl_hc_prepare_page_1 = {
    set_variable = { rl_offer_1_id = rl_hc_slot_01_id }
    set_variable = { rl_offer_1_rarity = rl_hc_slot_01_rarity }
    set_variable = { rl_offer_2_id = rl_hc_slot_02_id }
    set_variable = { rl_offer_2_rarity = rl_hc_slot_02_rarity }
    set_variable = { rl_offer_3_id = rl_hc_slot_03_id }
    set_variable = { rl_offer_3_rarity = rl_hc_slot_03_rarity }
}

rl_hc_prepare_page_2 = {
    set_variable = { rl_offer_1_id = rl_hc_slot_04_id }
    set_variable = { rl_offer_1_rarity = rl_hc_slot_04_rarity }
    set_variable = { rl_offer_2_id = rl_hc_slot_05_id }
    set_variable = { rl_offer_2_rarity = rl_hc_slot_05_rarity }
    set_variable = { rl_offer_3_id = rl_hc_slot_06_id }
    set_variable = { rl_offer_3_rarity = rl_hc_slot_06_rarity }
}

rl_hc_prepare_page_3 = {
    set_variable = { rl_offer_1_id = rl_hc_slot_07_id }
    set_variable = { rl_offer_1_rarity = rl_hc_slot_07_rarity }
    set_variable = { rl_offer_2_id = rl_hc_slot_08_id }
    set_variable = { rl_offer_2_rarity = rl_hc_slot_08_rarity }
    set_variable = { rl_offer_3_id = rl_hc_slot_09_id }
    set_variable = { rl_offer_3_rarity = rl_hc_slot_09_rarity }
}

rl_hc_prepare_page_4 = {
    set_variable = { rl_offer_1_id = rl_hc_slot_10_id }
    set_variable = { rl_offer_1_rarity = rl_hc_slot_10_rarity }
    set_variable = { rl_offer_2_id = rl_hc_slot_11_id }
    set_variable = { rl_offer_2_rarity = rl_hc_slot_11_rarity }
    set_variable = { rl_offer_3_id = rl_hc_slot_12_id }
    set_variable = { rl_offer_3_rarity = rl_hc_slot_12_rarity }
}

rl_hc_prepare_page_5 = {
    set_variable = { rl_offer_1_id = rl_hc_slot_13_id }
    set_variable = { rl_offer_1_rarity = rl_hc_slot_13_rarity }
    set_variable = { rl_offer_2_id = rl_hc_slot_14_id }
    set_variable = { rl_offer_2_rarity = rl_hc_slot_14_rarity }
    set_variable = { rl_offer_3_id = rl_hc_slot_15_id }
    set_variable = { rl_offer_3_rarity = rl_hc_slot_15_rarity }
}

rl_hc_prepare_page_6 = {
    set_variable = { rl_offer_1_id = rl_hc_slot_16_id }
    set_variable = { rl_offer_1_rarity = rl_hc_slot_16_rarity }
    set_variable = { rl_offer_2_id = rl_hc_slot_17_id }
    set_variable = { rl_offer_2_rarity = rl_hc_slot_17_rarity }
    set_variable = { rl_offer_3_id = rl_hc_slot_18_id }
    set_variable = { rl_offer_3_rarity = rl_hc_slot_18_rarity }
}

rl_hc_prepare_page_7 = {
    set_variable = { rl_offer_1_id = rl_hc_slot_19_id }
    set_variable = { rl_offer_1_rarity = rl_hc_slot_19_rarity }
    set_variable = { rl_offer_2_id = rl_hc_slot_20_id }
    set_variable = { rl_offer_2_rarity = rl_hc_slot_20_rarity }
    set_variable = { rl_offer_3_id = 0 }
    set_variable = { rl_offer_3_rarity = 0 }
}


rl_hc_resolve_pending_after_removal = {
    if = {
        limit = {
            OR = {
                AND = {
                    check_variable = { rl_hc_pending_cost = 1 }
                    check_variable = { rl_hc_slots_used < 20 }
                }
                AND = {
                    check_variable = { rl_hc_pending_cost = 2 }
                    check_variable = { rl_hc_slots_used < 19 }
                }
            }
        }
        add_to_variable = { rl_hc_replaced_count = 1 }
        rl_hc_apply_pending_upgrade = yes
    }
    else = {
        rl_hc_return_to_inventory_page = yes
    }
}

rl_hc_return_to_inventory_page = {
    if = {
        limit = { check_variable = { rl_hc_return_page = 51 } }
        country_event = { id = rl.51 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_return_page = 52 } }
        country_event = { id = rl.52 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_return_page = 53 } }
        country_event = { id = rl.53 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_return_page = 54 } }
        country_event = { id = rl.54 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_return_page = 55 } }
        country_event = { id = rl.55 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_return_page = 56 } }
        country_event = { id = rl.56 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_return_page = 57 } }
        country_event = { id = rl.57 }
    }
}


rl_reset_player_only_counterpower_variables = {
    set_variable = { rl_counter_mod_industrial_capacity_factory = 0 }
    set_variable = { rl_counter_mod_industrial_capacity_dockyard = 0 }
    set_variable = { rl_counter_mod_production_speed_buildings_factor = 0 }
    set_variable = { rl_counter_mod_production_factory_efficiency_gain_factor = 0 }
    set_variable = { rl_counter_mod_production_factory_max_efficiency_factor = 0 }
    set_variable = { rl_counter_mod_research_speed_factor = 0 }
    set_variable = { rl_counter_mod_army_attack_factor = 0 }
    set_variable = { rl_counter_mod_army_defence_factor = 0 }
    set_variable = { rl_counter_mod_army_org_factor = 0 }
    set_variable = { rl_counter_mod_army_speed_factor = 0 }
    set_variable = { rl_counter_mod_max_planning_factor = 0 }
    set_variable = { rl_counter_mod_planning_speed = 0 }
    set_variable = { rl_counter_mod_land_reinforce_rate = 0 }
    set_variable = { rl_counter_mod_training_time_army_factor = 0 }
    set_variable = { rl_counter_mod_air_attack_factor = 0 }
    set_variable = { rl_counter_mod_air_defence_factor = 0 }
    set_variable = { rl_counter_mod_air_mission_efficiency = 0 }
    set_variable = { rl_counter_mod_naval_damage_factor = 0 }
    set_variable = { rl_counter_mod_naval_defense_factor = 0 }
    set_variable = { rl_counter_mod_navy_org_factor = 0 }
    set_variable = { rl_counter_mod_supply_consumption_factor = 0 }
    set_variable = { rl_counter_mod_army_fuel_consumption_factor = 0 }
    set_variable = { rl_counter_mod_navy_fuel_consumption_factor = 0 }
    set_variable = { rl_counter_mod_air_fuel_consumption_factor = 0 }
    set_variable = { rl_counter_mod_stability_factor = 0 }
    set_variable = { rl_counter_mod_war_support_factor = 0 }
}

rl_update_global_player_only_escalation = {
    if = {
        limit = { has_global_flag = rl_mode_player_only is_ai = no }
        if = { limit = { NOT = { has_idea = rl_player_only_counterpower_indicator } } add_ideas = rl_player_only_counterpower_indicator }
        if = {
            limit = { OR = { date > 1947.1.1 check_variable = { rl_total_upgrades > 449 } } }
            clr_global_flag = rl_escalation_stage_1
            clr_global_flag = rl_escalation_stage_2
            clr_global_flag = rl_escalation_stage_3
            clr_global_flag = rl_escalation_stage_4
            set_global_flag = rl_escalation_stage_5
            if = { limit = { NOT = { check_variable = { rl_last_escalation_stage = 5 } } } set_variable = { rl_last_escalation_stage = 5 } country_event = { id = rl.40 hours = 2 } }
        }
        else_if = {
            limit = { OR = { date > 1945.1.1 check_variable = { rl_total_upgrades > 349 } } }
            clr_global_flag = rl_escalation_stage_1
            clr_global_flag = rl_escalation_stage_2
            clr_global_flag = rl_escalation_stage_3
            clr_global_flag = rl_escalation_stage_5
            set_global_flag = rl_escalation_stage_4
            if = { limit = { NOT = { check_variable = { rl_last_escalation_stage = 4 } } } set_variable = { rl_last_escalation_stage = 4 } country_event = { id = rl.40 hours = 2 } }
        }
        else_if = {
            limit = { OR = { date > 1943.1.1 check_variable = { rl_total_upgrades > 249 } } }
            clr_global_flag = rl_escalation_stage_1
            clr_global_flag = rl_escalation_stage_2
            clr_global_flag = rl_escalation_stage_4
            clr_global_flag = rl_escalation_stage_5
            set_global_flag = rl_escalation_stage_3
            if = { limit = { NOT = { check_variable = { rl_last_escalation_stage = 3 } } } set_variable = { rl_last_escalation_stage = 3 } country_event = { id = rl.40 hours = 2 } }
        }
        else_if = {
            limit = { OR = { date > 1941.1.1 check_variable = { rl_total_upgrades > 174 } } }
            clr_global_flag = rl_escalation_stage_1
            clr_global_flag = rl_escalation_stage_3
            clr_global_flag = rl_escalation_stage_4
            clr_global_flag = rl_escalation_stage_5
            set_global_flag = rl_escalation_stage_2
            if = { limit = { NOT = { check_variable = { rl_last_escalation_stage = 2 } } } set_variable = { rl_last_escalation_stage = 2 } country_event = { id = rl.40 hours = 2 } }
        }
        else = {
            clr_global_flag = rl_escalation_stage_2
            clr_global_flag = rl_escalation_stage_3
            clr_global_flag = rl_escalation_stage_4
            clr_global_flag = rl_escalation_stage_5
            set_global_flag = rl_escalation_stage_1
            set_variable = { rl_last_escalation_stage = 1 }
        }
        every_country = { limit = { is_ai = yes } rl_apply_player_only_ai_escalation = yes }
        if = { limit = { NOT = { has_country_flag = rl_counterpower_announced } } set_country_flag = rl_counterpower_announced country_event = { id = rl.41 hours = 3 } }
    }
}

rl_remove_all_escalation_ideas = {
    remove_ideas = rl_player_only_escalation_1
    remove_ideas = rl_player_only_escalation_2
    remove_ideas = rl_player_only_escalation_3
    remove_ideas = rl_player_only_escalation_4
    remove_ideas = rl_player_only_escalation_5
}

rl_apply_player_only_ai_escalation = {
    if = {
        limit = { has_global_flag = rl_mode_player_only is_ai = yes }
        rl_remove_all_escalation_ideas = yes
        rl_reset_player_only_counterpower_variables = yes
        if = {
            limit = { has_global_flag = rl_escalation_stage_5 }
            set_variable = { rl_counter_mod_industrial_capacity_factory = 0.45 }
            set_variable = { rl_counter_mod_industrial_capacity_dockyard = 0.45 }
            set_variable = { rl_counter_mod_production_speed_buildings_factor = 0.45 }
            set_variable = { rl_counter_mod_production_factory_efficiency_gain_factor = 0.25 }
            set_variable = { rl_counter_mod_production_factory_max_efficiency_factor = 0.20 }
            set_variable = { rl_counter_mod_research_speed_factor = 0.20 }
            set_variable = { rl_counter_mod_army_attack_factor = 0.45 }
            set_variable = { rl_counter_mod_army_defence_factor = 0.45 }
            set_variable = { rl_counter_mod_army_org_factor = 0.20 }
            set_variable = { rl_counter_mod_army_speed_factor = 0.12 }
            set_variable = { rl_counter_mod_max_planning_factor = 0.25 }
            set_variable = { rl_counter_mod_planning_speed = 0.25 }
            set_variable = { rl_counter_mod_land_reinforce_rate = 0.05 }
            set_variable = { rl_counter_mod_training_time_army_factor = -0.20 }
            set_variable = { rl_counter_mod_air_attack_factor = 0.45 }
            set_variable = { rl_counter_mod_air_defence_factor = 0.45 }
            set_variable = { rl_counter_mod_air_mission_efficiency = 0.25 }
            set_variable = { rl_counter_mod_naval_damage_factor = 0.45 }
            set_variable = { rl_counter_mod_naval_defense_factor = 0.45 }
            set_variable = { rl_counter_mod_navy_org_factor = 0.20 }
            set_variable = { rl_counter_mod_supply_consumption_factor = -0.20 }
            set_variable = { rl_counter_mod_army_fuel_consumption_factor = -0.15 }
            set_variable = { rl_counter_mod_navy_fuel_consumption_factor = -0.15 }
            set_variable = { rl_counter_mod_air_fuel_consumption_factor = -0.15 }
            set_variable = { rl_counter_mod_stability_factor = 0.15 }
            set_variable = { rl_counter_mod_war_support_factor = 0.15 }
        }
        else_if = {
            limit = { has_global_flag = rl_escalation_stage_4 }
            set_variable = { rl_counter_mod_industrial_capacity_factory = 0.30 }
            set_variable = { rl_counter_mod_industrial_capacity_dockyard = 0.30 }
            set_variable = { rl_counter_mod_production_speed_buildings_factor = 0.30 }
            set_variable = { rl_counter_mod_production_factory_efficiency_gain_factor = 0.15 }
            set_variable = { rl_counter_mod_production_factory_max_efficiency_factor = 0.10 }
            set_variable = { rl_counter_mod_research_speed_factor = 0.15 }
            set_variable = { rl_counter_mod_army_attack_factor = 0.30 }
            set_variable = { rl_counter_mod_army_defence_factor = 0.30 }
            set_variable = { rl_counter_mod_army_org_factor = 0.15 }
            set_variable = { rl_counter_mod_army_speed_factor = 0.08 }
            set_variable = { rl_counter_mod_max_planning_factor = 0.18 }
            set_variable = { rl_counter_mod_land_reinforce_rate = 0.03 }
            set_variable = { rl_counter_mod_air_attack_factor = 0.30 }
            set_variable = { rl_counter_mod_air_defence_factor = 0.30 }
            set_variable = { rl_counter_mod_air_mission_efficiency = 0.15 }
            set_variable = { rl_counter_mod_naval_damage_factor = 0.30 }
            set_variable = { rl_counter_mod_naval_defense_factor = 0.30 }
            set_variable = { rl_counter_mod_navy_org_factor = 0.15 }
            set_variable = { rl_counter_mod_supply_consumption_factor = -0.15 }
            set_variable = { rl_counter_mod_army_fuel_consumption_factor = -0.10 }
            set_variable = { rl_counter_mod_stability_factor = 0.10 }
            set_variable = { rl_counter_mod_war_support_factor = 0.10 }
        }
        else_if = {
            limit = { has_global_flag = rl_escalation_stage_3 }
            set_variable = { rl_counter_mod_industrial_capacity_factory = 0.20 }
            set_variable = { rl_counter_mod_industrial_capacity_dockyard = 0.20 }
            set_variable = { rl_counter_mod_production_speed_buildings_factor = 0.20 }
            set_variable = { rl_counter_mod_production_factory_efficiency_gain_factor = 0.10 }
            set_variable = { rl_counter_mod_research_speed_factor = 0.10 }
            set_variable = { rl_counter_mod_army_attack_factor = 0.20 }
            set_variable = { rl_counter_mod_army_defence_factor = 0.20 }
            set_variable = { rl_counter_mod_army_org_factor = 0.10 }
            set_variable = { rl_counter_mod_army_speed_factor = 0.05 }
            set_variable = { rl_counter_mod_max_planning_factor = 0.10 }
            set_variable = { rl_counter_mod_air_attack_factor = 0.20 }
            set_variable = { rl_counter_mod_air_defence_factor = 0.20 }
            set_variable = { rl_counter_mod_air_mission_efficiency = 0.10 }
            set_variable = { rl_counter_mod_naval_damage_factor = 0.20 }
            set_variable = { rl_counter_mod_naval_defense_factor = 0.20 }
            set_variable = { rl_counter_mod_navy_org_factor = 0.10 }
            set_variable = { rl_counter_mod_supply_consumption_factor = -0.10 }
        }
        else_if = {
            limit = { has_global_flag = rl_escalation_stage_2 }
            set_variable = { rl_counter_mod_industrial_capacity_factory = 0.10 }
            set_variable = { rl_counter_mod_industrial_capacity_dockyard = 0.10 }
            set_variable = { rl_counter_mod_production_speed_buildings_factor = 0.10 }
            set_variable = { rl_counter_mod_production_factory_efficiency_gain_factor = 0.05 }
            set_variable = { rl_counter_mod_research_speed_factor = 0.07 }
            set_variable = { rl_counter_mod_army_attack_factor = 0.10 }
            set_variable = { rl_counter_mod_army_defence_factor = 0.10 }
            set_variable = { rl_counter_mod_army_org_factor = 0.05 }
            set_variable = { rl_counter_mod_air_attack_factor = 0.10 }
            set_variable = { rl_counter_mod_air_defence_factor = 0.10 }
            set_variable = { rl_counter_mod_naval_damage_factor = 0.10 }
            set_variable = { rl_counter_mod_naval_defense_factor = 0.10 }
            set_variable = { rl_counter_mod_supply_consumption_factor = -0.05 }
        }
        else = {
            set_variable = { rl_counter_mod_industrial_capacity_factory = 0.05 }
            set_variable = { rl_counter_mod_industrial_capacity_dockyard = 0.05 }
            set_variable = { rl_counter_mod_production_speed_buildings_factor = 0.05 }
            set_variable = { rl_counter_mod_research_speed_factor = 0.03 }
            set_variable = { rl_counter_mod_army_attack_factor = 0.05 }
            set_variable = { rl_counter_mod_army_defence_factor = 0.05 }
            set_variable = { rl_counter_mod_air_attack_factor = 0.05 }
            set_variable = { rl_counter_mod_air_defence_factor = 0.05 }
            set_variable = { rl_counter_mod_naval_damage_factor = 0.05 }
            set_variable = { rl_counter_mod_naval_defense_factor = 0.05 }
        }
        if = { limit = { NOT = { has_dynamic_modifier = rl_player_only_counterpower } } add_dynamic_modifier = { modifier = rl_player_only_counterpower } }
        set_country_flag = rl_counterpower_applied
    }
}

rl_bootstrap_player_only_counterpower = {
    if = {
        limit = { has_global_flag = rl_mode_player_only }
        if = {
            limit = { NOT = { OR = { has_global_flag = rl_escalation_stage_1 has_global_flag = rl_escalation_stage_2 has_global_flag = rl_escalation_stage_3 has_global_flag = rl_escalation_stage_4 has_global_flag = rl_escalation_stage_5 } } }
            set_global_flag = rl_escalation_stage_1
            set_variable = { rl_last_escalation_stage = 1 }
        }
        if = { limit = { is_ai = no NOT = { has_idea = rl_player_only_counterpower_indicator } } add_ideas = rl_player_only_counterpower_indicator }
        every_country = { limit = { is_ai = yes } rl_apply_player_only_ai_escalation = yes }
        if = { limit = { is_ai = no NOT = { has_country_flag = rl_counterpower_announced } } set_country_flag = rl_counterpower_announced country_event = { id = rl.41 hours = 3 } }
    }
}

rl_finalize_roguelike_setup = {
    set_global_flag = rl_setup_complete
    set_global_flag = rl_v24_configured
    set_global_flag = rl_v241_configured
    every_country = {
        limit = { OR = { has_global_flag = rl_mode_all AND = { has_global_flag = rl_mode_player_only is_ai = no } } }
        rl_initialize_country = yes
        set_variable = { rl_offer_week_counter = 0 }
        set_variable = { rl_offer_month_counter = 0 }
    }
    rl_bootstrap_player_only_counterpower = yes
}

rl_relic_reset_collection = {
    set_variable = { rl_relic_mod_air_agility_factor = 0 }
    set_variable = { rl_relic_mod_air_attack_factor = 0 }
    set_variable = { rl_relic_mod_air_defence_factor = 0 }
    set_variable = { rl_relic_mod_air_mission_efficiency = 0 }
    set_variable = { rl_relic_mod_air_range_factor = 0 }
    set_variable = { rl_relic_mod_air_superiority_efficiency = 0 }
    set_variable = { rl_relic_mod_armor_factor = 0 }
    set_variable = { rl_relic_mod_army_armor_attack_factor = 0 }
    set_variable = { rl_relic_mod_army_attack_factor = 0 }
    set_variable = { rl_relic_mod_army_defence_factor = 0 }
    set_variable = { rl_relic_mod_army_fuel_consumption_factor = 0 }
    set_variable = { rl_relic_mod_army_org_factor = 0 }
    set_variable = { rl_relic_mod_army_org_regain = 0 }
    set_variable = { rl_relic_mod_army_speed_factor = 0 }
    set_variable = { rl_relic_mod_compliance_gain = 0 }
    set_variable = { rl_relic_mod_consumer_goods_factor = 0 }
    set_variable = { rl_relic_mod_decryption = 0 }
    set_variable = { rl_relic_mod_encryption = 0 }
    set_variable = { rl_relic_mod_equipment_conversion_speed = 0 }
    set_variable = { rl_relic_mod_equipment_upgrade_xp_cost = 0 }
    set_variable = { rl_relic_mod_experience_loss_factor = 0 }
    set_variable = { rl_relic_mod_fuel_gain_factor = 0 }
    set_variable = { rl_relic_mod_industrial_capacity_dockyard = 0 }
    set_variable = { rl_relic_mod_industrial_capacity_factory = 0 }
    set_variable = { rl_relic_mod_industry_free_repair_factor = 0 }
    set_variable = { rl_relic_mod_intel_from_operatives_factor = 0 }
    set_variable = { rl_relic_mod_land_reinforce_rate = 0 }
    set_variable = { rl_relic_mod_local_resources_factor = 0 }
    set_variable = { rl_relic_mod_max_dig_in_factor = 0 }
    set_variable = { rl_relic_mod_max_fuel_factor = 0 }
    set_variable = { rl_relic_mod_mechanized_attack_factor = 0 }
    set_variable = { rl_relic_mod_min_export = 0 }
    set_variable = { rl_relic_mod_naval_damage_factor = 0 }
    set_variable = { rl_relic_mod_naval_defense_factor = 0 }
    set_variable = { rl_relic_mod_navy_max_range_factor = 0 }
    set_variable = { rl_relic_mod_navy_org_factor = 0 }
    set_variable = { rl_relic_mod_out_of_supply_factor = 0 }
    set_variable = { rl_relic_mod_planning_speed = 0 }
    set_variable = { rl_relic_mod_political_power_factor = 0 }
    set_variable = { rl_relic_mod_positioning = 0 }
    set_variable = { rl_relic_mod_production_factory_efficiency_gain_factor = 0 }
    set_variable = { rl_relic_mod_production_lack_of_resource_penalty_factor = 0 }
    set_variable = { rl_relic_mod_production_speed_buildings_factor = 0 }
    set_variable = { rl_relic_mod_repair_speed_factor = 0 }
    set_variable = { rl_relic_mod_research_speed_factor = 0 }
    set_variable = { rl_relic_mod_resistance_target = 0 }
    set_variable = { rl_relic_mod_screening_efficiency = 0 }
    set_variable = { rl_relic_mod_special_project_speed_factor = 0 }
    set_variable = { rl_relic_mod_spotting_chance = 0 }
    set_variable = { rl_relic_mod_stability_factor = 0 }
    set_variable = { rl_relic_mod_supply_consumption_factor = 0 }
    set_variable = { rl_relic_mod_war_support_factor = 0 }
    clr_country_flag = rl_has_relic_1
    remove_ideas = rl_relic_1
    clr_country_flag = rl_has_relic_2
    remove_ideas = rl_relic_2
    clr_country_flag = rl_has_relic_3
    remove_ideas = rl_relic_3
    clr_country_flag = rl_has_relic_4
    remove_ideas = rl_relic_4
    clr_country_flag = rl_has_relic_5
    remove_ideas = rl_relic_5
    clr_country_flag = rl_has_relic_6
    remove_ideas = rl_relic_6
    clr_country_flag = rl_has_relic_7
    remove_ideas = rl_relic_7
    clr_country_flag = rl_has_relic_8
    remove_ideas = rl_relic_8
    clr_country_flag = rl_has_relic_9
    remove_ideas = rl_relic_9
    clr_country_flag = rl_has_relic_10
    remove_ideas = rl_relic_10
    clr_country_flag = rl_has_relic_11
    remove_ideas = rl_relic_11
    clr_country_flag = rl_has_relic_12
    remove_ideas = rl_relic_12
    clr_country_flag = rl_has_relic_13
    remove_ideas = rl_relic_13
    clr_country_flag = rl_has_relic_14
    remove_ideas = rl_relic_14
    clr_country_flag = rl_has_relic_15
    remove_ideas = rl_relic_15
    clr_country_flag = rl_has_relic_16
    remove_ideas = rl_relic_16
    clr_country_flag = rl_has_relic_17
    remove_ideas = rl_relic_17
    clr_country_flag = rl_has_relic_18
    remove_ideas = rl_relic_18
    clr_country_flag = rl_has_relic_19
    remove_ideas = rl_relic_19
    clr_country_flag = rl_has_relic_20
    remove_ideas = rl_relic_20
    clr_country_flag = rl_has_relic_21
    remove_ideas = rl_relic_21
    clr_country_flag = rl_has_relic_22
    remove_ideas = rl_relic_22
    clr_country_flag = rl_has_relic_23
    remove_ideas = rl_relic_23
    clr_country_flag = rl_has_relic_24
    remove_ideas = rl_relic_24
    clr_country_flag = rl_has_relic_25
    remove_ideas = rl_relic_25
    clr_country_flag = rl_has_relic_26
    remove_ideas = rl_relic_26
    clr_country_flag = rl_has_relic_27
    remove_ideas = rl_relic_27
    clr_country_flag = rl_has_relic_28
    remove_ideas = rl_relic_28
    clr_country_flag = rl_has_relic_29
    remove_ideas = rl_relic_29
    clr_country_flag = rl_has_relic_30
    remove_ideas = rl_relic_30
}

rl_relic_rebuild_collection = {
    rl_relic_reset_collection = yes
    if = {
        limit = { check_variable = { rl_relic_slot_1_id > 0 } }
        set_variable = { rl_relic_pending_id = rl_relic_slot_1_id }
        rl_relic_add_pending_idea = yes
    }
    if = {
        limit = { check_variable = { rl_relic_slot_2_id > 0 } }
        set_variable = { rl_relic_pending_id = rl_relic_slot_2_id }
        rl_relic_add_pending_idea = yes
    }
    if = {
        limit = { check_variable = { rl_relic_slot_3_id > 0 } }
        set_variable = { rl_relic_pending_id = rl_relic_slot_3_id }
        rl_relic_add_pending_idea = yes
    }
    set_variable = { rl_relic_pending_id = 0 }
    set_variable = { rl_relic_pending_power = 0 }
}

rl_hc_count_lower_rarity_slots = {
    set_variable = { rl_hc_lower_rarity_count = 0 }
    if = {
        limit = { check_variable = { rl_hc_pending_rarity = 2 } }
        if = { limit = { check_variable = { rl_hc_slot_01_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_02_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_03_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_04_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_05_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_06_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_07_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_08_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_09_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_10_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_11_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_12_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_13_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_14_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_15_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_16_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_17_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_18_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_19_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { check_variable = { rl_hc_slot_20_rarity = 1 } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
    }
    else_if = {
        limit = { check_variable = { rl_hc_pending_rarity = 3 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_01_rarity = 1 } check_variable = { rl_hc_slot_01_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_02_rarity = 1 } check_variable = { rl_hc_slot_02_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_03_rarity = 1 } check_variable = { rl_hc_slot_03_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_04_rarity = 1 } check_variable = { rl_hc_slot_04_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_05_rarity = 1 } check_variable = { rl_hc_slot_05_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_06_rarity = 1 } check_variable = { rl_hc_slot_06_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_07_rarity = 1 } check_variable = { rl_hc_slot_07_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_08_rarity = 1 } check_variable = { rl_hc_slot_08_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_09_rarity = 1 } check_variable = { rl_hc_slot_09_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_10_rarity = 1 } check_variable = { rl_hc_slot_10_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_11_rarity = 1 } check_variable = { rl_hc_slot_11_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_12_rarity = 1 } check_variable = { rl_hc_slot_12_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_13_rarity = 1 } check_variable = { rl_hc_slot_13_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_14_rarity = 1 } check_variable = { rl_hc_slot_14_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_15_rarity = 1 } check_variable = { rl_hc_slot_15_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_16_rarity = 1 } check_variable = { rl_hc_slot_16_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_17_rarity = 1 } check_variable = { rl_hc_slot_17_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_18_rarity = 1 } check_variable = { rl_hc_slot_18_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_19_rarity = 1 } check_variable = { rl_hc_slot_19_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_20_rarity = 1 } check_variable = { rl_hc_slot_20_rarity = 2 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
    }
    else_if = {
        limit = { check_variable = { rl_hc_pending_rarity = 4 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_01_rarity = 1 } check_variable = { rl_hc_slot_01_rarity = 2 } check_variable = { rl_hc_slot_01_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_02_rarity = 1 } check_variable = { rl_hc_slot_02_rarity = 2 } check_variable = { rl_hc_slot_02_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_03_rarity = 1 } check_variable = { rl_hc_slot_03_rarity = 2 } check_variable = { rl_hc_slot_03_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_04_rarity = 1 } check_variable = { rl_hc_slot_04_rarity = 2 } check_variable = { rl_hc_slot_04_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_05_rarity = 1 } check_variable = { rl_hc_slot_05_rarity = 2 } check_variable = { rl_hc_slot_05_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_06_rarity = 1 } check_variable = { rl_hc_slot_06_rarity = 2 } check_variable = { rl_hc_slot_06_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_07_rarity = 1 } check_variable = { rl_hc_slot_07_rarity = 2 } check_variable = { rl_hc_slot_07_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_08_rarity = 1 } check_variable = { rl_hc_slot_08_rarity = 2 } check_variable = { rl_hc_slot_08_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_09_rarity = 1 } check_variable = { rl_hc_slot_09_rarity = 2 } check_variable = { rl_hc_slot_09_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_10_rarity = 1 } check_variable = { rl_hc_slot_10_rarity = 2 } check_variable = { rl_hc_slot_10_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_11_rarity = 1 } check_variable = { rl_hc_slot_11_rarity = 2 } check_variable = { rl_hc_slot_11_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_12_rarity = 1 } check_variable = { rl_hc_slot_12_rarity = 2 } check_variable = { rl_hc_slot_12_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_13_rarity = 1 } check_variable = { rl_hc_slot_13_rarity = 2 } check_variable = { rl_hc_slot_13_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_14_rarity = 1 } check_variable = { rl_hc_slot_14_rarity = 2 } check_variable = { rl_hc_slot_14_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_15_rarity = 1 } check_variable = { rl_hc_slot_15_rarity = 2 } check_variable = { rl_hc_slot_15_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_16_rarity = 1 } check_variable = { rl_hc_slot_16_rarity = 2 } check_variable = { rl_hc_slot_16_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_17_rarity = 1 } check_variable = { rl_hc_slot_17_rarity = 2 } check_variable = { rl_hc_slot_17_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_18_rarity = 1 } check_variable = { rl_hc_slot_18_rarity = 2 } check_variable = { rl_hc_slot_18_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_19_rarity = 1 } check_variable = { rl_hc_slot_19_rarity = 2 } check_variable = { rl_hc_slot_19_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_20_rarity = 1 } check_variable = { rl_hc_slot_20_rarity = 2 } check_variable = { rl_hc_slot_20_rarity = 3 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
    }
    else_if = {
        limit = { check_variable = { rl_hc_pending_rarity = 5 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_01_rarity = 1 } check_variable = { rl_hc_slot_01_rarity = 2 } check_variable = { rl_hc_slot_01_rarity = 3 } check_variable = { rl_hc_slot_01_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_02_rarity = 1 } check_variable = { rl_hc_slot_02_rarity = 2 } check_variable = { rl_hc_slot_02_rarity = 3 } check_variable = { rl_hc_slot_02_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_03_rarity = 1 } check_variable = { rl_hc_slot_03_rarity = 2 } check_variable = { rl_hc_slot_03_rarity = 3 } check_variable = { rl_hc_slot_03_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_04_rarity = 1 } check_variable = { rl_hc_slot_04_rarity = 2 } check_variable = { rl_hc_slot_04_rarity = 3 } check_variable = { rl_hc_slot_04_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_05_rarity = 1 } check_variable = { rl_hc_slot_05_rarity = 2 } check_variable = { rl_hc_slot_05_rarity = 3 } check_variable = { rl_hc_slot_05_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_06_rarity = 1 } check_variable = { rl_hc_slot_06_rarity = 2 } check_variable = { rl_hc_slot_06_rarity = 3 } check_variable = { rl_hc_slot_06_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_07_rarity = 1 } check_variable = { rl_hc_slot_07_rarity = 2 } check_variable = { rl_hc_slot_07_rarity = 3 } check_variable = { rl_hc_slot_07_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_08_rarity = 1 } check_variable = { rl_hc_slot_08_rarity = 2 } check_variable = { rl_hc_slot_08_rarity = 3 } check_variable = { rl_hc_slot_08_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_09_rarity = 1 } check_variable = { rl_hc_slot_09_rarity = 2 } check_variable = { rl_hc_slot_09_rarity = 3 } check_variable = { rl_hc_slot_09_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_10_rarity = 1 } check_variable = { rl_hc_slot_10_rarity = 2 } check_variable = { rl_hc_slot_10_rarity = 3 } check_variable = { rl_hc_slot_10_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_11_rarity = 1 } check_variable = { rl_hc_slot_11_rarity = 2 } check_variable = { rl_hc_slot_11_rarity = 3 } check_variable = { rl_hc_slot_11_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_12_rarity = 1 } check_variable = { rl_hc_slot_12_rarity = 2 } check_variable = { rl_hc_slot_12_rarity = 3 } check_variable = { rl_hc_slot_12_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_13_rarity = 1 } check_variable = { rl_hc_slot_13_rarity = 2 } check_variable = { rl_hc_slot_13_rarity = 3 } check_variable = { rl_hc_slot_13_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_14_rarity = 1 } check_variable = { rl_hc_slot_14_rarity = 2 } check_variable = { rl_hc_slot_14_rarity = 3 } check_variable = { rl_hc_slot_14_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_15_rarity = 1 } check_variable = { rl_hc_slot_15_rarity = 2 } check_variable = { rl_hc_slot_15_rarity = 3 } check_variable = { rl_hc_slot_15_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_16_rarity = 1 } check_variable = { rl_hc_slot_16_rarity = 2 } check_variable = { rl_hc_slot_16_rarity = 3 } check_variable = { rl_hc_slot_16_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_17_rarity = 1 } check_variable = { rl_hc_slot_17_rarity = 2 } check_variable = { rl_hc_slot_17_rarity = 3 } check_variable = { rl_hc_slot_17_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_18_rarity = 1 } check_variable = { rl_hc_slot_18_rarity = 2 } check_variable = { rl_hc_slot_18_rarity = 3 } check_variable = { rl_hc_slot_18_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_19_rarity = 1 } check_variable = { rl_hc_slot_19_rarity = 2 } check_variable = { rl_hc_slot_19_rarity = 3 } check_variable = { rl_hc_slot_19_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
        if = { limit = { OR = { check_variable = { rl_hc_slot_20_rarity = 1 } check_variable = { rl_hc_slot_20_rarity = 2 } check_variable = { rl_hc_slot_20_rarity = 3 } check_variable = { rl_hc_slot_20_rarity = 4 } } } add_to_variable = { rl_hc_lower_rarity_count = 1 } }
    }
}

rl_hc_auto_remove_one_lower = {
    if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_01_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_01_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_01_rarity }
        rl_hc_remove_slot_01 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_02_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_02_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_02_rarity }
        rl_hc_remove_slot_02 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_03_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_03_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_03_rarity }
        rl_hc_remove_slot_03 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_04_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_04_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_04_rarity }
        rl_hc_remove_slot_04 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_05_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_05_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_05_rarity }
        rl_hc_remove_slot_05 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_06_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_06_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_06_rarity }
        rl_hc_remove_slot_06 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_07_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_07_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_07_rarity }
        rl_hc_remove_slot_07 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_08_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_08_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_08_rarity }
        rl_hc_remove_slot_08 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_09_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_09_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_09_rarity }
        rl_hc_remove_slot_09 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_10_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_10_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_10_rarity }
        rl_hc_remove_slot_10 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_11_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_11_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_11_rarity }
        rl_hc_remove_slot_11 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_12_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_12_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_12_rarity }
        rl_hc_remove_slot_12 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_13_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_13_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_13_rarity }
        rl_hc_remove_slot_13 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_14_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_14_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_14_rarity }
        rl_hc_remove_slot_14 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_15_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_15_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_15_rarity }
        rl_hc_remove_slot_15 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_16_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_16_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_16_rarity }
        rl_hc_remove_slot_16 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_17_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_17_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_17_rarity }
        rl_hc_remove_slot_17 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_18_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_18_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_18_rarity }
        rl_hc_remove_slot_18 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_19_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_19_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_19_rarity }
        rl_hc_remove_slot_19 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 2 } check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_20_rarity = 1 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_20_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_20_rarity }
        rl_hc_remove_slot_20 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_01_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_01_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_01_rarity }
        rl_hc_remove_slot_01 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_02_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_02_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_02_rarity }
        rl_hc_remove_slot_02 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_03_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_03_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_03_rarity }
        rl_hc_remove_slot_03 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_04_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_04_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_04_rarity }
        rl_hc_remove_slot_04 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_05_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_05_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_05_rarity }
        rl_hc_remove_slot_05 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_06_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_06_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_06_rarity }
        rl_hc_remove_slot_06 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_07_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_07_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_07_rarity }
        rl_hc_remove_slot_07 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_08_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_08_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_08_rarity }
        rl_hc_remove_slot_08 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_09_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_09_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_09_rarity }
        rl_hc_remove_slot_09 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_10_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_10_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_10_rarity }
        rl_hc_remove_slot_10 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_11_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_11_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_11_rarity }
        rl_hc_remove_slot_11 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_12_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_12_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_12_rarity }
        rl_hc_remove_slot_12 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_13_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_13_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_13_rarity }
        rl_hc_remove_slot_13 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_14_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_14_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_14_rarity }
        rl_hc_remove_slot_14 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_15_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_15_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_15_rarity }
        rl_hc_remove_slot_15 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_16_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_16_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_16_rarity }
        rl_hc_remove_slot_16 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_17_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_17_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_17_rarity }
        rl_hc_remove_slot_17 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_18_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_18_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_18_rarity }
        rl_hc_remove_slot_18 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_19_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_19_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_19_rarity }
        rl_hc_remove_slot_19 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 3 } check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_20_rarity = 2 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_20_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_20_rarity }
        rl_hc_remove_slot_20 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_01_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_01_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_01_rarity }
        rl_hc_remove_slot_01 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_02_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_02_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_02_rarity }
        rl_hc_remove_slot_02 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_03_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_03_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_03_rarity }
        rl_hc_remove_slot_03 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_04_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_04_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_04_rarity }
        rl_hc_remove_slot_04 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_05_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_05_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_05_rarity }
        rl_hc_remove_slot_05 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_06_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_06_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_06_rarity }
        rl_hc_remove_slot_06 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_07_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_07_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_07_rarity }
        rl_hc_remove_slot_07 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_08_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_08_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_08_rarity }
        rl_hc_remove_slot_08 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_09_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_09_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_09_rarity }
        rl_hc_remove_slot_09 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_10_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_10_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_10_rarity }
        rl_hc_remove_slot_10 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_11_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_11_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_11_rarity }
        rl_hc_remove_slot_11 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_12_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_12_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_12_rarity }
        rl_hc_remove_slot_12 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_13_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_13_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_13_rarity }
        rl_hc_remove_slot_13 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_14_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_14_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_14_rarity }
        rl_hc_remove_slot_14 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_15_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_15_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_15_rarity }
        rl_hc_remove_slot_15 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_16_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_16_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_16_rarity }
        rl_hc_remove_slot_16 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_17_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_17_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_17_rarity }
        rl_hc_remove_slot_17 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_18_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_18_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_18_rarity }
        rl_hc_remove_slot_18 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_19_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_19_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_19_rarity }
        rl_hc_remove_slot_19 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 4 } check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_20_rarity = 3 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_20_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_20_rarity }
        rl_hc_remove_slot_20 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_01_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_01_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_01_rarity }
        rl_hc_remove_slot_01 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_02_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_02_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_02_rarity }
        rl_hc_remove_slot_02 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_03_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_03_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_03_rarity }
        rl_hc_remove_slot_03 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_04_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_04_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_04_rarity }
        rl_hc_remove_slot_04 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_05_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_05_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_05_rarity }
        rl_hc_remove_slot_05 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_06_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_06_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_06_rarity }
        rl_hc_remove_slot_06 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_07_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_07_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_07_rarity }
        rl_hc_remove_slot_07 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_08_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_08_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_08_rarity }
        rl_hc_remove_slot_08 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_09_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_09_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_09_rarity }
        rl_hc_remove_slot_09 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_10_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_10_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_10_rarity }
        rl_hc_remove_slot_10 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_11_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_11_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_11_rarity }
        rl_hc_remove_slot_11 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_12_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_12_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_12_rarity }
        rl_hc_remove_slot_12 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_13_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_13_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_13_rarity }
        rl_hc_remove_slot_13 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_14_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_14_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_14_rarity }
        rl_hc_remove_slot_14 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_15_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_15_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_15_rarity }
        rl_hc_remove_slot_15 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_16_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_16_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_16_rarity }
        rl_hc_remove_slot_16 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_17_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_17_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_17_rarity }
        rl_hc_remove_slot_17 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_18_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_18_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_18_rarity }
        rl_hc_remove_slot_18 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_19_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_19_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_19_rarity }
        rl_hc_remove_slot_19 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
    else_if = {
        limit = { OR = { check_variable = { rl_hc_pending_rarity = 5 } } check_variable = { rl_hc_slot_20_rarity = 4 } }
        set_variable = { rl_hc_auto_candidate_id = rl_hc_slot_20_id }
        set_variable = { rl_hc_auto_candidate_rarity = rl_hc_slot_20_rarity }
        rl_hc_remove_slot_20 = yes
        if = {
            limit = { check_variable = { rl_hc_auto_remove_count = 0 } }
            set_variable = { rl_hc_auto_removed_1_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_1_rarity = rl_hc_auto_candidate_rarity }
        }
        else = {
            set_variable = { rl_hc_auto_removed_2_id = rl_hc_auto_candidate_id }
            set_variable = { rl_hc_auto_removed_2_rarity = rl_hc_auto_candidate_rarity }
        }
        add_to_variable = { rl_hc_auto_remove_count = 1 }
    }
}

rl_hc_auto_replace_weakest_pending = {
    set_variable = { rl_hc_auto_new_id = rl_hc_pending_id }
    set_variable = { rl_hc_auto_new_rarity = rl_hc_pending_rarity }
    set_variable = { rl_hc_auto_remove_count = 0 }
    set_variable = { rl_hc_auto_removed_1_id = 0 }
    set_variable = { rl_hc_auto_removed_1_rarity = 0 }
    set_variable = { rl_hc_auto_removed_2_id = 0 }
    set_variable = { rl_hc_auto_removed_2_rarity = 0 }
    set_variable = { rl_hc_auto_can_replace = 0 }
    rl_hc_count_lower_rarity_slots = yes
    if = {
        limit = { check_variable = { rl_hc_pending_cost = 1 } check_variable = { rl_hc_lower_rarity_count > 0 } }
        set_variable = { rl_hc_auto_can_replace = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_pending_cost = 2 } check_variable = { rl_hc_slots_used = 19 } check_variable = { rl_hc_lower_rarity_count > 0 } }
        set_variable = { rl_hc_auto_can_replace = 1 }
    }
    else_if = {
        limit = { check_variable = { rl_hc_pending_cost = 2 } check_variable = { rl_hc_slots_used > 19 } check_variable = { rl_hc_lower_rarity_count > 1 } }
        set_variable = { rl_hc_auto_can_replace = 1 }
    }
    if = {
        limit = { check_variable = { rl_hc_auto_can_replace = 1 } }
        rl_hc_auto_remove_one_lower = yes
        if = {
            limit = { check_variable = { rl_hc_pending_cost = 2 } check_variable = { rl_hc_slots_used > 18 } }
            rl_hc_auto_remove_one_lower = yes
        }
        if = {
            limit = { OR = {
                AND = { check_variable = { rl_hc_pending_cost = 1 } check_variable = { rl_hc_slots_used < 20 } }
                AND = { check_variable = { rl_hc_pending_cost = 2 } check_variable = { rl_hc_slots_used < 19 } }
            } }
            clr_country_flag = rl_hc_show_result_after_pending
            rl_hc_apply_pending_upgrade = yes
            add_to_variable = { rl_hc_auto_replaced_count = 1 }
            add_to_variable = { rl_hc_replaced_count = 1 }
            set_variable = { rl_offer_1_id = rl_hc_auto_new_id }
            set_variable = { rl_offer_1_rarity = rl_hc_auto_new_rarity }
            set_variable = { rl_offer_2_id = rl_hc_auto_removed_1_id }
            set_variable = { rl_offer_2_rarity = rl_hc_auto_removed_1_rarity }
            set_variable = { rl_offer_3_id = rl_hc_auto_removed_2_id }
            set_variable = { rl_offer_3_rarity = rl_hc_auto_removed_2_rarity }
            if = {
                limit = { is_ai = no check_variable = { rl_hc_auto_remove_count > 1 } }
                country_event = { id = rl.43 hours = 1 }
            }
            else_if = {
                limit = { is_ai = no }
                country_event = { id = rl.42 hours = 1 }
            }
        }
        else = {
            if = { limit = { is_ai = no } set_country_flag = rl_hc_replacement_mode country_event = { id = rl.50 hours = 1 } }
            else = { rl_hc_reject_pending_upgrade = yes }
        }
    }
    else = {
        set_variable = { rl_offer_1_id = rl_hc_auto_new_id }
        set_variable = { rl_offer_1_rarity = rl_hc_auto_new_rarity }
        add_to_variable = { rl_hc_auto_rejected_count = 1 }
        rl_hc_reject_pending_upgrade = yes
        if = { limit = { is_ai = no } country_event = { id = rl.44 hours = 1 } }
    }
}


### ROGUELIKE RELIC SYSTEM 3.4 ###

rl_clear_relic_offers = {
    set_variable = { rl_relic_offer_1_id = 0 }
    set_variable = { rl_relic_offer_1_power = 0 }
    set_variable = { rl_relic_offer_2_id = 0 }
    set_variable = { rl_relic_offer_2_power = 0 }
    set_variable = { rl_relic_offer_3_id = 0 }
    set_variable = { rl_relic_offer_3_power = 0 }
    clr_country_flag = rl_relic_offers_ready
}

rl_roll_relic_offer_1 = {
    random_list = {
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_1
            }
            set_variable = { rl_relic_offer_1_id = 1 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_2
            }
            set_variable = { rl_relic_offer_1_id = 2 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_3
            }
            set_variable = { rl_relic_offer_1_id = 3 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_4
            }
            set_variable = { rl_relic_offer_1_id = 4 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_5
            }
            set_variable = { rl_relic_offer_1_id = 5 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_6
            }
            set_variable = { rl_relic_offer_1_id = 6 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_7
            }
            set_variable = { rl_relic_offer_1_id = 7 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_8
            }
            set_variable = { rl_relic_offer_1_id = 8 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_9
            }
            set_variable = { rl_relic_offer_1_id = 9 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_10
            }
            set_variable = { rl_relic_offer_1_id = 10 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_11
            }
            set_variable = { rl_relic_offer_1_id = 11 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_12
            }
            set_variable = { rl_relic_offer_1_id = 12 }
            set_variable = { rl_relic_offer_1_power = 1 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_13
            }
            set_variable = { rl_relic_offer_1_id = 13 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_14
            }
            set_variable = { rl_relic_offer_1_id = 14 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_15
            }
            set_variable = { rl_relic_offer_1_id = 15 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_16
            }
            set_variable = { rl_relic_offer_1_id = 16 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_17
            }
            set_variable = { rl_relic_offer_1_id = 17 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_18
            }
            set_variable = { rl_relic_offer_1_id = 18 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_19
            }
            set_variable = { rl_relic_offer_1_id = 19 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_20
            }
            set_variable = { rl_relic_offer_1_id = 20 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_21
            }
            set_variable = { rl_relic_offer_1_id = 21 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_22
            }
            set_variable = { rl_relic_offer_1_id = 22 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_23
            }
            set_variable = { rl_relic_offer_1_id = 23 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_24
            }
            set_variable = { rl_relic_offer_1_id = 24 }
            set_variable = { rl_relic_offer_1_power = 2 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_25
            }
            set_variable = { rl_relic_offer_1_id = 25 }
            set_variable = { rl_relic_offer_1_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_26
            }
            set_variable = { rl_relic_offer_1_id = 26 }
            set_variable = { rl_relic_offer_1_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_27
            }
            set_variable = { rl_relic_offer_1_id = 27 }
            set_variable = { rl_relic_offer_1_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_28
            }
            set_variable = { rl_relic_offer_1_id = 28 }
            set_variable = { rl_relic_offer_1_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_29
            }
            set_variable = { rl_relic_offer_1_id = 29 }
            set_variable = { rl_relic_offer_1_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_30
            }
            set_variable = { rl_relic_offer_1_id = 30 }
            set_variable = { rl_relic_offer_1_power = 3 }
        }
    }
}

rl_roll_relic_offer_2 = {
    random_list = {
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_1
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 1 }
            }
            set_variable = { rl_relic_offer_2_id = 1 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_2
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 2 }
            }
            set_variable = { rl_relic_offer_2_id = 2 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_3
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 3 }
            }
            set_variable = { rl_relic_offer_2_id = 3 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_4
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 4 }
            }
            set_variable = { rl_relic_offer_2_id = 4 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_5
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 5 }
            }
            set_variable = { rl_relic_offer_2_id = 5 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_6
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 6 }
            }
            set_variable = { rl_relic_offer_2_id = 6 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_7
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 7 }
            }
            set_variable = { rl_relic_offer_2_id = 7 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_8
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 8 }
            }
            set_variable = { rl_relic_offer_2_id = 8 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_9
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 9 }
            }
            set_variable = { rl_relic_offer_2_id = 9 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_10
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 10 }
            }
            set_variable = { rl_relic_offer_2_id = 10 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_11
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 11 }
            }
            set_variable = { rl_relic_offer_2_id = 11 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_12
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 12 }
            }
            set_variable = { rl_relic_offer_2_id = 12 }
            set_variable = { rl_relic_offer_2_power = 1 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_13
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 13 }
            }
            set_variable = { rl_relic_offer_2_id = 13 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_14
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 14 }
            }
            set_variable = { rl_relic_offer_2_id = 14 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_15
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 15 }
            }
            set_variable = { rl_relic_offer_2_id = 15 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_16
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 16 }
            }
            set_variable = { rl_relic_offer_2_id = 16 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_17
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 17 }
            }
            set_variable = { rl_relic_offer_2_id = 17 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_18
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 18 }
            }
            set_variable = { rl_relic_offer_2_id = 18 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_19
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 19 }
            }
            set_variable = { rl_relic_offer_2_id = 19 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_20
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 20 }
            }
            set_variable = { rl_relic_offer_2_id = 20 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_21
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 21 }
            }
            set_variable = { rl_relic_offer_2_id = 21 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_22
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 22 }
            }
            set_variable = { rl_relic_offer_2_id = 22 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_23
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 23 }
            }
            set_variable = { rl_relic_offer_2_id = 23 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_24
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 24 }
            }
            set_variable = { rl_relic_offer_2_id = 24 }
            set_variable = { rl_relic_offer_2_power = 2 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_25
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 25 }
            }
            set_variable = { rl_relic_offer_2_id = 25 }
            set_variable = { rl_relic_offer_2_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_26
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 26 }
            }
            set_variable = { rl_relic_offer_2_id = 26 }
            set_variable = { rl_relic_offer_2_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_27
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 27 }
            }
            set_variable = { rl_relic_offer_2_id = 27 }
            set_variable = { rl_relic_offer_2_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_28
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 28 }
            }
            set_variable = { rl_relic_offer_2_id = 28 }
            set_variable = { rl_relic_offer_2_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_29
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 29 }
            }
            set_variable = { rl_relic_offer_2_id = 29 }
            set_variable = { rl_relic_offer_2_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_30
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 30 }
            }
            set_variable = { rl_relic_offer_2_id = 30 }
            set_variable = { rl_relic_offer_2_power = 3 }
        }
    }
}

rl_roll_relic_offer_3 = {
    random_list = {
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_1
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 1 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 1 }
            }
            set_variable = { rl_relic_offer_3_id = 1 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_2
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 2 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 2 }
            }
            set_variable = { rl_relic_offer_3_id = 2 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_3
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 3 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 3 }
            }
            set_variable = { rl_relic_offer_3_id = 3 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_4
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 4 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 4 }
            }
            set_variable = { rl_relic_offer_3_id = 4 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_5
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 5 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 5 }
            }
            set_variable = { rl_relic_offer_3_id = 5 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_6
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 6 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 6 }
            }
            set_variable = { rl_relic_offer_3_id = 6 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_7
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 7 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 7 }
            }
            set_variable = { rl_relic_offer_3_id = 7 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_8
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 8 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 8 }
            }
            set_variable = { rl_relic_offer_3_id = 8 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_9
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 9 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 9 }
            }
            set_variable = { rl_relic_offer_3_id = 9 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_10
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 10 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 10 }
            }
            set_variable = { rl_relic_offer_3_id = 10 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_11
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 11 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 11 }
            }
            set_variable = { rl_relic_offer_3_id = 11 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        6 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_12
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 12 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 12 }
            }
            set_variable = { rl_relic_offer_3_id = 12 }
            set_variable = { rl_relic_offer_3_power = 1 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_13
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 13 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 13 }
            }
            set_variable = { rl_relic_offer_3_id = 13 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_14
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 14 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 14 }
            }
            set_variable = { rl_relic_offer_3_id = 14 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_15
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 15 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 15 }
            }
            set_variable = { rl_relic_offer_3_id = 15 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_16
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 16 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 16 }
            }
            set_variable = { rl_relic_offer_3_id = 16 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_17
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 17 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 17 }
            }
            set_variable = { rl_relic_offer_3_id = 17 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_18
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 18 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 18 }
            }
            set_variable = { rl_relic_offer_3_id = 18 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_19
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 19 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 19 }
            }
            set_variable = { rl_relic_offer_3_id = 19 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_20
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 20 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 20 }
            }
            set_variable = { rl_relic_offer_3_id = 20 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_21
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 21 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 21 }
            }
            set_variable = { rl_relic_offer_3_id = 21 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_22
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 22 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 22 }
            }
            set_variable = { rl_relic_offer_3_id = 22 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_23
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 23 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 23 }
            }
            set_variable = { rl_relic_offer_3_id = 23 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        2 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_24
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 24 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 24 }
            }
            set_variable = { rl_relic_offer_3_id = 24 }
            set_variable = { rl_relic_offer_3_power = 2 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_25
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 25 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 25 }
            }
            set_variable = { rl_relic_offer_3_id = 25 }
            set_variable = { rl_relic_offer_3_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_26
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 26 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 26 }
            }
            set_variable = { rl_relic_offer_3_id = 26 }
            set_variable = { rl_relic_offer_3_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_27
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 27 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 27 }
            }
            set_variable = { rl_relic_offer_3_id = 27 }
            set_variable = { rl_relic_offer_3_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_28
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 28 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 28 }
            }
            set_variable = { rl_relic_offer_3_id = 28 }
            set_variable = { rl_relic_offer_3_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_29
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 29 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 29 }
            }
            set_variable = { rl_relic_offer_3_id = 29 }
            set_variable = { rl_relic_offer_3_power = 3 }
        }
        1 = {
            modifier = {
                factor = 0
                has_country_flag = rl_has_relic_30
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_1_id = 30 }
            }
            modifier = {
                factor = 0
                check_variable = { rl_relic_offer_2_id = 30 }
            }
            set_variable = { rl_relic_offer_3_id = 30 }
            set_variable = { rl_relic_offer_3_power = 3 }
        }
    }
}

rl_generate_relic_offers = {
    rl_clear_relic_offers = yes
    rl_roll_relic_offer_1 = yes
    rl_roll_relic_offer_2 = yes
    rl_roll_relic_offer_3 = yes
    set_country_flag = rl_relic_offers_ready
}

rl_relic_check_discovery = {
    if = {
        limit = {
            check_variable = { rl_relic_resonance > 59 }
            NOT = { has_country_flag = rl_relic_event_pending }
        }
        set_country_flag = rl_relic_event_pending
        country_event = { id = rl.70 hours = 3 }
    }
}

rl_relic_after_upgrade = {
    if = { limit = { check_variable = { rl_selected_rarity = 1 } } add_to_variable = { rl_relic_resonance = 1 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 2 } } add_to_variable = { rl_relic_resonance = 2 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 3 } } add_to_variable = { rl_relic_resonance = 4 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 4 } } add_to_variable = { rl_relic_resonance = 8 } }
    else_if = { limit = { check_variable = { rl_selected_rarity = 5 } } add_to_variable = { rl_relic_resonance = 16 } }
    if = { limit = { has_country_flag = rl_has_relic_29 check_variable = { rl_selected_rarity = 1 } } add_to_variable = { rl_relic_resonance = 1 } }
    else_if = { limit = { has_country_flag = rl_has_relic_29 check_variable = { rl_selected_rarity = 2 } } add_to_variable = { rl_relic_resonance = 2 } }
    else_if = { limit = { has_country_flag = rl_has_relic_29 check_variable = { rl_selected_rarity = 3 } } add_to_variable = { rl_relic_resonance = 4 } }
    else_if = { limit = { has_country_flag = rl_has_relic_29 check_variable = { rl_selected_rarity = 4 } } add_to_variable = { rl_relic_resonance = 8 } }
    else_if = { limit = { has_country_flag = rl_has_relic_29 check_variable = { rl_selected_rarity = 5 } } add_to_variable = { rl_relic_resonance = 16 } }
    if = { limit = { has_country_flag = rl_has_relic_1 check_variable = { rl_selected_rarity = 1 } } add_to_variable = { rl_fate_shards = 1 } }
    else_if = { limit = { has_country_flag = rl_has_relic_1 check_variable = { rl_selected_rarity = 2 } } add_to_variable = { rl_fate_shards = 1 } }
    else_if = { limit = { has_country_flag = rl_has_relic_1 check_variable = { rl_selected_rarity = 3 } } add_to_variable = { rl_fate_shards = 2 } }
    else_if = { limit = { has_country_flag = rl_has_relic_1 check_variable = { rl_selected_rarity = 4 } } add_to_variable = { rl_fate_shards = 4 } }
    else_if = { limit = { has_country_flag = rl_has_relic_1 check_variable = { rl_selected_rarity = 5 } } add_to_variable = { rl_fate_shards = 8 } }
    rl_relic_check_discovery = yes
}

rl_force_relic_discovery = {
    add_to_variable = { rl_fate_shards = -40 }
    add_to_variable = { rl_relic_resonance = 60 }
    rl_relic_check_discovery = yes
}

rl_relic_add_pending_idea = {
    if = {
        limit = { check_variable = { rl_relic_pending_id = 1 } }
        add_to_variable = { rl_relic_mod_political_power_factor = 0.05 }
        add_to_variable = { rl_relic_mod_stability_factor = 0.03 }
        set_country_flag = rl_has_relic_1
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 2 } }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = 0.08 }
        add_to_variable = { rl_relic_mod_production_factory_efficiency_gain_factor = 0.1 }
        set_country_flag = rl_has_relic_2
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 3 } }
        add_to_variable = { rl_relic_mod_army_org_factor = 0.08 }
        add_to_variable = { rl_relic_mod_land_reinforce_rate = 0.04 }
        set_country_flag = rl_has_relic_3
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 4 } }
        add_to_variable = { rl_relic_mod_army_speed_factor = 0.06 }
        add_to_variable = { rl_relic_mod_planning_speed = 0.15 }
        set_country_flag = rl_has_relic_4
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 5 } }
        add_to_variable = { rl_relic_mod_air_attack_factor = 0.1 }
        add_to_variable = { rl_relic_mod_air_mission_efficiency = 0.08 }
        set_country_flag = rl_has_relic_5
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 6 } }
        add_to_variable = { rl_relic_mod_naval_damage_factor = 0.1 }
        add_to_variable = { rl_relic_mod_navy_org_factor = 0.08 }
        set_country_flag = rl_has_relic_6
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 7 } }
        add_to_variable = { rl_relic_mod_research_speed_factor = 0.06 }
        add_to_variable = { rl_relic_mod_special_project_speed_factor = 0.1 }
        set_country_flag = rl_has_relic_7
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 8 } }
        add_to_variable = { rl_relic_mod_compliance_gain = 0.005 }
        add_to_variable = { rl_relic_mod_resistance_target = -0.08 }
        set_country_flag = rl_has_relic_8
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 9 } }
        add_to_variable = { rl_relic_mod_max_fuel_factor = 0.2 }
        add_to_variable = { rl_relic_mod_fuel_gain_factor = 0.15 }
        set_country_flag = rl_has_relic_9
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 10 } }
        add_to_variable = { rl_relic_mod_equipment_conversion_speed = 0.2 }
        add_to_variable = { rl_relic_mod_equipment_upgrade_xp_cost = -0.15 }
        set_country_flag = rl_has_relic_10
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 11 } }
        add_to_variable = { rl_relic_mod_army_defence_factor = 0.1 }
        add_to_variable = { rl_relic_mod_max_dig_in_factor = 0.1 }
        set_country_flag = rl_has_relic_11
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 12 } }
        add_to_variable = { rl_relic_mod_stability_factor = 0.08 }
        add_to_variable = { rl_relic_mod_war_support_factor = 0.08 }
        set_country_flag = rl_has_relic_12
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 13 } }
        add_to_variable = { rl_relic_mod_research_speed_factor = 0.1 }
        add_to_variable = { rl_relic_mod_production_speed_buildings_factor = 0.12 }
        add_to_variable = { rl_relic_mod_special_project_speed_factor = 0.15 }
        set_country_flag = rl_has_relic_13
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 14 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = 0.12 }
        add_to_variable = { rl_relic_mod_compliance_gain = 0.008 }
        add_to_variable = { rl_relic_mod_resistance_target = -0.1 }
        set_country_flag = rl_has_relic_14
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 15 } }
        add_to_variable = { rl_relic_mod_armor_factor = 0.12 }
        add_to_variable = { rl_relic_mod_army_armor_attack_factor = 0.15 }
        add_to_variable = { rl_relic_mod_mechanized_attack_factor = 0.12 }
        set_country_flag = rl_has_relic_15
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 16 } }
        add_to_variable = { rl_relic_mod_naval_damage_factor = 0.18 }
        add_to_variable = { rl_relic_mod_positioning = 0.12 }
        add_to_variable = { rl_relic_mod_screening_efficiency = 0.12 }
        set_country_flag = rl_has_relic_16
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 17 } }
        add_to_variable = { rl_relic_mod_air_range_factor = 0.2 }
        add_to_variable = { rl_relic_mod_air_agility_factor = 0.15 }
        add_to_variable = { rl_relic_mod_air_superiority_efficiency = 0.15 }
        set_country_flag = rl_has_relic_17
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 18 } }
        add_to_variable = { rl_relic_mod_repair_speed_factor = 0.3 }
        add_to_variable = { rl_relic_mod_industry_free_repair_factor = 0.2 }
        add_to_variable = { rl_relic_mod_army_org_regain = 0.12 }
        set_country_flag = rl_has_relic_18
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 19 } }
        add_to_variable = { rl_relic_mod_encryption = 2 }
        add_to_variable = { rl_relic_mod_decryption = 2 }
        add_to_variable = { rl_relic_mod_intel_from_operatives_factor = 0.2 }
        set_country_flag = rl_has_relic_19
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 20 } }
        add_to_variable = { rl_relic_mod_supply_consumption_factor = -0.15 }
        add_to_variable = { rl_relic_mod_out_of_supply_factor = 0.2 }
        add_to_variable = { rl_relic_mod_army_fuel_consumption_factor = -0.12 }
        set_country_flag = rl_has_relic_20
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 21 } }
        add_to_variable = { rl_relic_mod_consumer_goods_factor = -0.08 }
        add_to_variable = { rl_relic_mod_min_export = -0.1 }
        add_to_variable = { rl_relic_mod_political_power_factor = 0.1 }
        set_country_flag = rl_has_relic_21
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 22 } }
        add_to_variable = { rl_relic_mod_navy_max_range_factor = 0.2 }
        add_to_variable = { rl_relic_mod_air_range_factor = 0.2 }
        add_to_variable = { rl_relic_mod_spotting_chance = 0.15 }
        set_country_flag = rl_has_relic_22
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 23 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = 0.15 }
        add_to_variable = { rl_relic_mod_war_support_factor = 0.12 }
        add_to_variable = { rl_relic_mod_stability_factor = -0.05 }
        set_country_flag = rl_has_relic_23
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 24 } }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = 0.15 }
        add_to_variable = { rl_relic_mod_industrial_capacity_dockyard = 0.15 }
        add_to_variable = { rl_relic_mod_production_lack_of_resource_penalty_factor = -0.15 }
        set_country_flag = rl_has_relic_24
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 25 } }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = 0.25 }
        add_to_variable = { rl_relic_mod_production_speed_buildings_factor = 0.25 }
        add_to_variable = { rl_relic_mod_local_resources_factor = 0.2 }
        set_country_flag = rl_has_relic_25
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 26 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = 0.2 }
        add_to_variable = { rl_relic_mod_air_attack_factor = 0.2 }
        add_to_variable = { rl_relic_mod_naval_damage_factor = 0.2 }
        set_country_flag = rl_has_relic_26
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 27 } }
        add_to_variable = { rl_relic_mod_research_speed_factor = 0.15 }
        add_to_variable = { rl_relic_mod_special_project_speed_factor = 0.25 }
        add_to_variable = { rl_relic_mod_encryption = 3 }
        add_to_variable = { rl_relic_mod_decryption = 3 }
        set_country_flag = rl_has_relic_27
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 28 } }
        add_to_variable = { rl_relic_mod_army_org_factor = 0.2 }
        add_to_variable = { rl_relic_mod_army_defence_factor = 0.2 }
        add_to_variable = { rl_relic_mod_experience_loss_factor = -0.3 }
        set_country_flag = rl_has_relic_28
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 29 } }
        add_to_variable = { rl_relic_mod_political_power_factor = 0.15 }
        add_to_variable = { rl_relic_mod_stability_factor = 0.15 }
        add_to_variable = { rl_relic_mod_war_support_factor = 0.15 }
        set_country_flag = rl_has_relic_29
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_id = 30 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = 0.25 }
        add_to_variable = { rl_relic_mod_air_attack_factor = 0.25 }
        add_to_variable = { rl_relic_mod_naval_damage_factor = 0.25 }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = 0.25 }
        add_to_variable = { rl_relic_mod_army_defence_factor = -0.1 }
        add_to_variable = { rl_relic_mod_air_defence_factor = -0.1 }
        add_to_variable = { rl_relic_mod_naval_defense_factor = -0.1 }
        add_to_variable = { rl_relic_mod_stability_factor = -0.1 }
        set_country_flag = rl_has_relic_30
    }
}

rl_relic_remove_selected_idea = {
    if = {
        limit = { check_variable = { rl_relic_selected_id = 1 } }
        add_to_variable = { rl_relic_mod_political_power_factor = -0.05 }
        add_to_variable = { rl_relic_mod_stability_factor = -0.03 }
        clr_country_flag = rl_has_relic_1
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 2 } }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = -0.08 }
        add_to_variable = { rl_relic_mod_production_factory_efficiency_gain_factor = -0.1 }
        clr_country_flag = rl_has_relic_2
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 3 } }
        add_to_variable = { rl_relic_mod_army_org_factor = -0.08 }
        add_to_variable = { rl_relic_mod_land_reinforce_rate = -0.04 }
        clr_country_flag = rl_has_relic_3
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 4 } }
        add_to_variable = { rl_relic_mod_army_speed_factor = -0.06 }
        add_to_variable = { rl_relic_mod_planning_speed = -0.15 }
        clr_country_flag = rl_has_relic_4
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 5 } }
        add_to_variable = { rl_relic_mod_air_attack_factor = -0.1 }
        add_to_variable = { rl_relic_mod_air_mission_efficiency = -0.08 }
        clr_country_flag = rl_has_relic_5
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 6 } }
        add_to_variable = { rl_relic_mod_naval_damage_factor = -0.1 }
        add_to_variable = { rl_relic_mod_navy_org_factor = -0.08 }
        clr_country_flag = rl_has_relic_6
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 7 } }
        add_to_variable = { rl_relic_mod_research_speed_factor = -0.06 }
        add_to_variable = { rl_relic_mod_special_project_speed_factor = -0.1 }
        clr_country_flag = rl_has_relic_7
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 8 } }
        add_to_variable = { rl_relic_mod_compliance_gain = -0.005 }
        add_to_variable = { rl_relic_mod_resistance_target = 0.08 }
        clr_country_flag = rl_has_relic_8
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 9 } }
        add_to_variable = { rl_relic_mod_max_fuel_factor = -0.2 }
        add_to_variable = { rl_relic_mod_fuel_gain_factor = -0.15 }
        clr_country_flag = rl_has_relic_9
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 10 } }
        add_to_variable = { rl_relic_mod_equipment_conversion_speed = -0.2 }
        add_to_variable = { rl_relic_mod_equipment_upgrade_xp_cost = 0.15 }
        clr_country_flag = rl_has_relic_10
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 11 } }
        add_to_variable = { rl_relic_mod_army_defence_factor = -0.1 }
        add_to_variable = { rl_relic_mod_max_dig_in_factor = -0.1 }
        clr_country_flag = rl_has_relic_11
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 12 } }
        add_to_variable = { rl_relic_mod_stability_factor = -0.08 }
        add_to_variable = { rl_relic_mod_war_support_factor = -0.08 }
        clr_country_flag = rl_has_relic_12
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 13 } }
        add_to_variable = { rl_relic_mod_research_speed_factor = -0.1 }
        add_to_variable = { rl_relic_mod_production_speed_buildings_factor = -0.12 }
        add_to_variable = { rl_relic_mod_special_project_speed_factor = -0.15 }
        clr_country_flag = rl_has_relic_13
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 14 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = -0.12 }
        add_to_variable = { rl_relic_mod_compliance_gain = -0.008 }
        add_to_variable = { rl_relic_mod_resistance_target = 0.1 }
        clr_country_flag = rl_has_relic_14
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 15 } }
        add_to_variable = { rl_relic_mod_armor_factor = -0.12 }
        add_to_variable = { rl_relic_mod_army_armor_attack_factor = -0.15 }
        add_to_variable = { rl_relic_mod_mechanized_attack_factor = -0.12 }
        clr_country_flag = rl_has_relic_15
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 16 } }
        add_to_variable = { rl_relic_mod_naval_damage_factor = -0.18 }
        add_to_variable = { rl_relic_mod_positioning = -0.12 }
        add_to_variable = { rl_relic_mod_screening_efficiency = -0.12 }
        clr_country_flag = rl_has_relic_16
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 17 } }
        add_to_variable = { rl_relic_mod_air_range_factor = -0.2 }
        add_to_variable = { rl_relic_mod_air_agility_factor = -0.15 }
        add_to_variable = { rl_relic_mod_air_superiority_efficiency = -0.15 }
        clr_country_flag = rl_has_relic_17
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 18 } }
        add_to_variable = { rl_relic_mod_repair_speed_factor = -0.3 }
        add_to_variable = { rl_relic_mod_industry_free_repair_factor = -0.2 }
        add_to_variable = { rl_relic_mod_army_org_regain = -0.12 }
        clr_country_flag = rl_has_relic_18
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 19 } }
        add_to_variable = { rl_relic_mod_encryption = -2 }
        add_to_variable = { rl_relic_mod_decryption = -2 }
        add_to_variable = { rl_relic_mod_intel_from_operatives_factor = -0.2 }
        clr_country_flag = rl_has_relic_19
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 20 } }
        add_to_variable = { rl_relic_mod_supply_consumption_factor = 0.15 }
        add_to_variable = { rl_relic_mod_out_of_supply_factor = -0.2 }
        add_to_variable = { rl_relic_mod_army_fuel_consumption_factor = 0.12 }
        clr_country_flag = rl_has_relic_20
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 21 } }
        add_to_variable = { rl_relic_mod_consumer_goods_factor = 0.08 }
        add_to_variable = { rl_relic_mod_min_export = 0.1 }
        add_to_variable = { rl_relic_mod_political_power_factor = -0.1 }
        clr_country_flag = rl_has_relic_21
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 22 } }
        add_to_variable = { rl_relic_mod_navy_max_range_factor = -0.2 }
        add_to_variable = { rl_relic_mod_air_range_factor = -0.2 }
        add_to_variable = { rl_relic_mod_spotting_chance = -0.15 }
        clr_country_flag = rl_has_relic_22
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 23 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = -0.15 }
        add_to_variable = { rl_relic_mod_war_support_factor = -0.12 }
        add_to_variable = { rl_relic_mod_stability_factor = 0.05 }
        clr_country_flag = rl_has_relic_23
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 24 } }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = -0.15 }
        add_to_variable = { rl_relic_mod_industrial_capacity_dockyard = -0.15 }
        add_to_variable = { rl_relic_mod_production_lack_of_resource_penalty_factor = 0.15 }
        clr_country_flag = rl_has_relic_24
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 25 } }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = -0.25 }
        add_to_variable = { rl_relic_mod_production_speed_buildings_factor = -0.25 }
        add_to_variable = { rl_relic_mod_local_resources_factor = -0.2 }
        clr_country_flag = rl_has_relic_25
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 26 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = -0.2 }
        add_to_variable = { rl_relic_mod_air_attack_factor = -0.2 }
        add_to_variable = { rl_relic_mod_naval_damage_factor = -0.2 }
        clr_country_flag = rl_has_relic_26
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 27 } }
        add_to_variable = { rl_relic_mod_research_speed_factor = -0.15 }
        add_to_variable = { rl_relic_mod_special_project_speed_factor = -0.25 }
        add_to_variable = { rl_relic_mod_encryption = -3 }
        add_to_variable = { rl_relic_mod_decryption = -3 }
        clr_country_flag = rl_has_relic_27
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 28 } }
        add_to_variable = { rl_relic_mod_army_org_factor = -0.2 }
        add_to_variable = { rl_relic_mod_army_defence_factor = -0.2 }
        add_to_variable = { rl_relic_mod_experience_loss_factor = 0.3 }
        clr_country_flag = rl_has_relic_28
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 29 } }
        add_to_variable = { rl_relic_mod_political_power_factor = -0.15 }
        add_to_variable = { rl_relic_mod_stability_factor = -0.15 }
        add_to_variable = { rl_relic_mod_war_support_factor = -0.15 }
        clr_country_flag = rl_has_relic_29
    }
    else_if = {
        limit = { check_variable = { rl_relic_selected_id = 30 } }
        add_to_variable = { rl_relic_mod_army_attack_factor = -0.25 }
        add_to_variable = { rl_relic_mod_air_attack_factor = -0.25 }
        add_to_variable = { rl_relic_mod_naval_damage_factor = -0.25 }
        add_to_variable = { rl_relic_mod_industrial_capacity_factory = -0.25 }
        add_to_variable = { rl_relic_mod_army_defence_factor = 0.1 }
        add_to_variable = { rl_relic_mod_air_defence_factor = 0.1 }
        add_to_variable = { rl_relic_mod_naval_defense_factor = 0.1 }
        add_to_variable = { rl_relic_mod_stability_factor = 0.1 }
        clr_country_flag = rl_has_relic_30
    }
}

rl_relic_apply_pending = {
    rl_relic_add_pending_idea = yes
    if = {
        limit = { check_variable = { rl_relic_slot_1_id = 0 } }
        set_variable = { rl_relic_slot_1_id = rl_relic_pending_id }
        set_variable = { rl_relic_slot_1_power = rl_relic_pending_power }
    }
    else_if = {
        limit = { check_variable = { rl_relic_slot_2_id = 0 } }
        set_variable = { rl_relic_slot_2_id = rl_relic_pending_id }
        set_variable = { rl_relic_slot_2_power = rl_relic_pending_power }
    }
    else_if = {
        limit = { check_variable = { rl_relic_slot_3_id = 0 } }
        set_variable = { rl_relic_slot_3_id = rl_relic_pending_id }
        set_variable = { rl_relic_slot_3_power = rl_relic_pending_power }
    }
    add_to_variable = { rl_hc_relic_slots_used = 1 }
    add_to_variable = { rl_relics_found_total = 1 }
    set_variable = { rl_relic_pending_id = 0 }
    set_variable = { rl_relic_pending_power = 0 }
    clr_country_flag = rl_relic_replacement_pending
    rl_relic_check_discovery = yes
}

rl_relic_remove_slot_1 = {
    set_variable = { rl_relic_selected_id = rl_relic_slot_1_id }
    rl_relic_remove_selected_idea = yes
    set_variable = { rl_relic_slot_1_id = 0 }
    set_variable = { rl_relic_slot_1_power = 0 }
    add_to_variable = { rl_hc_relic_slots_used = -1 }
    if = { limit = { check_variable = { rl_hc_relic_slots_used < 0 } } set_variable = { rl_hc_relic_slots_used = 0 } }
}

rl_relic_replace_slot_1 = {
    rl_relic_remove_slot_1 = yes
    rl_relic_apply_pending = yes
}

rl_relic_remove_slot_2 = {
    set_variable = { rl_relic_selected_id = rl_relic_slot_2_id }
    rl_relic_remove_selected_idea = yes
    set_variable = { rl_relic_slot_2_id = 0 }
    set_variable = { rl_relic_slot_2_power = 0 }
    add_to_variable = { rl_hc_relic_slots_used = -1 }
    if = { limit = { check_variable = { rl_hc_relic_slots_used < 0 } } set_variable = { rl_hc_relic_slots_used = 0 } }
}

rl_relic_replace_slot_2 = {
    rl_relic_remove_slot_2 = yes
    rl_relic_apply_pending = yes
}

rl_relic_remove_slot_3 = {
    set_variable = { rl_relic_selected_id = rl_relic_slot_3_id }
    rl_relic_remove_selected_idea = yes
    set_variable = { rl_relic_slot_3_id = 0 }
    set_variable = { rl_relic_slot_3_power = 0 }
    add_to_variable = { rl_hc_relic_slots_used = -1 }
    if = { limit = { check_variable = { rl_hc_relic_slots_used < 0 } } set_variable = { rl_hc_relic_slots_used = 0 } }
}

rl_relic_replace_slot_3 = {
    rl_relic_remove_slot_3 = yes
    rl_relic_apply_pending = yes
}

rl_relic_ai_replace = {
    if = {
        limit = { check_variable = { rl_relic_pending_power = 3 } check_variable = { rl_relic_slot_1_power < 3 } }
        rl_relic_replace_slot_1 = yes
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_power = 3 } check_variable = { rl_relic_slot_2_power < 3 } }
        rl_relic_replace_slot_2 = yes
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_power = 3 } check_variable = { rl_relic_slot_3_power < 3 } }
        rl_relic_replace_slot_3 = yes
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_power = 2 } check_variable = { rl_relic_slot_1_power = 1 } }
        rl_relic_replace_slot_1 = yes
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_power = 2 } check_variable = { rl_relic_slot_2_power = 1 } }
        rl_relic_replace_slot_2 = yes
    }
    else_if = {
        limit = { check_variable = { rl_relic_pending_power = 2 } check_variable = { rl_relic_slot_3_power = 1 } }
        rl_relic_replace_slot_3 = yes
    }
    else = {
        rl_relic_replace_slot_1 = yes
    }
}

rl_relic_try_grant_pending = {
    if = {
        limit = { check_variable = { rl_hc_relic_slots_used < 3 } }
        rl_relic_apply_pending = yes
    }
    else_if = {
        limit = { is_ai = yes }
        rl_relic_ai_replace = yes
    }
    else = {
        set_country_flag = rl_relic_replacement_pending
        country_event = { id = rl.71 }
    }
}

rl_relic_select_offer_1 = {
    add_to_variable = { rl_relic_resonance = -60 }
    if = { limit = { check_variable = { rl_relic_resonance < 0 } } set_variable = { rl_relic_resonance = 0 } }
    set_variable = { rl_relic_pending_id = rl_relic_offer_1_id }
    set_variable = { rl_relic_pending_power = rl_relic_offer_1_power }
    clr_country_flag = rl_relic_event_pending
    rl_clear_relic_offers = yes
    rl_relic_try_grant_pending = yes
}

rl_relic_select_offer_2 = {
    add_to_variable = { rl_relic_resonance = -60 }
    if = { limit = { check_variable = { rl_relic_resonance < 0 } } set_variable = { rl_relic_resonance = 0 } }
    set_variable = { rl_relic_pending_id = rl_relic_offer_2_id }
    set_variable = { rl_relic_pending_power = rl_relic_offer_2_power }
    clr_country_flag = rl_relic_event_pending
    rl_clear_relic_offers = yes
    rl_relic_try_grant_pending = yes
}

rl_relic_select_offer_3 = {
    add_to_variable = { rl_relic_resonance = -60 }
    if = { limit = { check_variable = { rl_relic_resonance < 0 } } set_variable = { rl_relic_resonance = 0 } }
    set_variable = { rl_relic_pending_id = rl_relic_offer_3_id }
    set_variable = { rl_relic_pending_power = rl_relic_offer_3_power }
    clr_country_flag = rl_relic_event_pending
    rl_clear_relic_offers = yes
    rl_relic_try_grant_pending = yes
}

rl_relic_shatter_discovery = {
    add_to_variable = { rl_relic_resonance = -60 }
    if = { limit = { check_variable = { rl_relic_resonance < 0 } } set_variable = { rl_relic_resonance = 0 } }
    add_to_variable = { rl_fate_shards = 10 }
    clr_country_flag = rl_relic_event_pending
    rl_clear_relic_offers = yes
    rl_relic_check_discovery = yes
}

rl_relic_shatter_pending = {
    add_to_variable = { rl_fate_shards = 15 }
    set_variable = { rl_relic_pending_id = 0 }
    set_variable = { rl_relic_pending_power = 0 }
    clr_country_flag = rl_relic_replacement_pending
    rl_relic_check_discovery = yes
}

rl_relic_prepare_remove_slot_1 = {
    set_variable = { rl_relic_target_slot = 1 }
    set_variable = { rl_relic_target_id = rl_relic_slot_1_id }
    country_event = { id = rl.74 }
}

rl_relic_prepare_remove_slot_2 = {
    set_variable = { rl_relic_target_slot = 2 }
    set_variable = { rl_relic_target_id = rl_relic_slot_2_id }
    country_event = { id = rl.74 }
}

rl_relic_prepare_remove_slot_3 = {
    set_variable = { rl_relic_target_slot = 3 }
    set_variable = { rl_relic_target_id = rl_relic_slot_3_id }
    country_event = { id = rl.74 }
}

rl_relic_confirm_remove_target = {
    if = { limit = { check_variable = { rl_relic_target_slot = 1 } } rl_relic_remove_slot_1 = yes }
    else_if = { limit = { check_variable = { rl_relic_target_slot = 2 } } rl_relic_remove_slot_2 = yes }
    else_if = { limit = { check_variable = { rl_relic_target_slot = 3 } } rl_relic_remove_slot_3 = yes }
    add_to_variable = { rl_fate_shards = 10 }
    add_to_variable = { rl_relics_shattered_total = 1 }
    set_variable = { rl_relic_target_slot = 0 }
    set_variable = { rl_relic_target_id = 0 }
}

