35 lines
1.3 KiB
Python
35 lines
1.3 KiB
Python
"""Tactical Challenge Shop (戦術対抗戦) daily task. Ported from baas-reference
|
|
module/shop/tactical_challenge_shop.py's implement() -- see shop_utils.py for
|
|
the shared checkbox-grid-then-bulk-buy control flow both shop tabs use.
|
|
|
|
The reference reaches this tab via goto_shop_by_name's OCR swipe-search over
|
|
the shop-type tab list (module/shop/shop_utils.py), needed there because that
|
|
list can require scrolling. This account's tab list is only 7 entries and
|
|
fits on screen with no scrolling, confirmed live -- config.SHOP_TAB_TACTICAL
|
|
is a fixed click on the already-visible tab, not a shortcut around OCR (there
|
|
is nothing to search for)."""
|
|
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_tactical] could not confirm shop opened, aborting without pressing further keys")
|
|
return
|
|
|
|
shop_utils.run_shop_tab(
|
|
driver, config,
|
|
tab_button=config.SHOP_TAB_TACTICAL,
|
|
targets=config.TACTICAL_SHOP_TARGETS,
|
|
balance_rect=config.TACTICAL_COIN_OCR_RECT,
|
|
currency_label="tactical coin",
|
|
)
|
|
|
|
driver.click(*config.SHOP_BACK_BUTTON)
|
|
driver.wait(1.5)
|
|
print("[shop_tactical] Done.")
|