meritous: move completion_condition to set_rules (#4567)

This commit is contained in:
Felix R 2025-01-28 21:03:37 -04:00 committed by GitHub
parent 738c21c625
commit 57afdfda6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 7 deletions

View File

@ -136,6 +136,12 @@ class MeritousWorld(World):
def set_rules(self): def set_rules(self):
set_rules(self.multiworld, self.player) set_rules(self.multiworld, self.player)
if self.goal == 0:
self.multiworld.completion_condition[self.player] = lambda state: state.has_any(
["Victory", "Full Victory"], self.player)
else:
self.multiworld.completion_condition[self.player] = lambda state: state.has(
"Full Victory", self.player)
def generate_basic(self): def generate_basic(self):
self.multiworld.get_location("Place of Power", self.player).place_locked_item( self.multiworld.get_location("Place of Power", self.player).place_locked_item(
@ -166,13 +172,6 @@ class MeritousWorld(World):
self.multiworld.get_location(boss, self.player).place_locked_item( self.multiworld.get_location(boss, self.player).place_locked_item(
self.create_item("Evolution Trap")) self.create_item("Evolution Trap"))
if self.goal == 0:
self.multiworld.completion_condition[self.player] = lambda state: state.has_any(
["Victory", "Full Victory"], self.player)
else:
self.multiworld.completion_condition[self.player] = lambda state: state.has(
"Full Victory", self.player)
def fill_slot_data(self) -> dict: def fill_slot_data(self) -> dict:
return { return {
"goal": self.goal, "goal": self.goal,