design_attack

command
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

cmd/design_attack is the one-stop tool for authoring + verifying the per-unit `formula.json` consumed by the deploy pipeline. It walks the user through every unit in the strategy YAML — for each unit the user clicks 1 (point) or 2 (line) screen coordinates that the bot will then tap on its own.

ONE SIDE COVERS ALL FOUR. The user authors the formula for ONE corner (e.g. BottomRight). Combined with `target_edge: "Rotate"` in the strategy YAML and `formula.MirrorForCorner` in the orchestrator, the bot reflects the same authored attack onto all 4 corners (BR / BL / TR / TL) automatically. Use `-verify` to see the 2x2 mirror grid before running the bot.

Goal: replace the legacy corner-based pCfg.Edges / red-zone-detection / Duke-adjacent-override chain (which kept attacking in the corner and stacking heroes on the same pixel) with deterministic, user-pinned per-unit coordinates authored once and mirrored to all 4 sides.

Usage (author — click 1 or 2 points per unit, save):

go run ./cmd/design_attack \
    -live -strategy assets/strategies/auto_edrag_rush.yaml \
    -out assets/strategies/auto_edrag_rush_formula.json

Usage (verify — 2x2 grid of the formula mirrored to all 4 corners):

go run ./cmd/design_attack -live -verify auto_edrag_rush_formula.json

Usage (auto-pick from heuristics, no clicks):

go run ./cmd/design_attack -auto -live -strategy ... -out ...

Flags:

-screen <png>  : pre-saved battle PNG. Mutually exclusive with -live.
-live          : capture live from adb (adb exec-out screencap -p).
-device <s>    : adb device serial for -live. Empty = the only
                 connected device.
-strategy <y>  : strategy YAML (drives the unit list).
-out <f.json>  : output formula path. Required for author/auto modes.
-verify <f>    : load existing formula, show 2x2 4-corner mirror grid,
                 exit on keypress. Implies -screen or -live.
-auto          : skip clicks, derive coords from per-class heuristics.
-include-event : append _event_troop + _event_spell planned rows.
-target-edge   : override auto-pick target edge (right/left/top/bottom).

Author-mode keys: ENTER=commit, BACKSPACE/u=undo, c=clear, m=sub-line,

s=save+quit, q/ESC=quit-without-save.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL