Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YGO06: make sure it runs on 3.8 support #3324

Merged
merged 2 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions worlds/yugioh06/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def generate_early(self):
self.multiworld.push_precollected(self.create_item(Banlist_Items[banlist]))

if not self.removed_challenges:
challenge = list((Limited_Duels | Theme_Duels).keys())
challenge = list(({**Limited_Duels, **Theme_Duels}).keys())
noc = len(challenge) - max(
self.options.third_tier_5_campaign_boss_challenges.value
if self.options.third_tier_5_campaign_boss_unlock_condition == "challenges"
Expand Down Expand Up @@ -238,9 +238,9 @@ def create_regions(self):
structure_deck = self.options.structure_deck.current_key
self.multiworld.regions += [
self.create_region("Menu", None, ["to Deck Edit", "to Campaign", "to Challenges", "to Card Shop"]),
self.create_region("Campaign", Bonuses | Campaign_Opponents),
self.create_region("Campaign", {**Bonuses, **Campaign_Opponents}),
self.create_region("Challenges"),
self.create_region("Card Shop", Required_Cards | collection_events),
self.create_region("Card Shop", {**Required_Cards, **collection_events}),
self.create_region("Structure Deck", get_deck_content_locations(structure_deck)),
]

Expand Down Expand Up @@ -308,7 +308,7 @@ def create_regions(self):

challenge_region = self.get_region("Challenges")
# Challenges
for challenge, lid in (Limited_Duels | Theme_Duels).items():
for challenge, lid in ({**Limited_Duels, **Theme_Duels}).items():
if challenge in self.removed_challenges:
continue
region = self.create_region(challenge, {challenge: lid, challenge + " Complete": None})
Expand Down
6 changes: 4 additions & 2 deletions worlds/yugioh06/structure_deck.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
structure_contents: dict[str, set] = {
from typing import Dict, Set

structure_contents: Dict[str, Set] = {
"dragons_roar": {
"Luster Dragon",
"Armed Dragon LV3",
Expand Down Expand Up @@ -77,5 +79,5 @@
}


def get_deck_content_locations(deck: str) -> dict[str, str]:
def get_deck_content_locations(deck: str) -> Dict[str, str]:
return {f"{deck} {i}": content for i, content in enumerate(structure_contents[deck])}
Loading