Add: Rogue routes

This commit is contained in:
LmeSzinc 2023-10-19 01:21:20 +08:00
parent cfd8c1d4f1
commit f658f584b5
4 changed files with 63 additions and 1 deletions

View File

@ -26,7 +26,8 @@ class Route(RouteBase):
enemy3 = Waypoint((622.2, 170.0))
# ===== End of generated waypoints =====
self.clear_item(item1)
self.minimap.lock_rotation(90)
# self.clear_item(item1)
self.clear_enemy(enemy1)
# Go through enemy1 on the bridge
self.clear_enemy(
@ -34,6 +35,7 @@ class Route(RouteBase):
enemy2,
)
self.rotation_set(60)
self.minimap.lock_rotation(self.minimap.rotation)
self.clear_enemy(
node3,
enemy3,

View File

@ -0,0 +1,36 @@
from tasks.map.control.waypoint import Waypoint
from tasks.map.keywords.plane import Luofu_StargazerNavalia
from tasks.rogue.route.base import RouteBase
class Route(RouteBase):
def Luofu_StargazerNavalia_F1_X250Y498(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((249.4, 498.5)), | 190.1 | 184 |
| event_X236Y528 | Waypoint((236.8, 528.9)), | 188.1 | 181 |
| exit | Waypoint((245.3, 550.1)), | 282.9 | 181 |
"""
self.map_init(plane=Luofu_StargazerNavalia, floor="F1", position=(249.4, 498.5))
self.register_domain_exit(Waypoint((245.3, 550.1)), end_rotation=181)
event_X236Y528 = Waypoint((236.8, 528.9))
self.clear_event(event_X236Y528)
# ===== End of generated waypoints =====
def Luofu_StargazerNavalia_F1_X521Y595(self):
"""
| Waypoint | Position | Direction | Rotation |
| -------------- | ------------------------- | --------- | -------- |
| spawn | Waypoint((521.6, 595.4)), | 190.1 | 184 |
| event_X510Y626 | Waypoint((510.6, 626.4)), | 282.9 | 181 |
| exit | Waypoint((522.2, 630.6)), | 190.0 | 184 |
"""
self.map_init(plane=Luofu_StargazerNavalia, floor="F1", position=(521.6, 595.4))
self.register_domain_exit(Waypoint((522.2, 630.6)), end_rotation=184)
event_X510Y626 = Waypoint((510.6, 626.4))
self.clear_event(event_X510Y626)
# ===== End of generated waypoints =====

View File

@ -1418,6 +1418,28 @@
],
"domain": "Occurrence"
},
{
"name": "Occurrence_Luofu_StargazerNavalia_F1_X250Y498",
"route": "route.rogue.Occurrence.Luofu_StargazerNavalia_F1:Luofu_StargazerNavalia_F1_X250Y498",
"plane": "Luofu_StargazerNavalia",
"floor": "F1",
"position": [
249.4,
498.5
],
"domain": "Occurrence"
},
{
"name": "Occurrence_Luofu_StargazerNavalia_F1_X521Y595",
"route": "route.rogue.Occurrence.Luofu_StargazerNavalia_F1:Luofu_StargazerNavalia_F1_X521Y595",
"plane": "Luofu_StargazerNavalia",
"floor": "F1",
"position": [
521.6,
595.4
],
"domain": "Occurrence"
},
{
"name": "Occurrence_Luofu_StargazerNavalia_F2_X579Y183",
"route": "route.rogue.Occurrence.Luofu_StargazerNavalia_F2:Luofu_StargazerNavalia_F2_X579Y183",

View File

@ -81,10 +81,12 @@ class Minimap(MapResource):
def lock_direction(self, degree: int | float):
self.direction_locked = degree
self.direction = degree
self.direction_similarity = 0.
def lock_rotation(self, degree: int | float):
self.rotation_locked = degree
self.rotation = degree
self.rotation_confidence = 0.
def _predict_position(self, image, scale=1.0):
"""