1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-17 02:55:25 +08:00

Upd: campaign bonus

This commit is contained in:
sui-feng-cb
2025-11-18 02:10:59 +08:00
parent 67f8994cd1
commit 12db573f18
2 changed files with 24 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ from module.statistics.utils import *
class BonusItem(Item):
def predict_valid(self):
return np.mean(rgb2gray(self.image) > 160) > 0.1
return np.mean(rgb2gray(self.image) > 160) > 0.3
class CampaignBonusStatistics(GetItemsStatistics):
@@ -18,7 +18,7 @@ class CampaignBonusStatistics(GetItemsStatistics):
def appear_on(self, image):
if AUTO_SEARCH_MENU_EXIT.match(image, offset=(200, 20)) \
and (CAMPAIGN_BONUS.match(image, offset=(200, 500)) \
or CAMPAIGN_BONUS_SINGLE.match(image, offset=(200, 500))):
and CAMPAIGN_BONUS_SINGLE.match(image, offset=(200, 500))):
return True
return False
@@ -48,7 +48,7 @@ class CampaignBonusStatistics(GetItemsStatistics):
for item in result:
if item.name == 'Coin':
valid = True
if item.amount > 100:
if item.amount > 80:
valid_coin = True
if valid and valid_coin:
return [self.revise_item(item) for item in result]