magicciv/.project/objectives/p0-17-wild-creature-lair-loop.md
Natalie d65eb9524d feat(objectives): update wild creature objective status
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-17 05:18:54 -07:00

2.4 KiB

id title priority status scope owner updated_at evidence
p0-17 Wild creature and lair clearing loop p0 done game1 shipwright 2026-04-17
src/simulator/crates/mc-turn/src/gpu/fauna_encounter.wgsl
src/simulator/crates/mc-turn/src/processor.rs
src/game/engine/src/modules/ai/wild_creature_ai.gd
public/games/age-of-dwarves/data/units/
src/game/engine/scenes/tests/auto_play.gd
src/game/engine/src/autoloads/event_bus.gd
public/resources/ecology/fauna/land.json
.local/batches/autoplay_p017_v19/game_20260417_050121_seed*/turn_stats.jsonl

Summary

Full lair-clearing loop verified. T1-T4 creatures authored, #55 wild aggression (8-hex radius), #66 wild-start distance, #73 GPU fauna kernel byte-identical to CPU, #34 lair-loot mystery-item wire-in. lair_cleared EventBus signal declared in event_bus.gd and emitted from auto_play.gd::_try_attack_adjacent_lair when a lair is defeated in combat. Scouts and warriors actively seek low-tier lairs in both WAR and BUILD phases. 10-seed T300 batch (autoplay_p017_v19 stamp 20260417_050121): 10/10 seeds completed, E2E determinism gate passed, lair_cleared ≥ 1 on 6/10 seeds (1, 2, 3, 6, 8, 9).

Acceptance

  • ✓ Wild-aggression grace window — src/game/engine/src/modules/ai/wild_creature_ai.gd task #55 landed the 8-hex engagement + task #66 enforces ≥8-hex lair exclusion from capitals.
  • ✓ GPU fauna_encounter kernel byte-identical to CPU — kernel at src/simulator/crates/mc-turn/src/gpu/fauna_encounter.wgsl + parity tests passed on apricot/Vulkan (task #73).
  • lair_cleared EventBus signal — declared at event_bus.gd:78, emitted from auto_play.gd:_try_attack_adjacent_lair when defender_killed=true. Counter tracked in _lair_cleared_count, written to turn_stats.jsonl under aggregate.lair_cleared.
  • ✓ 10-seed T300 batch: batch autoplay_p017_v19 (stamp 20260417_050121) — 10/10 seeds produced turn_stats.jsonl, E2E gate 10/10 passed. lair_cleared ≥ 1 on seeds 1(2), 2(2), 3(1), 6(2), 8(1), 9(1) = 6/10 seeds ≥ required 5.
  • wilds.json + biome + tier as sole spawn source — lair_types array in public/resources/wilds/wilds.json drives spawning; habitat_abandon_turns=200 in land.json ensures lairs persist long enough for player engagement.

Non-goals

  • Tameable wild creatures (Game 2 race feature).
  • Lair faction behavior (neutral AI opponents in lairs).