mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 15:35:12 +00:00
perf: mission
This commit is contained in:
parent
fd4ec3aff0
commit
9d0c276db5
@ -34,11 +34,17 @@ class Mission(MissionUI, CommissionsUI):
|
||||
case "H":
|
||||
return 20
|
||||
case "E":
|
||||
stage = int(self.current_stage, base=10)
|
||||
return 20 if stage >= 9 else 10 + 5 * math.floor(stage / 5)
|
||||
if self.current_stage >= "09":
|
||||
return 20
|
||||
elif self.current_stage <= "04":
|
||||
return 10
|
||||
else:
|
||||
return 15
|
||||
case "XP" | "CR":
|
||||
stage = int(self.current_stage, base=10)
|
||||
return 40 if stage >= 8 else stage * 5
|
||||
if self.current_stage >= "08":
|
||||
return 40
|
||||
else:
|
||||
return int(self.current_stage, base=10) * 5
|
||||
|
||||
@property
|
||||
def mission_info(self) -> list:
|
||||
|
||||
@ -49,11 +49,7 @@ class MissionUI(UI, AP):
|
||||
logger.warning("Area not found")
|
||||
return False
|
||||
|
||||
to_switch = {
|
||||
"N": SWITCH_NORMAL,
|
||||
"H": SWITCH_HARD
|
||||
}
|
||||
switch = to_switch[mode]
|
||||
switch = SWITCH_HARD if mode == "H" else SWITCH_NORMAL
|
||||
if not self.select_mode(switch) and not self.select_area(area):
|
||||
return False
|
||||
return True
|
||||
@ -146,11 +142,10 @@ class MissionUI(UI, AP):
|
||||
class CommissionsUI(UI, AP):
|
||||
"""Works the same way as select_bounty"""
|
||||
def select_commission(self, mode):
|
||||
to_button = {
|
||||
"CR": (SELECT_CR, CHECK_CR),
|
||||
"XP": (SELECT_XP, CHECK_XP)
|
||||
}
|
||||
dest_enter, dest_check = to_button[mode]
|
||||
if mode == "CR":
|
||||
dest_enter, dest_check = SELECT_CR, CHECK_CR
|
||||
else:
|
||||
dest_enter, dest_check = SELECT_XP, CHECK_XP
|
||||
timer = Timer(5, 10).start()
|
||||
while 1:
|
||||
self.device.screenshot()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user