Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Rework accessibility #1481

Merged
merged 39 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
48090b1
rename locations accessibility to "full" and make old locations acces…
alwaysintreble Feb 25, 2023
067b3a4
fix a bug in oot
alwaysintreble Feb 25, 2023
018a994
reorder lttp tests to not override its overrides
alwaysintreble Feb 25, 2023
1b4c61b
changed the wrong word in the dict
alwaysintreble Feb 25, 2023
ae327b2
:forehead:
alwaysintreble Feb 25, 2023
23d96b2
update the manual lttp yaml
alwaysintreble Feb 25, 2023
cec6e6f
use __debug__
alwaysintreble Feb 27, 2023
5f95012
Merge remote-tracking branch 'Main/main' into rework_accessibility
alwaysintreble Feb 27, 2023
e3ba50a
Merge remote-tracking branch 'Main/main' into rework_accessibility
alwaysintreble Apr 6, 2023
0f6d72e
update pokemon and messenger
alwaysintreble Apr 6, 2023
6f9cbe7
Merge remote-tracking branch 'Main/main' into rework_accessibility
alwaysintreble Oct 10, 2023
7bc7465
fix conflicts from 993
alwaysintreble Oct 10, 2023
e3fb94e
Merge remote-tracking branch 'Main/main' into rework_accessibility
alwaysintreble Oct 27, 2023
78c6a38
Merge branch 'main' into rework_accessibility
alwaysintreble Nov 25, 2023
212775c
fix stardew presets
alwaysintreble Nov 25, 2023
dbf05f4
Merge branch 'main' into rework_accessibility
alwaysintreble Dec 14, 2023
2bbc38b
add that locations may be inaccessible to description
alwaysintreble Dec 14, 2023
850295e
use reST format and make the items description one line so that it re…
alwaysintreble Dec 14, 2023
22195d0
Merge remote-tracking branch 'Main/main' into rework_accessibility
alwaysintreble Feb 14, 2024
25a282d
forgot i renamed that
alwaysintreble Feb 14, 2024
b4d4855
Merge remote-tracking branch 'Main/main' into rework_accessibility
alwaysintreble Feb 20, 2024
f2aa14f
add aliases for back compat
alwaysintreble Feb 21, 2024
89f8f0f
Merge branch 'main' into rework_accessibility
alwaysintreble Mar 6, 2024
f885dc7
some cleanup
alwaysintreble Mar 6, 2024
f68296d
fix imports
alwaysintreble Mar 7, 2024
7ab7d77
Merge branch 'main' into rework_accessibility
alwaysintreble Mar 24, 2024
74905c2
fix test failure
alwaysintreble Mar 24, 2024
ecbf986
only check "items" players when the item is progression
alwaysintreble Apr 28, 2024
9713ec9
Merge branch 'refs/heads/main' into rework_accessibility
alwaysintreble Apr 28, 2024
299536c
Revert "only check "items" players when the item is progression"
alwaysintreble Apr 28, 2024
a2db851
Merge branch 'refs/heads/main' into rework_accessibility
alwaysintreble Jun 1, 2024
b0dacd9
remove some unnecessary diffs
alwaysintreble Jun 2, 2024
d1a1521
CV64: Add ItemsAccessibility
alwaysintreble Jun 2, 2024
8f0f5a5
put items description at the bottom of the docstring since that's it'…
alwaysintreble Jun 2, 2024
440cfb1
:
alwaysintreble Jun 2, 2024
2fbba05
Merge remote-tracking branch 'refs/remotes/Main/main' into rework_acc…
alwaysintreble Jun 7, 2024
fd5917e
rename accessibility reference in pokemon rb dexsanity
alwaysintreble Jun 7, 2024
4d70e74
Merge branch 'refs/heads/main' into rework_accessibility
alwaysintreble Jul 28, 2024
97afc69
make the rendered tooltips look nicer
alwaysintreble Jul 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions BaseClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def fulfills_accessibility(self, state: Optional[CollectionState] = None):
players: Dict[str, Set[int]] = {
"minimal": set(),
"items": set(),
"locations": set()
"full": set()
}
for player, access in self.accessibility.items():
players[access.current_key].add(player)
Expand All @@ -571,9 +571,10 @@ def location_condition(location: Location):

def location_relevant(location: Location):
"""Determine if this location is relevant to sweep."""
if location.progress_type != LocationProgressType.EXCLUDED \
and (location.player in players["locations"] or location.event
or (location.item and location.item.advancement)):
if __debug__ \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should the behavior of accessibility check differ between source and frozen?

