mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Add: Rogue routes
This commit is contained in:
parent
c2dcadb87a
commit
c3a1a5720e
@ -163,7 +163,10 @@ class Route(RouteBase):
|
||||
enemy2 = Waypoint((556.4, 206.8))
|
||||
# ===== End of generated waypoints =====
|
||||
|
||||
self.rotation_set(158)
|
||||
self.rotation_set(135)
|
||||
self.clear_item(item_X476Y129)
|
||||
self.clear_enemy(enemy1)
|
||||
self.clear_enemy(enemy2.straight_run())
|
||||
self.clear_enemy(
|
||||
node2.set_threshold(5),
|
||||
enemy2.straight_run(),
|
||||
)
|
||||
|
@ -150,3 +150,39 @@ class Route(RouteBase):
|
||||
# 2
|
||||
self.clear_item(item2)
|
||||
self.clear_enemy(enemy2)
|
||||
|
||||
def Luofu_Cloudford_F1_X435Y669(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((435.4, 669.2)), | 6.7 | 4 |
|
||||
| item1 | Waypoint((432.2, 628.3)), | 2.7 | 357 |
|
||||
| enemy1 | Waypoint((428.6, 598.8)), | 8.0 | 177 |
|
||||
| node2 | Waypoint((421.2, 590.8)), | 44.2 | 285 |
|
||||
| node3 | Waypoint((366.6, 588.2)), | 274.2 | 274 |
|
||||
| enemy3 | Waypoint((344.9, 590.4)), | 191.8 | 357 |
|
||||
| item4 | Waypoint((309.6, 580.2)), | 290.1 | 281 |
|
||||
| enemy4 | Waypoint((269.3, 549.6)), | 275.8 | 278 |
|
||||
| exit | Waypoint((271.3, 585.5)), | 285.0 | 274 |
|
||||
"""
|
||||
self.map_init(plane=Luofu_Cloudford, floor="F1", position=(435.4, 669.2))
|
||||
self.register_domain_exit(Waypoint((271.3, 585.5)), end_rotation=274)
|
||||
item1 = Waypoint((432.2, 628.3))
|
||||
enemy1 = Waypoint((428.6, 598.8))
|
||||
node2 = Waypoint((421.2, 590.8))
|
||||
node3 = Waypoint((366.6, 588.2))
|
||||
enemy3 = Waypoint((344.9, 590.4))
|
||||
item4 = Waypoint((309.6, 580.2))
|
||||
enemy4 = Waypoint((269.3, 549.6))
|
||||
# ===== End of generated waypoints =====
|
||||
|
||||
self.clear_item(item1)
|
||||
self.clear_enemy(enemy1)
|
||||
# Go through bridges
|
||||
self.clear_enemy(
|
||||
node2.straight_run().set_threshold(3),
|
||||
node3.straight_run().set_threshold(3),
|
||||
enemy3.straight_run(),
|
||||
)
|
||||
self.clear_item(item4)
|
||||
self.clear_enemy(enemy4)
|
||||
|
@ -5,6 +5,40 @@ from tasks.rogue.route.base import RouteBase
|
||||
|
||||
class Route(RouteBase):
|
||||
|
||||
def Luofu_StargazerNavalia_F2_X479Y187(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((479.5, 187.5)), | 94.3 | 94 |
|
||||
| item1 | Waypoint((516.4, 194.2)), | 94.3 | 91 |
|
||||
| enemy1 | Waypoint((538.2, 182.6)), | 94.5 | 94 |
|
||||
| enemy2 | Waypoint((572.4, 180.2)), | 284.6 | 94 |
|
||||
| node3 | Waypoint((618.0, 182.4)), | 274.2 | 105 |
|
||||
| enemy3 | Waypoint((622.2, 170.0)), | 284.7 | 94 |
|
||||
| exit | Waypoint((619.5, 169.4)), | 193.0 | 6 |
|
||||
"""
|
||||
self.map_init(plane=Luofu_StargazerNavalia, floor="F2", position=(479.5, 187.5))
|
||||
self.register_domain_exit(Waypoint((619.5, 169.4)), end_rotation=6)
|
||||
item1 = Waypoint((516.4, 194.2))
|
||||
enemy1 = Waypoint((538.2, 182.6))
|
||||
enemy2 = Waypoint((572.4, 180.2))
|
||||
node3 = Waypoint((618.0, 182.4))
|
||||
enemy3 = Waypoint((622.2, 170.0))
|
||||
# ===== End of generated waypoints =====
|
||||
|
||||
self.clear_item(item1)
|
||||
self.clear_enemy(enemy1)
|
||||
# Go through enemy1 on the bridge
|
||||
self.clear_enemy(
|
||||
enemy1.set_threshold(3),
|
||||
enemy2,
|
||||
)
|
||||
self.rotation_set(60)
|
||||
self.clear_enemy(
|
||||
node3,
|
||||
enemy3,
|
||||
)
|
||||
|
||||
def Luofu_StargazerNavalia_F2_X627Y179(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
|
@ -5,6 +5,11 @@ from tasks.rogue.route.base import RouteBase
|
||||
|
||||
class Route(RouteBase):
|
||||
|
||||
def map_init(self, *args, **kwargs):
|
||||
super().map_init(*args, **kwargs)
|
||||
# Blue triangle on blue sky, high error rate
|
||||
self.minimap.lock_rotation(90)
|
||||
|
||||
def Luofu_StargazerNavalia_F1_X617Y511(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
|
@ -10,12 +10,12 @@ class Route(RouteBase):
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((579.8, 183.5)), | 96.7 | 91 |
|
||||
| event | Waypoint((482.9, 204.6)), | 105.5 | 114 |
|
||||
| event | Waypoint((615.3, 195.5)), | 105.6 | 66 |
|
||||
| exit | Waypoint((622.1, 186.3)), | 96.7 | 91 |
|
||||
"""
|
||||
self.map_init(plane=Luofu_StargazerNavalia, floor="F2", position=(579.8, 183.5))
|
||||
self.register_domain_exit(Waypoint((622.1, 186.3)), end_rotation=91)
|
||||
event = Waypoint((482.9, 204.6))
|
||||
event = Waypoint((615.3, 195.5))
|
||||
|
||||
self.clear_event(event)
|
||||
# ===== End of generated waypoints =====
|
||||
|
@ -659,6 +659,17 @@
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Luofu_Cloudford_F1_X435Y669",
|
||||
"route": "route.rogue.Combat.Luofu_Cloudford_F1:Luofu_Cloudford_F1_X435Y669",
|
||||
"plane": "Luofu_Cloudford",
|
||||
"floor": "F1",
|
||||
"position": [
|
||||
435.4,
|
||||
669.2
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Luofu_Cloudford_F1Rogue_X49Y405",
|
||||
"route": "route.rogue.Combat.Luofu_Cloudford_F1Rogue:Luofu_Cloudford_F1Rogue_X49Y405",
|
||||
@ -813,6 +824,17 @@
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Luofu_StargazerNavalia_F2_X479Y187",
|
||||
"route": "route.rogue.Combat.Luofu_StargazerNavalia_F2:Luofu_StargazerNavalia_F2_X479Y187",
|
||||
"plane": "Luofu_StargazerNavalia",
|
||||
"floor": "F2",
|
||||
"position": [
|
||||
479.5,
|
||||
187.5
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Luofu_StargazerNavalia_F2_X627Y179",
|
||||
"route": "route.rogue.Combat.Luofu_StargazerNavalia_F2:Luofu_StargazerNavalia_F2_X627Y179",
|
||||
|
@ -47,7 +47,9 @@ class PositionPredictState:
|
||||
|
||||
|
||||
class Minimap(MapResource):
|
||||
position_locked = None
|
||||
position_locked: tuple[int | float, int | float] | None = None
|
||||
direction_locked: int | float | None = None
|
||||
rotation_locked: int | float | None = None
|
||||
|
||||
def init_position(
|
||||
self,
|
||||
@ -73,6 +75,16 @@ class Minimap(MapResource):
|
||||
self.position_locked = position
|
||||
else:
|
||||
self.position_locked = None
|
||||
self.direction_locked = None
|
||||
self.rotation_locked = None
|
||||
|
||||
def lock_direction(self, degree: int | float):
|
||||
self.direction_locked = degree
|
||||
self.direction = degree
|
||||
|
||||
def lock_rotation(self, degree: int | float):
|
||||
self.rotation_locked = degree
|
||||
self.rotation = degree
|
||||
|
||||
def _predict_position(self, image, scale=1.0):
|
||||
"""
|
||||
@ -390,7 +402,9 @@ class Minimap(MapResource):
|
||||
Update minimap, costs about 7.88ms.
|
||||
"""
|
||||
self.update_position(image)
|
||||
if self.direction_locked is None:
|
||||
self.update_direction(image)
|
||||
if self.rotation_locked is None:
|
||||
self.update_rotation(image)
|
||||
if show_log:
|
||||
self.log_minimap()
|
||||
|
Loading…
Reference in New Issue
Block a user