Fix: Avoid double clicking COMBAT_TEAM_SUPPORT

This commit is contained in:
LmeSzinc 2024-05-13 12:40:44 +08:00
parent ee3cb4f5ef
commit ba9f2973d2

View File

@ -107,18 +107,20 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
raise RequestHumanTakeover
# Click
if support_character and self.appear(COMBAT_TEAM_SUPPORT):
if support_character and self.appear(COMBAT_TEAM_SUPPORT, interval=2):
if pre_set_team:
self.team_set(team)
pre_set_team = False
continue
self.support_set(support_character)
self.interval_reset(COMBAT_TEAM_SUPPORT)
support_set = True
continue
if support_set and self.appear(COMBAT_TEAM_PREPARE, interval=2):
self.team_set(team)
self.device.click(COMBAT_TEAM_PREPARE)
self.interval_reset(COMBAT_TEAM_PREPARE)
self.interval_reset(COMBAT_TEAM_SUPPORT)
continue
if self.appear(COMBAT_TEAM_PREPARE):
self.interval_reset(COMBAT_PREPARE)