mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 19:55:12 +00:00
Compare commits
3 Commits
b22681b71a
...
962191d423
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
962191d423 | ||
|
|
a37be296df | ||
|
|
d7858c19d8 |
@ -99,6 +99,14 @@
|
|||||||
"Choice5": {
|
"Choice5": {
|
||||||
"Location": "None",
|
"Location": "None",
|
||||||
"Classrooms": null
|
"Classrooms": null
|
||||||
|
},
|
||||||
|
"Choice6": {
|
||||||
|
"Location": "None",
|
||||||
|
"Classrooms": null
|
||||||
|
},
|
||||||
|
"Choice7": {
|
||||||
|
"Location": "None",
|
||||||
|
"Classrooms": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Shop": {
|
"Shop": {
|
||||||
|
|||||||
@ -473,6 +473,52 @@
|
|||||||
"type": "textarea",
|
"type": "textarea",
|
||||||
"value": null
|
"value": null
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Choice6": {
|
||||||
|
"Location": {
|
||||||
|
"type": "select",
|
||||||
|
"value": "None",
|
||||||
|
"option": [
|
||||||
|
"None",
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
7,
|
||||||
|
8,
|
||||||
|
9
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Classrooms": {
|
||||||
|
"type": "textarea",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Choice7": {
|
||||||
|
"Location": {
|
||||||
|
"type": "select",
|
||||||
|
"value": "None",
|
||||||
|
"option": [
|
||||||
|
"None",
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
7,
|
||||||
|
8,
|
||||||
|
9
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Classrooms": {
|
||||||
|
"type": "textarea",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Shop": {
|
"Shop": {
|
||||||
|
|||||||
@ -133,6 +133,20 @@ Choice5:
|
|||||||
Classrooms:
|
Classrooms:
|
||||||
value: null
|
value: null
|
||||||
type: textarea
|
type: textarea
|
||||||
|
Choice6:
|
||||||
|
Location:
|
||||||
|
value: None
|
||||||
|
option: [ None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||||
|
Classrooms:
|
||||||
|
value: null
|
||||||
|
type: textarea
|
||||||
|
Choice7:
|
||||||
|
Location:
|
||||||
|
value: None
|
||||||
|
option: [ None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||||
|
Classrooms:
|
||||||
|
value: null
|
||||||
|
type: textarea
|
||||||
|
|
||||||
Bounty:
|
Bounty:
|
||||||
OnError:
|
OnError:
|
||||||
|
|||||||
@ -37,6 +37,8 @@ Daily:
|
|||||||
- Choice3
|
- Choice3
|
||||||
- Choice4
|
- Choice4
|
||||||
- Choice5
|
- Choice5
|
||||||
|
- Choice6
|
||||||
|
- Choice7
|
||||||
Shop:
|
Shop:
|
||||||
- Scheduler
|
- Scheduler
|
||||||
- NormalShop
|
- NormalShop
|
||||||
|
|||||||
@ -75,6 +75,14 @@ class GeneratedConfig:
|
|||||||
Choice5_Location = 'None' # None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
Choice5_Location = 'None' # None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||||
Choice5_Classrooms = None
|
Choice5_Classrooms = None
|
||||||
|
|
||||||
|
# Group `Choice6`
|
||||||
|
Choice6_Location = 'None' # None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||||
|
Choice6_Classrooms = None
|
||||||
|
|
||||||
|
# Group `Choice7`
|
||||||
|
Choice7_Location = 'None' # None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||||
|
Choice7_Classrooms = None
|
||||||
|
|
||||||
# Group `Bounty`
|
# Group `Bounty`
|
||||||
Bounty_OnError = 'skip' # stop, skip
|
Bounty_OnError = 'skip' # stop, skip
|
||||||
|
|
||||||
|
|||||||
@ -423,6 +423,56 @@
|
|||||||
"help": ""
|
"help": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Choice6": {
|
||||||
|
"_info": {
|
||||||
|
"name": "Choice 6",
|
||||||
|
"help": "Choice 6"
|
||||||
|
},
|
||||||
|
"Location": {
|
||||||
|
"name": "Location",
|
||||||
|
"help": "",
|
||||||
|
"None": "None",
|
||||||
|
"0": "Schale Office",
|
||||||
|
"1": "Schale Residence",
|
||||||
|
"2": "Gehenna",
|
||||||
|
"3": "Abydos",
|
||||||
|
"4": "Millennium",
|
||||||
|
"5": "Trinity",
|
||||||
|
"6": "Red Winter",
|
||||||
|
"7": "Hyakkiyako",
|
||||||
|
"8": "D.U. Shiratori",
|
||||||
|
"9": "Shanhaijing"
|
||||||
|
},
|
||||||
|
"Classrooms": {
|
||||||
|
"name": "Classrooms",
|
||||||
|
"help": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Choice7": {
|
||||||
|
"_info": {
|
||||||
|
"name": "Choice 7",
|
||||||
|
"help": "Choice 7"
|
||||||
|
},
|
||||||
|
"Location": {
|
||||||
|
"name": "Location",
|
||||||
|
"help": "",
|
||||||
|
"None": "None",
|
||||||
|
"0": "Schale Office",
|
||||||
|
"1": "Schale Residence",
|
||||||
|
"2": "Gehenna",
|
||||||
|
"3": "Abydos",
|
||||||
|
"4": "Millennium",
|
||||||
|
"5": "Trinity",
|
||||||
|
"6": "Red Winter",
|
||||||
|
"7": "Hyakkiyako",
|
||||||
|
"8": "D.U. Shiratori",
|
||||||
|
"9": "Shanhaijing"
|
||||||
|
},
|
||||||
|
"Classrooms": {
|
||||||
|
"name": "Classrooms",
|
||||||
|
"help": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
"Bounty": {
|
"Bounty": {
|
||||||
"_info": {
|
"_info": {
|
||||||
"name": "Bounty Settings",
|
"name": "Bounty Settings",
|
||||||
|
|||||||
@ -423,6 +423,56 @@
|
|||||||
"help": "Choice5.Classrooms.help"
|
"help": "Choice5.Classrooms.help"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Choice6": {
|
||||||
|
"_info": {
|
||||||
|
"name": "Choice6._info.name",
|
||||||
|
"help": "Choice6._info.help"
|
||||||
|
},
|
||||||
|
"Location": {
|
||||||
|
"name": "Choice6.Location.name",
|
||||||
|
"help": "Choice6.Location.help",
|
||||||
|
"None": "None",
|
||||||
|
"0": "0",
|
||||||
|
"1": "1",
|
||||||
|
"2": "2",
|
||||||
|
"3": "3",
|
||||||
|
"4": "4",
|
||||||
|
"5": "5",
|
||||||
|
"6": "6",
|
||||||
|
"7": "7",
|
||||||
|
"8": "8",
|
||||||
|
"9": "9"
|
||||||
|
},
|
||||||
|
"Classrooms": {
|
||||||
|
"name": "Choice6.Classrooms.name",
|
||||||
|
"help": "Choice6.Classrooms.help"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Choice7": {
|
||||||
|
"_info": {
|
||||||
|
"name": "Choice7._info.name",
|
||||||
|
"help": "Choice7._info.help"
|
||||||
|
},
|
||||||
|
"Location": {
|
||||||
|
"name": "Choice7.Location.name",
|
||||||
|
"help": "Choice7.Location.help",
|
||||||
|
"None": "None",
|
||||||
|
"0": "0",
|
||||||
|
"1": "1",
|
||||||
|
"2": "2",
|
||||||
|
"3": "3",
|
||||||
|
"4": "4",
|
||||||
|
"5": "5",
|
||||||
|
"6": "6",
|
||||||
|
"7": "7",
|
||||||
|
"8": "8",
|
||||||
|
"9": "9"
|
||||||
|
},
|
||||||
|
"Classrooms": {
|
||||||
|
"name": "Choice7.Classrooms.name",
|
||||||
|
"help": "Choice7.Classrooms.help"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Bounty": {
|
"Bounty": {
|
||||||
"_info": {
|
"_info": {
|
||||||
"name": "悬赏通缉设置",
|
"name": "悬赏通缉设置",
|
||||||
|
|||||||
@ -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:
|
||||||
|
|||||||
@ -45,18 +45,10 @@ MODE_TO_PAGE = {
|
|||||||
class MissionUI(UI, AP):
|
class MissionUI(UI, AP):
|
||||||
def select_mission(self, mode, stage):
|
def select_mission(self, mode, stage):
|
||||||
area = int(stage.split("-")[0])
|
area = int(stage.split("-")[0])
|
||||||
if not self.select_area(area):
|
switch = SWITCH_HARD if mode == "H" else SWITCH_NORMAL
|
||||||
logger.warning("Area not found")
|
if self.select_area(area) and self.select_mode(switch):
|
||||||
return False
|
return True
|
||||||
|
return False
|
||||||
to_switch = {
|
|
||||||
"N": SWITCH_NORMAL,
|
|
||||||
"H": SWITCH_HARD
|
|
||||||
}
|
|
||||||
switch = to_switch[mode]
|
|
||||||
if not self.select_mode(switch) and not self.select_area(area):
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def select_area(self, num):
|
def select_area(self, num):
|
||||||
""""
|
""""
|
||||||
@ -81,6 +73,7 @@ class MissionUI(UI, AP):
|
|||||||
except:
|
except:
|
||||||
tries += 1
|
tries += 1
|
||||||
if tries > 3:
|
if tries > 3:
|
||||||
|
logger.warning(f"Area {num} not found")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def select_mode(self, switch):
|
def select_mode(self, switch):
|
||||||
@ -146,11 +139,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()
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class Schedule(ScheduleUI):
|
|||||||
info = []
|
info = []
|
||||||
input_valid = True
|
input_valid = True
|
||||||
schedule_config = self.config.cross_get("Schedule")
|
schedule_config = self.config.cross_get("Schedule")
|
||||||
choices = ["Choice1", "Choice2", "Choice3", "Choice4", "Choice5"]
|
choices = ["Choice1", "Choice2", "Choice3", "Choice4", "Choice5", "Choice6", "Choice7"]
|
||||||
|
|
||||||
for choice in choices:
|
for choice in choices:
|
||||||
location, classrooms = schedule_config[choice]["Location"], schedule_config[choice]["Classrooms"]
|
location, classrooms = schedule_config[choice]["Location"], schedule_config[choice]["Classrooms"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user