diff --git a/worlds/kdl3/__init__.py b/worlds/kdl3/__init__.py index 1b5acbe9..7642ec23 100644 --- a/worlds/kdl3/__init__.py +++ b/worlds/kdl3/__init__.py @@ -303,9 +303,6 @@ class KDL3World(World): def generate_basic(self) -> None: self.stage_shuffle_enabled = self.options.stage_shuffle > 0 - goal = self.options.goal.value - goal_location = self.multiworld.get_location(location_name.goals[goal], self.player) - goal_location.place_locked_item(KDL3Item("Love-Love Rod", ItemClassification.progression, None, self.player)) for level in range(1, 6): self.multiworld.get_location(f"Level {level} Boss - Defeated", self.player) \ .place_locked_item( @@ -313,7 +310,6 @@ class KDL3World(World): self.multiworld.get_location(f"Level {level} Boss - Purified", self.player) \ .place_locked_item( KDL3Item(f"Level {level} Boss Purified", ItemClassification.progression, None, self.player)) - self.multiworld.completion_condition[self.player] = lambda state: state.has("Love-Love Rod", self.player) # this can technically be done at any point before generate_output if self.options.allow_bb: if self.options.allow_bb == self.options.allow_bb.option_enforced: diff --git a/worlds/kdl3/rules.py b/worlds/kdl3/rules.py index 82874085..0be47841 100644 --- a/worlds/kdl3/rules.py +++ b/worlds/kdl3/rules.py @@ -1,6 +1,8 @@ +from BaseClasses import ItemClassification from worlds.generic.Rules import set_rule, add_rule -from .names import location_name, enemy_abilities, animal_friend_spawns +from .items import KDL3Item from .locations import location_table +from .names import location_name, enemy_abilities, animal_friend_spawns from .options import GoalSpeed import typing @@ -111,6 +113,11 @@ def can_fix_angel_wings(state: "CollectionState", player: int, copy_abilities: t def set_rules(world: "KDL3World") -> None: + goal = world.options.goal.value + goal_location = world.multiworld.get_location(location_name.goals[goal], world.player) + goal_location.place_locked_item(KDL3Item("Love-Love Rod", ItemClassification.progression, None, world.player)) + world.multiworld.completion_condition[world.player] = lambda state: state.has("Love-Love Rod", world.player) + # Level 1 set_rule(world.multiworld.get_location(location_name.grass_land_muchi, world.player), lambda state: can_reach_chuchu(state, world.player)) diff --git a/worlds/mm2/__init__.py b/worlds/mm2/__init__.py index 4a43ee8d..529810d4 100644 --- a/worlds/mm2/__init__.py +++ b/worlds/mm2/__init__.py @@ -133,6 +133,9 @@ class MM2World(World): Consumables.option_all): stage.add_locations(energy_pickups[region], MM2Location) self.multiworld.regions.append(stage) + goal_location = self.get_location(dr_wily) + goal_location.place_locked_item(MM2Item("Victory", ItemClassification.progression, None, self.player)) + self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) def create_item(self, name: str) -> MM2Item: item = item_table[name] @@ -189,11 +192,6 @@ class MM2World(World): f"Incompatible starting Robot Master, changing to " f"{self.options.starting_robot_master.current_key.replace('_', ' ').title()}") - def generate_basic(self) -> None: - goal_location = self.get_location(dr_wily) - goal_location.place_locked_item(MM2Item("Victory", ItemClassification.progression, None, self.player)) - self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) - def fill_hook(self, progitempool: List["Item"], usefulitempool: List["Item"],