diff --git a/worlds/kh1/Rules.py b/worlds/kh1/Rules.py index 5d071a6fc23d..60a3a2a3c473 100644 --- a/worlds/kh1/Rules.py +++ b/worlds/kh1/Rules.py @@ -116,7 +116,14 @@ def has_oogie_manor(state: CollectionState, player: int, advanced_logic: bool) - or (advanced_logic and has_item(state, player, "High Jump") and can_glide(state, player)) ) -def set_rules(multiworld: MultiWorld, player: int, options, eotw_required_reports: int, final_rest_door_required_reports: int, final_rest_door_requirement: str): +def set_rules(kh1world): + multiworld = kh1world.multiworld + player = kh1world.player + options = kh1world.options + eotw_required_reports = kh1world.determine_reports_required_to_open_end_of_the_world() + final_rest_door_required_reports = kh1world.determine_reports_required_to_open_final_rest_door() + final_rest_door_requirement = kh1world.options.final_rest_door.current_key + #Location rules. #Keys #multiworld.get_location("Destiny Islands Chest" , player).access_rule = lambda state: has_item(state, player, "") diff --git a/worlds/kh1/__init__.py b/worlds/kh1/__init__.py index b520484a2702..3be3bd631398 100644 --- a/worlds/kh1/__init__.py +++ b/worlds/kh1/__init__.py @@ -92,7 +92,7 @@ def create_items(self): level_up_locations = list(get_locations_by_category("Levels").keys()) self.random.shuffle(level_up_item_pool) starting_level_for_stats_only = self.options.force_stats_on_levels - 1 - while len(level_up_item_pool) > 0 and i < self.options.level_checks: + while len(level_up_item_pool) > 0 and starting_level_for_stats_only < self.options.level_checks: self.multiworld.get_location(level_up_locations[starting_level_for_stats_only], self.player).place_locked_item(self.create_item(level_up_item_pool.pop())) starting_level_for_stats_only += 1 @@ -273,7 +273,7 @@ def create_event(self, name: str) -> KH1Item: return KH1Item(name, data.classification, data.code, self.player) def set_rules(self): - set_rules(self.multiworld, self.player, self.options, self.determine_reports_required_to_open_end_of_the_world(), self.determine_reports_required_to_open_final_rest_door(), self.options.final_rest_door.current_key) + set_rules(self) def create_regions(self): create_regions(self.multiworld, self.player, self.options)