Sc2: [performance] change default options (#5424)
* sc2: Changing default campaign options to something more performative and desirable for new players * sc2: Fixing broken test that was missed in roundup * SC2: Update tests for new defaults * SC2: Fix incomplete test * sc2: Updating description for enabled campaigns to mention which are free to play * sc2: PR comments; Updating additional unit tests that were affected by a default change * sc2: Adding a comment to the Enabled Campaigns option to list all the valid campaign names * sc2: Adding quotes wrapping sample values in enabled_campaigns comment to aid copy-pasting --------- Co-authored-by: Salzkorn <salzkitty@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ class Sc2MissionSet(OptionSet):
|
||||
return self.value.__len__()
|
||||
|
||||
|
||||
class SelectRaces(OptionSet):
|
||||
class SelectedRaces(OptionSet):
|
||||
"""
|
||||
Pick which factions' missions and items can be shuffled into the world.
|
||||
"""
|
||||
@@ -152,6 +152,7 @@ class MissionOrder(Choice):
|
||||
option_golden_path = 10
|
||||
option_hopscotch = 11
|
||||
option_custom = 99
|
||||
default = option_golden_path
|
||||
|
||||
|
||||
class MaximumCampaignSize(Range):
|
||||
@@ -251,10 +252,21 @@ class PlayerColorNova(ColorChoice):
|
||||
|
||||
|
||||
class EnabledCampaigns(OptionSet):
|
||||
"""Determines which campaign's missions will be used"""
|
||||
"""
|
||||
Determines which campaign's missions will be used.
|
||||
Wings of Liberty, Prophecy, and Prologue are the only free-to-play campaigns.
|
||||
Valid campaign names:
|
||||
- 'Wings of Liberty'
|
||||
- 'Prophecy'
|
||||
- 'Heart of the Swarm'
|
||||
- 'Whispers of Oblivion (Legacy of the Void: Prologue)'
|
||||
- 'Legacy of the Void'
|
||||
- 'Into the Void (Legacy of the Void: Epilogue)'
|
||||
- 'Nova Covert Ops'
|
||||
"""
|
||||
display_name = "Enabled Campaigns"
|
||||
valid_keys = {campaign.campaign_name for campaign in SC2Campaign if campaign != SC2Campaign.GLOBAL}
|
||||
default = valid_keys
|
||||
default = set((SC2Campaign.WOL.campaign_name,))
|
||||
|
||||
|
||||
class EnableRaceSwapVariants(Choice):
|
||||
@@ -1342,7 +1354,7 @@ class Starcraft2Options(PerGameCommonOptions):
|
||||
player_color_zerg: PlayerColorZerg
|
||||
player_color_zerg_primal: PlayerColorZergPrimal
|
||||
player_color_nova: PlayerColorNova
|
||||
selected_races: SelectRaces
|
||||
selected_races: SelectedRaces
|
||||
enabled_campaigns: EnabledCampaigns
|
||||
enable_race_swap: EnableRaceSwapVariants
|
||||
mission_race_balancing: EnableMissionRaceBalancing
|
||||
@@ -1436,7 +1448,7 @@ option_groups = [
|
||||
ShuffleCampaigns,
|
||||
AllInMap,
|
||||
TwoStartPositions,
|
||||
SelectRaces,
|
||||
SelectedRaces,
|
||||
ExcludeVeryHardMissions,
|
||||
EnableMissionRaceBalancing,
|
||||
]),
|
||||
@@ -1548,7 +1560,7 @@ def get_option_value(world: Union['SC2World', None], name: str) -> int:
|
||||
|
||||
|
||||
def get_enabled_races(world: Optional['SC2World']) -> Set[SC2Race]:
|
||||
race_names = world.options.selected_races.value if world and len(world.options.selected_races.value) > 0 else SelectRaces.valid_keys
|
||||
race_names = world.options.selected_races.value if world and len(world.options.selected_races.value) > 0 else SelectedRaces.valid_keys
|
||||
return {race for race in SC2Race if race.get_title() in race_names}
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@ from worlds import AutoWorld
|
||||
from test.general import gen_steps, call_all
|
||||
|
||||
from test.bases import WorldTestBase
|
||||
from .. import SC2World
|
||||
from .. import SC2World, SC2Campaign
|
||||
from .. import client
|
||||
from .. import options
|
||||
|
||||
class Sc2TestBase(WorldTestBase):
|
||||
game = client.SC2Context.game
|
||||
@@ -24,6 +25,18 @@ class Sc2SetupTestBase(unittest.TestCase):
|
||||
This allows potentially generating multiple worlds in one test case, useful for tracking down a rare / sporadic
|
||||
crash.
|
||||
"""
|
||||
ALL_CAMPAIGNS = {
|
||||
'enabled_campaigns': options.EnabledCampaigns.valid_keys,
|
||||
}
|
||||
TERRAN_CAMPAIGNS = {
|
||||
'enabled_campaigns': {SC2Campaign.WOL.campaign_name, SC2Campaign.NCO.campaign_name,}
|
||||
}
|
||||
ZERG_CAMPAIGNS = {
|
||||
'enabled_campaigns': {SC2Campaign.HOTS.campaign_name,}
|
||||
}
|
||||
PROTOSS_CAMPAIGNS = {
|
||||
'enabled_campaigns': {SC2Campaign.PROPHECY.campaign_name, SC2Campaign.PROLOGUE.campaign_name, SC2Campaign.LOTV.campaign_name,}
|
||||
}
|
||||
seed: Optional[int] = None
|
||||
game = SC2World.game
|
||||
player = 1
|
||||
|
||||
@@ -6,10 +6,12 @@ from .test_base import Sc2SetupTestBase
|
||||
from .. import MissionFlag
|
||||
from ..item import item_tables, item_names
|
||||
from BaseClasses import ItemClassification
|
||||
from .. import options
|
||||
|
||||
class TestCustomMissionOrders(Sc2SetupTestBase):
|
||||
def test_mini_wol_generates(self):
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': 'custom',
|
||||
'custom_mission_order': {
|
||||
'Mini Wings of Liberty': {
|
||||
@@ -137,6 +139,7 @@ class TestCustomMissionOrders(Sc2SetupTestBase):
|
||||
test_item = item_names.ZERGLING_METABOLIC_BOOST
|
||||
world_options = {
|
||||
'mission_order': 'custom',
|
||||
'enabled_campaigns': set(options.EnabledCampaigns.valid_keys),
|
||||
'start_inventory': { test_item: 1 },
|
||||
'custom_mission_order': {
|
||||
'test': {
|
||||
@@ -164,6 +167,7 @@ class TestCustomMissionOrders(Sc2SetupTestBase):
|
||||
test_item = item_names.ZERGLING_METABOLIC_BOOST
|
||||
world_options = {
|
||||
'mission_order': 'custom',
|
||||
'enabled_campaigns': set(options.EnabledCampaigns.valid_keys),
|
||||
'start_inventory': { test_item: 1 },
|
||||
'locked_items': { test_item: 1 },
|
||||
'custom_mission_order': {
|
||||
@@ -192,6 +196,7 @@ class TestCustomMissionOrders(Sc2SetupTestBase):
|
||||
test_item = item_names.ZERGLING
|
||||
test_amount = 3
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': 'custom',
|
||||
'locked_items': { test_item: 1 }, # Make sure it is generated as normal
|
||||
'custom_mission_order': {
|
||||
|
||||
@@ -16,6 +16,7 @@ from ..options import EnabledCampaigns, NovaGhostOfAChanceVariant, MissionOrder,
|
||||
class TestItemFiltering(Sc2SetupTestBase):
|
||||
def test_explicit_locks_excludes_interact_and_set_flags(self):
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'locked_items': {
|
||||
item_names.MARINE: 0,
|
||||
item_names.MARAUDER: 0,
|
||||
@@ -116,6 +117,8 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_excluding_mission_groups_excludes_all_missions_in_group(self):
|
||||
world_options = {
|
||||
**self.ZERG_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'excluded_missions': [
|
||||
mission_groups.MissionGroupNames.HOTS_ZERUS_MISSIONS,
|
||||
],
|
||||
@@ -158,6 +161,8 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_excluding_all_terran_missions_excludes_all_terran_items(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'excluded_missions': [
|
||||
@@ -173,6 +178,8 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_excluding_all_terran_build_missions_excludes_all_terran_units(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'excluded_missions': [
|
||||
@@ -191,6 +198,8 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_excluding_all_zerg_and_kerrigan_missions_excludes_all_zerg_items(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'excluded_missions': [
|
||||
@@ -206,6 +215,8 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_excluding_all_zerg_build_missions_excludes_zerg_units(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'excluded_missions': [
|
||||
@@ -225,6 +236,8 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_excluding_all_protoss_missions_excludes_all_protoss_items(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'accessibility': 'locations',
|
||||
@@ -242,6 +255,8 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_excluding_all_protoss_build_missions_excludes_protoss_units(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'accessibility': 'locations',
|
||||
@@ -287,6 +302,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_vanilla_items_only_includes_only_nova_equipment_and_vanilla_and_filler_items(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
# Avoid options that lock non-vanilla items for logic
|
||||
@@ -516,6 +532,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_nco_and_wol_picks_correct_starting_mission(self):
|
||||
world_options = {
|
||||
'mission_order': MissionOrder.option_vanilla,
|
||||
'enabled_campaigns': {
|
||||
SC2Campaign.WOL.campaign_name,
|
||||
SC2Campaign.NCO.campaign_name
|
||||
@@ -530,7 +547,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
mission_tables.SC2Mission.ZERO_HOUR.mission_name.split(" (")[0]
|
||||
],
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'selected_races': options.SelectRaces.valid_keys,
|
||||
'selected_races': options.SelectedRaces.valid_keys,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'enabled_campaigns': {
|
||||
SC2Campaign.WOL.campaign_name,
|
||||
@@ -549,7 +566,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
mission_tables.SC2Mission.ZERO_HOUR.mission_name
|
||||
],
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'selected_races': options.SelectRaces.valid_keys,
|
||||
'selected_races': options.SelectedRaces.valid_keys,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'enabled_campaigns': {
|
||||
SC2Campaign.WOL.campaign_name,
|
||||
@@ -757,7 +774,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_kerrigan_levels_per_mission_triggering_pre_fill(self):
|
||||
world_options = {
|
||||
# Vanilla WoL with all missions
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_custom,
|
||||
'custom_mission_order': {
|
||||
'campaign': {
|
||||
@@ -798,7 +815,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_kerrigan_levels_per_mission_and_generic_upgrades_both_triggering_pre_fill(self):
|
||||
world_options = {
|
||||
# Vanilla WoL with all missions
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_custom,
|
||||
'custom_mission_order': {
|
||||
'campaign': {
|
||||
@@ -843,10 +860,9 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
self.assertNotIn(item_names.KERRIGAN_LEVELS_70, itempool)
|
||||
self.assertNotIn(item_names.KERRIGAN_LEVELS_70, starting_inventory)
|
||||
|
||||
|
||||
|
||||
def test_locking_required_items(self):
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_custom,
|
||||
'custom_mission_order': {
|
||||
'campaign': {
|
||||
@@ -892,7 +908,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': campaign_size,
|
||||
'enabled_campaigns': EnabledCampaigns.valid_keys,
|
||||
'selected_races': options.SelectRaces.valid_keys,
|
||||
'selected_races': options.SelectedRaces.valid_keys,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'mission_race_balancing': options.EnableMissionRaceBalancing.option_fully_balanced,
|
||||
}
|
||||
@@ -924,6 +940,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
},
|
||||
'max_number_of_upgrades': 2,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'selected_races': {
|
||||
SC2Race.TERRAN.get_title(),
|
||||
},
|
||||
@@ -960,6 +977,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
},
|
||||
'max_number_of_upgrades': 2,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'selected_races': {
|
||||
SC2Race.TERRAN.get_title(),
|
||||
SC2Race.ZERG.get_title(),
|
||||
@@ -990,6 +1008,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
},
|
||||
'max_upgrade_level': MAX_LEVEL,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'generic_upgrade_items': options.GenericUpgradeItems.option_bundle_weapon_and_armor
|
||||
}
|
||||
@@ -1016,12 +1035,13 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_ghost_of_a_chance_generates_without_nco(self) -> None:
|
||||
world_options = {
|
||||
**self.TERRAN_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_custom,
|
||||
'nova_ghost_of_a_chance_variant': NovaGhostOfAChanceVariant.option_auto,
|
||||
'custom_mission_order': {
|
||||
'test': {
|
||||
'type': 'column',
|
||||
'size': 1, # Give the generator some space to place the key
|
||||
'size': 1,
|
||||
'mission_pool': [
|
||||
SC2Mission.GHOST_OF_A_CHANCE.mission_name
|
||||
]
|
||||
@@ -1037,12 +1057,13 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_ghost_of_a_chance_generates_using_nco_nova(self) -> None:
|
||||
world_options = {
|
||||
**self.TERRAN_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_custom,
|
||||
'nova_ghost_of_a_chance_variant': NovaGhostOfAChanceVariant.option_nco,
|
||||
'custom_mission_order': {
|
||||
'test': {
|
||||
'type': 'column',
|
||||
'size': 2, # Give the generator some space to place the key
|
||||
'size': 2,
|
||||
'mission_pool': [
|
||||
SC2Mission.LIBERATION_DAY.mission_name, # Starter mission
|
||||
SC2Mission.GHOST_OF_A_CHANCE.mission_name,
|
||||
@@ -1058,12 +1079,13 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_ghost_of_a_chance_generates_with_nco(self) -> None:
|
||||
world_options = {
|
||||
**self.TERRAN_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_custom,
|
||||
'nova_ghost_of_a_chance_variant': NovaGhostOfAChanceVariant.option_auto,
|
||||
'custom_mission_order': {
|
||||
'test': {
|
||||
'type': 'column',
|
||||
'size': 3, # Give the generator some space to place the key
|
||||
'size': 3,
|
||||
'mission_pool': [
|
||||
SC2Mission.LIBERATION_DAY.mission_name, # Starter mission
|
||||
SC2Mission.GHOST_OF_A_CHANCE.mission_name,
|
||||
@@ -1080,7 +1102,9 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_exclude_overpowered_items(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_true,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'selected_races': [SC2Race.TERRAN.get_title()],
|
||||
@@ -1096,7 +1120,9 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_exclude_overpowered_items_not_excluded(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_false,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'selected_races': [SC2Race.TERRAN.get_title()],
|
||||
@@ -1112,7 +1138,9 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_exclude_overpowered_items_vanilla_only(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_true,
|
||||
'vanilla_items_only': VanillaItemsOnly.option_true,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
@@ -1129,7 +1157,9 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
def test_exclude_locked_overpowered_items(self) -> None:
|
||||
locked_item = item_names.BATTLECRUISER_ATX_LASER_BATTERY
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_true,
|
||||
'locked_items': [locked_item],
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
@@ -1147,7 +1177,9 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
Checks if all unreleased items are marked properly not to generate
|
||||
"""
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_false,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
}
|
||||
@@ -1165,7 +1197,9 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
Locking overrides this behavior - if they're locked, they must appear
|
||||
"""
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_false,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'locked_items': {item_name: 0 for item_name in unreleased_items},
|
||||
@@ -1180,10 +1214,12 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_merc_excluded_excludes_merc_upgrades(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'excluded_items': [item_name for item_name in item_groups.terran_mercenaries],
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'selected_races': [SC2Race.TERRAN.get_title()],
|
||||
}
|
||||
|
||||
self.generate_world(world_options)
|
||||
@@ -1193,6 +1229,7 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_unexcluded_items_applies_over_op_items(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_true,
|
||||
@@ -1216,11 +1253,13 @@ class TestItemFiltering(Sc2SetupTestBase):
|
||||
|
||||
def test_exclude_overpowered_items_and_not_allow_unit_nerfs(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': MissionOrder.option_grid,
|
||||
'maximum_campaign_size': MaximumCampaignSize.range_end,
|
||||
'exclude_overpowered_items': ExcludeOverpoweredItems.option_true,
|
||||
'war_council_nerfs': options.WarCouncilNerfs.option_false,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_shuffle_all,
|
||||
'selected_races': [SC2Race.PROTOSS.get_title()],
|
||||
}
|
||||
|
||||
self.generate_world(world_options)
|
||||
|
||||
@@ -15,6 +15,7 @@ class ItemFilterTests(Sc2SetupTestBase):
|
||||
},
|
||||
'required_tactics': 'standard',
|
||||
'min_number_of_upgrades': 1,
|
||||
**self.TERRAN_CAMPAIGNS,
|
||||
'selected_races': {
|
||||
SC2Race.TERRAN.get_title()
|
||||
},
|
||||
@@ -54,6 +55,7 @@ class ItemFilterTests(Sc2SetupTestBase):
|
||||
},
|
||||
'min_number_of_upgrades': 2,
|
||||
'required_tactics': 'standard',
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'selected_races': {
|
||||
SC2Race.PROTOSS.get_title()
|
||||
},
|
||||
@@ -75,6 +77,7 @@ class ItemFilterTests(Sc2SetupTestBase):
|
||||
},
|
||||
'min_number_of_upgrades': 2,
|
||||
'required_tactics': 'standard',
|
||||
**self.PROTOSS_CAMPAIGNS,
|
||||
'selected_races': {
|
||||
SC2Race.PROTOSS.get_title()
|
||||
},
|
||||
|
||||
@@ -116,6 +116,7 @@ class TestRules(unittest.TestCase):
|
||||
test_world.options.take_over_ai_allies.value = take_over_ai_allies
|
||||
test_world.options.kerrigan_presence.value = kerrigan_presence
|
||||
test_world.options.spear_of_adun_passive_ability_presence.value = spear_of_adun_passive_presence
|
||||
test_world.options.enabled_campaigns.value = set(options.EnabledCampaigns.valid_keys)
|
||||
test_world.logic = SC2Logic(test_world) # type: ignore
|
||||
return test_world
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
|
||||
def test_race_swap_pick_one_has_correct_length_and_includes_swaps(self) -> None:
|
||||
world_options = {
|
||||
'selected_races': options.SelectRaces.valid_keys,
|
||||
'selected_races': options.SelectedRaces.valid_keys,
|
||||
'enable_race_swap': options.EnableRaceSwapVariants.option_pick_one,
|
||||
'enabled_campaigns': {
|
||||
SC2Campaign.WOL.campaign_name,
|
||||
@@ -343,6 +343,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
def test_kerrigan_max_active_abilities(self):
|
||||
target_number: int = 8
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'selected_races': {
|
||||
@@ -361,6 +362,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
def test_kerrigan_max_passive_abilities(self):
|
||||
target_number: int = 3
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'selected_races': {
|
||||
@@ -379,6 +381,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
def test_spear_of_adun_max_active_abilities(self):
|
||||
target_number: int = 8
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'selected_races': {
|
||||
@@ -398,6 +401,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
def test_spear_of_adun_max_autocasts(self):
|
||||
target_number: int = 2
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'selected_races': {
|
||||
@@ -417,6 +421,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
def test_nova_max_weapons(self):
|
||||
target_number: int = 3
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'selected_races': {
|
||||
@@ -436,6 +441,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
def test_nova_max_gadgets(self):
|
||||
target_number: int = 3
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'mission_order': options.MissionOrder.option_grid,
|
||||
'maximum_campaign_size': options.MaximumCampaignSize.range_end,
|
||||
'selected_races': {
|
||||
@@ -453,6 +459,7 @@ class TestSupportedUseCases(Sc2SetupTestBase):
|
||||
|
||||
def test_mercs_only(self) -> None:
|
||||
world_options = {
|
||||
**self.ALL_CAMPAIGNS,
|
||||
'selected_races': [
|
||||
SC2Race.TERRAN.get_title(),
|
||||
SC2Race.ZERG.get_title(),
|
||||
|
||||
Reference in New Issue
Block a user