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