Add: Rogue routes, allow early arrive

This commit is contained in:
LmeSzinc 2023-10-07 21:26:24 +08:00
parent f5239a69b9
commit d04ca2c3c6
11 changed files with 262 additions and 24 deletions

View File

@ -38,9 +38,10 @@ class Route(RouteBase):
self.clear_item(item1.straight_run()) self.clear_item(item1.straight_run())
self.clear_enemy(enemy1.straight_run()) self.clear_enemy(enemy1.straight_run())
# 2 # 2
self.rotation_set(156)
self.clear_enemy( self.clear_enemy(
enemy1.set_threshold(3), enemy1,
node2.straight_run().set_threshold(3), node2.set_threshold(3),
node3, node3,
node4.straight_run(), node4.straight_run(),
) )

View File

@ -0,0 +1,54 @@
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_F2RogueX151Y245_X151Y245(self):
"""
| Waypoint | Position | Direction | Rotation |
| --------------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((152.0, 245.4)), | 190.1 | 184 |
| node1 | Waypoint((156.1, 286.2)), | 166.8 | 163 |
| bridge_center | Waypoint((222.2, 246.8)), | 6.7 | 4 |
| enemy2 | Waypoint((222.0, 234.6)), | 11.2 | 184 |
| bridge1 | Waypoint((222.8, 284.9)), | 6.7 | 4 |
| node3_X222Y178 | Waypoint((222.8, 178.8)), | 6.7 | 4 |
| node2_X244Y298 | Waypoint((244.4, 298.3)), | 105.5 | 101 |
| enemy3_X283Y178 | Waypoint((283.3, 178.9)), | 2.7 | 89 |
| exit_X283Y178 | Waypoint((283.3, 178.9)), | 2.7 | 89 |
"""
self.map_init(plane=Herta_SupplyZone, floor="F2RogueX151Y245", position=(152.0, 245.4))
self.register_domain_exit(Waypoint((283.3, 178.9)), end_rotation=89)
node1 = Waypoint((156.1, 286.2))
bridge_center = Waypoint((222.2, 246.8))
enemy2 = Waypoint((222.0, 234.6))
bridge1 = Waypoint((222.8, 284.9))
node3_X222Y178 = Waypoint((222.8, 178.8))
node2_X244Y298 = Waypoint((244.4, 298.3))
enemy3_X283Y178 = Waypoint((283.3, 178.9))
# ===== End of generated waypoints =====
# 1
self.clear_enemy(
node1,
node2_X244Y298.straight_run(),
)
self.clear_item(node2_X244Y298),
# 2 Go through bridge
self.rotation_set(0)
self.clear_enemy(
bridge1.set_threshold(5),
bridge_center.set_threshold(3),
enemy2,
)
# 3
self.clear_item(
bridge_center.set_threshold(3),
node3_X222Y178,
)
self.clear_enemy(
node3_X222Y178.set_threshold(5),
enemy3_X283Y178.straight_run(),
)

View File

@ -18,6 +18,47 @@ class Route(RouteBase):
enemy = Waypoint((64.2, 909.2)) enemy = Waypoint((64.2, 909.2))
# ===== End of generated waypoints ===== # ===== End of generated waypoints =====
self.clear_enemy(enemy)
def Jarilo_CorridorofFadingEchoes_F1_X201Y1071(self):
"""
| Waypoint | Position | Direction | Rotation |
| ----------- | -------------------------- | --------- | -------- |
| spawn | Waypoint((201.2, 1071.4)), | 6.7 | 4 |
| enemy1right | Waypoint((200.3, 1032.4)), | 342.0 | 343 |
| enemy1left | Waypoint((168.6, 1022.3)), | 279.8 | 89 |
| node2 | Waypoint((118.4, 1019.0)), | 282.9 | 285 |
| enemy2left | Waypoint((105.2, 1012.0)), | 317.9 | 315 |
| enemy2right | Waypoint((102.2, 976.4)), | 11.1 | 193 |
| enemy3 | Waypoint((103.4, 919.2)), | 6.7 | 4 |
| exit | Waypoint((103.4, 919.2)), | 6.7 | 4 |
"""
self.map_init(plane=Jarilo_CorridorofFadingEchoes, floor="F1", position=(201.2, 1071.4))
self.register_domain_exit(Waypoint((103.4, 919.2)), end_rotation=4)
enemy1right = Waypoint((200.3, 1032.4))
enemy1left = Waypoint((168.6, 1022.3))
node2 = Waypoint((118.4, 1019.0))
enemy2left = Waypoint((105.2, 1012.0))
enemy2right = Waypoint((102.2, 976.4))
enemy3 = Waypoint((103.4, 919.2))
# ===== End of generated waypoints =====
# 1
self.rotation_set(315)
self.clear_enemy(
enemy1right.set_threshold(5),
enemy1left.set_threshold(5),
)
# 2
self.clear_enemy(
enemy1left.set_threshold(3),
node2.set_threshold(5),
enemy2left.straight_run(),
enemy2right,
)
# 3
self.clear_enemy(enemy3)
def Jarilo_CorridorofFadingEchoes_F1_X291Y765(self): def Jarilo_CorridorofFadingEchoes_F1_X291Y765(self):
""" """
| Waypoint | Position | Direction | Rotation | | Waypoint | Position | Direction | Rotation |

