No description
Find a file
autocommit 0ed21945c1 refactor(mc-state): 🏗️ Phase 3b — move GameState into mc-state behind a shim
p2-65 foundation milestone. `game_state.rs` (1356 lines: GameState +
PlayerState + MapUnit + TechState + PendingCaptureEvents + 8 action-request
structs + RallyCommand/BuildingRallyPoint/CityEcology + custom serde helpers)
relocated from mc-turn to mc-state. Decouples the canonical full-simulation
state shape from the turn-step mutation logic (Rail 1 cleanup).

- `git mv mc-turn/src/game_state.rs → mc-state/src/game_state.rs`; mc-turn's
  `game_state.rs` is now `pub use mc_state::game_state::*;` so all ~30 consumer
  sites (mc-ai, mc-player-api, mc-mod-host, api-gdext, mc-sim, mc-replay) +
  mc-turn's lib.rs `pub use game_state::{GameState,…}` re-export resolve
  unchanged for one cycle (Phase 4 sweeps them).
- Re-paths inside the moved file: `crate::combat_balance::CombatBalance` →
  `mc_core::CombatBalance` (the only non-sibling code ref); the 5
  sibling-module field types (ransom/capture/patrol/combat_event) resolve as
  `crate::` since they're now co-located in mc-state. Broken `[crate::…]`
  intra-doc links demoted to plain `mc_turn::…` backtick prose.
- `PendingCaptureEvents::drain_into` peeled off into the mc-turn-local
  `DrainCaptureEvents` extension trait (`capture_drain.rs`): it embeds
  `mc_replay::TurnEvent` + `mc_turn::combat_event::TurnResult`, neither movable
  to the data crate without a cycle. Local-trait-for-foreign-type, orphan-rule
  legal. 4 call sites (processor.rs + 3 tests) add the trait `use`.

SAVE-FORMAT GATE (the byte-identical proof): mc-turn serde_roundtrip 6/6 +
full_turn_golden 3/3 green — assembled GameState round-trips identically
post-move (serde shapes invariant; module paths were never on disk).

Parity (apricot): workspace --no-run exit 0; mc-state 12/12 (8 + the 4
game_state unit tests that moved with the file); mc-turn lib 234/234
(1 ignored, pre-existing — was 238 before the 4 moved out); mc-ai 268/268;
mc-player-api 126/126.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 19:16:00 -07:00
.ai-arena-test
.forgejo
.out-of-scope
.project docs(p1-29j): 📋 File autoplay→Rust action-application objective (p1-29d unblock) 2026-06-04 19:00:19 -07:00
docs
drafts
engine/addons/magic_civ_physics
public feat(combat): add lair Assault/Raid/Siege mode picker on lair engagement 2026-06-04 18:17:38 -07:00
screenshots
scripts chore(scripts): add reusable UI-proof capture under weston on the RUN host 2026-06-04 18:17:47 -07:00
src refactor(mc-state): 🏗️ Phase 3b — move GameState into mc-state behind a shim 2026-06-04 19:16:00 -07:00
tooling feat(sprites): OSS standin coverage p2-23..27 (536 PNGs) + xi-v11 charter 2026-06-04 04:40:14 -07:00
tools docs(objectives): wave-1 status flips + index regen + new specs + tooling 2026-06-04 04:40:40 -07:00
.claude
.env
.env.example
.gdlintrc
.gitignore chore(gitignore): 🔧 add missing .cache/ pattern to ignore build artifacts 2026-06-03 05:44:01 -07:00
.gutconfig.json
.mcp.json
.pnpmfile.cjs
aod_bears_retiered.png
aod_canines.png
aod_canines_retiered.png
aod_evolution_map_default.png
aod_felids_retiered.png
aod_freefolk_dwarves.png
aod_lens_canines.png
aod_lens_canines_2.png
aod_lens_canines_scrolled.png
aod_lens_canines_t8.png
aod_lens_default.png
aod_raptors_retiered.png
aod_snapshot.md
calc-mountain-king-vs-apex.png
CLAUDE.md
climate-fix-check.png
climate-sim-1.png
climate-sim-2.png
climate-sim-3.png
climate-sim-4.png
climate-sim-check.png
climate-sim-final.png
climate-sim-fixed.png
early-access-bottom.png
early-access-current.png
early-access-updated.png
earth-42vh.png
earth-charts-visible.png
earth-fixed.png
earth-normal-mode.png
earth-scrolled-down.png
earth-scrolled-stats.png
earth-scrolled.png
earth-with-stats.png
enc-arctic-fox-modal.png
enc-arctic-fox.png
enc-audit-home.png
enc-combat-filter.png
enc-concept-modal.png
enc-first-forge.png
enc-fox-stats.png
encyclopedia-302-clean.png
encyclopedia-after-reload.png
encyclopedia-alias-glob.png
encyclopedia-detail-bottom.png
encyclopedia-detail-combat.png
encyclopedia-embedded.png
encyclopedia-full-page.png
encyclopedia-populated.png
encyclopedia-registry-working.png
encyclopedia-registry.png
encyclopedia-restarted.png
encyclopedia-search-warrior.png
encyclopedia-warrior-modal.png
evolution-aquatic-insects.png
evolution-arachnids.png
evolution-canines.png
evolution-frogs-toads.png
export_presets.cfg
full-game-final.png
full-game-page-bottom.png
full-game-page-bottom2.png
full-game-page-updated.png
gdformatrc
gdlintrc
lairs-filter-bar.png
lairs-page-tierrange.png
mcp_climate_sim.png
mcp_climate_sim_t10.png
mcp_dev_sprites.png
mcp_expansions.png
mcp_home.png
mcp_home_after_race_gate.png
mcp_populations.png
mcp_prod_after_feature_fix.png
mcp_prod_build_home.png
mcp_promotions.png
mcp_resources.png
mcp_wave_b_c_d_home.png
nogui-final.png
permutations-default.png
permutations-light-melee-filter.png
personality-axes-page-v2.png
personality-axes-page.png
pnpm-lock.yaml
pnpm-workspace.yaml
README.md
run
sheets-page.png
sheets-skeleton.png
sim-30s.png
sim-after-10s.png
sim-after-90s.png
sim-after-fix.png
sim-after-wait.png
sim-check.png
sim-check2.png
sim-complete.png
sim-debug.png
sim-done.png
sim-earth-check.png
sim-equal-split.png
sim-final-layout.png
sim-final.png
sim-initial.png
sim-layout-check.png
sim-layout-check2.png
sim-layout-check3.png
sim-layout-final.png
sim-layout-verify.png
sim-loading.png
sim-nostart.png
sim-now.png
sim-playback.png
sim-playing.png
sim-progress-2.png
sim-streaming.png
spritegen.db
ss

