fix(@projects/@magic-civilization): 🐛 resolve unit damage method calls

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Natalie 2026-04-25 04:49:49 -07:00
parent 480d04d4d2
commit cfb3b222eb
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,5 @@
{
"generated_at": "2026-04-25T09:35:33Z",
"generated_at": "2026-04-25T11:48:02Z",
"totals": {
"done": 70,
"in_progress": 1,

View file

@ -96,6 +96,11 @@ a foregone conclusion; the grid is the precondition.
ironhold 2/20 (10%) — every clan wins ≥1, no clan exceeds 50%.
Defensive `winner_personality` fallback in `auto_play.gd` (reads `AI_PIN_PERSONALITY_P{index}`
env when player.clan_id is empty) provides belt-and-suspenders for any future path missing a pin.
**Fresh-data confirmation (`matchup-grid-20260425_022810`, 50/50 games)**: pass: true, every clan
20 appearances, win rates: ironhold 10/20 (50%), blackhammer 6/20 (30%), goldvein 6/20 (30%),
deepforge 5/20 (25%), runesmith ~3/20. Ironhold went from "0% bug" → "50% real" with proper
per-slot pinning measurement, confirming the bug was harness-only (no balance change needed).
- 🔴 **`tools/huge-map-5clan.sh``ultimate_stress: PASS`** — BLOCKED: three root causes, all diagnosed; fixes landing 2026-04-25.
**Root cause 4 (fix landed 2026-04-25):** `combat_resolver.gd::_get_ranged_attack` and three `combat_preview.gd` callsites called `unit.get_damage()` and `unit.get_damage_resistance()` — methods that don't exist on `Unit`. The `unit.gd` only has `get_attack()` and `get_defense()`. Each game produced ~300 SCRIPT ERROR lines per game on huge-map runs (combat-heavy). Verified in `huge-map-5clan-20260425_021822/game_*_seed4/game.log`: 305 errors, primarily `Invalid call. Nonexistent function 'get_damage' in base 'RefCounted (Unit)'`. Fixed: changed all 4 callsites to `get_attack()` / `get_defense()`. Verification batch `p0-22-noerror-*` running on apricot.