$ show LmeSzinc/AzurLaneAutoScript
AzurLaneAutoScript (ALAS) is a Python-based game automation bot for the mobile game Azur Lane. It uses computer vision (OpenCV, template matching, OCR via cnocr/mxnet) and Android Debug Bridge (ADB) to control an emulator, automating nearly all gameplay loops: campaign sorties, daily missions, research, dormitory, guild operations, Operation Siren, and event-specific maps. The architecture is modular, with a core framework providing device abstraction (module/device), image recognition (module/ocr, module/map_detection), configuration management (module/config), and a web UI (module/webui) built on PyWebIO with an Electron wrapper. Campaign logic is organized into hundreds of per-event map scripts under campaign/, each defining map grids, enemy spawns, and battle strategies via a consistent CampaignBase subclass pattern. The system runs as a daemon, continuously executing scheduled tasks with configurable priorities and notifications (onepush, Discord). External dependencies include uiautomator2, adbutils, OpenCV, cnocr, mxnet, pywebio, and zerorpc, with pinned versions targeting Python 3.7. The codebase is actively maintained with frequent updates for new game events, but suffers from significant duplication across campaign files and reliance on outdated library versions.
The LLM identified 3 files worth highlighting for reuse:
Implements a priority-based filter system using a string syntax like '1L > 1M > 1E > 1C'. Parses filter strings into ordered lists of criteria and provides matching logic. Self-contained and reusable for any scenario requiring ranked selection from a set of items.
Provides Timer and TimerServer classes for managing cooldowns and intervals. Supports start, check, reset, and server-wide synchronization. Can be extracted for any application needing rate-limited operations or scheduled delays.
Implements a YAML-based configuration system with automatic reloading (ConfigWatcher), nested attribute access, and a merge/override mechanism for temporary config changes. Demonstrates a clean pattern for managing hierarchical settings with runtime overrides, reusable across projects.