diff --git a/BaseClasses.py b/BaseClasses.py index 1a7d7dab..8ea0acb4 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -952,11 +952,11 @@ class Location(object): self.item_rule = lambda item: True self.player = player - def can_fill(self, state, item, check_access=True) -> bool: + def can_fill(self, state: CollectionState, item: Item, check_access=True) -> bool: return self.always_allow(state, item) or (self.parent_region.can_fill(item) and self.item_rule(item) and ( not check_access or self.can_reach(state))) - def can_reach(self, state) -> bool: + def can_reach(self, state: CollectionState) -> bool: if self.parent_region.can_reach(state) and self.access_rule(state): return True return False diff --git a/Dungeons.py b/Dungeons.py index 224906ae..d7e245da 100644 --- a/Dungeons.py +++ b/Dungeons.py @@ -50,15 +50,6 @@ def fill_dungeons(world): all_state_base = world.get_all_state() - for player in range(1, world.players + 1): - if not world.retro[player] and world.logic == "noglitches" and not world.keyshuffle[player]: - skull_woods = world.get_dungeon('Skull Woods', player) - skull_woods.small_keys.pop() - pinball_room = world.get_location('Skull Woods - Pinball Room', player) - world.push_item(pinball_room, ItemFactory('Small Key (Skull Woods)', player), False) - pinball_room.event = True - pinball_room.locked = True - dungeons = [(list(dungeon.regions), dungeon.big_key, list(dungeon.small_keys), list(dungeon.dungeon_items)) for dungeon in world.dungeons] loopcnt = 0 @@ -129,16 +120,6 @@ def get_dungeon_item_pool(world): def fill_dungeons_restrictive(world, shuffled_locations): all_state_base = world.get_all_state() - for player in range(1, world.players + 1): - if not world.retro[player] and world.logic == "noglitches" and not world.keyshuffle[player]: - skull_woods = world.get_dungeon('Skull Woods', player) - skull_woods.small_keys.pop() - pinball_room = world.get_location('Skull Woods - Pinball Room', player) - world.push_item(pinball_room, ItemFactory('Small Key (Skull Woods)', player), False) - pinball_room.event = True - pinball_room.locked = True - shuffled_locations.remove(pinball_room) - # with shuffled dungeon items they are distributed as part of the normal item pool for item in world.get_items(): if (item.smallkey and world.keyshuffle[item.player]) or (item.bigkey and world.bigkeyshuffle[item.player]): diff --git a/Fill.py b/Fill.py index 93be4fc8..249abf16 100644 --- a/Fill.py +++ b/Fill.py @@ -281,14 +281,14 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None if any( localprioitempool.values() or localrestitempool.values()): # we need to make sure some fills are limited to certain worlds - for player, items in localprioitempool.items(): # already shuffled + for player, items in localprioitempool.items(): # items already shuffled local_locations = [location for location in fill_locations if location.player == player] random.shuffle(local_locations) for item_to_place in items: spot_to_fill = local_locations.pop() world.push_item(spot_to_fill, item_to_place, False) fill_locations.remove(spot_to_fill) - for player, items in localrestitempool.items(): # already shuffled + for player, items in localrestitempool.items(): # items already shuffled local_locations = [location for location in fill_locations if location.player == player] random.shuffle(local_locations) for item_to_place in items: diff --git a/easy.yaml b/easy.yaml index 5db2ef32..8cc7f5ca 100644 --- a/easy.yaml +++ b/easy.yaml @@ -149,7 +149,7 @@ boss_shuffle: random: 0 # Any boss can appear any amount of times enemy_shuffle: none: 1 # Vanilla enemy placement - shuffled: 0 # Enemies are randomized + chaos: 0 # Enemies are randomized random: 0 # also shuffle bush enemies, random tile rooms and random bush enemy spawn chance chaosthieves: 0 # random + thieves may not be killable enemy_damage: diff --git a/setup.py b/setup.py index 0ecd44c6..1c4cf016 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,7 @@ for script, scriptname in scripts.items(): import datetime -buildtime = datetime.datetime.now() +buildtime = datetime.datetime.utcnow() cx_Freeze.setup( name="BerserkerMultiWorld",