"""Common Shop (通常アイテム) daily task. Ported from baas-reference module/shop/common_shop.py's implement() -- see shop_utils.py for the shared checkbox-grid-then-bulk-buy control flow both shop tabs use.""" from ba_auto import navigation from ba_auto.tasks import shop_utils def run(driver, config): driver.focus_game() driver.click(*config.SHOP_ICON) driver.wait(2) if not navigation.is_on_subscreen(driver): print("[shop_common] could not confirm shop opened, aborting without pressing further keys") return shop_utils.run_shop_tab( driver, config, tab_button=config.SHOP_TAB_COMMON, targets=config.COMMON_SHOP_TARGETS, balance_rect=config.CREDIT_BALANCE_OCR_RECT, currency_label="credits", ) driver.click(*config.SHOP_BACK_BUTTON) driver.wait(1.5) print("[shop_common] Done.")