Copy link
Collaborator Author

@alwaysintreble alwaysintreble Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The accessibility check is currently skipped if players are on items, which is the default and what most users actually experience. Since the option is being removed, this gives players essentially the same behavior as before, but enforces proper accessibility during development.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not quite true; even on items the location is checked if its item is advancement. At least it was, now the safety net is gone, which feels wrong.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the __debug__ completely but i'm still unsure how this should be handled. it feels wrong to force every world that doesn't define the optional accessibility to have every single one of their locations checked after fill, especially since it isn't optional. i do agree now that was probably the wrong way to do it but there should still probably be some way to disable it or at least only use the safety net.

and location.progress_type != LocationProgressType.EXCLUDED \
and (location.player in players["full"] or location.event
or (location.item and location.item.advancement)):
return True
return False

Expand Down
17 changes: 13 additions & 4 deletions Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,14 +880,23 @@ class ItemSet(OptionSet):

class Accessibility(Choice):
"""Set rules for reachability of your items/locations.
Locations: ensure everything can be reached and acquired.
Items: ensure all logically relevant items can be acquired.

Full: ensure everything can be reached and acquired.
Minimal: ensure what is needed to reach your goal can be acquired."""
display_name = "Accessibility"
option_locations = 0
option_items = 1
option_full = 0
option_minimal = 2
alias_none = 2
default = 0


class ItemsAccessibility(Accessibility):
"""Set rules for reachability of your items/locations.

Full: ensure everything can be reached and acquired.
Items: ensure all logically relevant items can be acquired. Some items, such as keys, may be self-locking.
alwaysintreble marked this conversation as resolved.
Show resolved Hide resolved
Minimal: ensure what is needed to reach your goal can be acquired."""
option_items = 1
default = 1


Expand Down
6 changes: 3 additions & 3 deletions playerSettings.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can delete this?

Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ A Link to the Past:

accessibility:
# Set rules for reachability of your items/locations.
# Locations: ensure everything can be reached and acquired.
# Items: ensure all logically relevant items can be acquired.
# Full: ensure everything can be reached and acquired.
# Items: ensure all logically relevant items can be acquired. Some items, such as keys, may be self-locking.
# Minimal: ensure what is needed to reach your goal can be acquired.
locations: 0
full: 0
items: 50
minimal: 0

Expand Down
2 changes: 1 addition & 1 deletion test/general/TestFill.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_minimal_mixed_fill(self):
player2 = generate_player_data(multi_world, 2, 3, 3)

multi_world.accessibility[player1.id].value = multi_world.accessibility[player1.id].option_minimal
multi_world.accessibility[player2.id].value = multi_world.accessibility[player2.id].option_locations
multi_world.accessibility[player2.id].value = multi_world.accessibility[player2.id].option_full

multi_world.completion_condition[player1.id] = lambda state: True
multi_world.completion_condition[player2.id] = lambda state: state.has(player2.prog_items[2].name, player2.id)
Expand Down
4 changes: 3 additions & 1 deletion worlds/alttp/Options.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import typing

from BaseClasses import MultiWorld
from Options import Choice, Range, Option, Toggle, DefaultOnToggle, DeathLink, StartInventoryPool, PlandoBosses
from Options import Choice, DeathLink, DefaultOnToggle, ItemsAccessibility, Option, PlandoBosses, Range, \
StartInventoryPool, Toggle


class Logic(Choice):
Expand Down Expand Up @@ -432,6 +433,7 @@ class AllowCollect(Toggle):


