Add: Stage option of MAA

This commit is contained in:
SarContDeli 2022-11-04 11:25:51 +08:00
parent 816f947deb
commit 32db4ad50f
9 changed files with 165 additions and 15 deletions

View File

@ -41,7 +41,8 @@
"ServerUpdate": "04:00"
},
"MaaFight": {
"Stage": "Annihilation",
"Stage": "last",
"CustomStage": null,
"Medicine": 0,
"Stone": 0,
"Times": 5,
@ -59,7 +60,8 @@
"ServerUpdate": "04:00"
},
"MaaFight": {
"Stage": "1-7",
"Stage": "last",
"CustomStage": null,
"Medicine": 0,
"Stone": 0,
"Times": 0,
@ -77,7 +79,8 @@
"ServerUpdate": "04:00"
},
"MaaFight": {
"Stage": "1-7",
"Stage": "last",
"CustomStage": null,
"Medicine": 0,
"Stone": 0,
"Times": 0,

View File

@ -136,10 +136,30 @@
},
"MaaFight": {
"Stage": {
"type": "select",
"value": "last",
"option": [
"last",
"1-7",
"CE-6",
"AP-5",
"CA-5",
"LS-6",
"PR-A-1",
"PR-A-2",
"PR-B-1",
"PR-B-2",
"PR-C-1",
"PR-C-2",
"PR-D-1",
"PR-D-2",
"custom"
]
},
"CustomStage": {
"type": "input",
"value": "Annihilation",
"valuetype": "str",
"display": "hide"
"value": null,
"valuetype": "str"
},
"Medicine": {
"type": "input",
@ -202,8 +222,29 @@
},
"MaaFight": {
"Stage": {
"type": "select",
"value": "last",
"option": [
"last",
"1-7",
"CE-6",
"AP-5",
"CA-5",
"LS-6",
"PR-A-1",
"PR-A-2",
"PR-B-1",
"PR-B-2",
"PR-C-1",
"PR-C-2",
"PR-D-1",
"PR-D-2",
"custom"
]
},
"CustomStage": {
"type": "input",
"value": "1-7",
"value": null,
"valuetype": "str"
},
"Medicine": {
@ -262,8 +303,29 @@
},
"MaaFight": {
"Stage": {
"type": "select",
"value": "last",
"option": [
"last",
"1-7",
"CE-6",
"AP-5",
"CA-5",
"LS-6",
"PR-A-1",
"PR-A-2",
"PR-B-1",
"PR-B-2",
"PR-C-1",
"PR-C-2",
"PR-D-1",
"PR-D-2",
"custom"
]
},
"CustomStage": {
"type": "input",
"value": "1-7",
"value": null,
"valuetype": "str"
},
"Medicine": {

View File

@ -55,7 +55,10 @@ MaaRecord:
MaaFight:
Stage:
value: 1-7
value: last
option: [last, 1-7, CE-6, AP-5, CA-5, LS-6, PR-A-1, PR-A-2, PR-B-1, PR-B-2, PR-C-1, PR-C-2, PR-D-1, PR-D-2, custom]
CustomStage:
value: null
valuetype: str
Medicine: 0
Stone: 0

View File

@ -38,7 +38,8 @@ class GeneratedConfig:
MaaRecord_PenguinID = None
# Group `MaaFight`
MaaFight_Stage = '1-7'
MaaFight_Stage = 'last' # last, 1-7, CE-6, AP-5, CA-5, LS-6, PR-A-1, PR-A-2, PR-B-1, PR-B-2, PR-C-1, PR-C-2, PR-D-1, PR-D-2, custom
MaaFight_CustomStage = None
MaaFight_Medicine = 0
MaaFight_Stone = 0
MaaFight_Times = 0

View File

@ -176,7 +176,26 @@
},
"Stage": {
"name": "MaaFight.Stage.name",
"help": "MaaFight.Stage.help"
"help": "MaaFight.Stage.help",
"last": "last",
"1-7": "1-7",
"CE-6": "CE-6",
"AP-5": "AP-5",
"CA-5": "CA-5",
"LS-6": "LS-6",
"PR-A-1": "PR-A-1",
"PR-A-2": "PR-A-2",
"PR-B-1": "PR-B-1",
"PR-B-2": "PR-B-2",
"PR-C-1": "PR-C-1",
"PR-C-2": "PR-C-2",
"PR-D-1": "PR-D-1",
"PR-D-2": "PR-D-2",
"custom": "custom"
},
"CustomStage": {
"name": "MaaFight.CustomStage.name",
"help": "MaaFight.CustomStage.help"
},
"Medicine": {
"name": "MaaFight.Medicine.name",

View File

@ -176,7 +176,26 @@
},
"Stage": {
"name": "MaaFight.Stage.name",
"help": "MaaFight.Stage.help"
"help": "MaaFight.Stage.help",
"last": "last",
"1-7": "1-7",
"CE-6": "CE-6",
"AP-5": "AP-5",
"CA-5": "CA-5",
"LS-6": "LS-6",
"PR-A-1": "PR-A-1",
"PR-A-2": "PR-A-2",
"PR-B-1": "PR-B-1",
"PR-B-2": "PR-B-2",
"PR-C-1": "PR-C-1",
"PR-C-2": "PR-C-2",
"PR-D-1": "PR-D-1",
"PR-D-2": "PR-D-2",
"custom": "custom"
},
"CustomStage": {
"name": "MaaFight.CustomStage.name",
"help": "MaaFight.CustomStage.help"
},
"Medicine": {
"name": "MaaFight.Medicine.name",

View File

@ -31,7 +31,7 @@
"help": ""
},
"MaaFight": {
"name": "理智",
"name": "理智",
"help": ""
},
"MaaRecruit": {
@ -176,6 +176,25 @@
},
"Stage": {
"name": "关卡选择",
"help": "",
"last": "上次",
"1-7": "1-7",
"CE-6": "龙门币-6",
"AP-5": "红票-5",
"CA-5": "技能-5",
"LS-6": "经验-6",
"PR-A-1": "奶/盾芯片",
"PR-A-2": "奶/盾芯片组",
"PR-B-1": "术/狙芯片",
"PR-B-2": "术/狙芯片组",
"PR-C-1": "先/辅芯片",
"PR-C-2": "先/辅芯片组",
"PR-D-1": "近/特芯片",
"PR-D-2": "近/特芯片组",
"custom": "自定义"
},
"CustomStage": {
"name": "自定义关卡",
"help": ""
},
"Medicine": {

View File

@ -176,7 +176,26 @@
},
"Stage": {
"name": "MaaFight.Stage.name",
"help": "MaaFight.Stage.help"
"help": "MaaFight.Stage.help",
"last": "last",
"1-7": "1-7",
"CE-6": "CE-6",
"AP-5": "AP-5",
"CA-5": "CA-5",
"LS-6": "LS-6",
"PR-A-1": "PR-A-1",
"PR-A-2": "PR-A-2",
"PR-B-1": "PR-B-1",
"PR-B-2": "PR-B-2",
"PR-C-1": "PR-C-1",
"PR-C-2": "PR-C-2",
"PR-D-1": "PR-D-1",
"PR-D-2": "PR-D-2",
"custom": "custom"
},
"CustomStage": {
"name": "MaaFight.CustomStage.name",
"help": "MaaFight.CustomStage.help"
},
"Medicine": {
"name": "MaaFight.Medicine.name",

View File

@ -156,12 +156,17 @@ class AssistantHandler:
def fight(self):
args = {
"stage": self.config.MaaFight_Stage,
"report_to_penguin": self.config.MaaRecord_ReportToPenguin,
"server": self.config.MaaEmulator_Server,
"client_type": self.config.MaaEmulator_PackageName,
"DrGrandet": self.config.MaaFight_DrGrandet,
}
if self.config.MaaFight_Stage == 'last':
args['stage'] = ''
elif self.config.MaaFight_Stage == 'custom':
args['stage'] = self.config.MaaFight_CustomStage
else:
args['stage'] = self.config.MaaFight_Stage
if self.config.MaaFight_Medicine != 0:
args["medicine"] = self.config.MaaFight_Medicine