Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Sim: refuse a site that is both a yishuv and a camp (Fixes #2599) (#2623)

Berib69e335769cc
diff --git a/changelog.d/2599-yishuv-camp-site.md b/changelog.d/2599-yishuv-camp-site.md
new file mode 100644
index 000000000..c22faa143
--- /dev/null
+++ b/changelog.d/2599-yishuv-camp-site.md
@@ -0,0 +1,4 @@
+### Fixed
+- The content loader now refuses a site whose kinds hold `yishuv` together with `military_camp` or `hakhshara`,
+ naming `sites.yaml` and the row's `kinds` (Fixes #2599). Such a site would share one built record, so building the
+ yishuv would also count as a built camp for its city. No shipped site has both kinds, so the game is unchanged.
diff --git a/docs/rules/mvp.md b/docs/rules/mvp.md
index ce27f636f..d1551a353 100644
--- a/docs/rules/mvp.md
+++ b/docs/rules/mvp.md
@@ -230,7 +230,7 @@ R-QUAL-007: Attention is that of the matching existing order (owner ruling 1): `
R-QUAL-008: Region-independent gdd-0.3 fixture helpers only (coordinator decision, 26 Oct 2026, Q5): a matching farmer/pioneer course may propose trained tier while retaining actual-work XP, veteran tier and every other record field. Cross-profession qualification is refused without mutation. This transform does not decide course eligibility, completion or release. Tools quotes read only Agreed `profession.farmer_tools` / `profession.pioneer_tools` (currently 3 / 5); no acquisition, charge, credit, refund or paid-flag change occurs. All helpers are internal and require an initialized exact-gdd-0.3 fixture. Money policy, once-only acquisition, lock-in policy, craftsman progression and production integration remain held with their owners. Tools stay a quote: the owner ruled the one-time tools charge post-MVP (3 November 2026, #1693 answer 1).
-R-SITE-004: Every designated site has one or more kinds from a fixed list: `yishuv`, `field`, `swamp`, `military_camp` and `hakhshara` (Phase 4, Q-FIELD-1, Q-SWAMP-1, Q-CAMP-3). A pioneer action is accepted only at a site of its kind; any other is refused with the state unchanged and the Attention refunded. A yishuv site has a founding date inside the MVP's years and no other kind has one. A camp site (`military_camp` or `hakhshara`) names a city of `cities.yaml`, the city it trains for (Q-CAMP-1), and no other kind names one. The loader refuses any other row, naming the file and field.
+R-SITE-004: Every designated site has one or more kinds from a fixed list: `yishuv`, `field`, `swamp`, `military_camp` and `hakhshara` (Phase 4, Q-FIELD-1, Q-SWAMP-1, Q-CAMP-3). A pioneer action is accepted only at a site of its kind; any other is refused with the state unchanged and the Attention refunded. A yishuv site has a founding date inside the MVP's years and no other kind has one. A camp site (`military_camp` or `hakhshara`) names a city of `cities.yaml`, the city it trains for (Q-CAMP-1), and no other kind names one. A yishuv site is never also a camp site (`military_camp` or `hakhshara`): the two would share one built record, so building the yishuv would count as a built camp for its city (#2599). The loader refuses that row and any other invalid one, naming the file and field.
R-SITE-005: At most one `yishuv` site sits in a hex, so a hex shows at most one new yishuv. A site of another kind may share a hex with a yishuv site, as a yishuv's field site does (Q-SITE-3).
diff --git a/sim/Statecraft.Sim.Tests/SitesContentTests.cs b/sim/Statecraft.Sim.Tests/SitesContentTests.cs
index a1596b03d..5ceea0466 100644
--- a/sim/Statecraft.Sim.Tests/SitesContentTests.cs
+++ b/sim/Statecraft.Sim.Tests/SitesContentTests.cs
@@ -206,6 +206,8 @@ public class SitesContentTests
new object[] { Second("[hakhshara]", " city: nowhere\n"), "sites[site_b].city", "unknown city 'nowhere'" },
new object[] { Second("[field]", " city: town_a\n"), "sites[site_b].city", "only a camp site has a city" },
new object[] { Second("[field]", " founded: 1949-06-12\n"), "sites[site_b].founded", "only a yishuv site has a founding date" },
+ new object[] { Site("kinds: [yishuv]\n founded: 1949-06-12\n", "kinds: [yishuv, military_camp]\n founded: 1949-06-12\n city: town_a\n"), "sites[site_a].kinds", "a yishuv site cannot also be a military_camp site (its built record is its built camp)" },
+ new object[] { Site("kinds: [yishuv]\n founded: 1949-06-12\n", "kinds: [hakhshara, yishuv]\n founded: 1949-06-12\n city: town_a\n"), "sites[site_a].kinds", "a yishuv site cannot also be a hakhshara site (its built record is its built camp)" },
};
[Theory]
diff --git a/sim/Statecraft.Sim/ContentLoader.cs b/sim/Statecraft.Sim/ContentLoader.cs
index 6589b86d7..30b02ebbb 100644
--- a/sim/Statecraft.Sim/ContentLoader.cs
+++ b/sim/Statecraft.Sim/ContentLoader.cs
@@ -1826,6 +1826,12 @@ namespace Statecraft.Sim
foreach (var k in CampKinds.Prepend(Projects.YishuvKind))
if (x.Kinds.Contains(k))
throw new ContentException(sf, at + ".kinds", $"a swamp site cannot also be a {k} site (its built record is its drained state)");
+ // R-SITE-004 (#2599): nor may a yishuv site be a camp site: they would share one built record, so building the yishuv
+ // would give the city the camp's facility (Training.HasFacility) without the camp action.
+ if (x.Kinds.Contains(Projects.YishuvKind))
+ foreach (var k in CampKinds)
+ if (x.Kinds.Contains(k))
+ throw new ContentException(sf, at + ".kinds", $"a yishuv site cannot also be a {k} site (its built record is its built camp)");
if (x.Kinds.Contains(Projects.YishuvKind))
{
// R-SITE-005 (Q-SITE-3): one yishuv per hex, so SettlementPlacer keeps one kit per hex; other kinds may share it.