View File

@ -184,11 +184,12 @@ class Route(RouteBase):
# ===== End of generated waypoints ===== # ===== End of generated waypoints =====
self.clear_item(item1) self.clear_item(item1)
self.rotation_set(232)
self.clear_item(item2) self.clear_item(item2)
self.rotation_set(232)
self.clear_enemy(enemy3) self.clear_enemy(enemy3)
self.clear_item(item3.straight_run()) # self.clear_item(item3.straight_run())
self.clear_enemy( self.clear_enemy(
item3.straight_run(),
node4.straight_run(), node4.straight_run(),
enemy4.straight_run(), enemy4.straight_run(),
) )

View File

@ -31,16 +31,17 @@ class Route(RouteBase):
# 1 # 1
self.clear_item(item1) self.clear_item(item1)
self.clear_enemy(enemy1middle) self.clear_enemy(enemy1middle)
# 2 # 2, ignore item, too close to enemy
self.clear_item( # self.clear_item(
node2, # node2,
item2.straight_run(), # item2.straight_run(),
) # )
self.clear_enemy( self.clear_enemy(
enemy2.straight_run(), node2,
enemy2.straight_run()
) )
# 3 # 3
self.clear_enemy(enemy3) self.clear_enemy(enemy3.straight_run())
def Jarilo_RivetTown_F1_X205Y439(self): def Jarilo_RivetTown_F1_X205Y439(self):
""" """
@ -126,7 +127,8 @@ class Route(RouteBase):
enemy = Waypoint((298.2, 246.0)) enemy = Waypoint((298.2, 246.0))
# ===== End of generated waypoints ===== # ===== End of generated waypoints =====
self.clear_item(item) # Ignore item
# self.clear_item(item)
self.clear_enemy(enemy) self.clear_enemy(enemy)
def Jarilo_RivetTown_F1_X293Y243(self): def Jarilo_RivetTown_F1_X293Y243(self):

View File

