Skip to content

Commit

Permalink
TLOZ: use proper rule for completion condition (#2872)
Browse files Browse the repository at this point in the history
Was pointed out that using `state.locations.checked` is not the best solution, even if it's for a completion condition and the Ganon event location would always have the Triforce of Power event item. So let's just check for the Triforce of Power instead. Thank you Zunawe for pointing it out and Silvris for providing the proper rule to use.
  • Loading branch information
t3hf1gm3nt authored Mar 5, 2024
1 parent 4ddfb7c commit 938beb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/tloz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def generate_basic(self):

self.multiworld.get_location("Zelda", self.player).place_locked_item(self.create_event("Rescued Zelda!"))
add_rule(self.multiworld.get_location("Zelda", self.player),
lambda state: ganon in state.locations_checked)
lambda state: state.has("Triforce of Power", self.player))
self.multiworld.completion_condition[self.player] = lambda state: state.has("Rescued Zelda!", self.player)

def apply_base_patch(self, rom):
Expand Down

0 comments on commit 938beb3

Please sign in to comment.