Add: Rogue routes

This commit is contained in:
LmeSzinc 2023-10-05 05:09:50 +08:00
parent 739a4d33b7
commit c31b124fe4
8 changed files with 132 additions and 7 deletions

View File

@ -5,6 +5,51 @@ from tasks.rogue.route.base import RouteBase
class Route(RouteBase):
def Herta_StorageZone_F1_X210Y268(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((225.8, 258.8)), | 96.7 | 91 |
| item1 | Waypoint((240.8, 270.0)), | 135.8 | 131 |
| enemy1 | Waypoint((270.6, 258.8)), | 76.4 | 73 |
| node2 | Waypoint((273.2, 269.2)), | 157.2 | 156 |
| node3 | Waypoint((284.6, 283.0)), | 157.2 | 154 |
| item3 | Waypoint((293.2, 288.6)), | 105.5 | 103 |
| node4 | Waypoint((307.2, 305.2)), | 126.2 | 124 |
| item5 | Waypoint((332.8, 304.8)), | 96.8 | 96 |
| node5 | Waypoint((336.2, 312.0)), | 102.9 | 98 |
| enemy5 | Waypoint((392.5, 312.4)), | 4.1 | 91 |
| exit | Waypoint((392.5, 312.4)), | 4.1 | 91 |
"""
self.map_init(plane=Herta_StorageZone, floor="F1", position=(225.8, 258.8))
self.register_domain_exit(Waypoint((392.5, 312.4)), end_rotation=91)
item1 = Waypoint((240.8, 270.0))
enemy1 = Waypoint((270.6, 258.8))
node2 = Waypoint((273.2, 269.2))
node3 = Waypoint((284.6, 283.0))
item3 = Waypoint((293.2, 288.6))
node4 = Waypoint((307.2, 305.2))
item5 = Waypoint((332.8, 304.8))
node5 = Waypoint((336.2, 312.0))
enemy5 = Waypoint((392.5, 312.4))
# ===== End of generated waypoints =====
# 1
self.clear_item(item1.straight_run())
self.clear_enemy(enemy1.straight_run())
# 2
self.clear_item(
enemy1.set_threshold(3),
node2.straight_run().set_threshold(3),
node3,
node4.straight_run(),
)
# 5
self.clear_enemy(
node5.straight_run(),
enemy5.straight_run(),
)
def Herta_StorageZone_F1_X257Y85(self):
"""
| Waypoint | Position | Direction | Rotation |

View File

@ -106,7 +106,7 @@ class Route(RouteBase):
# Ignore all items, road blocked
self.clear_enemy(enemy1)
self.clear_enemy(
node2,
node2.set_threshold(3),
enemy2middle
)
self.clear_enemy(enemy3)
@ -188,7 +188,8 @@ class Route(RouteBase):
enemy2 = Waypoint((234.6, 204.8))
# ===== End of generated waypoints =====
self.clear_item(item1)
# Ignore item
# self.clear_item(item1)
self.clear_enemy(enemy1)
# Ignore item2, position blocked
self.clear_enemy(enemy2.straight_run())

View File

@ -23,6 +23,24 @@ class Route(RouteBase):
self.clear_item(item)
self.clear_enemy(enemy)
def Jarilo_SilvermaneGuardRestrictedZone_F1_X227Y425(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((227.7, 425.5)), | 274.2 | 274 |
| item | Waypoint((208.3, 414.8)), | 303.8 | 301 |
| enemy | Waypoint((170.2, 426.2)), | 274.2 | 274 |
| exit | Waypoint((170.2, 426.2)), | 274.2 | 274 |
"""
self.map_init(plane=Jarilo_SilvermaneGuardRestrictedZone, floor="F1", position=(227.7, 425.5))
self.register_domain_exit(Waypoint((170.2, 426.2)), end_rotation=274)
item = Waypoint((208.3, 414.8))
enemy = Waypoint((170.2, 426.2))
# ===== End of generated waypoints =====
# Ignore item
self.clear_enemy(enemy)
def Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173(self):
"""
| Waypoint | Position | Direction | Rotation |

View File

@ -0,0 +1,21 @@
from tasks.map.control.waypoint import Waypoint
from tasks.map.keywords.plane import Jarilo_RivetTown
from tasks.rogue.route.base import RouteBase
class Route(RouteBase):
def Jarilo_RivetTown_F1_X157Y435(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((157.4, 435.5)), | 96.7 | 91 |
| event | Waypoint((200.4, 426.5)), | 76.4 | 73 |
| exit | Waypoint((211.2, 435.4)), | 96.7 | 91 |
"""
self.map_init(plane=Jarilo_RivetTown, floor="F1", position=(157.4, 435.5))
self.register_domain_exit(Waypoint((211.2, 435.4)), end_rotation=91)
event = Waypoint((200.4, 426.5))
self.clear_event(event)
# ===== End of generated waypoints =====

View File

@ -9,11 +9,11 @@ class Route(RouteBase):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((216.3, 948.3)), | 275.8 | 271 |
| spawn | Waypoint((241.4, 947.5)), | 274.2 | 274 |
| event | Waypoint((199.0, 940.8)), | 300.1 | 294 |
| exit | Waypoint((193.1, 947.2)), | 12.8 | 274 |
"""
self.map_init(plane=Luofu_Cloudford, floor="F1", position=(216.3, 948.3))
self.map_init(plane=Luofu_Cloudford, floor="F1", position=(241.4, 947.5))
self.register_domain_exit(Waypoint((193.1, 947.2)), end_rotation=274)
event = Waypoint((199.0, 940.8))

View File

@ -1,4 +1,15 @@
[
{
"name": "Combat_Herta_StorageZone_F1_X210Y268",
"route": "route.rogue.Combat.Herta_StorageZone_F1:Herta_StorageZone_F1_X210Y268",
"plane": "Herta_StorageZone",
"floor": "F1",
"position": [
225.8,
258.8
],
"domain": "Combat"
},
{
"name": "Combat_Herta_StorageZone_F1_X257Y85",
"route": "route.rogue.Combat.Herta_StorageZone_F1:Herta_StorageZone_F1_X257Y85",
@ -362,6 +373,17 @@
],
"domain": "Combat"
},
{
"name": "Combat_Jarilo_SilvermaneGuardRestrictedZone_F1_X227Y425",
"route": "route.rogue.Combat.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X227Y425",
"plane": "Jarilo_SilvermaneGuardRestrictedZone",
"floor": "F1",
"position": [
227.7,
425.5
],
"domain": "Combat"
},
{
"name": "Combat_Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173",
"route": "route.rogue.Combat.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173",
@ -681,6 +703,17 @@
],
"domain": "Occurrence"
},
{
"name": "Occurrence_Jarilo_RivetTown_F1_X157Y435",
"route": "route.rogue.Occurrence.Jarilo_RivetTown_F1:Jarilo_RivetTown_F1_X157Y435",
"plane": "Jarilo_RivetTown",
"floor": "F1",
"position": [
157.4,
435.5
],
"domain": "Occurrence"
},
{
"name": "Occurrence_Jarilo_SilvermaneGuardRestrictedZone_F1_X377Y505",
"route": "route.rogue.Occurrence.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X377Y505",
@ -753,8 +786,8 @@
"plane": "Luofu_Cloudford",
"floor": "F1",
"position": [
216.3,
948.3
241.4,
947.5
],
"domain": "Occurrence"
},

View File

@ -13,8 +13,9 @@ from tasks.map.resource.const import ResourceConst
from tasks.map.keywords import KEYWORDS_MAP_PLANE, MapPlane
SPECIAL_PLANES = [
('Luofu_StargazerNavalia', 'F2Rogue'),
('Herta_SupplyZone', 'F2Rogue'),
('Luofu_Cloudford', 'F1Rogue'),
('Luofu_StargazerNavalia', 'F2Rogue'),
]

View File

@ -88,6 +88,12 @@ class RogueBuffOcr(Ocr):
}
for pat, replace in replace_pattern_dict.items():
result = re.sub(pat, replace, result)
elif self.lang == 'en':
replace_pattern_dict = {
"RestIin": "Restin",
}
for pat, replace in replace_pattern_dict.items():
result = re.sub(pat, replace, result)
return result