Commit graph

9 commits

Author SHA1 Message Date
Natalie
27f4a4ea41 refactor(@projects/@magic-civilization): p3-18 — embark gate is data-driven per-player config, not hardcoded
P1 hardcoded the tech ids ("shipbuilding"/"ocean_navigation") in Rust — a Rail-2
violation (JSON is the canonical content store) and not single-source. Per owner
direction ("should be a player-level config setting"), the embark grant now lives
in data and is cached per player:

- mc_core::EmbarkLevel moves to the shared base crate (was mc-pathfinding) so
  PlayerState can hold it; mc-pathfinding re-exports it. Adds from_mechanic_key
  (the ONLY place the embark_* mechanic-key strings live).
- The naval techs carry the grant in JSON via unlocks.mechanics: shipbuilding →
  embark_coast, ocean_navigation → embark_ocean. Which tech grants embark is now
  authored data, not Rust.
- TechWeb::embark_level(researched) derives the strongest grant across a player's
  researched techs (None < Coast < Ocean).
- PlayerState gains a cached embark_level field; process_science recomputes it
  each turn from the researched set (idempotent → save-load / tech injection
  covered). The move handler reads the cache (no per-move tech parsing).

Tests: mc-core EmbarkLevel ordering + mapping; mc-tech embark_level method
(inline web) + a real-data guard that authored naval.json carries the mechanics;
mc-pathfinding 9/9 unchanged. All green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 04:40:14 -04:00
Natalie
88dffec277 fix(@projects/@magic-civilization): 🐛 reconcile dangling tech/unit content refs (data_integrity)
Tech unlocks + a unit tech-gate referenced ids absent from the loaded set:
- improvement renames (techs used stale ids): irrigation_channel→irrigation,
  stone_road→road, fortress→fort
- improvement refs with no existing target removed: orchard, aqueduct_channel,
  bridge, fishing_boats (no such improvement is authored)
- flight units (dwarf_gyrocopter/iron_hawk/mithril_hawk) exist + their unlock
  techs are in-scope, but weren't in the manifest's units subscription → added
- dwarf_master_engineer.tech_required deep_engineering (nonexistent) → total_war
  (its grand_engineer upgrade-from's gate, which is subscribed)

GUT: test_data_integrity 0 dangling refs (724 passing / 2 failing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 11:51:12 -04:00
Natalie
2442e93c23 feat(@projects/@magic-civilization): add hybrid building system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-06 16:57:39 -07:00
Natalie
e025a563cd feat(@projects/@magic-civilization): add hybrid structures module
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-05 10:47:56 -04:00
Natalie
e203bd1a09 feat(@projects): add tech-culture domain categorization system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-03 13:42:26 -04:00
Natalie
c76edd4c2f feat(@projects/@magic-civilization): add domain categorization system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-03 13:25:38 -04:00
Natalie
361d7e2808 feat(@projects): add era progression system with tech tree integration
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-03 13:19:58 -04:00
Natalie
9dd56517c5 feat(@projects): add clan personalities and tech updates
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-25 22:59:10 -07:00
Claude Code
6caea8d3ac feat(game-data): Implement comprehensive ecological simulation with biome systems, terrain definitions, and flora/fauna models
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-07 17:52:04 -07:00