From f5f0cebe2652d4aca36ca1aa5d311d6019dac57d Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Tue, 24 Oct 2023 13:06:47 -0500 Subject: [PATCH] Fix swordless checks not checking for swordless_b --- InitialSram.py | 2 +- ItemList.py | 6 +++--- Main.py | 2 +- Rom.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/InitialSram.py b/InitialSram.py index d2628cc8..b1177cb4 100644 --- a/InitialSram.py +++ b/InitialSram.py @@ -242,7 +242,7 @@ class InitialSram: self._initial_sram_bytes[0x422] = self._initial_sram_bytes[0x35A] self._initial_sram_bytes[0x46E] = self._initial_sram_bytes[0x35B] - if world.swords[player] == "swordless": + if world.swords[player] in ["swordless", "swordless_b"]: self._initial_sram_bytes[0x359] = 0xFF self._initial_sram_bytes[0x417] = 0x00 diff --git a/ItemList.py b/ItemList.py index 88148392..9fca3550 100644 --- a/ItemList.py +++ b/ItemList.py @@ -357,7 +357,7 @@ def generate_itempool(world, player): possible_weapons = [] for item in pool: if item in ['Progressive Sword', 'Fighter Sword', 'Master Sword', 'Tempered Sword', 'Golden Sword']: - if not found_sword and world.swords[player] != 'swordless': + if not found_sword and world.swords[player] not in ['swordless', 'swordless_b']: found_sword = True possible_weapons.append(item) if item in ['Progressive Cane', 'Progressive Net']: @@ -1162,7 +1162,7 @@ def get_pool_core(world, player, progressive, shuffle, difficulty, treasure_hunt else: pool.extend(['Bow', 'Silver Arrows']) - if swords == 'swordless': + if swords in ['swordless', 'swordless_b']: pool.extend(diff.swordless) elif swords == 'bombs': pool.extend(diff.bombs_only) @@ -1572,7 +1572,7 @@ def make_customizer_pool(world, player): if 'Bomb Upgrade (+10)' not in pool: missing_items.append('Bomb Upgrade (+10)') - if world.swords[player] != 'swordless': + if world.swords[player] not in ['swordless', 'swordless_b']: beam_swords = {'Master Sword', 'Tempered Sword', 'Golden Sword'} sword_count = sum(1 for i in pool if i in 'Progressive Sword') sword_count = 2 if next((i for i in pool if i in beam_swords), None) is not None else sword_count diff --git a/Main.py b/Main.py index 6f417765..a7b1e38b 100644 --- a/Main.py +++ b/Main.py @@ -65,7 +65,7 @@ def get_random_ganon_item(swordmode): "somaria", "byrna", ] - if swordmode == "swordless": + if swordmode in ["swordless", "swordless_b"]: options.remove("bombos") options.remove("ether") options.remove("quake") diff --git a/Rom.py b/Rom.py index 5fe1b416..9108950e 100644 --- a/Rom.py +++ b/Rom.py @@ -2635,7 +2635,7 @@ def write_strings(rom, world, player, team): prog_bow_locs = world.find_items('Progressive Bow', player) distinguished_prog_bow_loc = next((location for location in prog_bow_locs if location.item.code == 0x65), None) - progressive_silvers = world.difficulty_requirements[player].progressive_bow_limit >= 2 or world.swords[player] in ['swordless', 'pseudo', 'assured_pseudo'] + progressive_silvers = world.difficulty_requirements[player].progressive_bow_limit >= 2 or world.swords[player] in ['swordless', 'swordless_b', 'pseudo', 'assured_pseudo'] if distinguished_prog_bow_loc: prog_bow_locs.remove(distinguished_prog_bow_loc) hint_phrase = hint_text(distinguished_prog_bow_loc).replace("Ganon's", "my")