mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-15 22:19:18 +00:00
Add: Goto ornament boss
This commit is contained in:
parent
09acc8f076
commit
fe7dc5ac3c
21
route/daily/OrnamentExtraction.py
Normal file
21
route/daily/OrnamentExtraction.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
from module.logger import logger
|
||||||
|
from tasks.combat.combat import Combat
|
||||||
|
from tasks.map.control.waypoint import Waypoint
|
||||||
|
from tasks.map.keywords.plane import Penacony_TheReverieReality
|
||||||
|
from tasks.map.route.base import RouteBase
|
||||||
|
|
||||||
|
|
||||||
|
class Route(RouteBase, Combat):
|
||||||
|
def route(self):
|
||||||
|
"""
|
||||||
|
Pages:
|
||||||
|
in: Any
|
||||||
|
out: page_forgotten_hall
|
||||||
|
"""
|
||||||
|
logger.hr('Route Ornament Extraction', level=1)
|
||||||
|
self.map_init(plane=Penacony_TheReverieReality, position=(245.3, 233.3))
|
||||||
|
boss = Waypoint((245.2, 193.6))
|
||||||
|
boss.expected_end = [self.is_combat_executing]
|
||||||
|
self.clear_enemy(
|
||||||
|
boss
|
||||||
|
)
|
@ -38,3 +38,10 @@ HimekoTrial__exit = RouteModel(
|
|||||||
floor='F1',
|
floor='F1',
|
||||||
position=(519.9, 361.5),
|
position=(519.9, 361.5),
|
||||||
)
|
)
|
||||||
|
OrnamentExtraction__route = RouteModel(
|
||||||
|
name='OrnamentExtraction__route',
|
||||||
|
route='route.daily.OrnamentExtraction:route',
|
||||||
|
plane='Penacony_TheReverieReality',
|
||||||
|
floor='F1',
|
||||||
|
position=(245.3, 233.3),
|
||||||
|
)
|
||||||
|
@ -7,11 +7,13 @@ from tasks.combat.assets.assets_combat_prepare import COMBAT_PREPARE
|
|||||||
from tasks.combat.assets.assets_combat_support import COMBAT_SUPPORT_LIST
|
from tasks.combat.assets.assets_combat_support import COMBAT_SUPPORT_LIST
|
||||||
from tasks.combat.combat import Combat
|
from tasks.combat.combat import Combat
|
||||||
from tasks.dungeon.event import DungeonEvent
|
from tasks.dungeon.event import DungeonEvent
|
||||||
|
from tasks.map.route.loader import RouteLoader
|
||||||
|
from tasks.map.route.route.daily import OrnamentExtraction__route
|
||||||
from tasks.ornament.assets.assets_ornament_combat import *
|
from tasks.ornament.assets.assets_ornament_combat import *
|
||||||
from tasks.ornament.assets.assets_ornament_ui import *
|
from tasks.ornament.assets.assets_ornament_ui import *
|
||||||
|
|
||||||
|
|
||||||
class OrnamentCombat(DungeonEvent, Combat):
|
class OrnamentCombat(DungeonEvent, Combat, RouteLoader):
|
||||||
def combat_enter_from_map(self, skip_first_screenshot=True):
|
def combat_enter_from_map(self, skip_first_screenshot=True):
|
||||||
# Don't enter from map, UI too deep inside
|
# Don't enter from map, UI too deep inside
|
||||||
# Enter from survival index instead
|
# Enter from survival index instead
|
||||||
@ -149,8 +151,8 @@ class OrnamentCombat(DungeonEvent, Combat):
|
|||||||
|
|
||||||
# End
|
# End
|
||||||
if self.is_in_main():
|
if self.is_in_main():
|
||||||
logger.info('Combat entered')
|
logger.info('Combat map entered')
|
||||||
return True
|
break
|
||||||
# Relics full
|
# Relics full
|
||||||
# Clicking between COMBAT_PREPARE and COMBAT_TEAM_PREPARE
|
# Clicking between COMBAT_PREPARE and COMBAT_TEAM_PREPARE
|
||||||
if trial > 5:
|
if trial > 5:
|
||||||
@ -172,3 +174,6 @@ class OrnamentCombat(DungeonEvent, Combat):
|
|||||||
continue
|
continue
|
||||||
if self.handle_popup_confirm():
|
if self.handle_popup_confirm():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
self.route_run(OrnamentExtraction__route)
|
||||||
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user