alttp_options: typing.Dict[str, type(Option)] = {
"accessibility": ItemsAccessibility,
"crystals_needed_for_gt": CrystalsTower,
"crystals_needed_for_ganon": CrystalsGanon,
"open_pyramid": OpenPyramid,
Expand Down
19 changes: 10 additions & 9 deletions worlds/alttp/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
from typing import Iterator, Set

from Options import ItemsAccessibility
from BaseClasses import Entrance, MultiWorld
from worlds.generic.Rules import (add_item_rule, add_rule, forbid_item,
item_name_in_location_names, location_item_name, set_rule, allow_self_locking_items)
Expand Down Expand Up @@ -39,7 +40,7 @@ def set_rules(world):
else:
# Set access rules according to max glitches for multiworld progression.
# Set accessibility to none, and shuffle assuming the no logic players can always win
world.accessibility[player] = world.accessibility[player].from_text("minimal")
world.accessibility[player].value = ItemsAccessibility.option_minimal
world.progression_balancing[player].value = 0

else:
Expand Down Expand Up @@ -289,7 +290,7 @@ def global_rules(world, player):
set_rule(world.get_entrance('Tower of Hera Big Key Door', player), lambda state: state.has('Big Key (Tower of Hera)', player))
set_rule(world.get_location('Tower of Hera - Big Chest', player), lambda state: state.has('Big Key (Tower of Hera)', player))
set_rule(world.get_location('Tower of Hera - Big Key Chest', player), lambda state: has_fire_source(state, player))
if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
set_always_allow(world.get_location('Tower of Hera - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Tower of Hera)' and item.player == player)

set_rule(world.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Flippers', player) and state.has('Open Floodgate', player))
Expand All @@ -301,7 +302,7 @@ def global_rules(world, player):
if state.has('Hookshot', player)
else state._lttp_has_key('Small Key (Swamp Palace)', player, 4))
set_rule(world.get_location('Swamp Palace - Big Chest', player), lambda state: state.has('Big Key (Swamp Palace)', player))
if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
allow_self_locking_items(world.get_location('Swamp Palace - Big Chest', player), 'Big Key (Swamp Palace)')
set_rule(world.get_entrance('Swamp Palace (North)', player), lambda state: state.has('Hookshot', player) and state._lttp_has_key('Small Key (Swamp Palace)', player, 5))
if not world.smallkey_shuffle[player] and world.logic[player] not in ['hybridglitches', 'nologic']:
Expand All @@ -316,7 +317,7 @@ def global_rules(world, player):

set_rule(world.get_location('Thieves\' Town - Big Chest', player),
lambda state: (state._lttp_has_key('Small Key (Thieves Town)', player, 3)) and state.has('Hammer', player))
if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
allow_self_locking_items(world.get_location('Thieves\' Town - Big Chest', player), 'Small Key (Thieves Town)')

set_rule(world.get_location('Thieves\' Town - Attic', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3))
Expand All @@ -329,7 +330,7 @@ def global_rules(world, player):
set_rule(world.get_entrance('Skull Woods First Section West Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
set_rule(world.get_entrance('Skull Woods First Section (Left) Door to Exit', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
set_rule(world.get_location('Skull Woods - Big Chest', player), lambda state: state.has('Big Key (Skull Woods)', player))
if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
allow_self_locking_items(world.get_location('Skull Woods - Big Chest', player), 'Big Key (Skull Woods)')
set_rule(world.get_entrance('Skull Woods Torch Room', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 4) and state.has('Fire Rod', player) and has_sword(state, player)) # sword required for curtain
add_rule(world.get_location('Skull Woods - Prize', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
Expand Down Expand Up @@ -409,12 +410,12 @@ def global_rules(world, player):

set_rule(world.get_entrance('Palace of Darkness Big Key Chest Staircase', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or (
location_item_name(state, 'Palace of Darkness - Big Key Chest', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 3)))
if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
set_always_allow(world.get_location('Palace of Darkness - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5))

set_rule(world.get_entrance('Palace of Darkness Spike Statue Room Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or (
location_item_name(state, 'Palace of Darkness - Harmless Hellway', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 4)))
if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
set_always_allow(world.get_location('Palace of Darkness - Harmless Hellway', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5))

set_rule(world.get_entrance('Palace of Darkness Maze Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6))
Expand Down Expand Up @@ -1060,7 +1061,7 @@ def tr_big_key_chest_keys_needed(state):
# Must not go in the Chain Chomps chest - only 2 other chests available and 3+ keys required for all other chests
forbid_item(world.get_location('Turtle Rock - Chain Chomps', player), 'Big Key (Turtle Rock)', player)
forbid_item(world.get_location('Turtle Rock - Pokey 2 Key Drop', player), 'Big Key (Turtle Rock)', player)
if world.accessibility[player] == 'locations' and world.goal[player] != 'icerodhunt':
if world.accessibility[player] == 'full' and world.goal[player] != 'icerodhunt':
if world.bigkey_shuffle[player] and can_reach_big_chest:
# Must not go in the dungeon - all 3 available chests (Chomps, Big Chest, Crystaroller) must be keys to access laser bridge, and the big key is required first
for location in ['Turtle Rock - Chain Chomps', 'Turtle Rock - Compass Chest',
Expand All @@ -1075,7 +1076,7 @@ def tr_big_key_chest_keys_needed(state):
location.event = True
toss_junk_item(world, player)

if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
set_always_allow(world.get_location('Turtle Rock - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Turtle Rock)' and item.player == player
and state.can_reach(state.multiworld.get_region('Turtle Rock (Second Section)', player)))

Expand Down
4 changes: 2 additions & 2 deletions worlds/alttp/test/dungeons/TestDungeon.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from BaseClasses import CollectionState, ItemClassification
from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import mandatory_connections, connect_simple
from worlds.alttp.Dungeons import get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import connect_simple, mandatory_connections
from worlds.alttp.ItemPool import difficulties
from worlds.alttp.Items import ItemFactory
from worlds.alttp.Regions import create_regions
Expand Down
5 changes: 2 additions & 3 deletions worlds/alttp/test/inverted/TestInverted.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool
from test.TestBase import TestBase
from worlds.alttp.Dungeons import get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import link_inverted_entrances
from worlds.alttp.InvertedRegions import create_inverted_regions
from worlds.alttp.ItemPool import difficulties
from worlds.alttp.Items import ItemFactory
from worlds.alttp.Regions import mark_light_world_regions
from worlds.alttp.Shops import create_shops
from test.TestBase import TestBase

from worlds.alttp.test import LTTPTestBase


Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool
from test.TestBase import TestBase
from worlds.alttp.Dungeons import get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import link_inverted_entrances
from worlds.alttp.InvertedRegions import create_inverted_regions
from worlds.alttp.ItemPool import difficulties
from worlds.alttp.Items import ItemFactory
from worlds.alttp.Regions import mark_light_world_regions
from worlds.alttp.Shops import create_shops
from test.TestBase import TestBase

from worlds.alttp.test import LTTPTestBase


Expand Down
5 changes: 2 additions & 3 deletions worlds/alttp/test/inverted_owg/TestInvertedOWG.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool
from test.TestBase import TestBase
from worlds.alttp.Dungeons import get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import link_inverted_entrances
from worlds.alttp.InvertedRegions import create_inverted_regions
from worlds.alttp.ItemPool import difficulties
from worlds.alttp.Items import ItemFactory
from worlds.alttp.Regions import mark_light_world_regions
from worlds.alttp.Shops import create_shops
from test.TestBase import TestBase

from worlds.alttp.test import LTTPTestBase


Expand Down
8 changes: 4 additions & 4 deletions worlds/messenger/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

from schema import And, Optional, Or, Schema

from Options import Accessibility, Choice, DeathLink, DefaultOnToggle, OptionDict, PerGameCommonOptions, Range, \
from Options import Choice, DeathLink, DefaultOnToggle, ItemsAccessibility, OptionDict, PerGameCommonOptions, Range, \
StartInventoryPool, Toggle


class MessengerAccessibility(Accessibility):
default = Accessibility.option_locations
class MessengerAccessibility(ItemsAccessibility):
# defaulting to locations accessibility since items makes certain items self-locking
__doc__ = Accessibility.__doc__.replace(f"default {Accessibility.default}", f"default {default}")
default = ItemsAccessibility.option_full
__doc__ = ItemsAccessibility.__doc__


class Logic(Choice):
Expand Down
2 changes: 1 addition & 1 deletion worlds/messenger/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def set_messenger_rules(self) -> None:
lambda state: state.has("Shop Chest", self.player))

multiworld.completion_condition[self.player] = lambda state: state.has("Rescue Phantom", self.player)
if multiworld.accessibility[self.player] > MessengerAccessibility.option_locations:
if multiworld.accessibility[self.player] > MessengerAccessibility.option_full:
set_self_locking_items(self.world, self.player)


Expand Down
2 changes: 1 addition & 1 deletion worlds/minecraft/docs/minecraft_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ name: TuNombre
game: Minecraft

# Opciones compartidas por todos los juegos:
accessibility: locations
accessibility: full
progression_balancing: 50
# Opciones Especficicas para Minecraft

Expand Down
2 changes: 1 addition & 1 deletion worlds/minecraft/docs/minecraft_sv.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ description: Template Name
# Ditt spelnamn. Mellanslag kommer bli omplacerad med understräck och det är en 16-karaktärsgräns.
name: YourName
game: Minecraft
accessibility: locations
accessibility: full
progression_balancing: 0
advancement_goal:
few: 0
Expand Down
2 changes: 1 addition & 1 deletion worlds/oot/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def set_shop_rules(ootworld):
# The goal is to automatically set item rules based on age requirements in case entrances were shuffled
def set_entrances_based_rules(ootworld):

if ootworld.multiworld.accessibility == 'beatable':
if ootworld.multiworld.accessibility[ootworld.player] == 'minimal':
alwaysintreble marked this conversation as resolved.
Show resolved Hide resolved
return

all_state = ootworld.multiworld.get_all_state(False)
Expand Down
2 changes: 1 addition & 1 deletion worlds/pokemon_rb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def number_of_zones(mon):
self.multiworld.elite_four_pokedex_condition[self.player].total = \
int((len(reachable_mons) / 100) * self.multiworld.elite_four_pokedex_condition[self.player].value)

if self.multiworld.accessibility[self.player] == "locations":
if self.multiworld.accessibility[self.player] == "full":
balls = [self.create_item(ball) for ball in ["Poke Ball", "Great Ball", "Ultra Ball"]]
traps = [self.create_item(trap) for trap in item_groups["Traps"]]
locations = [location for location in self.multiworld.get_locations(self.player) if "Pokedex - " in
Expand Down
3 changes: 2 additions & 1 deletion worlds/pokemon_rb/options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Options import Toggle, Choice, Range, SpecialRange, TextChoice, DeathLink
from Options import Choice, DeathLink, ItemsAccessibility, Range, SpecialRange, TextChoice, Toggle


class GameVersion(Choice):
Expand Down Expand Up @@ -859,6 +859,7 @@ class RandomizePokemonPalettes(Choice):


pokemon_rb_options = {
"accessibility": ItemsAccessibility,
"game_version": GameVersion,
"trainer_name": TrainerName,
"rival_name": RivalName,
Expand Down
4 changes: 2 additions & 2 deletions worlds/pokemon_rb/pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ def roll_tm_compat(roll_move):
mon_data["tms"][int(flag / 8)] &= ~(1 << (flag % 8))

hm_verify = ["Surf", "Strength"]
if self.multiworld.accessibility[self.player] == "locations" or ((not
if self.multiworld.accessibility[self.player] == "full" or ((not
self.multiworld.badgesanity[self.player]) and max(self.multiworld.elite_four_badges_condition[self.player],
self.multiworld.route_22_gate_condition[self.player], self.multiworld.victory_road_condition[self.player])
> 7) or (self.multiworld.door_shuffle[self.player] not in ("off", "simple")):
hm_verify += ["Cut"]
if self.multiworld.accessibility[self.player] == "locations" or (not
if self.multiworld.accessibility[self.player] == "full" or (not
self.multiworld.dark_rock_tunnel_logic[self.player]) and ((self.multiworld.trainersanity[self.player] or
self.multiworld.extra_key_items[self.player])
or self.multiworld.door_shuffle[self.player]):
Expand Down
2 changes: 1 addition & 1 deletion worlds/pokemon_rb/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def prize_rule(i):
item_rules["Celadon Prize Corner - Item Prize 2"] = prize_rule
item_rules["Celadon Prize Corner - Item Prize 3"] = prize_rule

if multiworld.accessibility[player] != "locations":
if multiworld.accessibility[player] != "full":
multiworld.get_location("Cerulean Bicycle Shop", player).always_allow = (lambda state, item:
item.name == "Bike Voucher"
and item.player == player)
Expand Down
3 changes: 2 additions & 1 deletion worlds/smz3/Options.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import typing
from Options import Choice, Option, Toggle, DefaultOnToggle, Range
from Options import Choice, Option, Toggle, DefaultOnToggle, Range, ItemsAccessibility

class SMLogic(Choice):
"""This option selects what kind of logic to use for item placement inside
Expand Down Expand Up @@ -128,6 +128,7 @@ class EnergyBeep(DefaultOnToggle):


smz3_options: typing.Dict[str, type(Option)] = {
"accessibility": ItemsAccessibility,
"sm_logic": SMLogic,
"sword_location": SwordLocation,
"morph_location": MorphLocation,
Expand Down
2 changes: 1 addition & 1 deletion worlds/smz3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def set_rules(self):
set_rule(entrance, lambda state, region=region: region.CanEnter(state.smz3state[self.player]))
for loc in region.Locations:
l = self.locations[loc.Name]
if self.multiworld.accessibility[self.player] != 'locations':
if self.multiworld.accessibility[self.player] != 'full':
l.always_allow = lambda state, item, loc=loc: \
item.game == "SMZ3" and \
loc.alwaysAllow(item.item, state.smz3state[self.player])
Expand Down
Loading