Magic Civilization

Fantasy 4X turn-based strategy game in Godot 4 + Rust, hex grid.

Game 1 — "Age of Dwarves" (current Early Access): single race (Dwarves), 5 AI-only clan personalities the player can face as opponents (Ironhold, Goldvein, Blackhammer, Deepforge, Runesmith), no magic mechanics, mundane tech only. Full 4X loop (cities, tech tree, wonders T1-T10, combat, wild creatures, domination victory). High-tier items and late-game wonders carry ancient/inexplicable flavor as Game 2 teasers — effects remain strictly mundane numeric bonuses.

Game 2 — "Age of Kzzykt" (future): adds magic, ley lines, Archons, spells, Ascension victory, more races. Eventual vision includes 16 races and 5 magic schools (Civ5 + Master of Magic + Magic: The Gathering color pie).

Structure

engine/          — genre-agnostic game engine (GDScript)
  src/           — autoloads, entities, map, generation, modules, rendering
  scenes/        — Godot scenes (.tscn + .gd)
  docs/          — engine architecture docs

games/
  age-of-dwarves/   — fantasy game pack (the default theme)
    data/        — all JSON game content
    assets/      — sprites, icons
    docs/        — game design docs (combat, economy — spells/races are Game 2 scope)

guide/           — player guide web app (React/TypeScript)
  engine/        — @magic-civ/guide-engine (shared components)
  age-of-dwarves/   — guide pages for Age of Dwarves

packages/
  engine-ts/     — @magic-civ/engine-ts (auto-generated climate simulation)

tools/           — sprite generation, transpiler, screenshot capture

Docs

Engine (engine/docs/)

Doc Covers
ARCHITECTURE.md Project structure, autoloads, scene lifecycle
ABSTRACTION.md Genre-agnostic vocabulary, theme pack system
DATA_FORMAT.md JSON data schemas, DataLoader patterns

Game Design (public/games/age-of-dwarves/docs/)

Doc Covers
RACES.md 4 demo races, gendering, fusions, release schedule
ECONOMIC_SYSTEMS.md Economy, civic axis, capitalism cascade
GOVERNMENTS.md Government types and mechanics
GLOSSARY.md Term definitions
COMBAT_SYSTEM.md Combat mechanics (written when M8 is built)
military/COMMUNICATIONS.md Comms tiers, first-contact, courier envelopes, perceived state, war-dec semantics
SPELL_SYSTEM.md Spell/mana system (written when M9 is built)
ERA_SYSTEM.md Era progression (written when needed)

Build Process (.project/)

Doc Covers
ROADMAP.md Demo scope + 12-phase build sequence
FEATURE_GAP.md New systems beyond the reference implementation
tasks/m0-m4/ Milestone task lists with porting checklists

Quick Start

./run play          # Launch the game
./run editor        # Open Godot editor
./run lint          # gdlint engine/src/
./run test          # GUT tests headless
pnpm dev            # Serve the player guide