docs(@projects/@magic-civilization): 📝 p3-18 — mark P1b/P2/P3 done (embark functional end-to-end)

Records the landed phases: data-driven embark config (player-level setting),
Civ-VI auto-embark + embarked combat penalty, and AI water-pathing. Remaining:
explicit-action cleanup, transport (P4), GDScript mirror (P5), end-to-end
conquest demo (P6).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-25 05:01:17 -04:00
parent 6cd5abb210
commit efff773c97

View file

@ -52,13 +52,24 @@ two-tier Civ model on the existing tree (`public/resources/techs/naval.json`):
`mc-pathfinding` `embark_gates_land_on_water_by_level` +
`ocean_embark_lets_a_land_unit_cross_an_ocean_strip` (9/9 green); mc-turn suite
green (None default preserves behaviour). Commit pending.
- [ ] **P2 — embarked combat.** Wire `embarked_defence_penalty` at the resolve
site: a land defender on a water tile fights at halved defence. Parity test
(predict vs resolve) + a unit test.
- [ ] **P3 — AI water-pathing.** The tactical movement passable-set
(`mc-ai/tactical/movement.rs`) includes water when the unit's player can embark,
so the frontier-seek / march cross water. Self-play test: cross-water first
contact / conquest now reachable (extends `ai_self_play_first_contact.rs`).
- [x] **P1b — data-driven config (owner: "player-level config setting").**
Embark grant is authored data, not hardcoded Rust: naval techs carry it via
`unlocks.mechanics` (`shipbuilding``embark_coast`, `ocean_navigation`
`embark_ocean`); `TechWeb::embark_level(researched)` derives the level;
`PlayerState::embark_level` caches it (recomputed each turn in
`process_science`). `mc_core::EmbarkLevel::from_mechanic_key` is the only place
the keys live. Tests: mc-core mapping, mc-tech method + real-data guard. Commit
`ff4961721`.
- [x] **P2 — embarked combat (Civ-VI auto-embark).** ✅ A land unit that ends its
move on water auto-embarks (`process_one_move` sets `MapUnit::is_embarked`);
`CombatParams::defender_is_embarked` halves defence via the canonical
`embarked_defence_penalty` in `resolve`. Test `embarked_defender_takes_more_damage`;
mc-combat 146 + mc-turn 248 green. Commit `4ccce168c`.
- [x] **P3 — AI water-pathing.**`TacticalState::embark_level` (projected from
`PlayerState`) drives `passable_hexes(map, embark)` — water opens to the AI per
the embark tier (mountains/volcano/ice stay blocked). So a teched frontier /
capital-march army paths across water. Tests `embark_opens_water_for_passability`
+ `embark_never_opens_non_water_impassables`; mc-ai 287 green. Commit `6b41b07f4`.
- [ ] **P4 — transport load/carry/unload.** Implement the `transport` keyword:
load adjacent land units (≤ capacity) onto a transport ship, they move with it,
unload onto adjacent land. Carried units protected. Unit tests.