Add: Credit fight of MAA

This commit is contained in:
SarContDeli 2022-12-09 16:01:15 +08:00
parent 20896b68c3
commit c185da3f22
9 changed files with 32 additions and 1 deletions

View File

@ -176,6 +176,7 @@
"ServerUpdate": "04:00"
},
"MaaMall": {
"CreditFight": false,
"Shopping": true,
"ForceShoppingIfCreditFull": false,
"BuyFirst": "招聘许可 > 龙门币",

View File

@ -636,6 +636,10 @@
}
},
"MaaMall": {
"CreditFight": {
"type": "checkbox",
"value": false
},
"Shopping": {
"type": "checkbox",
"value": true

View File

@ -91,6 +91,7 @@ MaaCustomInfrast:
type: textarea
MaaMall:
CreditFight: false
Shopping: true
ForceShoppingIfCreditFull: false
BuyFirst:

View File

@ -69,6 +69,7 @@ class GeneratedConfig:
MaaCustomInfrast_Filename = None
# Group `MaaMall`
MaaMall_CreditFight = False
MaaMall_Shopping = True
MaaMall_ForceShoppingIfCreditFull = False
MaaMall_BuyFirst = '招聘许可 > 龙门币'

View File

@ -312,6 +312,10 @@
"name": "MaaMall._info.name",
"help": "MaaMall._info.help"
},
"CreditFight": {
"name": "MaaMall.CreditFight.name",
"help": "MaaMall.CreditFight.help"
},
"Shopping": {
"name": "MaaMall.Shopping.name",
"help": "MaaMall.Shopping.help"

View File

@ -312,6 +312,10 @@
"name": "MaaMall._info.name",
"help": "MaaMall._info.help"
},
"CreditFight": {
"name": "MaaMall.CreditFight.name",
"help": "MaaMall.CreditFight.help"
},
"Shopping": {
"name": "MaaMall.Shopping.name",
"help": "MaaMall.Shopping.help"

View File

@ -312,6 +312,10 @@
"name": "信用商店",
"help": ""
},
"CreditFight": {
"name": "借助战赚信用",
"help": "借助战打一把OF-1赚30信用\n战斗任务的关卡设置为”上次“时会被自动跳过\n火蓝之心OF-1未解锁时请勿勾选"
},
"Shopping": {
"name": "信用购物",
"help": ""

View File

@ -312,6 +312,10 @@
"name": "MaaMall._info.name",
"help": "MaaMall._info.help"
},
"CreditFight": {
"name": "MaaMall.CreditFight.name",
"help": "MaaMall.CreditFight.help"
},
"Shopping": {
"name": "MaaMall.Shopping.name",
"help": "MaaMall.Shopping.help"

View File

@ -180,7 +180,7 @@ class AssistantHandler:
self.serial = ConnectionAttr.find_bluestacks4_hyperv(self.serial)
if self.is_bluestacks5_hyperv:
self.serial = ConnectionAttr.find_bluestacks5_hyperv(self.serial)
@cached_property
def is_bluestacks4_hyperv(self):
return "bluestacks4-hyperv" in self.serial
@ -363,7 +363,15 @@ class AssistantHandler:
def mall(self):
buy_first = self.split_filter(self.config.MaaMall_BuyFirst)
blacklist = self.split_filter(self.config.MaaMall_BlackList)
credit_fight = self.config.MaaMall_CreditFight
if self.config.cross_get(keys='MaaMaterial.MaaFight.Stage') == 'last' \
and self.config.cross_get(keys='MaaMaterial.Scheduler.Enable', default=False):
credit_fight = False
if self.config.cross_get(keys='MaaFight.MaaFight.Stage') == 'last' \
and self.config.cross_get(keys='MaaFight.Scheduler.Enable', default=False):
credit_fight = False
self.maa_start('Mall', {
"credit_fight": credit_fight,
"shopping": self.config.MaaMall_Shopping,
"buy_first": buy_first,
"blacklist": blacklist,