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: GDD Phase 4 PR 5, dry swamp at the Hula; hula_drainage fires only while the works are in progress (Fixes #789) (#968)

Bericadf2b3b47f0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c24fe27f..0b57e1137 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,14 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
## [Unreleased]
+### Added
+- Pioneers can drain the Hula swamp: `PioneerWork(unit, dry_swamp, site)` at the new `hula` swamp site takes 12 turns
+ and IL 4m (labelled design values, Q-SWAMP-1), and once drained the Hula field site in its hex can be plowed
+ (refs #789; GDD Phase 4 PR 5, R-SWAMP-001). The `hula_drainage` card now has `site: hula`: in the GDD loop it fires only
+ while the player's works at the Hula are in progress (R-SWAMP-002, Q-SWAMP-2); its text, options and sources are
+ unchanged. The reference player drains no swamp, so the card no longer fires in its run and `hash1952` and `mvp-end`
+ move (docs/determinism.md). The loader refuses a swamp site that is also a field, yishuv or camp site.
+
### Fixed
- The Unity golden checks play every golden in `sim/Statecraft.Sim.Tests/golden/manifest.txt` (`hash1950`, `hash1952`,
`smoke5`, `mvp-end` and each scenario), not only the 1950 and 1952 runs: one EditMode test and `GoldenCheck` (`-golden`,
diff --git a/content/events/hula_drainage.yaml b/content/events/hula_drainage.yaml
index 7838333a3..7cac0e04d 100644
--- a/content/events/hula_drainage.yaml
+++ b/content/events/hula_drainage.yaml
@@ -10,6 +10,9 @@ office: prime_minister
# 5 March 1951; the notes give 7 March for Riley's request, and both dates are recorded here.
from: 1951-03-07
to: 1951-05-18
+# R-SWAMP-002 (Q-SWAMP-2, owner, 17 October 2026, #782): the card is about works in progress, so in the GDD loop it fires
+# only while the player's works at the Hula swamp site are in progress. Text, options and sources are unchanged.
+site: hula
options:
- id: continue_works
text: Continue the works and assert Israel's rights in the zone
diff --git a/content/rules.yaml b/content/rules.yaml
index 1bf7dc03a..6f42f2f8c 100644
--- a/content/rules.yaml
+++ b/content/rules.yaml
@@ -45,6 +45,11 @@ mvp:
# month's national need; plowing takes the recruit-training pair, the smallest project-sized values in the code.
plow_fields_turns: 3 # DESIGN VALUE: owner-set balance, not a historical figure (D-D10, Q-FIELD-3: turns plowing takes)
plow_fields_cost: 0.5 # DESIGN VALUE: owner-set balance, not a historical figure (D-D10, Q-FIELD-3: IL millions, paid at the start)
+ # Dry swamp (R-SWAMP-001; D-D6, Q-SWAMP-1). Proposed by an agent under "Agents propose design values" (owner,
+ # 15 October 2026, #375) and taken by the owner with the plan's other recommendations (17 October 2026, #782): twice
+ # the yishuv build's pair, for the largest land work in the MVP. The owner may override them.
+ dry_swamp_turns: 12 # DESIGN VALUE: owner-set balance, not a historical figure (D-D6, Q-SWAMP-1: turns draining the Hula takes)
+ dry_swamp_cost: 4 # DESIGN VALUE: owner-set balance, not a historical figure (D-D6, Q-SWAMP-1: IL millions, paid at the start)
field_food_per_turn: 1 # DESIGN VALUE: owner-set balance, not a historical figure (D-D10, Q-FIELD-3: Food units a plowed field adds each turn)
objective_points: 100 # DESIGN VALUE: owner-set balance, not a historical figure (D-B6: points per objective)
objective_bonus_per_month: 5 # DESIGN VALUE: owner-set balance, not a historical figure (D-B2: points per month early)
diff --git a/content/schema/event.schema.json b/content/schema/event.schema.json
index d3c677800..845c30cdf 100644
--- a/content/schema/event.schema.json
+++ b/content/schema/event.schema.json
@@ -76,6 +76,7 @@
"anchor": { "enum": ["hard", "soft"], "description": "Default soft. A hard anchor needs a historical option." },
"office": { "$ref": "#/definitions/id", "description": "The office the event goes to when the player does not answer." },
"objective": { "$ref": "#/definitions/id", "description": "The objective (objectives.yaml) whose completion card this is. It fires only once that objective is completed, and has exactly one option." },
+ "site": { "$ref": "#/definitions/id", "description": "A swamp site (sites.yaml) whose works this event is about. In the GDD loop it fires only while that site is being worked; the legacy loop ignores it." },
"from": { "$ref": "#/definitions/date", "description": "First day of the window." },
"to": { "$ref": "#/definitions/date", "description": "End of the window (exclusive). Leave out for an open window." },
"conditions": {
diff --git a/content/sites.yaml b/content/sites.yaml
index 9ceb35829..56de20eed 100644
--- a/content/sites.yaml
+++ b/content/sites.yaml
@@ -1,16 +1,17 @@
# GDD v0.1 designated sites (docs/GDD.md "Pioneer work": building is allowed only at designated spots, and a new yishuv
# takes its site's name). Phase 1 had one site (owner decision D-A4; the owner chose Mefalsim on #378, 14 October 2026).
# Phase 4 PR 1 (#785) adds the MVP's other yishuv sites, Beit Kama, Re'im and Gilat (Q-SITE-1, owner, 17 October 2026, #782:
-# "take all of the plan's recommendations"), and a field site in each yishuv's hex (Q-FIELD-1). The Hula swamp site waits
-# for the owner (#785). Research for the three: research_notes/GDD objectives/settlements-1949-51.md, rows
-# 22, 23 and 25. Their sources carry that note's checked date (14 October 2026); no person has re-read them since, so the
-# rows stay draft.
+# "take all of the plan's recommendations"), and a field site in each yishuv's hex (Q-FIELD-1). Research for the three:
+# research_notes/GDD objectives/settlements-1949-51.md, rows 22, 23 and 25. Their sources carry that note's checked date
+# (14 October 2026); no person has re-read them since, so the rows stay draft.
# Phase 4 PR 3 (#787) adds the two camp sites (Q-CAMP-2, owner, 17 October 2026, #785: "Both"): Camp 80 near Pardes Hanna
# and Tzrifin, both military camps (owner, "Both military", 17 October 2026, #927). Research: research_notes/gdd-phase-4-sourcing.md, rows C1 and C4, and the research recorded on #785
# (issuecomment-6233553842 and the camp-site gaps, issuecomment-6237625295). Their sources carry the checked date of the
# note or comment that read them (15 or 17 October 2026). Only AI agents have read them (the note's pass and the #785
# research); no person has, so the rows stay draft, and a person verifies them before release (owner, "OK for draft rows",
# 17 October 2026, #927; the #570 "verify later" rule).
+# Phase 4 PR 5 (#789) adds the Hula swamp site and the field site its drainage gives (Q-SWAMP-1, owner, 17 October 2026,
+# #782; Q-SWAMP-3, "Allow as planned", owner, 17 October 2026, #789).
# The yishuv rows are sourced facts. The field rows are design placements, not facts (Q-FIELD-1). The build turns and cost
# are labelled design values in rules.yaml mvp: (Q-CUT-1, owner, 15 October 2026; R-LOOP-005). The loader reads this file
# only when eras.yaml systems.loop is gdd. Research: #459, research_notes/GDD objectives/designated-site-1.md.
@@ -216,3 +217,43 @@ sites:
# the Givati Brigade in 1948.
- { url: "https://soil-remediation.co.il/wp-content/uploads/2019/06/%D7%A1%D7%A7%D7%A8-%D7%96%D7%99%D7%94%D7%95%D7%9D-%D7%A7%D7%A8%D7%A7%D7%A2-2016.pdf", checked: 2026-10-17 }
status: draft
+ - id: hula
+ name: Hula swamp
+ # For the native reviewer (#564): "the Hula swamps", the place the works drain; the site names nothing but the drainage's
+ # target (Q-SWAMP-3).
+ name_he: ביצות החולה
+ # The swamp hex: in the 1946 Survey of Palestine 1:250,000 map the marsh fills the valley north of Lake Hula, with "Hula
+ # Conces. Area" printed in it, and (14, 3) is the one hex it makes mostly wet; the lake itself is about a fifth of a hex
+ # (research_notes/Map/historical-water-1948.md, findings 6 and 7, and section 2.5). No 1948 settlement in the hex. No
+ # yishuv site may share it: a yishuv there would also gate hula_field (Projects.YishuvToBuildFirst). The one site stands
+ # for the concession's works, of which the 1951 DMZ dispute was the Jordan work below the lake.
+ q: 14
+ r: 3
+ kinds: [swamp]
+ # Q-SWAMP-1: one swamp site, the Hula, sourced to the hula_drainage event's own sources, which date the works to 1951 and
+ # place them under the Palestine Land Development Company's concession. Q-SWAMP-3 (Task 5.0 criterion 4; owner, "Allow
+ # as planned", #789): the site text names only the drainage, as the event does. The factual brief on #789
+ # (issuecomment-6233554138) records Arab and Ghawarna villages around the marsh, al-Salihiyya depopulated on 25 May
+ # 1948; any card text that names a depopulated place goes through D-F1 review. [GAP] No overlay of this hex with a
+ # sourced 1948 village or cadastral map has been done. The sources keep the event's checked date; no person has
+ # re-read them for this row, so it stays draft.
+ sources:
+ # FRUS 1951 v.V doc 288: the works begun about 14 February 1951 under the Hula concession, and their reach into the
+ # demilitarised zone.
+ - { url: "https://history.state.gov/historicaldocuments/frus1951v05/d288", checked: 2026-10-10 }
+ # JTA: Israel resumes the drainage of the Huleh swamps.
+ - { url: "https://www.jta.org/archive/israel-resumes-drainage-of-huleh-swamps-syria-concentrates-troops-situation-tense", checked: 2026-10-10 }
+ status: draft
+ - id: hula_field
+ name: Hula fields
+ # For the native reviewer (#564): "the fields of the Hula".
+ name_he: שדות החולה
+ # Design placement (Q-SWAMP-1, Q-FIELD-1, owner, #782), not a historical field: drained, the Hula becomes one field site,
+ # in the swamp's hex, ready once the swamp is drained (R-SWAMP-001). No new place and no new fact: the source is the
+ # swamp site's.
+ q: 14
+ r: 3
+ kinds: [field]
+ sources:
+ - { url: "https://history.state.gov/historicaldocuments/frus1951v05/d288", checked: 2026-10-10 }
+ status: draft
diff --git a/docs/RELEASING.md b/docs/RELEASING.md
index 2e9196d69..317157cb5 100644
--- a/docs/RELEASING.md
+++ b/docs/RELEASING.md
@@ -20,7 +20,7 @@ GitHub Releases page (and, from M4, on itch.io). Steps 1–3 are a normal pull r
git checkout -- unity/Assets/Settings unity/ProjectSettings/ProjectSettings.asset
golden_expect=(); while read -r name hash; do [[ -z "$name" || "$name" == \#* ]] || golden_expect+=(--expect "GOLDEN OK $name $hash"); done < sim/Statecraft.Sim.Tests/golden/manifest.txt
# one GOLDEN OK line per manifest golden (#394), e.g. "GOLDEN OK hash1950 7cf678b6b2b3d55dc0fee7b2efdee9ec7688cdf18964dcaa6e5a7c0018e34a51"
- # and "GOLDEN OK hash1952 9496947232f0c97ed21c0a0b98e6727e7d59c892f9aff12049b5d7e5ee2230e8"
+ # and "GOLDEN OK hash1952 f9f47f5c783b7dc8d6f47e5e3e048de5899d79e6d55614ee8e6f0331d0fb3cd5"
uv run tools/web_check.py unity/Builds/Web-gzip --query "golden&smoke=5" "${golden_expect[@]}" \
--expect "SMOKE OK 5 turns 1948-10-15 3005405d64abc6e7418fa1f0d35c36ce5f64ed3af7c5a4c24a73d5dfdb16121f"
uv run tools/web_check.py unity/Builds/Web-gzip --startscreen new --timeout 300 --stall 90
diff --git a/docs/WRITING_EVENTS.md b/docs/WRITING_EVENTS.md
index cc5237bed..cb8f88e78 100644
--- a/docs/WRITING_EVENTS.md
+++ b/docs/WRITING_EVENTS.md
@@ -41,6 +41,7 @@ schema too, or that test fails. Keep the comment when you copy a file.
| `requires` | no | Fires only after every listed requirement holds. See below. |
| `variants` | no | `kind: reconvergence` only. Course-specific title and text, each with `when`, `text`, optional `title` and `sources` (R-ALT-010). See "kind". |
| `objective` | no | Makes the event the completion card of an objective in `objectives.yaml`, which must name this event as its `card`. It fires only once the objective is completed (GDD loop only), and has exactly one option. See `docs/gdd/objective-card.md`. |
+| `site` | no | A swamp site in `sites.yaml` whose works the event is about. In the GDD loop it fires only while that site is being worked (R-SWAMP-002); the legacy loop ignores it. See `docs/gdd/fields-and-swamps.md`. |
| `options` | yes | One or more options. See below. |
| `sources` | no by the loader, yes by the rules | A list of `{ url, checked }`. See below. |
| `status` | no (default `draft`) | The review status. See below. |
@@ -348,6 +349,8 @@ Errors are printed as `file: field: message`. These are the messages you are mos
| `unknown objective` | `objective` names an objective that is not in `objectives.yaml`. |
| `has another card` | `objective` names an objective whose `card` is a different event. |
| `an objective's card has exactly one option` | An objective's card has more than one option. |
+| `unknown site` | `site` names a site that is not in `sites.yaml` (GDD loop). |
+| `is not a swamp site` | `site` names a site whose kinds do not include `swamp` (GDD loop). |
| `must be a list` | A list field (such as `tags:`) written with no value. |
| `an event cannot require itself` | `requires[n].event` is the event's own id. |
| `requirements form a cycle` | Event A needs B and B needs A, directly or through others. |
diff --git a/docs/determinism.md b/docs/determinism.md
index ff27d4375..eb2e9a921 100644
--- a/docs/determinism.md
+++ b/docs/determinism.md
@@ -29,8 +29,8 @@ final `GameState.Hash()` is pinned:
| Run | Ends | Hash |
|---|---|---|
| to 1950-01-01 (`Hash1950`) | 1950-01-15, turn 20 | `7cf678b6b2b3d55dc0fee7b2efdee9ec7688cdf18964dcaa6e5a7c0018e34a51` |
-| to 1952-01-01 (`Hash1952`) | 1952-01-15, turn 44 (the game's end) | `9496947232f0c97ed21c0a0b98e6727e7d59c892f9aff12049b5d7e5ee2230e8` |
-| to the game's end (`mvp-end`) | 1952-01-15, turn 44 | `9496947232f0c97ed21c0a0b98e6727e7d59c892f9aff12049b5d7e5ee2230e8` |
+| to 1952-01-01 (`Hash1952`) | 1952-01-15, turn 44 (the game's end) | `f9f47f5c783b7dc8d6f47e5e3e048de5899d79e6d55614ee8e6f0331d0fb3cd5` |
+| to the game's end (`mvp-end`) | 1952-01-15, turn 44 | `f9f47f5c783b7dc8d6f47e5e3e048de5899d79e6d55614ee8e6f0331d0fb3cd5` |
`hash1952` stops at the first turn on or after 1 January 1952, which is the game's last turn, so it is the same run as
`mvp-end` (`DeterminismTests.TheWholeGameToItsEndIsFixed`). Both names are kept (spec 2026-10-12 section 3 step 6): a
@@ -284,3 +284,5 @@ The hash reads the state keys, so it never sees a record outside its window. An
| GDD Phase 3 PR 3 | scenario-cautious | `6507ddc3` | the housing rules: `city{}`, `housing`, `morale`, its two links and stability (was `28fd1405`) |
| GDD Phase 3 PR 3 | scenario-reckless | `8041988a` | same (was `af7b2abd`) |
| GDD Phase 3 PR 3 | scenario-mvp-absorb-first | `a77a8f20` | same (was `b16a8740`) |
+| GDD Phase 4 PR 5 | 1952 | `f9f47f5c` | dry swamp and the Hula event (R-SWAMP-001, R-SWAMP-002, #789), rebased on the housing condition (#855) and the alternate-timeline stack (#960, #966, #972): `hula_drainage` now fires only while the player's works at the Hula swamp site are in progress, and the reference player drains no swamp, so the card leaves `fired[]` and `chosen{}` (it fired on 1951-03-15 with `continue_works`). Without that choice's effects security ends at 0.5061 (was 0.5361) and intl_standing at 0.83 (was 0.78), which moves morale (0.4916, was 0.4946) and stability (0.4432, was 0.4487) through the effects web (was `94969472`) |
+| GDD Phase 4 PR 5 | mvp-end | `f9f47f5c` | same; the same run as hash1952 (was `94969472`) |
diff --git a/docs/gdd/fields-and-swamps.md b/docs/gdd/fields-and-swamps.md
index 9737681e2..c2537840f 100644
--- a/docs/gdd/fields-and-swamps.md
+++ b/docs/gdd/fields-and-swamps.md
@@ -2,7 +2,7 @@
## Player story
-As a player of the MVP, I want to send a group of halutzim to plow the fields of a yishuv I have built, so that the land adds a little Food to the national stock every turn (GDD "Pioneer work", "Prepare agricultural land" [S1]; decision D-D10 [S2]).
+As a player of the MVP, I want to send a group of halutzim to plow the fields of a yishuv I have built, so that the land adds a little Food to the national stock every turn (GDD "Pioneer work", "Prepare agricultural land" [S1]; decision D-D10 [S2]). I also want to send them to drain the Hula swamp, so that its land becomes a field I can plow, and so that the 1951 card about the drainage works comes only when my works are there (GDD "Pioneer work", "Dry swamp" [S1]).
## Rules
@@ -14,31 +14,40 @@ As a player of the MVP, I want to send a group of halutzim to plow the fields of
- A plowed field needs no workers (`Q-FIELD-2` [S3]). Each turn, in the turn's sixth step, after the cities' production, it adds 1 unit of Food to the national stock, one population unit's food for a month (R-FIELD-002, `Q-FIELD-3` [S3]).
- The effect is small on purpose: the nation eats 650 to 1,400 units of Food a turn over the MVP, so one field is about 0.1% of a month's need (`Q-FIELD-3` [S3]). In a turn with imports the import only tops the stock up by less; the field shows in the stock when foreign currency is exhausted and nothing is imported.
- The reference player of the goldens plows the lowest-id ready field once every yishuv site is taken, before any camp site (D-A7).
+- The MVP has one swamp site, the Hula, at the swamp hex `(14, 3)`, sourced to the `hula_drainage` event's sources; its name names only the drainage (`Q-SWAMP-1`, `Q-SWAMP-3`, "Allow as planned" [S4]). The Hula field site shares its hex. It is a design placement, not a historical field.
+- `PioneerWork(unit, dry_swamp, site)` sends an idle halutz unit to drain a swamp site, by the same build rules (R-SWAMP-001, R-SITE-001). Draining takes 12 turns, counting the turn of the order, and costs IL 4m, twice the yishuv build: design values the owner may override (`Q-SWAMP-1` [S3]).
+- Drained, the swamp site does nothing else; the Hula field site becomes ready to plow. Before that a plow order there is refused with the state unchanged (R-SWAMP-001).
+- `hula_drainage` (window 7 March to 18 May 1951) carries `site: hula`, so it fires only while the player's works at the Hula are in progress: with no works, or once the Hula is drained, it does not fire (R-SWAMP-002, `Q-SWAMP-2` [S3]). Its text, options and sources are unchanged. The reference player drains no swamp, so the card does not come in the goldens' run.
## Data touched
- `rules.yaml` `mvp.plow_fields_turns`, `mvp.plow_fields_cost` and `mvp.field_food_per_turn`: labelled design values, required in the GDD loop.
- `content/sites.yaml`: the four field rows of #785, unchanged. The loader now refuses a field site that is also a yishuv site.
- `GameState.Sites` (a plowed field is a built field site, so the hash format is unchanged), `GameState.Food`, `Treasury` and debt.
-- No save or scenario format change: `pioneer UNIT plow_fields SITE` uses the existing line.
+- No save or scenario format change: `pioneer UNIT plow_fields SITE` and `pioneer UNIT dry_swamp SITE` use the existing line.
+- `rules.yaml` `mvp.dry_swamp_turns` and `mvp.dry_swamp_cost`: labelled design values, required in the GDD loop.
+- `content/sites.yaml`: the `hula` swamp site and the `hula_field` field site (status draft). The loader refuses a field site that is also a swamp site.
+- `content/events/hula_drainage.yaml`: the `site:` key, which the loader checks names a swamp site (GDD loop); `content/schema/event.schema.json` and docs/WRITING_EVENTS.md list it.
## Done when
-- `dotnet test sim/Statecraft.sln` passes, including `FieldsTests`, `ProjectsTests` and `ReferencePlayerTests`.
-- `hash1950`, `hash1952` and `mvp-end` move and are re-pinned with history rows in `docs/determinism.md`; `smoke5` and the three scenarios do not move.
+- `dotnet test sim/Statecraft.sln` passes, including `FieldsTests`, `SwampTests`, `ProjectsTests` and `ReferencePlayerTests`.
+- For the fields half, `hash1950`, `hash1952` and `mvp-end` move and are re-pinned with history rows in `docs/determinism.md`; `smoke5` and the three scenarios do not move.
+- For the swamp half, `hash1952` and `mvp-end` move (the Hula card no longer fires) and are re-pinned with history rows; `hash1950`, `smoke5` and the three scenarios do not move.
## Out of scope
-- The swamp half: the Hula swamp site and `dry_swamp` (#789). The site waits for the owner on #785, and a drained swamp becomes a field site there (`Q-SWAMP-1`).
-- A plow button and plowed fields on the map, and fields at places other than the yishuv sites. Unity's order check (`SimBridge`) still accepts only `build_yishuv`, so the game's UI cannot send `plow_fields` until that PR adds it.
+- A plow or drain button, and plowed fields or a drained swamp on the map. Unity's order check (`SimBridge`) still accepts only `build_yishuv`, so the game's UI cannot send `plow_fields` or `dry_swamp` until that PR adds it.
+- A map change on draining (the water research's option D) and any card text about the Hula's people or land: such text goes through D-F1 review.
## Sources
- [S1] The game design of record, docs/GDD.md
- [S2] GDD Phase 4 plan, PR 4 and the owner questions table, docs/superpowers/plans/2026-10-15-gdd-phase-4.md
- [S3] GDD Phase 4 owner answers, https://github.com/eyalgolan/statecraft-israel/issues/782, checked 2026-10-17
+- [S4] Q-SWAMP-3, the owner's decision on the Hula, https://github.com/eyalgolan/statecraft-israel/issues/789, checked 2026-10-17
## Open questions
- The design values (1 Food a turn, 3 turns, IL 0.5m) stand until the owner overrides them.
-- The swamp half of this section waits for the owner's answer on the Hula site (#785).
+- The swamp design values (12 turns, IL 4m) stand until the owner overrides them.
diff --git a/docs/rules/mvp.md b/docs/rules/mvp.md
index 9429efe54..35ce90a5b 100644
--- a/docs/rules/mvp.md
+++ b/docs/rules/mvp.md
@@ -96,6 +96,10 @@ R-FIELD-001: `PioneerWork(unit, plow_fields, site)` plows a field at a site whos
R-FIELD-002: Each turn in step 6, after the cities' production and in ordinal site id order, every plowed field adds `field_food_per_turn` Food units to the national stock (R-FOOD-001), with no workers (Q-FIELD-2, decided 17 October 2026). A field being plowed adds nothing. The Food arrives before the nation eats in step 7, so in a turn with imports (R-FOOD-002) the import tops the stock up by that much less. `field_food_per_turn` is 1, a labelled design value (Q-FIELD-3: "1 Food a turn"), and required in the GDD loop.
+R-SWAMP-001: `PioneerWork(unit, dry_swamp, site)` drains a swamp at a site whose kinds include `swamp`, by R-SITE-001 to R-SITE-003's rules, with `dry_swamp_turns` and `dry_swamp_cost` (12 turns and IL 4m, labelled design values, required in the GDD loop; Q-SWAMP-1, decided 17 October 2026). Built, the swamp site is drained, and the field site in its hex becomes ready: before that a `plow_fields` order there is refused with the state unchanged and the Attention refunded, as at an unbuilt yishuv (R-FIELD-001). Drained, the swamp does nothing else. A field site is not also a swamp site, since draining would plow it; the loader refuses a row that gives it both kinds. The MVP's one swamp site is the Hula (Q-SWAMP-1; Q-SWAMP-3, "Allow as planned", owner, 17 October 2026, #789).
+
+R-SWAMP-002: An event with `site: <id>` names a swamp site (the loader checks it in the GDD loop) and, in the GDD loop, can fire only while that site is being worked: it has a record that is not built. With no works, or once the swamp is drained, it waits, and it can still fire later in its window (Q-SWAMP-2, decided 17 October 2026). The legacy loop reads no sites and ignores the key, so the legacy goldens hold. `hula_drainage` carries `site: hula`.
+
## Camps
R-CAMP-001: `PioneerWork(unit, build_camp, site)` builds a training camp at a site whose kinds include `military_camp` or `hakhshara`, by R-SITE-001 to R-SITE-003's rules, with `build_camp_turns` and `build_camp_cost` (labelled design values, required in the GDD loop). One action builds either facility, as the site's kind says (Q-CAMP-3, owner, 17 October 2026, #782). Built, on the turn's end date, the camp gives the site's city (Q-CAMP-1) the site's facility, with no capacity limit, so `Train` accepts that city for the matching track from the next turn (R-TRAIN-001). A camp being built gives nothing. The facility is read from the built site's record, so the state hash gains nothing beyond the site's own record. The MVP's camp sites are Camp 80 (for Hadera) and Tzrifin (for Rishon LeZion), both `military_camp` (Q-CAMP-2, owner, 17 October 2026, #785; "Both military", owner, 17 October 2026, #927).
diff --git a/sim/Statecraft.Sim.Tests/DesignValuesTests.cs b/sim/Statecraft.Sim.Tests/DesignValuesTests.cs
index 3044cde7c..0fe61331f 100644
--- a/sim/Statecraft.Sim.Tests/DesignValuesTests.cs
+++ b/sim/Statecraft.Sim.Tests/DesignValuesTests.cs
@@ -30,6 +30,8 @@ public class DesignValuesTests
("rules.yaml", "mvp.build_camp_cost"),
("rules.yaml", "mvp.plow_fields_turns"),
("rules.yaml", "mvp.plow_fields_cost"),
+ ("rules.yaml", "mvp.dry_swamp_turns"),
+ ("rules.yaml", "mvp.dry_swamp_cost"),
("rules.yaml", "mvp.field_food_per_turn"),
("rules.yaml", "mvp.objective_points"),
("rules.yaml", "mvp.objective_bonus_per_month"),
diff --git a/sim/Statecraft.Sim.Tests/EventRetimingTests.cs b/sim/Statecraft.Sim.Tests/EventRetimingTests.cs
index 8a282a130..07ae562e1 100644
--- a/sim/Statecraft.Sim.Tests/EventRetimingTests.cs
+++ b/sim/Statecraft.Sim.Tests/EventRetimingTests.cs
@@ -27,15 +27,17 @@ public class EventRetimingTests
/// <summary>#567 section 4 item 8: all 32 events fire in the historical monthly run (#567's 31 and the first new yishuv
/// card, R-OBJ-003). Before the re-timing, sinai_withdrawal and rhodes_talks never fired (Horev's card came after both
- /// windows had closed).</summary>
+ /// windows had closed). Since GDD Phase 4 PR 5 every event but hula_drainage, which needs the player's works (R-SWAMP-002).</summary>
[Fact]
public void EveryEventFiresInTheHistoricalMonthlyRun()
{
Assert.Equal(GameOverCodes.MvpEnded, Run[Run.Count - 1].GameOver);
// A consequence card (R-ALT-005) comes only on a road not taken, never in this run (R-ALT-012).
var record = C.Events.Where(e => e.Kind != EventKinds.Consequence).ToList();
+ // R-SWAMP-002: hula_drainage fires only while the player's works at the Hula are in progress, and the reference
+ // player drains no swamp, so it is the one historical card the run never shows.
var missing = record.Select(e => e.Id).Where(id => CardDate(id) == null).ToList();
- Assert.True(missing.Count == 0, "never fired: " + string.Join(", ", missing));
+ Assert.True(missing.SequenceEqual(new[] { "hula_drainage" }), "never fired: " + string.Join(", ", missing));
Assert.Equal(32, record.Count);
}
@@ -73,7 +75,6 @@ public class EventRetimingTests
[InlineData("ministry_supply_crisis", "1950-10-15")]
[InlineData("education_registration_1951", "1950-12-15")]
[InlineData("reparations_claim", "1951-03-15")]
- [InlineData("hula_drainage", "1951-03-15")]
[InlineData("iraqi_exodus", "1951-03-15")]
[InlineData("israel_bonds", "1951-05-15")]
[InlineData("forex_crisis_1951", "1951-11-15")]
diff --git a/sim/Statecraft.Sim.Tests/EventRulesGddTests.cs b/sim/Statecraft.Sim.Tests/EventRulesGddTests.cs
index 1dea0de50..bbb3350d0 100644
--- a/sim/Statecraft.Sim.Tests/EventRulesGddTests.cs
+++ b/sim/Statecraft.Sim.Tests/EventRulesGddTests.cs
@@ -199,8 +199,10 @@ options:
// A consequence card never fires in the historical run (R-ALT-012); its state comes from a run on its road.
foreach (var e in C.Events)
{
+ // Every historical event fires in the run (EventRetimingTests) but hula_drainage, which waits for works the
+ // reference player never starts (R-SWAMP-002); its options are read on the first turn of its window.
var s = e.Kind != EventKinds.Consequence
- ? Run.First(x => x.FiredEvents.Contains(e.Id)) // every historical event fires in the run (EventRetimingTests)
+ ? Run.FirstOrDefault(x => x.FiredEvents.Contains(e.Id)) ?? Run.First(x => e.Site != "" && x.Date >= e.From)
: AltRun.Play(C, AltRun.RoadTo(C, e)).First(x => x.FiredEvents.Contains(e.Id));
foreach (var o in e.Options)
{
diff --git a/sim/Statecraft.Sim.Tests/EventTests.cs b/sim/Statecraft.Sim.Tests/EventTests.cs
index e18bcd50b..0649c0ba5 100644
--- a/sim/Statecraft.Sim.Tests/EventTests.cs
+++ b/sim/Statecraft.Sim.Tests/EventTests.cs
@@ -651,4 +651,16 @@ options:
Assert.Equal(new DateTime(1949, 2, 15), s.Date);
Assert.Contains(r.Why, w => w.Message == "New: late for Pm One");
}
+
+ // R-SWAMP-002, Phase 2 Q-CUT-4's rule: hula_drainage gained only a condition (site: hula), not new text or options, so
+ // its review status and the release gate's verdict on it are unchanged.
+ [Fact]
+ public void TheHulaConditionLeavesItsReleaseStatus()
+ {
+ var c = ContentLoader.Load(RealContentTests.ContentRoot());
+ var e = c.Events.Single(x => x.Id == "hula_drainage");
+ Assert.Equal(("hula", "fact-checked"), (e.Site, e.Status));
+ Assert.DoesNotContain("hula_drainage", ReleaseGate.SensitiveEvents(c));
+ Assert.DoesNotContain("hula_drainage", ReleaseGate.SensitiveUnreviewed(c));
+ }
}
diff --git a/sim/Statecraft.Sim.Tests/FieldsTests.cs b/sim/Statecraft.Sim.Tests/FieldsTests.cs
index d12835622..4f5e3835b 100644
--- a/sim/Statecraft.Sim.Tests/FieldsTests.cs
+++ b/sim/Statecraft.Sim.Tests/FieldsTests.cs
@@ -174,7 +174,8 @@ public class FieldsTests
Assert.Contains(message, e.Message);
}
- // The real content: every field site lies in a yishuv's hex (Q-FIELD-1), and the design values are those of Q-FIELD-3.
+ // The real content: every field site lies in a yishuv's hex (Q-FIELD-1) or the swamp's (Q-SWAMP-1), and the design
+ // values are those of Q-FIELD-3.
[Fact]
public void TheRealFieldsAreThePlannedOnes()
{
@@ -182,6 +183,6 @@ public class FieldsTests
var m = c.Rules.Mvp!;
Assert.Equal((1, 3, 0.5), (m.FieldFoodPerTurn!.Value, m.PlowFieldsTurns, m.PlowFieldsCost!.Value));
foreach (var f in c.Sites.Where(x => x.Kinds.Contains(Projects.FieldKind)))
- Assert.Contains(c.Sites, y => y.Kinds.Contains(Projects.YishuvKind) && (y.Q, y.R) == (f.Q, f.R));
+ Assert.Contains(c.Sites, y => (y.Kinds.Contains(Projects.YishuvKind) || y.Kinds.Contains(Projects.SwampKind)) && (y.Q, y.R) == (f.Q, f.R));
}
}
diff --git a/sim/Statecraft.Sim.Tests/Fixture.cs b/sim/Statecraft.Sim.Tests/Fixture.cs
index b7c62568b..c6a17fa49 100644
--- a/sim/Statecraft.Sim.Tests/Fixture.cs
+++ b/sim/Statecraft.Sim.Tests/Fixture.cs
@@ -226,6 +226,8 @@ mvp:
build_camp_cost: 1
plow_fields_turns: 2
plow_fields_cost: 0.5
+ dry_swamp_turns: 3
+ dry_swamp_cost: 2
field_food_per_turn: 7
objective_points: 100
objective_bonus_per_month: 5
diff --git a/sim/Statecraft.Sim.Tests/RealContentTests.cs b/sim/Statecraft.Sim.Tests/RealContentTests.cs
index 7be9f57e3..a4567b267 100644
--- a/sim/Statecraft.Sim.Tests/RealContentTests.cs
+++ b/sim/Statecraft.Sim.Tests/RealContentTests.cs
@@ -381,9 +381,10 @@ public class RealContentTests
var s = GoldenRun.Play(C, new DateTime(1952, 1, 1));
Assert.Equal(GameOverCodes.MvpEnded, s.GameOver); // the run reaches the game's end, 15 January 1952 (R-LOOP-004)
var expected = new[] { "clothing_rationing_1950", "education_registration_1951", "forex_crisis_1951", "frumkin_commission",
- "hula_drainage", "iraqi_exodus", "israel_bonds", "law_of_return", "maabarot_policy", "ministry_supply_crisis", "reparations_claim" };
+ "iraqi_exodus", "israel_bonds", "law_of_return", "maabarot_policy", "ministry_supply_crisis", "reparations_claim" };
var missing = expected.Where(id => !s.FiredEvents.Contains(id)).ToList();
Assert.True(missing.Count == 0, "Never fired: " + string.Join(", ", missing));
+ Assert.DoesNotContain("hula_drainage", s.FiredEvents); // R-SWAMP-002: it waits for works at the Hula, and this run starts none
Assert.Equal(1.0, s.Policies["maabarot"]); // the historical choice opens transit camps
}
}
diff --git a/sim/Statecraft.Sim.Tests/SwampTests.cs b/sim/Statecraft.Sim.Tests/SwampTests.cs
new file mode 100644
index 000000000..62ef4ae15
--- /dev/null
+++ b/sim/Statecraft.Sim.Tests/SwampTests.cs
@@ -0,0 +1,213 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Statecraft.Sim;
+
+/// <summary>Dry swamp (GDD Phase 4 PR 5; GDD "Pioneer work", "Dry swamp"): PioneerWork(dry_swamp) at a swamp site, which
+/// drained becomes a field site (R-SWAMP-001), and an event tied to a site by `site:`, which fires only while that site is
+/// being worked (R-SWAMP-002). The owner took the plan's recommendations on #782 (17 October 2026): the Hula only, a field
+/// once drained (Q-SWAMP-1), the event only while the works are in progress (Q-SWAMP-2); and "Allow as planned" for the
+/// Hula on #789 (Q-SWAMP-3).</summary>
+public class SwampTests
+{
+ /// <summary>A swamp site, marsh, and its field site, marsh_field, in a hex of their own (no yishuv there, so only the
+ /// swamp gates the field). Fixture values, not history.</summary>
+ const string Marsh = @"
+ - id: marsh
+ name: Marsh
+ name_he: ביצה
+ q: 3
+ r: 0
+ kinds: [swamp]
+ sources:
+ - { url: ""https://example.org/marsh"", checked: 2026-10-14 }
+ status: draft
+ - id: marsh_field
+ name: Marsh fields
+ name_he: שדות הביצה
+ q: 3
+ r: 0
+ kinds: [field]
+ sources:
+ - { url: ""https://example.org/marsh"", checked: 2026-10-14 }
+ status: draft
+";
+
+ /// <summary>An event about the works at <paramref name="site"/>, in its window from the game's start.</summary>
+ static string Works(string site) => $@"
+id: works
+title: The works
+text: 'The drainage works reach the zone.'
+from: 1948-05-15
+site: {site}
+options:
+ - id: go_on
+ text: Go on
+ historical: true
+";
+
+ static Dictionary<string, string> Files() => Fixture.Gdd(new Dictionary<string, string> { ["sites.yaml"] = Fixture.GddSites + Marsh });
+
+ /// <summary>The GDD fixture with the marsh: draining takes dry_swamp_turns 3 and costs IL 2m (fixture values).</summary>
+ static Content Town(string site = "marsh") => ContentLoader.Load(Fixture.Write(Files(), new Dictionary<string, string> { ["works.yaml"] = Works(site) }));
+
+ static StepResult Step(Content c, GameState s, params Command[] commands) => Simulation.Step(c, s, commands);
+
+ static GameState WithHalutz(Content c, out int id)
+ {
+ var s = Simulation.NewGame(c, 1, Mode.Historical);
+ s.FiredEvents.Add("works"); // keep the fixture's event out of the way of the work tests
+ id = s.NextId++;
+ s.Units.Add(id, new Unit(id, "halutz", 1, 0));
+ return s;
+ }
+
+ static PioneerWork Drain(int unit, string site = "marsh") => new PioneerWork(unit, Projects.DrySwamp, site);
+
+ // R-SWAMP-002 (Review focus 5): in its window, with no works, the event does not fire; with works in progress it does;
+ // once the swamp is drained the works are over and it does not.
+ [Fact]
+ public void TheHulaEventNeedsWorksInProgress()
+ {
+ var c = Town();
+ var none = new GameState { Date = new DateTime(1948, 6, 1), RngState = 3 };
+ EffectsSystem.Init(c, none); EconomySystem.Init(c, none);
+ var working = none.Clone();
+ working.Units.Add(99, new Unit(99, "halutz", 3, 0));
+ working.Sites["marsh"] = new SiteWork("marsh", 99, 2, null);
+ var drained = none.Clone();
+ drained.Sites["marsh"] = SiteWork.Built("marsh", new DateTime(1948, 5, 15));
+
+ EventSystem.Trigger(c, none, new List<Cause>());
+ EventSystem.Trigger(c, working, new List<Cause>());
+ EventSystem.Trigger(c, drained, new List<Cause>());
+ Assert.DoesNotContain("works", none.PendingEvents);
+ Assert.Contains("works", working.PendingEvents);
+ Assert.DoesNotContain("works", drained.PendingEvents);
+ Assert.DoesNotContain("works", none.FiredEvents); // not spent: it can still fire once works start in its window
+ }
+
+ // R-SWAMP-002, through the turn: the order starts the works and the same turn's event check sees them.
+ [Fact]
+ public void TheEventFiresOnTheTurnTheWorksStart()
+ {
+ var c = Town();
+ var s = Simulation.NewGame(c, 1, Mode.Historical);
+ var id = s.NextId++;
+ s.Units.Add(id, new Unit(id, "halutz", 1, 0));
+ Assert.DoesNotContain("works", Step(c, s).State.PendingEvents);
+ Assert.Contains("works", Step(c, s, Drain(id)).State.PendingEvents);
+ }
+
+ // R-SWAMP-002: the legacy loop reads no sites.yaml and ignores the key, so the event fires as it did (the legacy goldens hold).
+ [Fact]
+ public void TheLegacyLoopIgnoresTheSiteKey()
+ {
+ var c = ContentLoader.Load(Fixture.Write(events: new Dictionary<string, string> { ["works.yaml"] = Works("marsh") }));
+ Assert.False(c.IsGdd);
+ Assert.Equal("marsh", c.Events.Single(e => e.Id == "works").Site);
+ var s = new GameState { Date = new DateTime(1948, 6, 1), RngState = 3 };
+ EffectsSystem.Init(c, s); EconomySystem.Init(c, s);
+ EventSystem.Trigger(c, s, new List<Cause>());
+ Assert.Contains("works", s.PendingEvents);
+ }
+
+ // R-SWAMP-001 (Q-SWAMP-1): draining follows R-SITE-001 to R-SITE-003 (paid in full at the start, its turns counting the
+ // order's); drained, the swamp's hex has a ready field site, which before that is refused with the state unchanged.
+ [Fact]
+ public void ADrainedSwampBecomesAField()
+ {
+ var c = Town();
+ var s = WithHalutz(c, out var id);
+ var early = Step(c, s, new PioneerWork(id, Projects.PlowFields, "marsh_field"));
+ Assert.Equal("Marsh fields can be plowed once Marsh is drained", Assert.Single(early.Rejected).Reason);
+ Assert.Equal(Step(c, s).State.Hash(), early.State.Hash());
+
+ var r = Step(c, s, Drain(id));
+ Assert.Empty(r.Rejected);
+ Assert.Equal(("marsh", (int?)id, 2), (r.State.Sites["marsh"].Site, r.State.Sites["marsh"].Unit, r.State.Sites["marsh"].TurnsLeft));
+ Assert.Equal(Step(c, s).State.Treasury - 2, r.State.Treasury, 9);
+ Assert.Contains(r.Why, x => x.System == "map" && x.Message == "Marsh: a group of halutzim began draining the swamp, cost IL 2.0m");
+
+ var mid = Step(c, r.State);
+ Assert.Null(mid.State.Sites["marsh"].BuiltOn);
+ var done = Step(c, mid.State);
+ Assert.Equal(done.State.Date, done.State.Sites["marsh"].BuiltOn); // the end of the order's turn + 2
+ Assert.False(Projects.IsBusy(done.State, id));
+ Assert.Contains(done.Why, x => x.System == "map" && x.Message == "Marsh drained");
+ Assert.False(done.State.Sites.ContainsKey("marsh_field")); // drained is not plowed: the field yields nothing yet
+
+ var plow = Step(c, done.State, new PioneerWork(id, Projects.PlowFields, "marsh_field"));
+ Assert.Empty(plow.Rejected);
+ Assert.True(plow.State.Sites.ContainsKey("marsh_field"));
+ }
+
+ // R-SITE-004, R-SWAMP-001: each action only at its own kind of site.
+ [Theory]
+ [InlineData("dry_swamp", "site_a", "Site A is not a swamp")]
+ [InlineData("dry_swamp", "marsh_field", "Marsh fields is not a swamp")]
+ [InlineData("build_yishuv", "marsh", "Marsh is not a site for a new yishuv")]
+ public void DrainingOnlyAtASwampSite(string action, string site, string reason)
+ {
+ var c = Town();
+ var s = WithHalutz(c, out var id);
+ var r = Step(c, s, new PioneerWork(id, action, site));
+ Assert.Equal(reason, Assert.Single(r.Rejected).Reason);
+ Assert.Equal(Step(c, s).State.Hash(), r.State.Hash());
+ }
+
+ // R-SWAMP-002: in the GDD loop an event's site must be a swamp site of sites.yaml. R-SWAMP-001: a swamp site is not
+ // also a field site (drained, it would yield Food unplowed), nor a yishuv or camp site (its build would drain the swamp),
+ // and the drain values are required in the GDD loop, so a missing key is never read as 0.
+ [Theory]
+ [InlineData("site nope", "events/works.yaml", "unknown site 'nope'")]
+ [InlineData("site site_a", "events/works.yaml", "site 'site_a' is not a swamp site")]
+ [InlineData("kinds field", "sites.yaml", "a field site cannot also be a swamp site")]
+ [InlineData("kinds yishuv", "sites.yaml", "a swamp site cannot also be a yishuv site")]
+ [InlineData("kinds military_camp", "sites.yaml", "a swamp site cannot also be a military_camp site")]
+ [InlineData("kinds hakhshara", "sites.yaml", "a swamp site cannot also be a hakhshara site")]
+ [InlineData("dry_swamp_turns", "rules.yaml", "mvp.dry_swamp_turns: required")]
+ [InlineData("dry_swamp_cost", "rules.yaml", "mvp.dry_swamp_cost: required")]
+ public void BadSwampContentFailsLoad(string what, string file, string message)
+ {
+ var files = Files();
+ var site = what.StartsWith("site ") ? what.Substring(5) : "marsh";
+ if (what.StartsWith("kinds ")) files["sites.yaml"] = files["sites.yaml"].Replace("kinds: [swamp]", $"kinds: [swamp, {what.Substring(6)}]");
+ else if (!what.StartsWith("site ")) files["rules.yaml"] = files["rules.yaml"].Replace(what == "dry_swamp_turns" ? " dry_swamp_turns: 3\n" : " dry_swamp_cost: 2\n", "");
+ var e = Assert.Throws<ContentException>(() => ContentLoader.Load(Fixture.Write(files, new Dictionary<string, string> { ["works.yaml"] = Works(site) })));
+ Assert.Equal(file, e.File);
+ Assert.Contains(message, e.Message);
+ }
+
+ // R-SWAMP-002 on the real content (owner review on #968): with the works in progress, the fact-checked card still fires on
+ // its historical turn. The reference player to 1 February 1951, then a halutz ordered to drain the Hula alongside the
+ // reference orders: the order lands on the turn ending 15 March 1951, and so does the card.
+ [Fact]
+ public void TheRealHulaCardFiresOnItsTurnWithWorksInProgress()
+ {
+ var c = ContentLoader.Load(RealContentTests.ContentRoot());
+ var s = GoldenRun.Play(c, new DateTime(1951, 2, 1));
+ Assert.DoesNotContain("hula_drainage", s.FiredEvents);
+ var id = s.NextId++;
+ s.Units.Add(id, new Unit(id, "halutz", 14, 3));
+ var r = Step(c, s, GoldenRun.Orders(c, s).Append(Drain(id, "hula")).ToArray());
+ Assert.Empty(r.Rejected);
+ Assert.Equal(new DateTime(1951, 3, 15), r.State.Date);
+ Assert.Contains("hula_drainage", r.State.FiredEvents);
+ }
+
+ // The real content: the Hula is the one swamp site, in the swamp hex of the water research (14, 3), with one field site in
+ // its hex; hula_drainage waits for its works; the design values are Q-SWAMP-1's (12 turns, IL 4m).
+ [Fact]
+ public void TheRealSwampIsThePlannedOne()
+ {
+ var c = ContentLoader.Load(RealContentTests.ContentRoot());
+ var swamp = Assert.Single(c.Sites, x => x.Kinds.Contains(Projects.SwampKind));
+ Assert.Equal(("hula", 14, 3), (swamp.Id, swamp.Q, swamp.R));
+ var field = Assert.Single(c.Sites, x => x.Kinds.Contains(Projects.FieldKind) && (x.Q, x.R) == (14, 3));
+ Assert.Equal("hula_field", field.Id);
+ Assert.Equal("hula", c.Events.Single(e => e.Id == "hula_drainage").Site);
+ var m = c.Rules.Mvp!;
+ Assert.Equal((12, 4.0), (m.DrySwampTurns!.Value, m.DrySwampCost!.Value));
+ }
+}
diff --git a/sim/Statecraft.Sim.Tests/golden/hash1952.txt b/sim/Statecraft.Sim.Tests/golden/hash1952.txt
index d4b884f02..62100927f 100644
--- a/sim/Statecraft.Sim.Tests/golden/hash1952.txt
+++ b/sim/Statecraft.Sim.Tests/golden/hash1952.txt
@@ -2,9 +2,9 @@
ind{
food_supply=0.8556115107122045 [3FEB612B6412E1DF]
housing=0.08504947742483628 [3FB5C5CD7414E141]
- intl_standing=0.7800000000000002 [3FE8F5C28F5C28F8]
- morale=0.4945578468038132 [3FDFA6D5F48029E0]
- security=0.5361322526321604 [3FE127FED36C599C]
+ intl_standing=0.8300000000000003 [3FEA8F5C28F5C292]
+ morale=0.49156077649131324 [3FDF75BB54C1B318]
+ security=0.5061322526321603 [3FE0323C441030A6]
pol{
border_settlement=0.2 [3FC999999999999A]
housing_construction=0.3 [3FD3333333333333]
@@ -17,14 +17,14 @@ eff{
homes_lift_morale=0.012767196348836194 [3F8A25B0163D2852]
rationing_feeds=0.3399999999208376 [3FD5C28F5C133334]
rationing_grates=-0.15 [BFC3333333333333]
- safety_lifts_morale=0.05354077083901369 [3FAB69B227832BE6]
+ safety_lifts_morale=0.05054370052651369 [3FA9E0DD298F75A0]
work_lifts_cohesion=0.019249879880694112 [3F93B63D92287534]
shift{
food_supply=0.15000000000000002 [3FC3333333333334]
housing=-1.3877787807814457E-17 [BC70000000000000]
- intl_standing=0.28000000000000025 [3FD1EB851EB851F0]
+ intl_standing=0.3300000000000003 [3FD51EB851EB8524]
morale=-0.08000000000000007 [BFB47AE147AE1480]
- security=0.19500000000000017 [3FC8F5C28F5C28FC]
+ security=0.16500000000000015 [3FC51EB851EB8524]
bud{
agriculture_minister=0.07 [3FB1EB851EB851EC]
defense_minister=0.45 [3FDCCCCCCCCCCCCD]
@@ -49,7 +49,7 @@ debt=182.89012071283815 [4066DC7BDE6EE43A]
fx=-12.990431328096559 [C029FB19D0A63796]
rung=2;cf=0;
mob=0.05 [3FA999999999999A]
-stab=0.448654481936148 [3FDCB6C149C7A72C]
+stab=0.44317459732760256 [3FDC5CF8FC7C2952]
att=4 [4010000000000000]
fired[
altalena
@@ -66,7 +66,6 @@ fired[
first_truce
forex_crisis_1951
frumkin_commission
- hula_drainage
idf_founding
iraqi_exodus
israel_bonds
@@ -100,7 +99,6 @@ chosen{
first_truce=accept
forex_crisis_1951=request_aid
frumkin_commission=inquiry
- hula_drainage=continue_works
idf_founding=one_army
iraqi_exodus=airlift
israel_bonds=launch
diff --git a/sim/Statecraft.Sim.Tests/golden/manifest.txt b/sim/Statecraft.Sim.Tests/golden/manifest.txt
index 372c4e16e..493450e6a 100644
--- a/sim/Statecraft.Sim.Tests/golden/manifest.txt
+++ b/sim/Statecraft.Sim.Tests/golden/manifest.txt
@@ -3,9 +3,9 @@
# rewrites this file, the snapshots and the GoldenRun.cs constants; then update docs/determinism.md and tools/web_check.py
# (GoldenManifestTests names any place that is out of date) and add a row to the rebaseline history.
hash1950 7cf678b6b2b3d55dc0fee7b2efdee9ec7688cdf18964dcaa6e5a7c0018e34a51
-hash1952 9496947232f0c97ed21c0a0b98e6727e7d59c892f9aff12049b5d7e5ee2230e8
+hash1952 f9f47f5c783b7dc8d6f47e5e3e048de5899d79e6d55614ee8e6f0331d0fb3cd5
smoke5 3005405d64abc6e7418fa1f0d35c36ce5f64ed3af7c5a4c24a73d5dfdb16121f
scenario-reckless 8041988a2c6b5b72a8351fd79ab07c2afca0672f686586cc8b7f9777c2061038
scenario-cautious 6507ddc31437eaf8b0a8858a84c539860dcd7a6febacb0f1d142cb59489e2a9f
scenario-mvp-absorb-first a77a8f20063c741a680a964e3824946dfee27b5675b9cead5e23bbf4bd146183
-mvp-end 9496947232f0c97ed21c0a0b98e6727e7d59c892f9aff12049b5d7e5ee2230e8
+mvp-end f9f47f5c783b7dc8d6f47e5e3e048de5899d79e6d55614ee8e6f0331d0fb3cd5
diff --git a/sim/Statecraft.Sim.Tests/golden/mvp-end.txt b/sim/Statecraft.Sim.Tests/golden/mvp-end.txt
index d4b884f02..62100927f 100644
--- a/sim/Statecraft.Sim.Tests/golden/mvp-end.txt
+++ b/sim/Statecraft.Sim.Tests/golden/mvp-end.txt
@@ -2,9 +2,9 @@
ind{
food_supply=0.8556115107122045 [3FEB612B6412E1DF]
housing=0.08504947742483628 [3FB5C5CD7414E141]
- intl_standing=0.7800000000000002 [3FE8F5C28F5C28F8]
- morale=0.4945578468038132 [3FDFA6D5F48029E0]
- security=0.5361322526321604 [3FE127FED36C599C]
+ intl_standing=0.8300000000000003 [3FEA8F5C28F5C292]
+ morale=0.49156077649131324 [3FDF75BB54C1B318]
+ security=0.5061322526321603 [3FE0323C441030A6]
pol{
border_settlement=0.2 [3FC999999999999A]
housing_construction=0.3 [3FD3333333333333]
@@ -17,14 +17,14 @@ eff{
homes_lift_morale=0.012767196348836194 [3F8A25B0163D2852]
rationing_feeds=0.3399999999208376 [3FD5C28F5C133334]
rationing_grates=-0.15 [BFC3333333333333]
- safety_lifts_morale=0.05354077083901369 [3FAB69B227832BE6]
+ safety_lifts_morale=0.05054370052651369 [3FA9E0DD298F75A0]
work_lifts_cohesion=0.019249879880694112 [3F93B63D92287534]
shift{
food_supply=0.15000000000000002 [3FC3333333333334]
housing=-1.3877787807814457E-17 [BC70000000000000]
- intl_standing=0.28000000000000025 [3FD1EB851EB851F0]
+ intl_standing=0.3300000000000003 [3FD51EB851EB8524]
morale=-0.08000000000000007 [BFB47AE147AE1480]
- security=0.19500000000000017 [3FC8F5C28F5C28FC]
+ security=0.16500000000000015 [3FC51EB851EB8524]
bud{
agriculture_minister=0.07 [3FB1EB851EB851EC]
defense_minister=0.45 [3FDCCCCCCCCCCCCD]
@@ -49,7 +49,7 @@ debt=182.89012071283815 [4066DC7BDE6EE43A]
fx=-12.990431328096559 [C029FB19D0A63796]
rung=2;cf=0;
mob=0.05 [3FA999999999999A]
-stab=0.448654481936148 [3FDCB6C149C7A72C]
+stab=0.44317459732760256 [3FDC5CF8FC7C2952]
att=4 [4010000000000000]
fired[
altalena
@@ -66,7 +66,6 @@ fired[
first_truce
forex_crisis_1951
frumkin_commission
- hula_drainage
idf_founding
iraqi_exodus
israel_bonds
@@ -100,7 +99,6 @@ chosen{
first_truce=accept
forex_crisis_1951=request_aid
frumkin_commission=inquiry
- hula_drainage=continue_works
idf_founding=one_army
iraqi_exodus=airlift
israel_bonds=launch
diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.cs
index 13ca36a5f..995a65523 100644
--- a/sim/Statecraft.Sim/Content.cs
+++ b/sim/Statecraft.Sim/Content.cs
@@ -486,6 +486,12 @@ namespace Statecraft.Sim
/// <summary>IL millions plowing a field costs, paid in full when it starts (R-FIELD-001, as R-SITE-001). Required in the
/// GDD loop, so a missing key never makes plowing free.</summary>
public double? PlowFieldsCost { get; set; }
+ /// <summary>Turns draining a swamp takes, counting the turn it was ordered in (R-SWAMP-001, as R-SITE-003; Q-SWAMP-1).
+ /// Required in the GDD loop, at least 1.</summary>
+ public int? DrySwampTurns { get; set; }
+ /// <summary>IL millions draining a swamp costs, paid in full when it starts (R-SWAMP-001, as R-SITE-001; Q-SWAMP-1).
+ /// Required in the GDD loop, so a missing key never makes draining free.</summary>
+ public double? DrySwampCost { get; set; }
/// <summary>Food units a plowed field adds to the national stock each turn, in step 6 (R-FIELD-002; Q-FIELD-3). Required
/// in the GDD loop, so a missing key is never read as 0.</summary>
public int? FieldFoodPerTurn { get; set; }
@@ -808,6 +814,10 @@ namespace Statecraft.Sim
/// <summary>The objective (objectives.yaml) whose completion card this event is: it fires only once that objective is
/// recorded (R-OBJ-003). Empty for every other event.</summary>
public string Objective { get; set; } = "";
+ /// <summary>The designated site (sites.yaml, a swamp site) whose works this event is about: in the GDD loop it fires
+ /// only while that site is being worked (R-SWAMP-002; Q-SWAMP-2). The legacy loop reads no sites and ignores it.
+ /// Empty for every other event.</summary>
+ public string Site { get; set; } = "";
/// <summary>Path relative to the content root, set by the loader (not read from YAML).</summary>
[YamlIgnore] public string File { get; set; } = "";
}
diff --git a/sim/Statecraft.Sim/ContentLoader.cs b/sim/Statecraft.Sim/ContentLoader.cs
index 2dcaf65d5..a065413cf 100644
--- a/sim/Statecraft.Sim/ContentLoader.cs
+++ b/sim/Statecraft.Sim/ContentLoader.cs
@@ -338,6 +338,8 @@ namespace Statecraft.Sim
// sources: [{ url, checked }], status
// objective the objective (objectives.yaml) whose completion card this is: it fires only once
// that objective is recorded, and has exactly one option
+ // site a swamp site (sites.yaml) whose works the event is about: in the GDD loop it
+ // fires only while that site is being worked; the legacy loop ignores it
foreach (var rel in eventFiles.OrderBy(p => p, StringComparer.Ordinal))
{
var e = Read<GameEvent>(readFile, rel);
@@ -1065,6 +1067,11 @@ namespace Statecraft.Sim
if (m.PlowFieldsTurns < 1) throw new ContentException(file, "mvp.plow_fields_turns", "must be >= 1");
if (m.PlowFieldsCost == null) throw new ContentException(file, "mvp.plow_fields_cost", "required when eras.yaml systems.loop is gdd");
if (!(m.PlowFieldsCost >= 0 && IsFinite(m.PlowFieldsCost.Value))) throw new ContentException(file, "mvp.plow_fields_cost", "must be a finite number >= 0");
+ // R-SWAMP-001: required, so a missing key is not read as 0 (a swamp drained at once, or for nothing).
+ if (m.DrySwampTurns == null) throw new ContentException(file, "mvp.dry_swamp_turns", "required when eras.yaml systems.loop is gdd");
+ if (m.DrySwampTurns < 1) throw new ContentException(file, "mvp.dry_swamp_turns", "must be >= 1");
+ if (m.DrySwampCost == null) throw new ContentException(file, "mvp.dry_swamp_cost", "required when eras.yaml systems.loop is gdd");
+ if (!(m.DrySwampCost >= 0 && IsFinite(m.DrySwampCost.Value))) throw new ContentException(file, "mvp.dry_swamp_cost", "must be a finite number >= 0");
if (m.FieldFoodPerTurn == null) throw new ContentException(file, "mvp.field_food_per_turn", "required when eras.yaml systems.loop is gdd");
if (m.FieldFoodPerTurn < 0) throw new ContentException(file, "mvp.field_food_per_turn", "must be >= 0");
// R-FOOD-001 to R-FOOD-003: required, so a missing key is never read as 0 (a stock term of 0, or no stock).
@@ -1111,6 +1118,20 @@ namespace Statecraft.Sim
throw new ContentException("rules.yaml", "mvp.end", FormattableString.Invariant($"must be after start ({c.Rules.Start:yyyy-MM-dd}) and before the last era's end ({c.Eras[c.Eras.Count - 1].To:yyyy-MM-dd})"));
ValidateSites(c);
ValidateObjectiveSites(c);
+ ValidateEventSites(c);
+ }
+
+ /// <summary>An event's site (R-SWAMP-002): a designated swamp site, whose works the event is about. Only the GDD loop
+ /// reads sites.yaml, so only it can check this; the legacy loop ignores the key.</summary>
+ static void ValidateEventSites(Content c)
+ {
+ foreach (var e in c.Events.Where(e => e.Site != ""))
+ {
+ var site = c.Sites.FirstOrDefault(x => x.Id == e.Site)
+ ?? throw new ContentException(e.File, $"events[{e.Id}].site", $"unknown site '{e.Site}' (sites.yaml)");
+ if (!site.Kinds.Contains(Projects.SwampKind))
+ throw new ContentException(e.File, $"events[{e.Id}].site", $"site '{e.Site}' is not a swamp site (sites.yaml kinds)");
+ }
}
/// <summary>An objective's site (R-OBJ-001): a designated site of kind yishuv, whose sourced founding date is the
@@ -1162,9 +1183,17 @@ namespace Statecraft.Sim
foreach (var k in x.Kinds)
if (!SiteKinds.Contains(k)) throw new ContentException(sf, at + ".kinds", $"unknown kind '{k}' ({string.Join(", ", SiteKinds)})");
// R-FIELD-001: a field site's built record is its plowed state, so a built yishuv on it would yield Food. Only that
- // pair is refused; other kinds may share a field site (a drained swamp is PR 5's question, Q-SWAMP-1).
+ // pair is refused; other kinds may share a field site.
if (x.Kinds.Contains(Projects.FieldKind) && x.Kinds.Contains(Projects.YishuvKind))
throw new ContentException(sf, at + ".kinds", "a field site cannot also be a yishuv site (its built record is its plowed state)");
+ // R-SWAMP-001 (Q-SWAMP-1): the same for a swamp, which drained gives a field site in its hex, to be plowed.
+ if (x.Kinds.Contains(Projects.FieldKind) && x.Kinds.Contains(Projects.SwampKind))
+ throw new ContentException(sf, at + ".kinds", "a field site cannot also be a swamp site (its built record is its plowed state)");
+ // R-SWAMP-001: nor a yishuv or camp site, whose build would write the same record and so drain the swamp.
+ if (x.Kinds.Contains(Projects.SwampKind))
+ 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)");
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.
diff --git a/sim/Statecraft.Sim/EventSystem.cs b/sim/Statecraft.Sim/EventSystem.cs
index 1e87e402e..847e987d8 100644
--- a/sim/Statecraft.Sim/EventSystem.cs
+++ b/sim/Statecraft.Sim/EventSystem.cs
@@ -28,6 +28,9 @@ namespace Statecraft.Sim
.Where(e => Timeline.AllMet(c, s, e))
// R-OBJ-003: an objective's card waits for the objective. Only the GDD loop records one, so in the legacy loop it never fires.
.Where(e => e.Objective == "" || s.Objectives.ContainsKey(e.Objective))
+ // R-SWAMP-002: an event about a site's works waits for those works, and stops once the site is built (drained).
+ // The legacy loop reads no sites, so it ignores the key and the legacy goldens hold.
+ .Where(e => e.Site == "" || !c.IsGdd || (s.Sites.TryGetValue(e.Site, out var works) && works.BuiltOn == null))
// A late fire can come after a dated indicator's window has ended (chapters design 3.2): a condition on it is not met.
.Where(e => e.Conditions.All(k => s.Indicators.TryGetValue(k.Indicator, out var v)
&& (!k.Min.HasValue || v >= k.Min.Value) && (!k.Max.HasValue || v <= k.Max.Value)))
diff --git a/sim/Statecraft.Sim/GoldenRun.cs b/sim/Statecraft.Sim/GoldenRun.cs
index b1e3ad50a..240684410 100644
--- a/sim/Statecraft.Sim/GoldenRun.cs
+++ b/sim/Statecraft.Sim/GoldenRun.cs
@@ -22,7 +22,7 @@ namespace Statecraft.Sim
/// <summary>Final hash of Play(content, Until1952): the M3 content range (to 31 December 1951). The GDD game ends on
/// 15 January 1952 (R-LOOP-004), the first turn on or after Until1952, so this is also the mvp-end run.</summary>
- public const string Hash1952 = "9496947232f0c97ed21c0a0b98e6727e7d59c892f9aff12049b5d7e5ee2230e8";
+ public const string Hash1952 = "f9f47f5c783b7dc8d6f47e5e3e048de5899d79e6d55614ee8e6f0331d0fb3cd5";
public static readonly DateTime Until1952 = new DateTime(1952, 1, 1);
diff --git a/sim/Statecraft.Sim/Projects.cs b/sim/Statecraft.Sim/Projects.cs
index fcdfb3c7f..46c7fdc60 100644
--- a/sim/Statecraft.Sim/Projects.cs
+++ b/sim/Statecraft.Sim/Projects.cs
@@ -30,6 +30,10 @@ namespace Statecraft.Sim
public const string PlowFields = "plow_fields";
/// <summary>The kind of site a field may be plowed at (sites.yaml kinds). Built, a field site is plowed (R-FIELD-001).</summary>
public const string FieldKind = "field";
+ /// <summary>The pioneer action that drains a swamp (GDD "Pioneer work": "Dry swamp"; Phase 4 PR 5).</summary>
+ public const string DrySwamp = "dry_swamp";
+ /// <summary>The kind of site a swamp may be drained at (sites.yaml kinds). Drained, its hex's field site is ready (R-SWAMP-001).</summary>
+ public const string SwampKind = "swamp";
/// <summary>Whether a yishuv may be built at <paramref name="site"/>: its kinds name one (R-SITE-001, R-SITE-004). A hex may
/// hold more than one site, as a yishuv hex holds a field one; the panel finds the yishuv by this, not by file order.</summary>
@@ -69,34 +73,38 @@ namespace Statecraft.Sim
/// action or site, a site that is not for a yishuv, or is being built or is built. Step
/// has already refused it in the legacy loop. R-CAMP-001: build_camp at a military_camp or hakhshara site follows the same
/// rules, with build_camp_turns and build_camp_cost. R-FIELD-001: plow_fields at a field site follows the same rules, with
- /// plow_fields_turns and plow_fields_cost, and is refused while a yishuv site in the field's hex is not built.</summary>
+ /// plow_fields_turns and plow_fields_cost, and is refused while a yishuv site in the field's hex is not built. R-SWAMP-001:
+ /// dry_swamp at a swamp site follows the same rules, with dry_swamp_turns and dry_swamp_cost; a field site in the swamp's
+ /// hex is refused until the swamp is drained.</summary>
public static string? Start(Content c, GameState s, int unit, string action, string site, List<Cause> why)
{
if (!s.Units.TryGetValue(unit, out var u)) return "There is no such unit";
if (!IsPioneer(u.Type)) return "Only halutzim do pioneer work";
var busy = s.Sites.Values.FirstOrDefault(w => w.BuiltOn == null && w.Unit == unit);
if (busy != null) return $"That group of halutzim is already building {PlayerText.Site(c, busy.Site)}";
- if (action != BuildYishuv && action != BuildCamp && action != PlowFields) return "There is no such pioneer work";
+ if (action != BuildYishuv && action != BuildCamp && action != PlowFields && action != DrySwamp) return "There is no such pioneer work";
var place = c.Sites.FirstOrDefault(x => x.Id == site);
if (place == null) return "There is no such site";
var camp = action == BuildCamp;
var plow = action == PlowFields;
- if (camp ? !IsCamp(place) : plow ? !place.Kinds.Contains(FieldKind) : !IsYishuvSite(place))
+ var drain = action == DrySwamp;
+ if (camp ? !IsCamp(place) : plow ? !place.Kinds.Contains(FieldKind) : drain ? !place.Kinds.Contains(SwampKind) : !IsYishuvSite(place))
return camp ? $"{place.Name} is not a site for a training camp"
- : plow ? $"{place.Name} is not a site for fields" : $"{place.Name} is not a site for a new yishuv";
+ : plow ? $"{place.Name} is not a site for fields" : drain ? $"{place.Name} is not a swamp" : $"{place.Name} is not a site for a new yishuv";
if (s.Sites.TryGetValue(site, out var work))
return work.BuiltOn == null ? $"{place.Name} is already being built" : $"{place.Name} is already built";
- if (plow && YishuvToBuildFirst(c, s, place) is Site first) return $"{place.Name} can be plowed once {first.Name} is built";
+ if (plow && YishuvToBuildFirst(c, s, place) is Site first)
+ return $"{place.Name} can be plowed once {first.Name} is {(first.Kinds.Contains(SwampKind) ? "drained" : "built")}";
var r = c.RulesAt(s.Date).Mvp!; // the loader requires it in the GDD loop
// Owner decision "Allow borrowing" (2026-10-15, #378 question 13): a short Treasury borrows, as map actions do.
- var cost = camp ? r.BuildCampCost!.Value : plow ? r.PlowFieldsCost!.Value : r.BuildYishuvCost; // the loader requires both in the GDD loop
- EconomySystem.PayOrBorrow(c, s, cost, camp ? "to build a training camp" : plow ? "to plow fields" : "to build a yishuv", why);
+ var cost = camp ? r.BuildCampCost!.Value : plow ? r.PlowFieldsCost!.Value : drain ? r.DrySwampCost!.Value : r.BuildYishuvCost; // the loader requires them in the GDD loop
+ EconomySystem.PayOrBorrow(c, s, cost, camp ? "to build a training camp" : plow ? "to plow fields" : drain ? "to drain a swamp" : "to build a yishuv", why);
// The same reading of D-A6 as training's: the turn of the order is the first build turn, so with
// build_yishuv_turns 6 an order on turn T is built at the end of T+5
// (ProjectsTests.AnOrderOnTurnTWithSixTurnsIsBuiltAtTheEndOfTurnTPlusFive).
- s.Sites[site] = new SiteWork(site, unit, camp ? r.BuildCampTurns!.Value : plow ? r.PlowFieldsTurns : r.BuildYishuvTurns, null);
- why.Add(plow
- ? new Cause("map", site, 1, $"{place.Name}: a group of halutzim began plowing, cost {PlayerText.Money(c, "treasury", cost)}")
+ s.Sites[site] = new SiteWork(site, unit, camp ? r.BuildCampTurns!.Value : plow ? r.PlowFieldsTurns : drain ? r.DrySwampTurns!.Value : r.BuildYishuvTurns, null);
+ why.Add(plow || drain
+ ? new Cause("map", site, 1, $"{place.Name}: a group of halutzim began {(plow ? "plowing" : "draining the swamp")}, cost {PlayerText.Money(c, "treasury", cost)}")
: new Cause("map", site, 1, $"{place.Name}: a group of halutzim began building {(camp ? "a training camp" : "a yishuv")}, cost {PlayerText.Money(c, "treasury", cost)}"));
return null;
}
@@ -106,9 +114,10 @@ namespace Statecraft.Sim
public static bool IsCamp(Site site) => site.Kinds.Contains("military_camp") || site.Kinds.Contains("hakhshara");
/// <summary>R-FIELD-001 (Q-FIELD-1): the yishuv site in <paramref name="field"/>'s hex while it is not built yet, so the
- /// field cannot be plowed; null when the field is ready (its yishuv is built, or it has none in its hex).</summary>
+ /// field cannot be plowed; null when the field is ready (its yishuv is built, or it has none in its hex). R-SWAMP-001
+ /// (Q-SWAMP-1): a swamp site in the hex counts the same way, so its field is ready only once it is drained.</summary>
public static Site? YishuvToBuildFirst(Content c, GameState s, Site field) =>
- c.Sites.FirstOrDefault(y => y.Kinds.Contains(YishuvKind) && y.Q == field.Q && y.R == field.R
+ c.Sites.FirstOrDefault(y => (y.Kinds.Contains(YishuvKind) || y.Kinds.Contains(SwampKind)) && y.Q == field.Q && y.R == field.R
&& !(s.Sites.TryGetValue(y.Id, out var w) && w.BuiltOn != null));
/// <summary>R-SITE-002 (D-A3): the unit's site loses its record, so it is available again and the unit is idle. The
@@ -129,7 +138,8 @@ namespace Statecraft.Sim
/// <paramref name="next"/>, the turn's end date, and its unit is idle again. No city is founded (Phase 1). Then the
/// unit, a halutz, gains a turn of service, and at veteran_halutz_service becomes a veteran_halutz (R-VET-001). A built
/// camp site gives its city the facility from the next turn (R-CAMP-001, Training.HasFacility). A built field site is
- /// plowed (R-FIELD-001), and yields from this turn's step 6 on (R-FIELD-002).</summary>
+ /// plowed (R-FIELD-001), and yields from this turn's step 6 on (R-FIELD-002). A built swamp site is drained, and its
+ /// hex's field site is ready (R-SWAMP-001).</summary>
public static void Advance(Content c, GameState s, DateTime next, List<Cause> why)
{
var r = c.RulesAt(s.Date).Mvp!; // the loader requires it in the GDD loop, the only loop TurnResolver runs this in
@@ -142,7 +152,7 @@ namespace Statecraft.Sim
{
s.Sites[w.Site] = SiteWork.Built(w.Site, next);
var place = c.Sites.First(x => x.Id == w.Site); // a site being built is always in sites.yaml (Start)
- why.Add(new Cause("map", w.Site, 1, $"{place.Name} {(IsCamp(place) ? "built" : place.Kinds.Contains(FieldKind) ? "plowed" : "founded")}"));
+ why.Add(new Cause("map", w.Site, 1, $"{place.Name} {(IsCamp(place) ? "built" : place.Kinds.Contains(FieldKind) ? "plowed" : place.Kinds.Contains(SwampKind) ? "drained" : "founded")}"));
}
// R-VET-001: the project progressed this turn, so a halutz serves a turn; a veteran counts no further.
if (u.Type != "halutz") continue;
diff --git a/tools/web_check.py b/tools/web_check.py
index e7904a7a3..d9dbb3b77 100644
--- a/tools/web_check.py
+++ b/tools/web_check.py
@@ -8,7 +8,7 @@ fail on a failure line or a timeout. Uses Chrome for Testing from the Playwright
--enable-logging=stderr --v=1 as INFO:CONSOLE... "text", source: ...
Usage (from the repo root):
- uv run tools/web_check.py unity/Builds/Web-disabled --query "golden" --expect "GOLDEN OK hash1950 7cf678b6b2b3d55dc0fee7b2efdee9ec7688cdf18964dcaa6e5a7c0018e34a51" --expect "GOLDEN OK hash1952 9496947232f0c97ed21c0a0b98e6727e7d59c892f9aff12049b5d7e5ee2230e8"
+ uv run tools/web_check.py unity/Builds/Web-disabled --query "golden" --expect "GOLDEN OK hash1950 7cf678b6b2b3d55dc0fee7b2efdee9ec7688cdf18964dcaa6e5a7c0018e34a51" --expect "GOLDEN OK hash1952 f9f47f5c783b7dc8d6f47e5e3e048de5899d79e6d55614ee8e6f0331d0fb3cd5"
Options: --query Q (page URL query, without '?'), --expect TEXT (repeatable), --fail REGEX (default: GOLDEN FAIL|SMOKE FAIL|BOOT FAIL),
--timeout SECONDS (default 300), --stall SECONDS (fail when no console message arrives for that long; 0 = off),
--swiftshader (software WebGL when there is no GPU), --dpr N (default 1), --shots DIR (reassemble the player's