diff --git a/worlds/tloz/ItemPool.py b/worlds/tloz/ItemPool.py index 4acda4ef41fc..2535afaa9112 100644 --- a/worlds/tloz/ItemPool.py +++ b/worlds/tloz/ItemPool.py @@ -2,6 +2,8 @@ from .Locations import level_locations, all_level_locations, standard_level_locations, shop_locations from .Options import TriforceLocations, StartingPosition +from collections import Counter + # Swords are in starting_weapons overworld_items = { "Letter": 1, @@ -58,11 +60,11 @@ "Small Key": 2, "Five Rupees": 2 } -basic_pool = { - item: overworld_items.get(item, 0) + shop_items.get(item, 0) - + major_dungeon_items.get(item, 0) + map_compass_replacements.get(item, 0) - for item in set(overworld_items) | set(shop_items) | set(major_dungeon_items) | set(map_compass_replacements) -} +basic_pool = Counter() +basic_pool.update(overworld_items) +basic_pool.update(shop_items) +basic_pool.update(major_dungeon_items) +basic_pool.update(map_compass_replacements) starting_weapons = ["Sword", "White Sword", "Magical Sword", "Magical Rod", "Red Candle"] guaranteed_shop_items = ["Small Key", "Bomb", "Water of Life (Red)", "Arrow"] @@ -135,10 +137,10 @@ def get_pool_core(world): # Finish Pool final_pool = basic_pool if world.options.ExpandedPool: - final_pool = { - item: basic_pool.get(item, 0) + minor_items.get(item, 0) + take_any_items.get(item, 0) - for item in set(basic_pool) | set(minor_items) | set(take_any_items) - } + final_pool = Counter() + final_pool.update(basic_pool) + final_pool.update(minor_items) + final_pool.update(take_any_items) final_pool["Five Rupees"] -= 1 for item in final_pool.keys(): for i in range(0, final_pool[item]):