From 7aa9622c5e713e5fbba2b2e428ec5c1c8ea1b352 Mon Sep 17 00:00:00 2001 From: Bonta-kun <40473493+Bonta0@users.noreply.github.com> Date: Mon, 30 Dec 2019 06:42:45 +0100 Subject: [PATCH] Escape assist: only get infinite bombs with enemizer or bombs/cane/bow start + high hp --- ItemList.py | 37 ++++++++++++++++++++----------------- Main.py | 2 +- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ItemList.py b/ItemList.py index c5f2f3de..01cfb3e1 100644 --- a/ItemList.py +++ b/ItemList.py @@ -182,24 +182,27 @@ def generate_itempool(world, player): for item in precollected_items: world.push_precollected(ItemFactory(item, player)) - if world.mode[player] == 'standard' and not world.state.has_blunt_weapon(player) and "Link's Uncle" not in placed_items: - found_sword = False - found_bow = False - 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': - found_sword = True + if world.mode[player] == 'standard' and not world.state.has_blunt_weapon(player): + if "Link's Uncle" not in placed_items: + found_sword = False + found_bow = False + 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': + found_sword = True + possible_weapons.append(item) + if item in ['Progressive Bow', 'Bow'] and not found_bow: + found_bow = True possible_weapons.append(item) - if item in ['Progressive Bow', 'Bow'] and not found_bow: - found_bow = True - possible_weapons.append(item) - if item in ['Hammer', 'Bombs (10)', 'Fire Rod', 'Cane of Somaria', 'Cane of Byrna']: - if item not in possible_weapons: - possible_weapons.append(item) - starting_weapon = random.choice(possible_weapons) - placed_items["Link's Uncle"] = starting_weapon - pool.remove(starting_weapon) + if item in ['Hammer', 'Bombs (10)', 'Fire Rod', 'Cane of Somaria', 'Cane of Byrna']: + if item not in possible_weapons: + possible_weapons.append(item) + starting_weapon = random.choice(possible_weapons) + placed_items["Link's Uncle"] = starting_weapon + pool.remove(starting_weapon) + if placed_items["Link's Uncle"] in ['Bow', 'Progressive Bow', 'Bombs (10)', 'Cane of Somaria', 'Cane of Byrna'] and world.enemy_health[player] not in ['default', 'easy']: + world.escape_assist[player].append('bombs') for (location, item) in placed_items.items(): world.push_item(world.get_location(location, player), ItemFactory(item, player), False) diff --git a/Main.py b/Main.py index 80f94552..f8af954c 100644 --- a/Main.py +++ b/Main.py @@ -61,7 +61,7 @@ def main(args, seed=None): for player in range(1, world.players + 1): world.difficulty_requirements[player] = difficulties[world.difficulty[player]] - if world.mode[player] == 'standard' and (world.enemy_shuffle[player] != 'none' or world.enemy_health[player] not in ['default', 'easy']): + if world.mode[player] == 'standard' and world.enemy_shuffle[player] != 'none': world.escape_assist[player].append('bombs') # enemized escape assumes infinite bombs available and will likely be unbeatable without it if world.mode[player] != 'inverted':