1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 16:47: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

@@ -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