Skip to content

Commit

Permalink
fix: 轮形阵识别不全 (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirisameVanilla authored Feb 16, 2025
1 parent a57d74e commit d989d56
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autowsgr/game/get_game_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,12 @@ def get_enemy_condition(timer: Timer, type='exercise', *args, **kwargs):

def get_enemy_formation(timer: Timer) -> str:
"""识别敌方队型, 识别失败返回空字符串"""
box = [(0.11, 0.11), (0.2, 0)]
res = timer.recognize(crop_image(timer.screen, *box), allowlist=FormationName.get_all_chars())
left_bottom = (0.11, 0.15)
right_top = (0.2, 0.05)
res = timer.recognize(
crop_image(timer.screen, left_bottom, right_top),
allowlist=FormationName.get_all_chars(),
)
return res[1] if res is not None else ''


Expand Down

0 comments on commit d989d56

Please sign in to comment.