remove special rules for pinball room
This commit is contained in:
parent
baa1f1d2ba
commit
57fe16ab60
|
@ -952,11 +952,11 @@ class Location(object):
|
||||||
self.item_rule = lambda item: True
|
self.item_rule = lambda item: True
|
||||||
self.player = player
|
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 (
|
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)))
|
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):
|
if self.parent_region.can_reach(state) and self.access_rule(state):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
19
Dungeons.py
19
Dungeons.py
|
@ -50,15 +50,6 @@ def fill_dungeons(world):
|
||||||
|
|
||||||
all_state_base = world.get_all_state()
|
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]
|
dungeons = [(list(dungeon.regions), dungeon.big_key, list(dungeon.small_keys), list(dungeon.dungeon_items)) for dungeon in world.dungeons]
|
||||||
|
|
||||||
loopcnt = 0
|
loopcnt = 0
|
||||||
|
@ -129,16 +120,6 @@ def get_dungeon_item_pool(world):
|
||||||
def fill_dungeons_restrictive(world, shuffled_locations):
|
def fill_dungeons_restrictive(world, shuffled_locations):
|
||||||
all_state_base = world.get_all_state()
|
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
|
# with shuffled dungeon items they are distributed as part of the normal item pool
|
||||||
for item in world.get_items():
|
for item in world.get_items():
|
||||||
if (item.smallkey and world.keyshuffle[item.player]) or (item.bigkey and world.bigkeyshuffle[item.player]):
|
if (item.smallkey and world.keyshuffle[item.player]) or (item.bigkey and world.bigkeyshuffle[item.player]):
|
||||||
|
|
4
Fill.py
4
Fill.py
|
@ -281,14 +281,14 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
|
||||||
|
|
||||||
if any(
|
if any(
|
||||||
localprioitempool.values() or localrestitempool.values()): # we need to make sure some fills are limited to certain worlds
|
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]
|
local_locations = [location for location in fill_locations if location.player == player]
|
||||||
random.shuffle(local_locations)
|
random.shuffle(local_locations)
|
||||||
for item_to_place in items:
|
for item_to_place in items:
|
||||||
spot_to_fill = local_locations.pop()
|
spot_to_fill = local_locations.pop()
|
||||||
world.push_item(spot_to_fill, item_to_place, False)
|
world.push_item(spot_to_fill, item_to_place, False)
|
||||||
fill_locations.remove(spot_to_fill)
|
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]
|
local_locations = [location for location in fill_locations if location.player == player]
|
||||||
random.shuffle(local_locations)
|
random.shuffle(local_locations)
|
||||||
for item_to_place in items:
|
for item_to_place in items:
|
||||||
|
|
|
@ -149,7 +149,7 @@ boss_shuffle:
|
||||||
random: 0 # Any boss can appear any amount of times
|
random: 0 # Any boss can appear any amount of times
|
||||||
enemy_shuffle:
|
enemy_shuffle:
|
||||||
none: 1 # Vanilla enemy placement
|
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
|
random: 0 # also shuffle bush enemies, random tile rooms and random bush enemy spawn chance
|
||||||
chaosthieves: 0 # random + thieves may not be killable
|
chaosthieves: 0 # random + thieves may not be killable
|
||||||
enemy_damage:
|
enemy_damage:
|
||||||
|
|
Loading…
Reference in New Issue