@ -41,6 +41,42 @@ class Route(RouteBase):
# Ignore item # Ignore item
self.clear_enemy(enemy) self.clear_enemy(enemy)
def Jarilo_SilvermaneGuardRestrictedZone_F1_X371Y425(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((371.6, 425.3)), | 274.2 | 274 |
| enemy1 | Waypoint((304.0, 424.2)), | 274.2 | 276 |
| enemy2 | Waypoint((247.9, 426.4)), | 11.2 | 45 |
| enemy3 | Waypoint((163.9, 426.5)), | 282.9 | 278 |
| exit | Waypoint((163.9, 426.5)), | 282.9 | 278 |
"""
self.map_init(plane=Jarilo_SilvermaneGuardRestrictedZone, floor="F1", position=(371.6, 425.3))
self.register_domain_exit(Waypoint((163.9, 426.5)), end_rotation=278)
enemy1 = Waypoint((304.0, 424.2))
enemy2 = Waypoint((247.9, 426.4))
enemy3 = Waypoint((163.9, 426.5))
# ===== End of generated waypoints =====
self.clear_enemy(enemy1)
self.clear_enemy(enemy2)
self.clear_enemy(enemy3)
def Jarilo_SilvermaneGuardRestrictedZone_F1_X419Y180(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((419.4, 179.8)), | 166.8 | 163 |
| enemy | Waypoint((437.0, 227.2)), | 166.6 | 156 |
| exit | Waypoint((437.0, 227.2)), | 166.6 | 156 |
"""
self.map_init(plane=Jarilo_SilvermaneGuardRestrictedZone, floor="F1", position=(419.4, 179.8))
self.register_domain_exit(Waypoint((437.0, 227.2)), end_rotation=156)
enemy = Waypoint((437.0, 227.2))
# ===== End of generated waypoints =====
self.clear_enemy(enemy)
def Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173(self): def Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173(self):
""" """
| Waypoint | Position | Direction | Rotation | | Waypoint | Position | Direction | Rotation |

View File

@ -23,3 +23,22 @@ class Route(RouteBase):
self.domain_reward(reward) self.domain_reward(reward)
self.domain_single_exit(exit_) self.domain_single_exit(exit_)
# ===== End of generated waypoints ===== # ===== End of generated waypoints =====
def Jarilo_GreatMine_F1_X303Y489(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((303.4, 489.3)), | 6.7 | 4 |
| enemy | Waypoint((304.2, 441.8)), | 6.7 | 4 |
| reward | Waypoint((310.9, 430.8)), | 30.1 | 27 |
| exit | Waypoint((296.5, 421.4)), | 342.1 | 343 |
"""
self.map_init(plane=Jarilo_GreatMine, floor="F1", position=(303.4, 489.3))
enemy = Waypoint((304.2, 441.8))
reward = Waypoint((310.9, 430.8))
exit_ = Waypoint((296.5, 421.4))
self.clear_elite(enemy)
self.domain_reward(reward)
self.domain_single_exit(exit_)
# ===== End of generated waypoints =====

View File

@ -0,0 +1,25 @@
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_F2_X189Y81(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((189.5, 81.9)), | 231.7 | 228 |
| enemy | Waypoint((155.4, 119.5)), | 191.8 | 223 |
| reward | Waypoint((145.0, 122.4)), | 256.7 | 251 |
| exit | Waypoint((151.1, 134.2)), | 203.1 | 198 |
"""
self.map_init(plane=Jarilo_RivetTown, floor="F2", position=(189.5, 81.9))
enemy = Waypoint((155.4, 119.5))
reward = Waypoint((145.0, 122.4))
exit_ = Waypoint((151.1, 134.2))
self.clear_elite(enemy)
self.domain_reward(reward)
self.domain_single_exit(exit_)
# ===== End of generated waypoints =====

View File

@ -98,17 +98,6 @@
], ],
"domain": "Combat" "domain": "Combat"
}, },
{
"name": "Combat_Herta_SupplyZone_F2_X151Y245",
"route": "route.rogue.Combat.Herta_SupplyZone_F2:Herta_SupplyZone_F2_X151Y245",
"plane": "Herta_SupplyZone",
"floor": "F2",
"position": [
151.6,
245.5
],
"domain": "Combat"
},
{ {
"name": "Combat_Herta_SupplyZone_F2_X397Y233", "name": "Combat_Herta_SupplyZone_F2_X397Y233",
"route": "route.rogue.Combat.Herta_SupplyZone_F2:Herta_SupplyZone_F2_X397Y233", "route": "route.rogue.Combat.Herta_SupplyZone_F2:Herta_SupplyZone_F2_X397Y233",
@ -175,6 +164,17 @@
], ],
"domain": "Combat" "domain": "Combat"
}, },
{
"name": "Combat_Herta_SupplyZone_F2RogueX151Y245_X151Y245",
"route": "route.rogue.Combat.Herta_SupplyZone_F2RogueX151Y245:Herta_SupplyZone_F2RogueX151Y245_X151Y245",
"plane": "Herta_SupplyZone",
"floor": "F2RogueX151Y245",
"position": [
152.0,
245.4
],
"domain": "Combat"
},
{ {
"name": "Combat_Jarilo_BackwaterPass_F1_X475Y49", "name": "Combat_Jarilo_BackwaterPass_F1_X475Y49",
"route": "route.rogue.Combat.Jarilo_BackwaterPass_F1:Jarilo_BackwaterPass_F1_X475Y49", "route": "route.rogue.Combat.Jarilo_BackwaterPass_F1:Jarilo_BackwaterPass_F1_X475Y49",
@ -252,6 +252,17 @@
], ],
"domain": "Combat" "domain": "Combat"
}, },
{
"name": "Combat_Jarilo_CorridorofFadingEchoes_F1_X201Y1071",
"route": "route.rogue.Combat.Jarilo_CorridorofFadingEchoes_F1:Jarilo_CorridorofFadingEchoes_F1_X201Y1071",
"plane": "Jarilo_CorridorofFadingEchoes",
"floor": "F1",
"position": [
201.2,
1071.4
],
"domain": "Combat"
},
{ {
"name": "Combat_Jarilo_CorridorofFadingEchoes_F1_X291Y765", "name": "Combat_Jarilo_CorridorofFadingEchoes_F1_X291Y765",
"route": "route.rogue.Combat.Jarilo_CorridorofFadingEchoes_F1:Jarilo_CorridorofFadingEchoes_F1_X291Y765", "route": "route.rogue.Combat.Jarilo_CorridorofFadingEchoes_F1:Jarilo_CorridorofFadingEchoes_F1_X291Y765",
@ -472,6 +483,28 @@
], ],
"domain": "Combat" "domain": "Combat"
}, },
{
"name": "Combat_Jarilo_SilvermaneGuardRestrictedZone_F1_X371Y425",
"route": "route.rogue.Combat.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X371Y425",
"plane": "Jarilo_SilvermaneGuardRestrictedZone",
"floor": "F1",
"position": [
371.6,
425.3
],
"domain": "Combat"
},
{
"name": "Combat_Jarilo_SilvermaneGuardRestrictedZone_F1_X419Y180",
"route": "route.rogue.Combat.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X419Y180",
"plane": "Jarilo_SilvermaneGuardRestrictedZone",
"floor": "F1",
"position": [
419.4,
179.8
],
"domain": "Combat"
},
{ {
"name": "Combat_Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173", "name": "Combat_Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173",
"route": "route.rogue.Combat.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173", "route": "route.rogue.Combat.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X421Y173",
@ -780,6 +813,17 @@
], ],
"domain": "Elite" "domain": "Elite"
}, },
{
"name": "Elite_Jarilo_GreatMine_F1_X303Y489",
"route": "route.rogue.Elite.Jarilo_GreatMine_F1:Jarilo_GreatMine_F1_X303Y489",
"plane": "Jarilo_GreatMine",
"floor": "F1",
"position": [
303.4,
489.3
],
"domain": "Elite"
},
{ {
"name": "Elite_Jarilo_RivetTown_F1_X149Y435", "name": "Elite_Jarilo_RivetTown_F1_X149Y435",
"route": "route.rogue.Elite.Jarilo_RivetTown_F1:Jarilo_RivetTown_F1_X149Y435", "route": "route.rogue.Elite.Jarilo_RivetTown_F1:Jarilo_RivetTown_F1_X149Y435",
@ -791,6 +835,17 @@
], ],
"domain": "Elite" "domain": "Elite"
}, },
{
"name": "Elite_Jarilo_RivetTown_F2_X189Y81",
"route": "route.rogue.Elite.Jarilo_RivetTown_F2:Jarilo_RivetTown_F2_X189Y81",
"plane": "Jarilo_RivetTown",
"floor": "F2",
"position": [
189.5,
81.9
],
"domain": "Elite"
},
{ {
"name": "Elite_Jarilo_SilvermaneGuardRestrictedZone_F1_X225Y425", "name": "Elite_Jarilo_SilvermaneGuardRestrictedZone_F1_X225Y425",
"route": "route.rogue.Elite.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X225Y425", "route": "route.rogue.Elite.Jarilo_SilvermaneGuardRestrictedZone_F1:Jarilo_SilvermaneGuardRestrictedZone_F1_X225Y425",

View File

@ -346,8 +346,11 @@ class MapControl(Combat, AimDetectorMixin):
logger.info(f'Arrive waypoint, expected: {expected}, result: {result}') logger.info(f'Arrive waypoint, expected: {expected}, result: {result}')
results += result results += result
matched = waypoint.match_results(result) matched = waypoint.match_results(result)
if not waypoint.expected_end or matched: if not waypoint.expected_end:
logger.info(f'Arrive waypoint: {matched}')
elif matched:
logger.info(f'Arrive waypoint with expected result: {matched}') logger.info(f'Arrive waypoint with expected result: {matched}')
break
else: else:
logger.warning(f'Arrive waypoint with unexpected result: {result}') logger.warning(f'Arrive waypoint with unexpected result: {result}')

View File

@ -14,6 +14,7 @@ from tasks.map.keywords import KEYWORDS_MAP_PLANE, MapPlane
SPECIAL_PLANES = [ SPECIAL_PLANES = [
('Herta_SupplyZone', 'F2Rogue'), ('Herta_SupplyZone', 'F2Rogue'),
('Herta_SupplyZone', 'F2RogueX151Y245'),
('Jarilo_GreatMine', 'F1RogueOcc'), ('Jarilo_GreatMine', 'F1RogueOcc'),
('Luofu_Cloudford', 'F1Rogue'), ('Luofu_Cloudford', 'F1Rogue'),
('Luofu_StargazerNavalia', 'F2Rogue'), ('Luofu_StargazerNavalia', 'F2Rogue'),