1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-09 12:49:03 +08:00

Feat: Purchase Quantity Control for Skin Boxes

This commit is contained in:
positnuec 2025-12-25 19:03:24 +08:00
parent 049935a5ce
commit c2365aa92c
9 changed files with 56 additions and 11 deletions

View File

@ -1743,7 +1743,8 @@
"GeneralShop": {
"UseGems": false,
"Refresh": false,
"BuySkinBox": false,
"BuySkinBox": "disabled",
"BuySkinBoxAmount": 0,
"ConsumeCoins": false,
"Filter": "BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2\n> Cube\n> FoodT6 > FoodT5"
},

View File

@ -9475,8 +9475,17 @@
"value": false
},
"BuySkinBox": {
"type": "checkbox",
"value": false
"type": "select",
"value": "disabled",
"option": [
"disabled",
"unlimited",
"specified"
]
},
"BuySkinBoxAmount": {
"type": "input",
"value": 0
},
"ConsumeCoins": {
"type": "checkbox",

View File

@ -763,7 +763,10 @@ Island15:
GeneralShop:
UseGems: false
Refresh: false
BuySkinBox: false
BuySkinBox:
value: disabled
option: [ disabled, unlimited, specified ]
BuySkinBoxAmount: 0
ConsumeCoins: false
Filter: |-
BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2

View File

@ -403,7 +403,8 @@ class GeneratedConfig:
# Group `GeneralShop`
GeneralShop_UseGems = False
GeneralShop_Refresh = False
GeneralShop_BuySkinBox = False
GeneralShop_BuySkinBox = 'disabled' # disabled, unlimited, specified
GeneralShop_BuySkinBoxAmount = 0
GeneralShop_ConsumeCoins = False
GeneralShop_Filter = 'BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2\n> Cube\n> FoodT6 > FoodT5'

View File

@ -2981,7 +2981,14 @@
},
"BuySkinBox": {
"name": "Buy Equip Skin Boxes",
"help": "In order to reduce maintenance costs, the skin box selectors in the filter will not be updated with the game, but Alas will consider any unknown items with a quantity of 1 and consume 7000 coins as skin boxes and buy them."
"help": "In order to reduce maintenance costs, the skin box selectors in the filter will not be updated with the game, but Alas will consider any unknown items with a quantity of 1 and consume 7000 coins as skin boxes and buy them.",
"disabled": "Do Not Purchase",
"unlimited": "Unlimited Purchases",
"specified": "Purchase Specified Quantity"
},
"BuySkinBoxAmount": {
"name": "Purchase X Skin Boxes",
"help": "Takes effect when \"Purchase Specified Quantity\" is selected."
},
"ConsumeCoins": {
"name": "Consume Spilled Coins",

View File

@ -2981,7 +2981,14 @@
},
"BuySkinBox": {
"name": "GeneralShop.BuySkinBox.name",
"help": "GeneralShop.BuySkinBox.help"
"help": "GeneralShop.BuySkinBox.help",
"disabled": "disabled",
"unlimited": "unlimited",
"specified": "specified"
},
"BuySkinBoxAmount": {
"name": "GeneralShop.BuySkinBoxAmount.name",
"help": "GeneralShop.BuySkinBoxAmount.help"
},
"ConsumeCoins": {
"name": "GeneralShop.ConsumeCoins.name",

View File

@ -2980,8 +2980,15 @@
"help": "刷新需要消耗50钻石"
},
"BuySkinBox": {
"name": "买外观装备箱",
"help": "为降低维护成本过滤器中的外观箱选择器不会随游戏更新但Alas会将任何未知的数量为1的消耗7000物资的物品视为外观箱并购买"
"name": "买装备外观箱",
"help": "为降低维护成本过滤器中的外观箱选择器不会随游戏更新但Alas会将任何未知的数量为1的消耗7000物资的物品视为外观箱并购买",
"disabled": "不购买",
"unlimited": "无限制购买",
"specified": "购买指定数量"
},
"BuySkinBoxAmount": {
"name": "购买 X 个外观箱",
"help": "在选择“购买指定数量”时生效"
},
"ConsumeCoins": {
"name": "消耗溢出物资",

View File

@ -2981,7 +2981,14 @@
},
"BuySkinBox": {
"name": "買外觀裝備箱",
"help": "為降低維護成本過濾器中的外觀箱選擇器不會隨遊戲更新但Alas會將任何未知的數量為1的消耗7000物資的物品視為外觀箱併購買"
"help": "為降低維護成本過濾器中的外觀箱選擇器不會隨遊戲更新但Alas會將任何未知的數量為1的消耗7000物資的物品視為外觀箱併購買",
"disabled": "不購買",
"unlimited": "無限制購買",
"specified": "購買指定數量"
},
"BuySkinBoxAmount": {
"name": "購買 X 個外觀箱",
"help": "在選擇「購買指定數量」時生效"
},
"ConsumeCoins": {
"name": "消耗溢出物資",

View File

@ -125,12 +125,15 @@ class GeneralShop_250814(ShopClerk, ShopUI, ShopStatus):
if item.cost == 'Coins':
return True
if self.config.GeneralShop_BuySkinBox:
mode = self.config.GeneralShop_BuySkinBox
if (mode == 'unlimited' or (mode == 'specified' and self.config.GeneralShop_BuySkinBoxAmount > 0)):
if (not item.is_known_item()) and item.amount == 1 and item.cost == 'Coins' and item.price == 7000:
# check a custom item that cannot be template matched as color
# and design constantly changes i.e. equip skin box
logger.info(f'Item {item} is considered to be an equip skin box')
if self._currency >= item.price:
if mode == 'specified':
self.config.GeneralShop_BuySkinBoxAmount -= 1
return True
return False