mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-04-04 17:13:40 -07:00
SC2: UI update, Relegate No Build Option, and Filler Item Update (#606)
This commit is contained in:
@@ -141,8 +141,9 @@ item_table = {
|
||||
"Void Ray": ItemData(707 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 7, progression=True),
|
||||
"Carrier": ItemData(708 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 8, progression=True),
|
||||
|
||||
"+5 Starting Minerals": ItemData(800+SC2WOL_ITEM_ID_OFFSET, "Minerals", 5, quantity=0, never_exclude=False),
|
||||
"+5 Starting Vespene": ItemData(801+SC2WOL_ITEM_ID_OFFSET, "Vespene", 5, quantity=0, never_exclude=False)
|
||||
"+15 Starting Minerals": ItemData(800+SC2WOL_ITEM_ID_OFFSET, "Minerals", 15, quantity=0, never_exclude=False),
|
||||
"+15 Starting Vespene": ItemData(801+SC2WOL_ITEM_ID_OFFSET, "Vespene", 15, quantity=0, never_exclude=False),
|
||||
"+2 Starting Supply": ItemData(802+SC2WOL_ITEM_ID_OFFSET, "Supply", 2, quantity=0, never_exclude=False),
|
||||
}
|
||||
|
||||
basic_unit: typing.Tuple[str, ...] = (
|
||||
@@ -165,8 +166,8 @@ item_name_groups["Missions"] = ["Beat Liberation Day", "Beat The Outlaws", "Beat
|
||||
"Beat Media Blitz", "Beat Piercing the Shroud"]
|
||||
|
||||
filler_items: typing.Tuple[str, ...] = (
|
||||
'+5 Starting Minerals',
|
||||
'+5 Starting Vespene'
|
||||
'+15 Starting Minerals',
|
||||
'+15 Starting Vespene'
|
||||
)
|
||||
|
||||
lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in get_full_item_list().items() if data.code}
|
||||
@@ -24,10 +24,10 @@ class FillMission(NamedTuple):
|
||||
type: str
|
||||
connect_to: List[int] # -1 connects to Menu
|
||||
category: str
|
||||
number: int = 0 # number of worlds need beaten
|
||||
number: int = 0 # number of worlds need beaten
|
||||
completion_critical: bool = False # missions needed to beat game
|
||||
or_requirements: bool = False # true if the requirements should be or-ed instead of and-ed
|
||||
|
||||
relegate: bool = False # true if this is a slot no build missions should be relegated to.
|
||||
|
||||
|
||||
vanilla_shuffle_order = [
|
||||
@@ -37,7 +37,7 @@ vanilla_shuffle_order = [
|
||||
FillMission("easy", [2], "Colonist"),
|
||||
FillMission("medium", [3], "Colonist"),
|
||||
FillMission("hard", [4], "Colonist", number=7),
|
||||
FillMission("hard", [4], "Colonist", number=7),
|
||||
FillMission("hard", [4], "Colonist", number=7, relegate=True),
|
||||
FillMission("easy", [2], "Artifact", completion_critical=True),
|
||||
FillMission("medium", [7], "Artifact", number=8, completion_critical=True),
|
||||
FillMission("hard", [8], "Artifact", number=11, completion_critical=True),
|
||||
@@ -45,17 +45,17 @@ vanilla_shuffle_order = [
|
||||
FillMission("hard", [10], "Artifact", completion_critical=True),
|
||||
FillMission("medium", [2], "Covert", number=4),
|
||||
FillMission("medium", [12], "Covert"),
|
||||
FillMission("hard", [13], "Covert", number=8),
|
||||
FillMission("hard", [13], "Covert", number=8),
|
||||
FillMission("hard", [13], "Covert", number=8, relegate=True),
|
||||
FillMission("hard", [13], "Covert", number=8, relegate=True),
|
||||
FillMission("medium", [2], "Rebellion", number=6),
|
||||
FillMission("hard", [16], "Rebellion"),
|
||||
FillMission("hard", [17], "Rebellion"),
|
||||
FillMission("hard", [18], "Rebellion"),
|
||||
FillMission("hard", [19], "Rebellion"),
|
||||
FillMission("hard", [19], "Rebellion", relegate=True),
|
||||
FillMission("medium", [8], "Prophecy"),
|
||||
FillMission("hard", [21], "Prophecy"),
|
||||
FillMission("hard", [22], "Prophecy"),
|
||||
FillMission("hard", [23], "Prophecy"),
|
||||
FillMission("hard", [23], "Prophecy", relegate=True),
|
||||
FillMission("hard", [11], "Char", completion_critical=True),
|
||||
FillMission("hard", [25], "Char", completion_critical=True),
|
||||
FillMission("hard", [25], "Char", completion_critical=True),
|
||||
|
||||
@@ -38,17 +38,25 @@ class AllInMap(Choice):
|
||||
class MissionOrder(Choice):
|
||||
"""Determines the order the missions are played in.
|
||||
Vanilla: Keeps the standard mission order and branching from the WoL Campaign.
|
||||
Vanilla Shuffled: Keeps same branching paths from the WoL Campaign but randomizes the order of missions within"""
|
||||
Vanilla Shuffled: Keeps same branching paths from the WoL Campaign but randomizes the order of missions within."""
|
||||
display_name = "Mission Order"
|
||||
option_vanilla = 0
|
||||
option_vanilla_shuffled = 1
|
||||
|
||||
|
||||
class ShuffleProtoss(DefaultOnToggle):
|
||||
"""Determines if the 3 protoss missions are included in the shuffle if Vanilla Shuffled is enabled. If this is
|
||||
not the 3 protoss missions will stay in their vanilla order in the mission order making them optional to complete
|
||||
the game."""
|
||||
display_name = "Shuffle Protoss Missions"
|
||||
|
||||
|
||||
class RelegateNoBuildMissions(DefaultOnToggle):
|
||||
"""If enabled, all no build missions besides the needed first one will be placed at the end of optional routes so
|
||||
that none of them become required to complete the game. Only takes effect if mission order is not set to vanilla."""
|
||||
display_name = "Relegate No-Build Missions"
|
||||
|
||||
|
||||
# noinspection PyTypeChecker
|
||||
sc2wol_options: Dict[str, Option] = {
|
||||
"game_difficulty": GameDifficulty,
|
||||
@@ -56,7 +64,8 @@ sc2wol_options: Dict[str, Option] = {
|
||||
"bunker_upgrade": BunkerUpgrade,
|
||||
"all_in_map": AllInMap,
|
||||
"mission_order": MissionOrder,
|
||||
"shuffle_protoss": ShuffleProtoss
|
||||
"shuffle_protoss": ShuffleProtoss,
|
||||
"relegate_no_build": RelegateNoBuildMissions
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@ def create_regions(world: MultiWorld, player: int, locations: Tuple[LocationData
|
||||
for mission in vanilla_shuffle_order:
|
||||
if mission.type == "all_in":
|
||||
missions.append("All-In")
|
||||
elif get_option_value(world, player, "relegate_no_build") and mission.relegate:
|
||||
missions.append("no_build")
|
||||
else:
|
||||
missions.append(mission.type)
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class SC2WoLWorld(World):
|
||||
|
||||
game = "Starcraft 2 Wings of Liberty"
|
||||
web = Starcraft2WoLWebWorld()
|
||||
data_version = 2
|
||||
|
||||
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
||||
location_name_to_id = {location.name: location.code for location in get_locations(None, None)}
|
||||
|
||||
Reference in New Issue
Block a user