From 0300de86f6aa37256920a9c76b26e2562c5e9815 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sat, 30 Sep 2023 18:37:37 +0800 Subject: [PATCH] Refactor: Set default speed to 'run' other speed level will require manual set --- route/daily/HimekoTrial.py | 20 ++++++++++---------- tasks/map/control/control.py | 12 ++++++++---- tasks/map/control/waypoint.py | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/route/daily/HimekoTrial.py b/route/daily/HimekoTrial.py index 64984842c..ae0c0013c 100644 --- a/route/daily/HimekoTrial.py +++ b/route/daily/HimekoTrial.py @@ -83,16 +83,16 @@ class Route(RouteBase, Combat, CharacterTrial): Waypoint((587.6, 366.9)).run_2x(), ) self.clear_item( - Waypoint((575.5, 377.4)), + Waypoint((575.5, 377.4)).straight_run(), ) self.clear_item( # Go through arched door - Waypoint((581.5, 383.3)).run().set_threshold(3), - Waypoint((575.7, 417.2)).run(), + Waypoint((581.5, 383.3)).set_threshold(3), + Waypoint((575.7, 417.2)), ) # Goto boss self.clear_enemy( - Waypoint((613.5, 427.3)), + Waypoint((613.5, 427.3)).straight_run(), ) def route_item(self): @@ -104,12 +104,12 @@ class Route(RouteBase, Combat, CharacterTrial): Waypoint((587.6, 366.9)).run_2x(), ) self.clear_item( - Waypoint((575.5, 377.4)), + Waypoint((575.5, 377.4)).straight_run(), ) self.clear_item( # Go through arched door - Waypoint((581.5, 383.3)).run().set_threshold(3), - Waypoint((575.7, 417.2)).run(), + Waypoint((581.5, 383.3)).set_threshold(3), + Waypoint((575.7, 417.2)), ) # Exit self.exit_trial() @@ -121,11 +121,11 @@ class Route(RouteBase, Combat, CharacterTrial): # Goto boss self.clear_enemy( # Before the corner, turn right - Waypoint((571.7, 371.3)).run(), + Waypoint((571.7, 371.3)), # Go through arched door - Waypoint((581.5, 383.3)).run(), + Waypoint((581.5, 383.3)), # Boss - Waypoint((613.5, 427.3)), + Waypoint((613.5, 427.3)).straight_run(), ) def exit(self): diff --git a/tasks/map/control/control.py b/tasks/map/control/control.py index fa10e7504..9966487fd 100644 --- a/tasks/map/control/control.py +++ b/tasks/map/control/control.py @@ -377,11 +377,15 @@ if __name__ == '__main__': self.clear_item( Waypoint((587.6, 366.9)).run_2x(), ) - self.clear_item((575.5, 377.4)) + self.clear_item( + Waypoint((575.5, 377.4)).straight_run(), + ) self.clear_item( # Go through arched door - Waypoint((581.5, 383.3)).run().set_threshold(3), - Waypoint((575.7, 417.2)).run(), + Waypoint((581.5, 383.3)).set_threshold(3), + Waypoint((575.7, 417.2)), ) # Goto boss - self.clear_enemy((613.5, 427.3)) + self.clear_enemy( + Waypoint((613.5, 427.3)).straight_run(), + ) diff --git a/tasks/map/control/waypoint.py b/tasks/map/control/waypoint.py index 8cd018999..831e5894a 100644 --- a/tasks/map/control/waypoint.py +++ b/tasks/map/control/waypoint.py @@ -15,7 +15,7 @@ class Waypoint: endpoint_threshold: int = 3 # Max move speed, 'run_2x', 'straight_run', 'run', 'walk' # See MapControl._goto() for details of each speed level - speed: str = 'straight_run' + speed: str = 'run' """ The following attributes are only be used if this waypoint is the end point of goto()