From b227980613f68ca9dd03360dd2279c1fe2da5e65 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 8 May 2026 06:30:21 -0700 Subject: [PATCH] =?UTF-8?q?feat(@projects):=20=E2=9C=A8=20update=20civics?= =?UTF-8?q?=20objective=20with=20harvest=20policy=20and=20great=20works?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../p1-56-civics-buildings-and-great-works.md | 10 +++++++--- src/simulator/crates/mc-ai/src/rollout.rs | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.project/objectives/p1-56-civics-buildings-and-great-works.md b/.project/objectives/p1-56-civics-buildings-and-great-works.md index 14a10bd6..9c0d9e51 100644 --- a/.project/objectives/p1-56-civics-buildings-and-great-works.md +++ b/.project/objectives/p1-56-civics-buildings-and-great-works.md @@ -5,7 +5,7 @@ priority: p1 status: partial scope: game1 owner: simulator-infra -updated_at: 2026-05-07 +updated_at: 2026-05-08 evidence: - "src/simulator/crates/mc-city/src/great_works.rs:1 — static GreatWorkRegistry with 3/3 tests green over the 4 authored category JSONs (≥30 works)" - "src/simulator/api-gdext/src/civics.rs:1 — GdSpecialistRegistry / GdHarvestPolicyRegistry / GdGreatWorkRegistry / GdBuildingCivics; cargo build -p magic-civ-physics-gdext clean on apricot" @@ -128,11 +128,15 @@ Unit fields added (additive, optional): (Civ5 formula). `per_turn_from_buildings(defs)` sums `BuildingEffect::as_gpp` per-type from completed buildings. Exported from `mc-city::lib.rs`. Tests: 8/8 green (`cargo test -p mc-city --lib gpp` 8/8). -- [ ] `mc-city::Tile`: `harvest_policy: HarvestPolicyId` field. Per-turn +- [x] `mc-city::Tile`: `harvest_policy: HarvestPolicyId` field. Per-turn step applies `yield_multiplier`, `biome_quality_delta_per_turn`, `fauna_population_delta`, `flora_density_delta`. `remove_chop` is a one-shot terrain transform (consumes the tile's quality and fires a - one-time yield event). + one-time yield event). Implemented in `src/simulator/crates/mc-city/src/tile.rs` + (`WorkedTile` struct) and `src/simulator/crates/mc-city/src/harvest.rs` + (`apply_harvest_policy` + `tick_harvest_policy` + `ChopEvent`). + Tests: `harvest::tests` (11) + `tile::tests` (3) — 14/14 green locally + (`cargo test -p mc-city --lib harvest`, 2026-05-08). - [ ] `mc-city`: Great Work item registry loaded from `great_works/*.json`. Activation of a Great Person of class `great_writer` spawns one Great Work of Writing (era_authored matches GP tier), diff --git a/src/simulator/crates/mc-ai/src/rollout.rs b/src/simulator/crates/mc-ai/src/rollout.rs index ca56a9cb..475eb915 100644 --- a/src/simulator/crates/mc-ai/src/rollout.rs +++ b/src/simulator/crates/mc-ai/src/rollout.rs @@ -671,7 +671,7 @@ mod tests { sole.abstract_state.players[0].science = 0; sole.abstract_state.players[0].pop_total = 0; sole.abstract_state.players[0].happiness_pool = 0; - sole.abstract_state.players[0].force_rel = [0, 0, 0, 0]; + sole.abstract_state.players[0].force_rel = [0, 0, 0, 0, 0]; let sole_score_with_tech = sole.score_player(0); sole.abstract_state.players[0].tech_index = 0; let sole_score_no_tech = sole.score_player(0); @@ -684,7 +684,7 @@ mod tests { multi.abstract_state.players[0].science = 0; multi.abstract_state.players[0].pop_total = 0; multi.abstract_state.players[0].happiness_pool = 0; - multi.abstract_state.players[0].force_rel = [0, 0, 0, 0]; + multi.abstract_state.players[0].force_rel = [0, 0, 0, 0, 0]; let multi_score_with_tech = multi.score_player(0); multi.abstract_state.players[0].tech_index = 0; let multi_score_no_tech = multi.score_player(0);