feat(@projects): update civics objective with harvest policy and great works

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Natalie 2026-05-08 06:30:21 -07:00
parent 6bf021d0b3
commit b227980613
2 changed files with 9 additions and 5 deletions

View file

@ -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),

View file

@ -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);