mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:47:32 +08:00
Fix: Failed to enter boss room due to wrong is_question prediction
This commit is contained in:
parent
ab27a00125
commit
e4653741dd
@ -530,7 +530,11 @@ class OSFleet(OSCamera, Combat, Fleet, OSAsh):
|
||||
if is_normal:
|
||||
self.relative_goto(has_fleet_step=True, near_by=True, is_exclamation=True)
|
||||
else:
|
||||
self.relative_goto(has_fleet_step=True, near_by=True, is_question=True)
|
||||
if self.radar.select(is_exclamation=True).count:
|
||||
logger.warning('Trying to enter month boss hard mode but is_exclamation exists')
|
||||
self.relative_goto(has_fleet_step=True, near_by=True, is_exclamation=True)
|
||||
else:
|
||||
self.relative_goto(has_fleet_step=True, near_by=True, is_question=True)
|
||||
|
||||
def question_goto(self, has_fleet_step=False):
|
||||
logger.hr('Question goto')
|
||||
|
@ -205,6 +205,13 @@ class Radar:
|
||||
grid.image = image
|
||||
grid.reset()
|
||||
grid.predict()
|
||||
# Fixup is_question near is_port
|
||||
for port in self.select(is_port=True):
|
||||
for grid in self.select(is_question=True):
|
||||
if np.sum(np.abs(np.subtract(port.location, grid.location))) == 1:
|
||||
logger.warning(f'Wrong radar prediction is_question {grid.location} {grid.encode()} '
|
||||
f'near {port.location} {port.encode()}')
|
||||
grid.is_question = False
|
||||
|
||||
def select(self, **kwargs):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user