diff --git a/route/rogue/Occurrence/Luofu_StargazerNavalia_F1.py b/route/rogue/Occurrence/Luofu_StargazerNavalia_F1.py index 3e1af7a7a..fa8f6f8fd 100644 --- a/route/rogue/Occurrence/Luofu_StargazerNavalia_F1.py +++ b/route/rogue/Occurrence/Luofu_StargazerNavalia_F1.py @@ -28,3 +28,8 @@ class Route(RouteBase): self.clear_item(item_X504Y610) self.clear_event(event_X510Y626) # ===== End of generated waypoints ===== + + def clear_event(self, *waypoints): + # Too many clicks on A_BUTTON, so no items enroute in Luofu_StargazerNavalia_F1_X521Y595 + self.enroute_add_item = False + return super().clear_event(*waypoints) diff --git a/tasks/map/control/waypoint.py b/tasks/map/control/waypoint.py index 829a4c05f..0a058a463 100644 --- a/tasks/map/control/waypoint.py +++ b/tasks/map/control/waypoint.py @@ -116,6 +116,10 @@ class Waypoint: return list(same) + def enroute_add_item(self): + if 'item' not in self.expected_enroute: + self.expected_enroute.append('item') + def ensure_waypoint(point) -> Waypoint: """ diff --git a/tasks/rogue/route/base.py b/tasks/rogue/route/base.py index 2126852a3..d41522075 100644 --- a/tasks/rogue/route/base.py +++ b/tasks/rogue/route/base.py @@ -17,6 +17,7 @@ from tasks.rogue.route.exit import RogueExit class RouteBase(RouteBase_, RogueExit, RogueEvent, RogueReward): registered_domain_exit = None + enroute_add_item = True def combat_expected_end(self): if self.is_page_choose_blessing(): @@ -140,10 +141,9 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent, RogueReward): def clear_enemy(self, *waypoints): waypoints = ensure_waypoints(waypoints) - if self.plane.is_rogue_combat: + if self.enroute_add_item and self.plane.is_rogue_combat: for point in waypoints: - if 'item' not in point.expected_enroute: - point.expected_enroute.append('item') + point.enroute_add_item() return super().clear_enemy(*waypoints) def clear_item(self, *waypoints): @@ -199,10 +199,9 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent, RogueReward): end_point.endpoint_threshold = 1.5 end_point.interact_radius = 7 end_point.expected_end.append(self._domain_event_expected_end) - if self.plane.is_rogue_occurrence: + if self.enroute_add_item and self.plane.is_rogue_occurrence: for point in waypoints: - if 'item' not in point.expected_enroute: - point.expected_enroute.append('item') + point.enroute_add_item() result = self.goto(*waypoints) self.clear_occurrence() @@ -302,9 +301,9 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent, RogueReward): logger.hr('Domain single exit', level=1) waypoints = ensure_waypoints(waypoints) - for point in waypoints: - if 'item' not in point.expected_enroute: - point.expected_enroute.append('item') + if self.enroute_add_item: + for point in waypoints: + point.enroute_add_item() end_point = waypoints[-1] end_point.min_speed = 'run'