mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 08:37:42 +00:00
Add: Rogue routes, fix rotation overflow
This commit is contained in:
parent
64cfb18a44
commit
b2b540698f
@ -14,7 +14,7 @@ class Route(RouteBase):
|
||||
| door1 | Waypoint((46.6, 343.9)), | 12.6 | 6 |
|
||||
| enemy1 | Waypoint((46.2, 328.2)), | 12.6 | 8 |
|
||||
| item2 | Waypoint((34.4, 299.0)), | 352.8 | 348 |
|
||||
| door2 | Waypoint((46.4, 284.5)), | 4.2 | 361 |
|
||||
| door2 | Waypoint((46.4, 284.5)), | 4.2 | 1 |
|
||||
| enemy2left_X31Y248 | Waypoint((31.2, 248.8)), | 183.8 | 84 |
|
||||
| enemy2right_X55Y247 | Waypoint((55.2, 247.2)), | 96.7 | 91 |
|
||||
| item3 | Waypoint((68.5, 226.5)), | 30.2 | 29 |
|
||||
@ -72,6 +72,30 @@ class Route(RouteBase):
|
||||
# Ignore item, bad way
|
||||
self.clear_enemy(enemy_X397Y182)
|
||||
|
||||
def Herta_SupplyZone_F2_X543Y255(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((543.4, 255.2)), | 6.7 | 4 |
|
||||
| enemy1 | Waypoint((546.4, 165.0)), | 6.7 | 179 |
|
||||
| item1 | Waypoint((540.3, 136.6)), | 2.7 | 357 |
|
||||
| item2 | Waypoint((560.6, 132.9)), | 82.6 | 75 |
|
||||
| enemy2 | Waypoint((586.2, 128.9)), | 91.3 | 84 |
|
||||
| exit | Waypoint((588.4, 126.8)), | 5.7 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Herta_SupplyZone, floor="F2", position=(543.4, 255.2))
|
||||
self.register_domain_exit(Waypoint((588.4, 126.8)), end_rotation=1)
|
||||
enemy1 = Waypoint((546.4, 165.0))
|
||||
item1 = Waypoint((540.3, 136.6))
|
||||
item2 = Waypoint((560.6, 132.9))
|
||||
enemy2 = Waypoint((586.2, 128.9))
|
||||
# ===== End of generated waypoints =====
|
||||
|
||||
self.clear_enemy(enemy1)
|
||||
self.clear_item(item1)
|
||||
self.clear_item(item2.straight_run())
|
||||
self.clear_enemy(enemy2)
|
||||
|
||||
def Herta_SupplyZone_F2_X594Y247(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
@ -82,10 +106,10 @@ class Route(RouteBase):
|
||||
| enemy2 | Waypoint((542.2, 168.6)), | 11.1 | 177 |
|
||||
| enemy3 | Waypoint((586.5, 128.3)), | 87.7 | 260 |
|
||||
| item3 | Waypoint((564.2, 130.9)), | 67.2 | 66 |
|
||||
| exit | Waypoint((586.9, 135.8)), | 266.1 | 361 |
|
||||
| exit | Waypoint((586.9, 135.8)), | 266.1 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Herta_SupplyZone, floor="F2", position=(594.3, 247.5))
|
||||
self.register_domain_exit(Waypoint((586.9, 135.8)), end_rotation=361)
|
||||
self.register_domain_exit(Waypoint((586.9, 135.8)), end_rotation=1)
|
||||
item1_X578Y258 = Waypoint((578.9, 258.2))
|
||||
enemy1 = Waypoint((542.2, 246.2))
|
||||
enemy2 = Waypoint((542.2, 168.6))
|
||||
@ -97,5 +121,47 @@ class Route(RouteBase):
|
||||
self.clear_enemy(enemy1)
|
||||
self.clear_enemy(enemy2.straight_run())
|
||||
|
||||
self.clear_item(item3.straight_run())
|
||||
self.clear_item(
|
||||
# Go through enemy2 before turning right
|
||||
enemy2,
|
||||
item3.straight_run(),
|
||||
)
|
||||
self.clear_enemy(enemy3.straight_run())
|
||||
|
||||
def Herta_SupplyZone_F2_X657Y247(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((656.7, 247.5)), | 274.2 | 274 |
|
||||
| item1_X578Y258 | Waypoint((578.9, 258.2)), | 282.8 | 276 |
|
||||
| enemy1 | Waypoint((542.2, 246.2)), | 302.7 | 301 |
|
||||
| enemy3 | Waypoint((586.5, 128.3)), | 87.7 | 260 |
|
||||
| enemy2 | Waypoint((542.2, 168.6)), | 11.1 | 177 |
|
||||
| item3 | Waypoint((564.2, 130.9)), | 67.2 | 66 |
|
||||
| exit | Waypoint((586.9, 135.8)), | 266.1 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Herta_SupplyZone, floor="F2", position=(656.7, 247.5))
|
||||
self.register_domain_exit(Waypoint((586.9, 135.8)), end_rotation=1)
|
||||
item1_X578Y258 = Waypoint((578.9, 258.2))
|
||||
enemy1 = Waypoint((542.2, 246.2))
|
||||
enemy3 = Waypoint((586.5, 128.3))
|
||||
enemy2 = Waypoint((542.2, 168.6))
|
||||
item3 = Waypoint((564.2, 130.9))
|
||||
# ===== End of generated waypoints =====
|
||||
|
||||
"""
|
||||
Notes
|
||||
Herta_SupplyZone_F2_X657Y247 is the same as Herta_SupplyZone_F2_X594Y247
|
||||
but for wrong spawn point detected
|
||||
"""
|
||||
|
||||
self.clear_item(item1_X578Y258)
|
||||
self.clear_enemy(enemy1)
|
||||
self.clear_enemy(enemy2.straight_run())
|
||||
|
||||
self.clear_item(
|
||||
# Go through enemy2 before turning right
|
||||
enemy2,
|
||||
item3.straight_run(),
|
||||
)
|
||||
self.clear_enemy(enemy3.straight_run())
|
||||
|
@ -24,11 +24,29 @@ class Route(RouteBase):
|
||||
self.clear_enemy(enemy_X212Y398)
|
||||
self.clear_item(item)
|
||||
|
||||
def Luofu_ArtisanshipCommission_F1_X217Y807(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((217.3, 807.4)), | 190.1 | 184 |
|
||||
| item | Waypoint((221.2, 833.4)), | 166.7 | 163 |
|
||||
| enemy | Waypoint((216.2, 860.2)), | 193.1 | 188 |
|
||||
| exit | Waypoint((215.7, 861.4)), | 11.3 | 186 |
|
||||
"""
|
||||
self.map_init(plane=Luofu_ArtisanshipCommission, floor="F1", position=(217.3, 807.4))
|
||||
self.register_domain_exit(Waypoint((215.7, 861.4)), end_rotation=186)
|
||||
item = Waypoint((221.2, 833.4))
|
||||
enemy = Waypoint((216.2, 860.2))
|
||||
# ===== End of generated waypoints =====
|
||||
|
||||
self.clear_item(item)
|
||||
self.clear_enemy(enemy)
|
||||
|
||||
def Luofu_ArtisanshipCommission_F1_X655Y537(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((655.5, 537.3)), | 6.7 | 361 |
|
||||
| spawn | Waypoint((655.5, 537.3)), | 6.7 | 1 |
|
||||
| item | Waypoint((680.6, 503.2)), | 30.1 | 27 |
|
||||
| enemy | Waypoint((656.2, 484.2)), | 11.1 | 184 |
|
||||
| exit | Waypoint((647.0, 477.5)), | 357.8 | 352 |
|
||||
|
@ -57,11 +57,11 @@ class Route(RouteBase):
|
||||
| -------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((283.4, 865.3)), | 6.7 | 4 |
|
||||
| item | Waypoint((297.0, 841.4)), | 36.1 | 31 |
|
||||
| enemy | Waypoint((282.4, 814.2)), | 8.1 | 361 |
|
||||
| exit | Waypoint((284.5, 816.8)), | 5.7 | 361 |
|
||||
| enemy | Waypoint((282.4, 814.2)), | 8.1 | 1 |
|
||||
| exit | Waypoint((284.5, 816.8)), | 5.7 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Luofu_Cloudford, floor="F1", position=(283.4, 865.3))
|
||||
self.register_domain_exit(Waypoint((284.5, 816.8)), end_rotation=361)
|
||||
self.register_domain_exit(Waypoint((284.5, 816.8)), end_rotation=1)
|
||||
item = Waypoint((297.0, 841.4))
|
||||
enemy = Waypoint((282.4, 814.2))
|
||||
# ===== End of generated waypoints =====
|
||||
|
@ -14,10 +14,10 @@ class Route(RouteBase):
|
||||
| node | Waypoint((439.0, 388.5)), | 355.9 | 352 |
|
||||
| enemy1 | Waypoint((434.0, 406.2)), | 274.2 | 274 |
|
||||
| enemy2 | Waypoint((432.2, 367.2)), | 355.9 | 352 |
|
||||
| exit | Waypoint((431.2, 363.2)), | 6.6 | 361 |
|
||||
| exit | Waypoint((431.2, 363.2)), | 6.6 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Luofu_ScalegorgeWaterscape, floor="F1", position=(467.5, 405.5))
|
||||
self.register_domain_exit(Waypoint((431.2, 363.2)), end_rotation=361)
|
||||
self.register_domain_exit(Waypoint((431.2, 363.2)), end_rotation=1)
|
||||
item = Waypoint((444.6, 390.5))
|
||||
node = Waypoint((439.0, 388.5))
|
||||
enemy1 = Waypoint((434.0, 406.2))
|
||||
@ -32,7 +32,7 @@ class Route(RouteBase):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------- | ------------------------ | --------- | -------- |
|
||||
| spawn | Waypoint((617.3, 99.4)), | 6.7 | 361 |
|
||||
| spawn | Waypoint((617.3, 99.4)), | 6.7 | 1 |
|
||||
| item | Waypoint((610.5, 88.6)), | 337.2 | 334 |
|
||||
| enemy | Waypoint((616.2, 64.4)), | 22.7 | 195 |
|
||||
| exit | Waypoint((617.2, 66.6)), | 12.6 | 4 |
|
||||
|
23
route/rogue/Occurrence/Herta_SupplyZone_F2Rogue.py
Normal file
23
route/rogue/Occurrence/Herta_SupplyZone_F2Rogue.py
Normal file
@ -0,0 +1,23 @@
|
||||
from tasks.map.control.waypoint import Waypoint
|
||||
from tasks.map.keywords.plane import Herta_SupplyZone
|
||||
from tasks.rogue.route.base import RouteBase
|
||||
|
||||
|
||||
class Route(RouteBase):
|
||||
|
||||
def Herta_SupplyZone_F2Rogue_X397Y227(self):
|
||||
"""
|
||||
| Waypoint | Position | Direction | Rotation |
|
||||
| -------------- | ------------------------- | --------- | -------- |
|
||||
| spawn | Waypoint((397.4, 223.3)), | 6.7 | 4 |
|
||||
| node_X397Y227 | Waypoint((400.5, 184.8)), | 15.6 | 11 |
|
||||
| event_X397Y227 | Waypoint((404.5, 182.1)), | 26.8 | 24 |
|
||||
| exit_X397Y227 | Waypoint((398.8, 176.6)), | 4.2 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Herta_SupplyZone, floor="F2", position=(397.4, 223.3))
|
||||
self.register_domain_exit(Waypoint((398.8, 176.6)), end_rotation=1)
|
||||
node_X397Y227 = Waypoint((400.5, 184.8))
|
||||
event_X397Y227 = Waypoint((404.5, 182.1))
|
||||
|
||||
self.clear_event(event_X397Y227)
|
||||
# ===== End of generated waypoints =====
|
@ -27,10 +27,10 @@ class Route(RouteBase):
|
||||
| spawn | Waypoint((209.3, 397.9)), | 6.7 | 4 |
|
||||
| item | Waypoint((220.9, 378.0)), | 36.2 | 34 |
|
||||
| event | Waypoint((218.0, 356.2)), | 12.7 | 8 |
|
||||
| exit | Waypoint((208.3, 349.2)), | 12.7 | 361 |
|
||||
| exit | Waypoint((208.3, 349.2)), | 12.7 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Jarilo_RivetTown, floor="F1", position=(209.3, 397.9))
|
||||
self.register_domain_exit(Waypoint((208.3, 349.2)), end_rotation=361)
|
||||
self.register_domain_exit(Waypoint((208.3, 349.2)), end_rotation=1)
|
||||
item = Waypoint((220.9, 378.0))
|
||||
event = Waypoint((218.0, 356.2))
|
||||
|
||||
|
@ -27,10 +27,10 @@ class Route(RouteBase):
|
||||
| spawn | Waypoint((283.2, 865.2)), | 6.7 | 4 |
|
||||
| item | Waypoint((272.2, 840.2)), | 332.7 | 327 |
|
||||
| event | Waypoint((291.8, 822.2)), | 26.8 | 22 |
|
||||
| exit | Waypoint((285.3, 818.1)), | 99.0 | 361 |
|
||||
| exit | Waypoint((285.3, 818.1)), | 99.0 | 1 |
|
||||
"""
|
||||
self.map_init(plane=Luofu_Cloudford, floor="F1", position=(283.2, 865.2))
|
||||
self.register_domain_exit(Waypoint((285.3, 818.1)), end_rotation=361)
|
||||
self.register_domain_exit(Waypoint((285.3, 818.1)), end_rotation=1)
|
||||
item = Waypoint((272.2, 840.2))
|
||||
event = Waypoint((291.8, 822.2))
|
||||
|
||||
|
@ -98,6 +98,17 @@
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Herta_SupplyZone_F2_X543Y255",
|
||||
"route": "route.rogue.Combat.Herta_SupplyZone_F2:Herta_SupplyZone_F2_X543Y255",
|
||||
"plane": "Herta_SupplyZone",
|
||||
"floor": "F2",
|
||||
"position": [
|
||||
543.4,
|
||||
255.2
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Herta_SupplyZone_F2_X594Y247",
|
||||
"route": "route.rogue.Combat.Herta_SupplyZone_F2:Herta_SupplyZone_F2_X594Y247",
|
||||
@ -109,6 +120,17 @@
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Herta_SupplyZone_F2_X657Y247",
|
||||
"route": "route.rogue.Combat.Herta_SupplyZone_F2:Herta_SupplyZone_F2_X657Y247",
|
||||
"plane": "Herta_SupplyZone",
|
||||
"floor": "F2",
|
||||
"position": [
|
||||
656.7,
|
||||
247.5
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Herta_SupplyZone_F2Rogue_X209Y112",
|
||||
"route": "route.rogue.Combat.Herta_SupplyZone_F2Rogue:Herta_SupplyZone_F2Rogue_X209Y112",
|
||||
@ -439,6 +461,17 @@
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Luofu_ArtisanshipCommission_F1_X217Y807",
|
||||
"route": "route.rogue.Combat.Luofu_ArtisanshipCommission_F1:Luofu_ArtisanshipCommission_F1_X217Y807",
|
||||
"plane": "Luofu_ArtisanshipCommission",
|
||||
"floor": "F1",
|
||||
"position": [
|
||||
217.3,
|
||||
807.4
|
||||
],
|
||||
"domain": "Combat"
|
||||
},
|
||||
{
|
||||
"name": "Combat_Luofu_ArtisanshipCommission_F1_X655Y537",
|
||||
"route": "route.rogue.Combat.Luofu_ArtisanshipCommission_F1:Luofu_ArtisanshipCommission_F1_X655Y537",
|
||||
@ -747,6 +780,17 @@
|
||||
],
|
||||
"domain": "Occurrence"
|
||||
},
|
||||
{
|
||||
"name": "Occurrence_Herta_SupplyZone_F2Rogue_X397Y227",
|
||||
"route": "route.rogue.Occurrence.Herta_SupplyZone_F2Rogue:Herta_SupplyZone_F2Rogue_X397Y227",
|
||||
"plane": "Herta_SupplyZone",
|
||||
"floor": "F2",
|
||||
"position": [
|
||||
397.4,
|
||||
223.3
|
||||
],
|
||||
"domain": "Occurrence"
|
||||
},
|
||||
{
|
||||
"name": "Occurrence_Jarilo_BackwaterPass_F1_X437Y101",
|
||||
"route": "route.rogue.Occurrence.Jarilo_BackwaterPass_F1:Jarilo_BackwaterPass_F1_X437Y101",
|
||||
|
@ -380,7 +380,7 @@ class Minimap(MapResource):
|
||||
degree = int(degree % 360)
|
||||
# +3 is a value obtained from experience
|
||||
# Don't know why but <predicted_rotation> + 3 = <actual_rotation>
|
||||
rotation = degree + 3
|
||||
rotation = (degree + 3) % 360
|
||||
|
||||
self.rotation_confidence = rotation_confidence
|
||||
self.rotation = rotation
|
||||
|
Loading…
Reference in New Issue
Block a user