-
Notifications
You must be signed in to change notification settings - Fork 819
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
TLoZ: Implementing The Legend of Zelda #1354
TLoZ: Implementing The Legend of Zelda #1354
Conversation
Making it no longer possible to strand items in a take any cave permanently in edge cases
# Conflicts: # Launcher.py # host.yaml
remove read_rom as it no longer exists.
turns out I need to actually update that line with the new util function instead of just ripping out the one that doesn't exist anymore. using something labeled to be used for snes on a nes rom feels weird but if it works, it works.
…/Archipelago into The-Legend-of-Zelda-AP
oops I didn't see this until after I'd already written and pushed your suggested changes. Don't take my missing it as anything other than my being absent-minded |
It's fine as long as it's fixed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly lgtm
] | ||
] | ||
|
||
all_level_locations = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all_level_locations = [location for level in level_locations for location in level]
|
||
floor_location_game_ids_early = {} | ||
floor_location_game_ids_late = {} | ||
for key, value in floor_location_game_offsets_early.items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
floor_location_game_ids_early = {key, value + Rom.first_quest_dungeon_items_early for key, value in floor_location_game_offsets_early.items()}
for key, value in floor_location_game_offsets_late.items(): | ||
floor_location_game_ids_late[key] = value + Rom.first_quest_dungeon_items_late | ||
|
||
dungeon_items = {**floor_location_game_ids_early, **floor_location_game_ids_late} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you use all 3 of these dictionaries separately? seems like it'd be better to just build a single dictionary with a single generator using collections.ChainMap
"Ocean Heart Container" | ||
] | ||
|
||
underworld1_locations = [*floor_location_game_offsets_early.keys()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list(floor_location_game_offsets_early)
world = tloz_world.multiworld | ||
|
||
# Boss events for a nicer spoiler log play through | ||
for level in range(1, 9): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python ranges are end exclusive so this only does 1-8 if that matters here
add_rule(world.get_location("Ocean Heart Container", player), | ||
lambda state: state.has("Stepladder", player)) | ||
|
||
if world.StartingPosition[player] != 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend importing the actual Option class and using the value, or using a string comparison, instead of a hardcoded number comparison that doesn't mean anything when you reread this code in 3 months.
add_rule(world.get_location(location.name, player), | ||
lambda state: state.has("Bow", player)) | ||
|
||
add_rule(world.get_location("Potion Shop Item Left", player), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these be a Region?
lambda state: ganon in state.locations_checked) | ||
|
||
self.multiworld.completion_condition[self.player] = lambda state: state.has("Rescued Zelda!", self.player) | ||
generate_itempool(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create items in the function dedicated to it please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since all of the item creation is done in this function that is in a whole other file (ItemPool.py), sticking it in create_items seemed redundant to me? unless theres something fundamental im not understanding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're doing it later than expected, which has lead to bugs before and in the future AP is likely to reject your world for it.
worlds/tloz/Rules.py
Outdated
"Level 4 Map", "Level 4 Key Drop (Keese North)" | ||
] | ||
for location in stepladder_locations: | ||
add_rule(world.get_location("Ocean Heart Container", player), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this should be
add_rule(world.get_location(location, player),
Fixing an extra paranthesis
Merging this for now, but I'd like to see the code quality concerns that were commented addressed soon. Almost inevitably someone will copy from your world. |
Co-authored-by: t3hf1gm3nt <[email protected]> Co-authored-by: Alchav <[email protected]>
Co-authored-by: t3hf1gm3nt <[email protected]> Co-authored-by: Alchav <[email protected]>
Please format your title with what portion of the project this pull request is
targeting and what it's changing.
ex. "MyGame4: implement new game" or "Docs: add new guide for customizing MyGame3"
What is this fixing or adding?
Support for The Legend of Zelda for the NES, including randomizer, client, and emulator connector, as well as website documentation.
N.B.: while I'm the one putting in the pull request, @t3hf1gm3nt put in a nontrivial amount of work and as such deserves joint credit.
How was this tested?
Public and private sync beta tests, with multiple players playing both Z1 and non-Z1 games.
If this makes graphical changes, please attach screenshots.