feat/leech-chaining · PurpleFuchs · 7 Dateien · +464 −21 · 2026-10-27
Implements card b09805 (3 Kai-coordinated parts; analyst CONFIRMED with flags, all addressed).
1) Chaining — a leech now anchors to the nearest DarkPyramid A/B/C or an already-anchored PyramidLeech within PyramidLeechRadius:
- Candidates must themselves be anchored -> anchor edges always point into resolved nodes, chains structurally cannot cycle (DAG invariant) + defensive MAXCHAINHOPS=32.
- Equal-distance ties prefer a real pyramid (avoids pointless chains).
- Anchors are frozen (no re-resolve while valid); dead/unanchored anchors clear and re-scan.
- Drain walks the chain live to the root pyramid each tick and stacks UpdateSkips there (multi-drain already worked via counter). Dead hop -> 'NoAnchor', produces nothing.
- New MachineData: LeechAnchorPosition / LeechAnchorName / LeechAnchorIsPyramid; LeechTargetName = root pyramid; LeechTargetDistance = anchor-link distance.
2) Overlay — new LeechRangePreview layer (TowerRangePreview pattern, lists rebuilt per rebake so anchor relations read live; no Make/Add/Remove wiring needed): orange leech radii, purple pyramid anchor circles, yellow chain lines leech->anchor. While placing a PyramidLeech the ghost shows its radius — blue when anchorable, red when not. 'LeechRange' toggle in Overlays STANDARDTOGGLES; UpdateCanvas wired at TowerRangePreview's three call sites in Game.lua.
3) Details tab — PyramidLeech CW shows Wired status + Anchor name/kind (Pyramid|Leech) next to existing Target/Power/Skips; new locale keys EN+DE. Soft placement: unanchored leech stays legal and produces nothing.
Verified: luajit per-file + lovec .syntaxchk 4055 OK / 0 ERR.
| Source/Data/Locale/English.lua | geändert | +6 −0 |
| Source/Data/Locale/German.lua | geändert | +6 −0 |
| Source/GuiElements/ConfigWindows/PyramidLeech/DrawDetailsTab.lua | geändert | +11 −0 |
| Source/Objects/Gui/Overlays.lua | geändert | +15 −0 |
| Source/Objects/MapData/LeechRangePreview.lua | neu | +303 −0 |
| Source/Objects/SolarClock.lua | geändert | +117 −21 |
| Source/Stages/Game.lua | geändert | +6 −0 |