mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-23 09:01:45 +00:00
Fix: 修复额外剧情出现时报错的问题
This commit is contained in:
parent
088aca3c95
commit
2244ca3d8d
@ -10,7 +10,6 @@ from module.combat.hp_balancer import HPBalancer
|
|||||||
from module.combat.submarine import SubmarineCall
|
from module.combat.submarine import SubmarineCall
|
||||||
from module.handler.enemy_searching import EnemySearchingHandler
|
from module.handler.enemy_searching import EnemySearchingHandler
|
||||||
from module.handler.low_emotion import LowEmotionHandler
|
from module.handler.low_emotion import LowEmotionHandler
|
||||||
from module.handler.story import StoryHandler
|
|
||||||
from module.handler.urgent_commission import UrgentCommissionHandler
|
from module.handler.urgent_commission import UrgentCommissionHandler
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from module.map.assets import MAP_OFFENSIVE
|
from module.map.assets import MAP_OFFENSIVE
|
||||||
@ -19,7 +18,7 @@ from module.ui.assets import BACK_ARROW
|
|||||||
|
|
||||||
|
|
||||||
class Combat(HPBalancer, UrgentCommissionHandler, EnemySearchingHandler, Retirement, SubmarineCall, LowEmotionHandler,
|
class Combat(HPBalancer, UrgentCommissionHandler, EnemySearchingHandler, Retirement, SubmarineCall, LowEmotionHandler,
|
||||||
CombatAuto, CombatManual, StoryHandler):
|
CombatAuto, CombatManual):
|
||||||
_automation_set_timer = Timer(1)
|
_automation_set_timer = Timer(1)
|
||||||
_emotion: Emotion
|
_emotion: Emotion
|
||||||
battle_status_click_interval = 0
|
battle_status_click_interval = 0
|
||||||
|
@ -3,10 +3,11 @@ from module.base.utils import red_overlay_transparency, get_color
|
|||||||
from module.exception import CampaignEnd
|
from module.exception import CampaignEnd
|
||||||
from module.handler.assets import *
|
from module.handler.assets import *
|
||||||
from module.handler.info_bar import InfoBarHandler
|
from module.handler.info_bar import InfoBarHandler
|
||||||
|
from module.handler.story import StoryHandler
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
|
|
||||||
|
|
||||||
class EnemySearchingHandler(InfoBarHandler):
|
class EnemySearchingHandler(InfoBarHandler, StoryHandler):
|
||||||
MAP_ENEMY_SEARCHING_OVERLAY_TRANSPARENCY_THRESHOLD = 0.5 # Usually (0.70, 0.80).
|
MAP_ENEMY_SEARCHING_OVERLAY_TRANSPARENCY_THRESHOLD = 0.5 # Usually (0.70, 0.80).
|
||||||
MAP_ENEMY_SEARCHING_TIMEOUT_SECOND = 4.5
|
MAP_ENEMY_SEARCHING_TIMEOUT_SECOND = 4.5
|
||||||
in_stage_timer = Timer(1, count=3)
|
in_stage_timer = Timer(1, count=3)
|
||||||
@ -50,6 +51,8 @@ class EnemySearchingHandler(InfoBarHandler):
|
|||||||
timeout.start()
|
timeout.start()
|
||||||
if self.handle_in_stage():
|
if self.handle_in_stage():
|
||||||
return True
|
return True
|
||||||
|
if self.handle_story_skip():
|
||||||
|
timeout.reset()
|
||||||
if self.enemy_searching_appear():
|
if self.enemy_searching_appear():
|
||||||
appeared = True
|
appeared = True
|
||||||
else:
|
else:
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
from module.base.timer import Timer
|
from module.base.timer import Timer
|
||||||
|
from module.exception import CampaignEnd
|
||||||
|
from module.exception import ScriptEnd
|
||||||
from module.handler.fast_forward import FastForwardHandler
|
from module.handler.fast_forward import FastForwardHandler
|
||||||
from module.handler.low_emotion import LowEmotionHandler
|
from module.handler.low_emotion import LowEmotionHandler
|
||||||
from module.handler.mystery import MysteryHandler
|
from module.handler.mystery import MysteryHandler
|
||||||
from module.handler.story import StoryHandler
|
|
||||||
from module.handler.urgent_commission import UrgentCommissionHandler
|
from module.handler.urgent_commission import UrgentCommissionHandler
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from module.map.assets import *
|
from module.map.assets import *
|
||||||
from module.exception import CampaignEnd
|
|
||||||
from module.exception import ScriptEnd
|
|
||||||
from module.map.map_fleet_preparation import FleetPreparation
|
from module.map.map_fleet_preparation import FleetPreparation
|
||||||
from module.retire.retirement import Retirement
|
from module.retire.retirement import Retirement
|
||||||
|
|
||||||
|
|
||||||
class MapOperation(UrgentCommissionHandler, MysteryHandler, FleetPreparation, Retirement, FastForwardHandler,
|
class MapOperation(UrgentCommissionHandler, MysteryHandler, FleetPreparation, Retirement, FastForwardHandler,
|
||||||
LowEmotionHandler, StoryHandler):
|
LowEmotionHandler):
|
||||||
def fleet_switch_click(self):
|
def fleet_switch_click(self):
|
||||||
"""
|
"""
|
||||||
Switch fleet.
|
Switch fleet.
|
||||||
|
Loading…
Reference in New Issue
Block a user