A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
R-CTRL-006: enemy units take the player's localities (Refs #1305) (#2955)
Eyal Golan578255ecf508
diff --git a/changelog.d/c30-1305-enemy-captures.md b/changelog.d/c30-1305-enemy-captures.mdnew file mode 100644index 000000000..c220bf625--- /dev/null+++ b/changelog.d/c30-1305-enemy-captures.md@@ -0,0 +1,7 @@+- Enemy units can now take the player's towns, kibbutzim and other localities (R-CTRL-006, Refs #1305): an enemy+ military unit alone on one at the end of a turn makes it lost, with a "lost" line on the Why? screen and the place shown+ as enemy-held, and Israeli units alone on it again retake it. An annexed town can be taken the same way, and retaking it+ makes it annexed again. No choice is offered and residents stay as they are. An+ enemy march only takes the place it is sent to and goes round the others; the historical script sends no enemy force+ to a player's locality, so a Historical game plays as before and saves are unaffected. The sourced loss cards (Yad+ Mordechai, the Jewish Quarter, Nitzanim) come in a later change.diff --git a/docs/GDD.md b/docs/GDD.mdindex 0d6730540..9ee5b9cf2 100644--- a/docs/GDD.md+++ b/docs/GDD.md@@ -201,7 +201,7 @@ The player selects one of three outcomes:After X turns of occupation, the player chooses to install a puppet regime or annex the settlement. X is unset. A puppet regime provides indirect control; annexation incorporates the settlement into the player's territory. Population management, jobs, housing, defense responsibilities and resource access under each outcome are open.-**Then decided (owner, 18 Oct 2026, Q-PUP-1 (c), [#783](https://github.com/eyalgolan/statecraft-israel/issues/783#issuecomment-6249846499); 22 Oct 2026, Q-OCC-3, [#1324](https://github.com/eyalgolan/statecraft-israel/pull/1324#issuecomment-6338594839); 24 Oct 2026, in the coordinator session, "1520: do this: 1. When the player annexes a town whose residents stayed (Acre, Nazareth), how many people, homes and jobs join the game? - a. The same rule as the 12 starting cities: a sourced resident count you approve. (Recommended) 2.b 3.a"; [#799](https://github.com/eyalgolan/statecraft-israel/issues/799#issuecomment-6374876433)):** no puppet regime in the MVP. X is six monthly turns. When an occupation ends the player annexes or withdraws. The residents of a fled town are recorded as fled when it is captured, and the record of the flight stays after a Raid. A town emptied by flight adds land only. A town whose residents stayed (Acre, Nazareth) adds one city by the starting-city rule, from a sourced resident count the owner approves. An annexed town stays Israeli for good, with no upkeep and no unit that has to stay. For a town whose residents already fled at capture, Deport stays listed and is refused with its reason (OWNER QUESTION 4 (a), owner, 24 Oct 2026, "Hide it, button explains (Recommended)", [#799](https://github.com/eyalgolan/statecraft-israel/issues/799#issuecomment-6375591758)). Rules R-CTRL-014 to R-CTRL-017.+**Then decided (owner, 18 Oct 2026, Q-PUP-1 (c), [#783](https://github.com/eyalgolan/statecraft-israel/issues/783#issuecomment-6249846499); 22 Oct 2026, Q-OCC-3, [#1324](https://github.com/eyalgolan/statecraft-israel/pull/1324#issuecomment-6338594839); 24 Oct 2026, in the coordinator session, "1520: do this: 1. When the player annexes a town whose residents stayed (Acre, Nazareth), how many people, homes and jobs join the game? - a. The same rule as the 12 starting cities: a sourced resident count you approve. (Recommended) 2.b 3.a"; [#799](https://github.com/eyalgolan/statecraft-israel/issues/799#issuecomment-6374876433)):** no puppet regime in the MVP. X is six monthly turns. When an occupation ends the player annexes or withdraws. The residents of a fled town are recorded as fled when it is captured, and the record of the flight stays after a Raid. A town emptied by flight adds land only. A town whose residents stayed (Acre, Nazareth) adds one city by the starting-city rule, from a sourced resident count the owner approves. An annexed town stays Israeli for good, with no upkeep and no unit that has to stay (superseded in part: the owner, 8 November 2026, answering the questions on #2955: "Can be taken"; R-CTRL-006). For a town whose residents already fled at capture, Deport stays listed and is refused with its reason (OWNER QUESTION 4 (a), owner, 24 Oct 2026, "Hide it, button explains (Recommended)", [#799](https://github.com/eyalgolan/statecraft-israel/issues/799#issuecomment-6375591758)). Rules R-CTRL-014 to R-CTRL-017.**Then changed (owner, 1 Nov 2026, "3 turns (27 Oct)"; [1 November 2026 answers](#1-november-2026-answers)):** X is three monthly turns, as the owner had ruled on 27 October 2026 ("3 turns, keep upkeep", [#1712](https://github.com/eyalgolan/statecraft-israel/issues/1712#issuecomment-6461246243)). `mvp.occupation_turns` reads 3 (`R-CTRL-012`) since [#2123](https://github.com/eyalgolan/statecraft-israel/pull/2123); the upkeep is unchanged.Open: when is a settlement captured, what constitutes enemy control, and can an occupying force withdraw before the timer ends? Capturing enemy soldiers earns the bonus specified in the MVP objectives. Settlement-control rewards and political penalties remain open.diff --git a/docs/determinism.md b/docs/determinism.mdindex f713d6c28..5abf2efb1 100644--- a/docs/determinism.md+++ b/docs/determinism.md@@ -27,6 +27,12 @@ The simulation must produce the same state, bit for bit, on .NET, Unity Mono andenter the five enemy-held ones since #1304 (R-MOVE-005), but the reference player sends no Move, so none of its units stands on one, and its unit onJaffa's hex (shared with Tel Aviv) captures nothing, since Jaffa is not enemy-held at the start. The smoke-ordersmove skips the lit hexes of enemy-held places on purpose (`GoldenRun.SmokeMove`), so it stays a plain move.+ The enemy's check (R-CTRL-006, #1305) runs in the same step after it, visits the player's localities and the annexed+ targets (the owner on #2955, "Can be taken") in one ordinal id order and draws nothing+ (`CaptureTests.PlayersLocalitiesResolveInOrdinalOrder`, `ALossAndARetakeDrawNothing`,+ `AnEnemyUnitAloneOnAnAnnexedTargetTakesIt`). An enemy move ends on a player's locality or an annexed target only where it+ is sent, and no scripted anchor is on one, so no golden records a loss and no hash moved, `mvp-annex-nazareth`'s+ annexed Nazareth included (`CaptureTests.RealContentLosesNoPlayersLocalityOnTheFirstTurn`).- **Answering a capture (Raid and withdraw):** the units on the place leave in ascending id, each to the first free hex inthe fixed neighbour order, and the captures still waiting at the game's end resolve in ordinal id order, with no RNGdraw (R-CTRL-008, R-CTRL-010; `RaidTests.RaidDrawsNothing`). Only `mvp-occupy-cost` captures a place, and it answers with Occupy, so no golden Raids one.diff --git a/docs/gdd/settlement-control.md b/docs/gdd/settlement-control.mdindex 1a4ed26a8..d36cd1e1c 100644--- a/docs/gdd/settlement-control.md+++ b/docs/gdd/settlement-control.md@@ -8,7 +8,7 @@ I can recover from losing a region and understand controlling an enemy town with## Rules- Only `arab_town` rows of `settlements_1948.yaml` that a sourced operation names may enter the curated target list (R-CTRL-001). Jaffa and Gaza require the target research before they can enter it. Every target row is `sensitivity-reviewed`, and an unreviewed row is refused by the release gate (`Q-TGT-1`, `Q-TGT-3`, owner ruling [S3]). **Then decided (owner, 18 Oct 2026, "Only in a what-if"; [#793](https://github.com/eyalgolan/statecraft-israel/issues/793#issuecomment-6254333177)):** Jaffa stays on the target list, but is a target in play only if an alternate-timeline card returns it to Arab control; in the historical course it is Israeli-held from the start and no capture decision is offered [S9].-- Enemy units may capture the player's localities. The capture changes their state, and every place tied by sources to a dated loss receives a sourced card. A capture that exists only in an alternate timeline also requires researched cards (`Q-TGT-2`; planned R-CTRL-006; owner ruling [S3]).+- Enemy units may capture the player's localities. The capture changes their state, and every place tied by sources to a dated loss receives a sourced card. A capture that exists only in an alternate timeline also requires researched cards (`Q-TGT-2`; owner ruling [S3]). The state change is R-CTRL-006 (#1305); the cards are a later content PR.- Settlement state uses one immutable record per settlement in an ordinal `SortedDictionary<string, SettlementControl>`. It is written to the deterministic hash as `ctrl{...}` only when non-empty, and each field is written only when it differs from its default. `DisplacedByPlayer` is an integer count of places and is written only when non-zero (`Q-TECH-2`, `Q-CAP-2`; R-CTRL-002 for the collection; owner rulings [S3], [S4]).- Residents and combatants are distinct. The state records whether a place is inhabited, fled or depopulated, not a resident count, and only enemy military units on its hex are combatants (`Q-CAP-2`, `Q-CAP-3`; R-CTRL-003; owner ruling [S4]).- A target is captured the moment an Israeli military unit's move or go-to stops on its hex while no enemy combatant is there; a halutz holds nothing. The capture answer still takes effect at End turn (`Q-CAP-1` / `D-F2`; R-CTRL-004, R-CTRL-005; owner ruling [S4]; owner, 23 October 2026, #1402 and #1398: "Instant", "Yes, answer at End turn" and "Approve, start building").@@ -20,7 +20,7 @@ I can recover from losing a region and understand controlling an enemy town with- The MVP has no puppet-regime outcome. When an occupation ends, the choices are annex or withdraw (`Q-PUP-1` / `D-F4`; planned R-CTRL-015; owner ruling [S6]).- On capture, the residents of a target place are recorded as having fled, unless highly credible Israeli sources, such as an official or state-archive history, say otherwise for that place (in the owner's words, "default is fled, unless you have super credible israeli sources that say otherwise"). Every place's outcome is recorded in its reviewed target row. Where the residents stayed, annexation joins them to the player's population with their housing and jobs (`Q-ANNEX-1` / `D-F4`; planned R-CTRL-016; owner rulings [S6], [S7]).- A place emptied by flight grants territory only. Annexation of it grants no housing, jobs or score (`Q-ANNEX-1` follow-up; planned R-CTRL-016; owner ruling [S7]).-- **Then decided (owner, 24 Oct 2026, in the coordinator session; [#799](https://github.com/eyalgolan/statecraft-israel/issues/799#issuecomment-6374876433)):** annexing a stayed town (Acre, Nazareth) adds one city by the starting-city rule, from a sourced resident count the owner approves (R-CTRL-016); a fled town's residents are recorded as fled at capture, and the record stays after any return to enemy control (R-CTRL-003 to R-CTRL-005, R-CTRL-010); an annexed town stays Israeli for good, with no upkeep and no unit that has to stay (R-CTRL-016). Deport of a town whose residents fled at capture stays listed third and is refused, with its reason on the button (OWNER QUESTION 4 (a), "Hide it, button explains (Recommended)"; R-CTRL-018; owner ruling [S12]). (unitless)+- **Then decided (owner, 24 Oct 2026, in the coordinator session; [#799](https://github.com/eyalgolan/statecraft-israel/issues/799#issuecomment-6374876433)):** annexing a stayed town (Acre, Nazareth) adds one city by the starting-city rule, from a sourced resident count the owner approves (R-CTRL-016); a fled town's residents are recorded as fled at capture, and the record stays after any return to enemy control (R-CTRL-003 to R-CTRL-005, R-CTRL-010); an annexed town stays Israeli for good, with no upkeep and no unit that has to stay (R-CTRL-016; superseded in part: the owner, 8 November 2026, answering the questions on #2955: "Can be taken"; R-CTRL-006). Deport of a town whose residents fled at capture stays listed third and is refused, with its reason on the button (OWNER QUESTION 4 (a), "Hide it, button explains (Recommended)"; R-CTRL-018; owner ruling [S12]). (unitless)The owner answers for plan #1520 are catalogued in [S11].@@ -54,7 +54,7 @@ The retained `R-CTRL-011` rule requires an Israeli military unit on the place'sThe retained ruling has no puppet-regime outcome [S6]. **Amir's proposal, declined by the owner on 30 October 2026 (Annexation conflict, option A) [S1]:** town/city regime taxes would be added; that addition is non-operative. For an annexation cost, the 30 October 2026 conflict review did not rule; `R-CTRL-016` (`docs/rules/mvp.md`) stays operative. Puppet regimes and regime taxes are post-MVP design (owner, 1 November 2026, Q28 to Q33): an annexed town that stayed earns ordinary city income, and a fled place pays nothing [S16].-**Amir's proposal, declined by the owner on 30 October 2026 [S1]:** enemy recapture would clear annexation. The retained ruling says an annexed town stays Israeli for good [S11].+**Amir's proposal, declined by the owner on 30 October 2026 [S1]:** enemy recapture would clear annexation. The ruling of 24 October 2026 said an annexed town stays Israeli for good [S11]. **Then decided (owner, 8 November 2026, answering the questions on #2955):** "Can be taken", the option "Enemy units can take an annexed town like any Israeli town, and Israeli units retaking it make it annexed again" (`R-CTRL-006`), so a recapture does not clear the annexation for good; and "Destination only (Recommended)": an enemy march takes only the place it is sent to.**Amir's proposal, declined by the owner on 30 October 2026 [S1]:** residents would remain outside the player's civilian systems and produce regime taxes. The retained rule adds residents of stayed towns under the starting-city rule [S11].@@ -82,7 +82,7 @@ Old references to Raid, Occupy and Deport do not approve every sensitive outcome- `uv run scripts/oss/rule_ids.py` passes without defining any planned Phase six ID in this docs-only change.- `uv run scripts/oss/check_repo.py` passes.- **Amir's proposal, declined by the owner on 30 October 2026 (Regional pooling conflict, option A) [S13]:** capital capture would disable a region. That criterion is non-operative. Route-blocked evacuation is post-MVP (owner, 1 November 2026: "30 Oct wins for the MVP (Recommended)") [S16]. While an enemy unit holds an Israeli city's hex, its jobs, Food production and projects pause, and they resume on retaking with nothing deleted (D6) [S16].-- Pre-annexation withdrawal becomes a Raid; after annexation the town stays Israeli for good, with no unit that has to stay [S11].+- Pre-annexation withdrawal becomes a Raid; after annexation no unit has to stay [S11]. Enemy units can take an annexed town like any Israeli town, and Israeli units retaking it make it annexed again (owner, 8 November 2026, on #2955: "Can be taken"; `R-CTRL-006`).- The proposal's resident treatment is not implemented unless the owner supersedes R-CTRL-016.- Unreviewed outcomes remain unavailable and shared-hex identities stay distinct.diff --git a/docs/mvp-checklist.md b/docs/mvp-checklist.mdindex 8c493dfee..b7f46c010 100644--- a/docs/mvp-checklist.md+++ b/docs/mvp-checklist.md@@ -91,7 +91,7 @@ PRs 1 to 12 have their owner answers recorded in the Phase 6 plan (#1060, #1069)- [x] **Done: `docs/rules/mvp.md`, R-CTRL-001.** PR 1 target-list research (#977, #1046, #1299, #1333; #793 closed). The owner sensitivity-reviewed the later residents fields on 24 October 2026 (#1569), so all six target rows are `sensitivity-reviewed` (`content/settlement_targets.yaml:7-10`); Deport activation and the phase close remain with #802 and #804.- [x] **Done: `docs/rules/mvp.md`, R-EFX-007 and R-GATE-001.** PR 2 `displacement` tag and release gate (#1070; #794).- [x] **Done: `docs/rules/mvp.md`, R-CTRL-001 to R-CTRL-003.** PR 3 target list and settlement state (#1077; #795).-- [x] **Done: `docs/rules/mvp.md`, R-CTRL-004 and R-CTRL-005.** PR 4 capture, resolver step 3 (#1239; #796 closed). Enemy captures of the player's localities, R-CTRL-006, remain #1305; player units entering enemy-held targets are done (#1314 merged; #1304 closed).+- [x] **Done: `docs/rules/mvp.md`, R-CTRL-004 and R-CTRL-005.** PR 4 capture, resolver step 3 (#1239; #796 closed). Enemy captures of the player's localities, R-CTRL-006: the state change is in #1305's PR 1, the sourced and what-if cards are its PR 2; player units entering enemy-held targets are done (#1314 merged; #1304 closed).- [x] **Done: `docs/rules/mvp.md`, R-CTRL-007 to R-CTRL-010.** PR 5 `ResolveCapture`, the options helper, and Raid and withdraw (#1257; #797 closed).- [x] **Done: `docs/rules/mvp.md`, R-CTRL-011 to R-CTRL-013.** PR 6 Occupy, the occupation timer and withdrawal (#1324 merged; #798 closed).- [x] **Done: `docs/rules/mvp.md`, R-CTRL-014 to R-CTRL-017.** PR 7 annex or withdraw (Q-PUP-1: no puppet regime in the MVP; #1526 merged; #799 closed).diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex 2fdafc1d7..00d609d4e 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -42,7 +42,9 @@ R-CTRL-002: Settlement control is an ordinal `SortedDictionary<string, SettlemenR-CTRL-003: Residents and combatants are distinct fields. Residents are a state, inhabited, fled or depopulated, not a count (Q-CAP-2 (b)). Fled is the record's `Fled`, set at capture from the target row's `residents: fled` and never cleared (OWNER QUESTION 2 (b), owner, 24 October 2026, #799); flight is not Deport: it adds nothing to `DisplacedByPlayer` and costs nothing. No rule reads residents as combatants, prisoners, refugee units, labour or a resource; annexation is the one place a later owner-approved rule may say otherwise.-R-CTRL-004: The capture check runs after the route step and each order, and still in resolver step 3 after enemy combat, in ordinal settlement id (Q-CAP-1 (a), Q-CAP-3 (a), owner rulings of 18 October 2026). A target that starts under enemy control, one listed in `mvp.enemy_held_localities` (owner, 21 October 2026, #796), is captured at once when Israeli military units are on its hex and no enemy military unit is; only enemy military units are combatants (Q-CAP-3 (a)), and a halutz holds nothing (#796). Passing through a target does not capture it; only a move's or go-to's stopping hex counts (owner, 23 October 2026, OQ-2: "Instant"). Its record names `israel` as owner and has the state `awaiting_choice`; the preview leaves `Since` unset, and Step stamps the turn's end before the resolver, preserving the date through a same-turn answer. The answer stays deferred until End turn (R-TURN-004). A capture remains when the unit leaves; the player's units stay on the hex. A captured target still awaiting the choice that only enemy military units are on is under enemy control again, and its record becomes the ownerless marker of R-CTRL-002. A target not enemy-held at the start (Jaffa, owner ruling of 18 October 2026 on #793, "Only in a what-if") is never captured. The check is an integer rule on unit positions and draws nothing from the RNG. Enemy captures of the player's localities (Q-TGT-2 (c), the plan's R-CTRL-006) are not built yet: with the real starting forces a Syrian unit stands on Degania Alef's hex with no Israeli unit, so the rule would record a capture at the first turn's end (#796). Every ownerless, non-depopulated record is no record for the capture check, so the place can be captured again; the new record keeps its `fled` value and takes the new turn's date. `Stamp` dates every new settlement record, including the stayed lost marker, as it dates Deport's (OWNER QUESTION 2 (b), owner, 24 October 2026, #799).+R-CTRL-004: The capture check runs after the route step and each order, and still in resolver step 3 after enemy combat, in ordinal settlement id (Q-CAP-1 (a), Q-CAP-3 (a), owner rulings of 18 October 2026). A target that starts under enemy control, one listed in `mvp.enemy_held_localities` (owner, 21 October 2026, #796), is captured at once when Israeli military units are on its hex and no enemy military unit is; only enemy military units are combatants (Q-CAP-3 (a)), and a halutz holds nothing (#796). Passing through a target does not capture it; only a move's or go-to's stopping hex counts (owner, 23 October 2026, OQ-2: "Instant"). Its record names `israel` as owner and has the state `awaiting_choice`; the preview leaves `Since` unset, and Step stamps the turn's end before the resolver, preserving the date through a same-turn answer. The answer stays deferred until End turn (R-TURN-004). A capture remains when the unit leaves; the player's units stay on the hex. A captured target still awaiting the choice that only enemy military units are on is under enemy control again, and its record becomes the ownerless marker of R-CTRL-002. A target not enemy-held at the start (Jaffa, owner ruling of 18 October 2026 on #793, "Only in a what-if") is never captured. The check is an integer rule on unit positions and draws nothing from the RNG. Enemy captures of the player's localities (Q-TGT-2 (c)) are R-CTRL-006. Its old blocker (#796), a Syrian unit starting on Degania Alef's hex, is gone since the 4.4 km grid (#1796): the Syrian start is (13, 10) and Degania Alef is (12, 11). Every ownerless, non-depopulated record is no record for the capture check, so the place can be captured again; the new record keeps its `fled` value and takes the new turn's date. `Stamp` dates every new settlement record, including the stayed lost marker, as it dates Deport's (OWNER QUESTION 2 (b), owner, 24 October 2026, #799).++R-CTRL-006: Enemy units take the player's localities (Q-TGT-2 (c), owner, 18 October 2026, https://github.com/eyalgolan/statecraft-israel/issues/783#issuecomment-6249796458: "c + in what if scenarios that are outside of the historical timeline we need to research cards"; option (c) is option (b), "enemy units capture them, with a state change and no outcome choice", with sourced cards for places sources tie to a dated loss). A player's locality is every `settlements_1948.yaml` row that is not an `arab_town` and not on `mvp.enemy_held_localities` (owner, 21 October 2026, https://github.com/eyalgolan/statecraft-israel/issues/796#issuecomment-6315647311: "Default 3 as proposed (the player's localities)"; the proposal: "An enemy military unit holding one with no Israeli combatant changes its state, with no choice. Israeli units holding it again change it back."). In resolver step 3, after R-CTRL-004's check, each player's locality is checked in ordinal id. One with no record that only enemy military units are on (a halutz holds nothing, #796) is lost: it gets R-CTRL-002's ownerless marker, dated the turn's end, and one `place_lost` line, "{name} is lost: enemy units hold it and no Israeli unit is there". A lost one that only Israeli military units are on loses that marker again and gets one `place_retaken` line, "{name} is retaken: Israeli units hold it again and no enemy unit is there". The check is an integer rule on unit positions and draws nothing from the RNG. As R-CTRL-005, it writes the settlement state only: it offers no choice and changes no resident, unit, resource or score. An annexed target is taken the same way, on its target's hex (R-CTRL-001; Ramla's is (-3, 24)) (the owner, 8 November 2026, answering the questions on #2955: "Can be taken", the option "Enemy units can take an annexed town like any Israeli town, and Israeli units retaking it make it annexed again"): the record loses only its owner, so it is enemy-held again, with the same `place_lost` line; Israeli military units alone on it give the owner back, with the same `place_retaken` line, so it is annexed again with the record it had. A retake is no new capture (R-CTRL-004 skips an ownerless annexed record), and nothing R-CTRL-016 added is taken away or added a second time. An enemy move ends on a player's locality or an annexed target Israel holds only when that hex is where the move is sent, and no enemy path passes through one (R-ENEMY-001; the owner, 8 November 2026, answering the questions on #2955: "Destination only (Recommended)"), so a march never takes a place on its way. No scripted enemy anchor is on a player's locality, so the shipped goldens lose none. On a city's hex the war-loss check (R-END-003) still reads the enemy unit as before. The sourced loss cards and the what-if cards of Q-TGT-2 (c) are a later content PR (#1305).R-CTRL-005: Capture writes the settlement state only. It changes no resident field except that a target whose row says `residents: fled` is recorded with `fled=1` and its capture line says its residents fled (OWNER QUESTION 2 (b), owner, 24 October 2026, #799), no unit, no resource, parameter, city or score, and counts towards no objective (constraint 6 of the Phase 6 plan; impact plan section 4.3).@@ -64,7 +66,7 @@ R-CTRL-014: `EndOccupation(settlement, outcome)` answers the end of an occupatioR-CTRL-015: No puppet regime (Q-PUP-1 (c), owner, 18 October 2026, #783). `SettlementControl.EndOptions(content, state, settlement)` offers Annex and Withdraw, in that order (the ruling's words, "annex or withdraw"), with no default or selected flag, each with its refusal or its preview as `CaptureOptions` (R-CTRL-008); it is empty when the place is not awaiting the end. Withdraw is R-CTRL-010's withdrawal, the same code path.-R-CTRL-016: Annexation and the residents (Q-ANNEX-1, owner, 18 October 2026, #783; OWNER QUESTIONS 1 (a) and 3 (a), owner, 24 October 2026, #799). The record becomes `owner=israel,state=annexed`, keeping its capture date and `fled`, with no timer. A fled place adds nothing else: no city, people, housing, jobs, Food, Money, Arms, indicator change, score or objective progress ("Territory only, no gain"). A stayed place adds one city by the starting-city rule: its row's `annexation.people` (a sourced count the owner approves) in population units (R-CITY-007), housing equal to them, job slots equal to the employed (people times `annexation.employed_share`, the national share 0.439, to the nearest unit), the condition `mvp.housing_start_condition`, and no refugees, recruits or craftsmen, and the same approved people join `GameState.Population` (R-CITY-008; owner, 4 November 2026, #2608, the option labelled "Yes, add them (Recommended)"), in a group of their own, `annexed`, unless an initialized gdd-0.3 ledger keeps the record (the separate group and that exception are this change's design, not the owner's ruling); refused, the state unchanged, if the id is already a city. Each target row says `residents: fled` or `stayed` with at least one source (`residents_sources`); only a stayed row has an `annexation` block, whose `people` must be a sourced whole number; any other row is a load error naming file and field. The town stays Israeli for good: step 10 ignores an annexed record, so the upkeep stops and no unit has to stay, and an annexed target is no enemy-held locality for movement (R-MOVE-005, R-ENEMY-001). A city that exists only in state has no training facility.+R-CTRL-016: Annexation and the residents (Q-ANNEX-1, owner, 18 October 2026, #783; OWNER QUESTIONS 1 (a) and 3 (a), owner, 24 October 2026, #799). The record becomes `owner=israel,state=annexed`, keeping its capture date and `fled`, with no timer. A fled place adds nothing else: no city, people, housing, jobs, Food, Money, Arms, indicator change, score or objective progress ("Territory only, no gain"). A stayed place adds one city by the starting-city rule: its row's `annexation.people` (a sourced count the owner approves) in population units (R-CITY-007), housing equal to them, job slots equal to the employed (people times `annexation.employed_share`, the national share 0.439, to the nearest unit), the condition `mvp.housing_start_condition`, and no refugees, recruits or craftsmen, and the same approved people join `GameState.Population` (R-CITY-008; owner, 4 November 2026, #2608, the option labelled "Yes, add them (Recommended)"), in a group of their own, `annexed`, unless an initialized gdd-0.3 ledger keeps the record (the separate group and that exception are this change's design, not the owner's ruling); refused, the state unchanged, if the id is already a city. Each target row says `residents: fled` or `stayed` with at least one source (`residents_sources`); only a stayed row has an `annexation` block, whose `people` must be a sourced whole number; any other row is a load error naming file and field. The town stays Israeli unless enemy units take it: step 10 ignores an annexed record, so the upkeep stops and no unit has to stay, and an annexed target Israel holds is no enemy-held locality for movement (R-MOVE-005, R-ENEMY-001). Enemy units can take it like any Israeli town, and Israeli units retaking it make it annexed again (R-CTRL-006; the owner, 8 November 2026, answering the questions on #2955: "Can be taken"); while it is taken its record has no owner and it is enemy-held again. A city that exists only in state has no training facility.R-CTRL-017: A depopulated place (Deport) is never offered or given `EndOccupation`, so it is never annexed (Q-ANNEX-2 (a), owner, 18 October 2026, #783). The owner's rulings of 27 October 2026 on #1712 (https://github.com/eyalgolan/statecraft-israel/issues/1712#issuecomment-6461246243) and of 1 November 2026 ("30 Oct wins for the MVP (Recommended)") leave it as written. It holds unchanged under gdd-0.3 (`EndOccupationTests.ADepopulatedPlaceIsNeverAnnexed`).@@ -116,7 +118,7 @@ The #1696 status comment of 27 October 2026 says, "It does not yet provide the lR-CITY-009: The job default (Q-JOBS-1, owner, 15 October 2026). On each housing step, after the refugees become civilians (R-CITY-004), each city whose default is on sets its employed to `min(job slots, civilians + craftsmen)`, in ascending city id, at no Attention cost. Every city's default is on at the start; an accepted `AssignWorkers` order fixes that city's number and turns its default off for the rest of the game. Each change is a `city` cause on the Why screen ("Town: N groups in work"). A city's record writes `jobs=manual` into the state hash only when its default is off.-R-CITY-010: A city the enemy holds pauses (decision D6, owner, 1 November 2026, "Approve all six (Recommended)", [answers](https://github.com/eyalgolan/statecraft-israel/pull/1668#issuecomment-6553884547); #1711). Under gdd-0.3 only, a city is held in a turn when an enemy military unit (a unit with a `side` other than the player's; a halutz has no side and holds nothing, R-UNIT-001) stands on its settlement hex when steps 5 and 6 run, after step 3: no later step moves an enemy unit, so that is where it stands at the turn's end. An enemy formation that arrives on the hex at step 9 (R-UNIT-009) holds the city from the next turn. That turn a held city pays no R-CITY-002 job income and its R-PROJ-003 projects gain no progress: their records, turns left and carried fraction stay as they were. Its staffed arms workshops pause the same way: no charge and no progress, the cycle kept (R-ARMS-006). The housing step still absorbs refugees and fills default jobs; its people and every id stay, nobody is evacuated, and an objective already awarded stays awarded. A turn in which no enemy unit is on the hex pays and builds as before. Cities have no Food production of their own on main (R-FIELD-002 fields belong to no city), so there is nothing else to pause until #1694 links fields to cities. The gdd-0.3 field fixture pauses a field the same way (R-FIELD-002, #2471): a field not Israeli-held at settlement adds no Food, and its farmer and assignment stay until it is retaken. gdd-0.1 and legacy are unchanged, and gdd-0.1 keeps its R-END-003 defeat. Each turn a city is held, step 6 writes one Why line for it ("Town: held by the enemy; no job income or project work this turn", no change of its own), in city id order; the turn-report panel lists those lines in a row of their own, "Cities held by the enemy", after the stocks and the arms workshops and before the enemy's orders (#1711). A retaken city gets no line.+R-CITY-010: A city the enemy holds pauses (decision D6, owner, 1 November 2026, "Approve all six (Recommended)", [answers](https://github.com/eyalgolan/statecraft-israel/pull/1668#issuecomment-6553884547); #1711). Under gdd-0.3 only, a city is held in a turn when an enemy military unit (a unit with a `side` other than the player's; a halutz has no side and holds nothing, R-UNIT-001) stands on its settlement hex when steps 5 and 6 run, after step 3: no later step moves an enemy unit, so that is where it stands at the turn's end. An enemy formation that arrives on the hex at step 9 (R-UNIT-009) holds the city from the next turn. That turn a held city pays no R-CITY-002 job income and its R-PROJ-003 projects gain no progress: their records, turns left and carried fraction stay as they were. Its staffed arms workshops pause the same way: no charge and no progress, the cycle kept (R-ARMS-006). The housing step still absorbs refugees and fills default jobs; its people and every id stay, nobody is evacuated, and an objective already awarded stays awarded. A turn in which no enemy unit is on the hex pays and builds as before. A city the map marks lost (#2955) with no enemy unit on its hex still pays and builds: the lost mark is map-only (owner, 8 November 2026: "Earn when empty (Recommended)"). Cities have no Food production of their own on main (R-FIELD-002 fields belong to no city), so there is nothing else to pause until #1694 links fields to cities. The gdd-0.3 field fixture pauses a field the same way (R-FIELD-002, #2471): a field not Israeli-held at settlement adds no Food, and its farmer and assignment stay until it is retaken. gdd-0.1 and legacy are unchanged, and gdd-0.1 keeps its R-END-003 defeat. Each turn a city is held, step 6 writes one Why line for it ("Town: held by the enemy; no job income or project work this turn", no change of its own), in city id order; the turn-report panel lists those lines in a row of their own, "Cities held by the enemy", after the stocks and the arms workshops and before the enemy's orders (#1711). A retaken city gets no line.R-CITY-005: The cities' employed share (employed over civilians and craftsmen, summed over all cities; 1 with none) is an effect-web source of `morale`, Social cohesion (`work_lifts_cohesion`, source id `employed_share`), read after the turn's housing. The legacy loop has no cities, so there it reads 0 and adds nothing. Housing reaches Social cohesion through the existing `housing` link (`homes_lift_morale`) until Phase 3 makes it the cities' aggregate (Q-NAT-2, decided 15 October 2026). Phase 1's separate cohesion value and its two weights are gone (D-C1, Reading 2).@@ -306,7 +308,7 @@ R-MOVE-003: A hex holds at most `mvp.stack_limit` units of one side (Q-MOVE-3; rR-MOVE-004: There is no zone of control (Q-MOVE-4): a unit passes next to an enemy unit at the terrain's cost, but no path enters or passes through an enemy unit's hex. Units may enter any land hex on the board; the 1948 control layer stays display-only. There is no transport (Q-MOVE-5). The same water, enemy-hex and no-zone-of-control restrictions apply under `gdd-0.3`; water catalogue rows must remain `impassable`.-R-MOVE-005: A player unit cannot enter the hex of an enemy-held locality that is not a curated target (`settlement_targets.yaml`, R-CTRL-001), and no path passes through one: in Phase 6 only Gaza stays closed (Q-CIV-1, owner, 15 October 2026: "No entry until Phase 6"; Q-TGT-1 (a)). The hex of an enemy-held target is open, so a player unit may move onto it, or through it, and capture it in play (R-CTRL-004; the owner's ruling on #793, 21 October 2026, that the targets "can be captured in play", https://github.com/eyalgolan/statecraft-israel/issues/793#issuecomment-6322289565; #1304). Raid's withdrawal (R-CTRL-010) and combat retreat (R-COMBAT-003) still never end on any enemy-held locality, target or not, and the enemy's mirror (R-ENEMY-001) is unchanged. The localities are the settlements listed in `rules.yaml` `mvp.enemy_held_localities` (`settlements_1948.yaml` ids; the loader refuses an unknown one). The real list is the owner-accepted DRAFT (19 October 2026, https://github.com/eyalgolan/statecraft-israel/pull/1073#issuecomment-6259083180): acre, nazareth, lod, ramla, gaza, beersheba. It is unchecked: no person has yet checked each place's control on 15 May 1948; research task #1096 will check it. An annexed target (R-CTRL-016) is no enemy-held locality: the player's withdrawal and retreat may end on it, and enemy units may not enter it, as any Israeli town (#799). Under `gdd-0.3` these guards remain; a `kind: fort` location grants neither locality capture eligibility nor peaceful entry onto hostile combatants (R-COMBAT-010).+R-MOVE-005: A player unit cannot enter the hex of an enemy-held locality that is not a curated target (`settlement_targets.yaml`, R-CTRL-001), and no path passes through one: in Phase 6 only Gaza stays closed (Q-CIV-1, owner, 15 October 2026: "No entry until Phase 6"; Q-TGT-1 (a)). The hex of an enemy-held target is open, so a player unit may move onto it, or through it, and capture it in play (R-CTRL-004; the owner's ruling on #793, 21 October 2026, that the targets "can be captured in play", https://github.com/eyalgolan/statecraft-israel/issues/793#issuecomment-6322289565; #1304). Raid's withdrawal (R-CTRL-010) and combat retreat (R-COMBAT-003) still never end on any enemy-held locality, target or not, and no enemy retreat ends on a player's locality (R-ENEMY-001). The localities are the settlements listed in `rules.yaml` `mvp.enemy_held_localities` (`settlements_1948.yaml` ids; the loader refuses an unknown one). The real list is the owner-accepted DRAFT (19 October 2026, https://github.com/eyalgolan/statecraft-israel/pull/1073#issuecomment-6259083180): acre, nazareth, lod, ramla, gaza, beersheba. It is unchecked: no person has yet checked each place's control on 15 May 1948; research task #1096 will check it. An annexed target Israel holds (R-CTRL-016) is no enemy-held locality: the player's withdrawal and retreat may end on it, and an enemy unit may enter it only as the hex its move is sent to, which takes it, and no enemy path passes through it (R-CTRL-006; the owner, 8 November 2026, answering the questions on #2955: "Can be taken" and "Destination only (Recommended)"). Under `gdd-0.3` these guards remain; a `kind: fort` location grants neither locality capture eligibility nor peaceful entry onto hostile combatants (R-COMBAT-010).R-MOVE-006: `Move` is refused with the state unchanged and a reason when the unit does not exist, is not the player's (a unit of a side other than Israel), cannot move or is already on the hex, when the hex is water or off the board, holds an enemy unit, is an enemy-held locality closed by R-MOVE-005 or is full of the unit's side, or when no path reaches it within the points the unit has left this turn. It costs no Attention (D-A6). A Move that goes through clears a fortify order (`fortify`, or `fortifying` the turn it is given) and the hex it names at once, so a unit that leaves its hex and comes back in the same turn is not fortified (Q-HOLD-1, "lost on move"); hold moves with the unit; a refused Move changes nothing. Under `gdd-0.3` the same immediate/refusal/order-clearing contract uses the effective allowance and role terrain costs in R-MOVE-001. Moving never removes a permanent fort (R-COMBAT-010).@@ -362,7 +364,7 @@ R-COMBAT-010: Under exact identity `gdd-0.3` only, an effective map-location hexPhase 5 PR 10, part 1 (#749). Q-ENEMY-1 to Q-ENEMY-4 are the plan's recommendations (owner, 15 October 2026, #375: "Take all recommendations"). The march's turns (through the 15 June 1948 turn, until the first truce ends on 8 July) are the owner's (owner, 21 October 2026, #749); so is the truce guard (R-ENEMY-006, same ruling). The scripted anchor's choice, the goal order, `mvp.enemy_attack_ratio_percent` and the truce guard's turn-middle reading are agent defaults proposed on #749 and #1263. The operation cards' orders (Q-ENEMY-5, the plan's R-ENEMY-005) are part 2: its ruleset, its byte pins and its orders are the owner's (31 October 2026, #749).-R-ENEMY-001: Resolver step 1, before combat, gives every enemy military unit its orders, in ascending unit id, from the state alone: two equal states get the same orders. They go through the player's own checks with the sides swapped (`Movement.Move`, `Combat.Give`, `Orders.Give`), and a refused order changes nothing. So an enemy unit may not enter a hex holding a player unit, water or a full hex (R-MOVE-003), and, as R-MOVE-005's mirror, no locality's hex that is not on `mvp.enemy_held_localities`: while enemy capture (R-CTRL-006) is unbuilt, no enemy move ends on a player's locality. Its attacks pay no Arms (Q-ENEMY-4: no enemy supply). Step 1 draws nothing from the RNG (Q-ENEMY-2). An annexed target counts as an Israeli town for enemy movement (R-CTRL-016, #799).+R-ENEMY-001: Resolver step 1, before combat, gives every enemy military unit its orders, in ascending unit id, from the state alone: two equal states get the same orders. They go through the player's own checks with the sides swapped (`Movement.Move`, `Combat.Give`, `Orders.Give`), and a refused order changes nothing. So an enemy unit may not enter a hex holding a player unit, water or a full hex (R-MOVE-003), and, as R-MOVE-005's mirror, no locality's hex that is not on `mvp.enemy_held_localities`, except the player's locality or annexed target a move is sent to, which it then takes (R-CTRL-006; the owner, 8 November 2026, answering the questions on #2955: "Can be taken"). No enemy path passes through a player's locality or an annexed target Israel holds (the owner, 8 November 2026, answering the questions on #2955: "Destination only (Recommended)"), as a card's go-to goes round every place it is not sent to (R-ENEMY-005; the owner's answer 1 on #2087, 31 October 2026), and no enemy retreat ends on one. An `arab_town` off the list (Jaffa) and a hex it shares stay closed. Its attacks pay no Arms (Q-ENEMY-4: no enemy supply). Step 1 draws nothing from the RNG (Q-ENEMY-2).R-ENEMY-002: In Historical mode each starting Arab force (R-UNIT-006) has a script from `map/units_1948.yaml` (Q-ENEMY-1; `research_notes/GDD phase 5/arab-forces-1948.md` section 10). Its 15 May 1948 position is the start. Its script is every anchor of the row from 11 June 1948 on that cites at least two sources other than Wikipedia and Wikidata, each on its hex (`map/unit_anchor_hexes.yaml`), in the file's order. On each turn its target is the first of them whose window has not ended when the turn starts (its `to`; owner, 31 October 2026, #1270 ruling a: "First listed (as today)"): to 8 July 1948 Isdud for Egypt (the forward base, listed before Majdal), Latrun for the Arab Legion, the bridgehead at Mishmar HaYarden for Syria and Jenin for Iraq; the ALA has none. After 8 July only Syria has one, the same bridgehead to the Syrian armistice of 20 July 1949 (#1270, anchor S1; the other forces' anchors past the first truce are #1270's later slices). The unit moves along its cheapest path to the target (R-MOVE-002) as far as its movement points reach. A unit on its target, with no path to it or whose move is refused follows R-ENEMY-003 that turn, and so does every unit from the turn its last window has ended. The script never places a unit anywhere but its own path to a sourced anchor.@@ -488,7 +490,7 @@ R-END-002: In the resolver's step 11, after the objectives and the score (specR-END-003: Under gdd-0.1, when an enemy military unit (a unit with a `side` other than the player's; a halutz has no side, R-UNIT-001) holds the hex of one of the player's GDD cities (`cities.yaml`; the hex in `map/settlement_hexes.yaml`) at the end of a turn, the game ends at once with `defeat_war` and a cause in the turn's causes, under the game's end (`era`). One turn is enough, any of the GDD cities, at any time, truces included (Q-WAR-5; Q-DEF-3, owner, 17 October 2026, #784). The check runs in the resolver's last step after the economic count (R-END-002), so a turn the economic defeat also ends keeps `defeat_economy`.-Under the explicit `gdd-0.3` ruleset, this city-loss check is skipped before scanning cities or units: losing a city or region alone does not set `GameOver` or emit a `defeat_war` cause. The existing economic and dated ends retain their order; an already-ended game is never revived. Authority: the owner's two rulings recorded on 25 October 2026 on #1668, [“there is an economic defeat”](https://github.com/eyalgolan/statecraft-israel/pull/1668#issuecomment-6403926601) and [city or region loss does not end the game](https://github.com/eyalgolan/statecraft-israel/pull/1668#issuecomment-6403936877). This exception does not implement region transfer, evacuation, recapture or new enemy capture permissions (R-CTRL-006 remains unbuilt); it changes no legacy or gdd-0.1 rule.+Under the explicit `gdd-0.3` ruleset, this city-loss check is skipped before scanning cities or units: losing a city or region alone does not set `GameOver` or emit a `defeat_war` cause. The existing economic and dated ends retain their order; an already-ended game is never revived. Authority: the owner's two rulings recorded on 25 October 2026 on #1668, [“there is an economic defeat”](https://github.com/eyalgolan/statecraft-israel/pull/1668#issuecomment-6403926601) and [city or region loss does not end the game](https://github.com/eyalgolan/statecraft-israel/pull/1668#issuecomment-6403936877). This exception does not implement region transfer, evacuation, recapture or new enemy capture permissions; R-CTRL-006's loss of a player's locality ends no game here either. It changes no legacy or gdd-0.1 rule.## The end reportdiff --git a/sim/Statecraft.Sim.Tests/CaptureTests.cs b/sim/Statecraft.Sim.Tests/CaptureTests.csindex 0d3c8201b..ce51c6204 100644--- a/sim/Statecraft.Sim.Tests/CaptureTests.cs+++ b/sim/Statecraft.Sim.Tests/CaptureTests.cs@@ -354,4 +354,298 @@ public class CaptureTestsAssert.Empty(ended.Rejected);Assert.Equal(ended.State.Date, ended.State.Settlements["town_a"].Since);}++ // R-CTRL-006 fixture: town_b, a kibbutz on (3, 1), appended after town_h so file order differs from ordinal id order.+ // Fixture values, not history.+ static Content LoadWithKibbutz() => Load(f =>+ {+ f["map/settlement_hexes.yaml"] += " - { id: town_b, q: 3, r: 1 }\n";+ f["map/settlements_1948.yaml"] += " - { id: town_b, name: Town B, lon: 34.29, lat: 33.25, type: kibbutz, founded: 1930, pre_modern: false }\n";+ }, AllTargets);++ static void AssertLost(GameState s, string id, DateTime since)+ {+ var x = s.Settlements[id];+ Assert.Equal(("", "", since, false, false, 0, "", 0), (x.Owner, x.State, x.Since, x.Depopulated, x.Fled, x.Combatants, x.Buildings, x.Turns));+ }++ // R-CTRL-006 (Q-TGT-2 (c), owner, 18 October 2026, #783; #796 default 3, owner, 21 October 2026): an enemy military unit+ // alone on a player's locality (town_h, a town that is not an arab_town and not enemy-held) changes its state with no+ // player choice: an ownerless record dated the turn's end, the same lost marker as R-CTRL-002, and one Why line.+ [Fact]+ public void AnEnemyUnitAloneOnAPlayersLocalityTakesIt()+ {+ var c = Load(AllTargets);+ var s = With(c, Enemy(1, 0, 2));+ var next = s.Date.AddDays(7);+ var why = Capture(c, s);+ AssertLost(s, "town_h", next);+ Assert.Single(s.Settlements);+ var line = Assert.Single(why);+ Assert.Equal(("town_h", "place_lost"), (line.Target, line.Key));+ Assert.Equal("Town H is lost: enemy units hold it and no Israeli unit is there", line.Message);+ }++ // R-CTRL-006: an Israeli military unit on the hex keeps it (no loss), and so does nobody on it; a halutz is no+ // combatant (R-UNIT-001; #796 default 1), so it does not keep it.+ [Fact]+ public void OnlyEnemyUnitsAloneTakeAPlayersLocality()+ {+ var c = Load(AllTargets);+ var both = With(c, Enemy(1, 0, 2), Soldier(2, 0, 2));+ Assert.Empty(Capture(c, both));+ Assert.Empty(both.Settlements);+ var none = With(c);+ Assert.Empty(Capture(c, none));+ Assert.Empty(none.Settlements);+ var halutz = With(c, Enemy(1, 0, 2), new Unit(2, "halutz", 0, 2));+ Capture(c, halutz);+ AssertLost(halutz, "town_h", halutz.Date.AddDays(7));+ }++ // R-CTRL-006 (#796 default 3): an arab_town is no player's locality, whether a target that is not enemy-held (town_d,+ // Jaffa's case) or an enemy-held place (town_e), so an enemy unit on it records nothing.+ [Fact]+ public void AnArabTownIsNoPlayersLocality()+ {+ var c = Load(AllTargets);+ var s = With(c, Enemy(1, 1, 2), Enemy(2, 4, 2));+ Assert.Empty(Capture(c, s));+ Assert.Empty(s.Settlements);+ }++ // R-CTRL-006 (#796 default 3: "Israeli units holding it again change it back"): Israeli military units alone on a lost+ // locality remove its record, so it is the player's again as at the start, with one Why line. A lost locality nobody+ // holds stays lost, and so does one both sides are on.+ [Fact]+ public void IsraeliUnitsRetakingAPlayersLocalityChangeItBack()+ {+ var c = Load(AllTargets);+ var s = With(c, Enemy(1, 0, 2));+ Capture(c, s);+ var lost = s.Settlements["town_h"].Since;+ s.Units.Clear();+ Assert.Empty(Capture(c, s));+ AssertLost(s, "town_h", lost);+ s.Units[1] = Enemy(1, 0, 2);+ s.Units[2] = Soldier(2, 0, 2);+ Assert.Empty(Capture(c, s));+ AssertLost(s, "town_h", lost);+ s.Units.Remove(1);+ var why = Capture(c, s);+ Assert.Empty(s.Settlements);+ var line = Assert.Single(why);+ Assert.Equal(("town_h", "place_retaken"), (line.Target, line.Key));+ Assert.Equal("Town H is retaken: Israeli units hold it again and no enemy unit is there", line.Message);+ }++ // R-CTRL-006, determinism: losses resolve in ordinal settlement id, not file order (town_b is after town_h in the+ // files) nor unit order, and the state is the same either way.+ [Fact]+ public void PlayersLocalitiesResolveInOrdinalOrder()+ {+ var c = LoadWithKibbutz();+ var s1 = With(c, Enemy(1, 0, 2), Enemy(2, 3, 1));+ var s2 = With(c, Enemy(2, 3, 1), Enemy(1, 0, 2));+ var why1 = Capture(c, s1);+ var why2 = Capture(c, s2);+ Assert.Equal(new[] { "town_b", "town_h" }, why1.Select(x => x.Target).ToArray());+ Assert.Equal(why1.Select(x => x.Message), why2.Select(x => x.Message));+ Assert.Equal(s1.Describe(), s2.Describe());+ }++ // R-CTRL-006, determinism: neither a loss nor a retake draws from the RNG.+ [Fact]+ public void ALossAndARetakeDrawNothing()+ {+ var c = LoadWithKibbutz();+ var s = With(c, Enemy(1, 0, 2), Enemy(2, 3, 1));+ var rng = s.RngState;+ Capture(c, s);+ Assert.Equal(2, s.Settlements.Count);+ s.Units.Clear();+ s.Units[3] = Soldier(3, 3, 1);+ Capture(c, s);+ Assert.Single(s.Settlements);+ Assert.Equal(rng, s.RngState);+ }++ // R-CTRL-006 and R-CTRL-005's mirror: a loss changes only the settlement state. Every resource, city, unit, the score+ // and every objective are as before step 3.+ [Fact]+ public void ALossTakesNothingElse()+ {+ var c = LoadWithKibbutz();+ var s = With(c, Enemy(1, 3, 1));+ var before = s.Clone();+ Assert.NotEmpty(Capture(c, s));+ s.Settlements.Clear();+ Assert.Equal(before.Describe(), s.Describe());+ }++ // R-ENEMY-001 with R-CTRL-006: an enemy unit may now end a move on a player's locality (town_h) it is sent to, but not+ // on an arab_town that is not enemy-held (town_d, Jaffa's case). A retreat still never ends on either (#2932: NoEntry is+ // unchanged). An annexed target is covered by AnEnemyUnitMayBeSentOntoAnAnnexedTarget.+ [Fact]+ public void AnEnemyUnitMayMoveOntoAPlayersLocality()+ {+ var c = Load(AllTargets);+ var s = With(c, Enemy(1, 0, 1));+ var spent = new Dictionary<int, int>();+ Assert.Null(Movement.Move(c, s, 1, 0, 2, spent, new List<Cause>(), enemy: true));+ Assert.Equal((0, 2), (s.Units[1].Q, s.Units[1].R));+ var noEntry = Movement.NoEntry(c, s, true);+ Assert.Contains((0, 2), noEntry);+ Assert.Contains((1, 2), noEntry);+ var t = With(c, Enemy(1, 1, 1));+ Assert.Equal("Units may not enter an enemy-held locality before its capture is possible",+ Movement.Move(c, t, 1, 1, 2, new Dictionary<int, int>(), new List<Cause>(), enemy: true));+ }++ // R-CTRL-006 only as far as the rule needs (R-ENEMY-001): an enemy path goes round a player's locality it is not sent+ // to, as a card's go-to goes round every enemy-held place but its own (the owner's answer 1 on #2087), so a march never+ // takes a place on its way. From (4, 1) to (2, 1) the way through town_b on (3, 1) costs 2; the way round costs 3.+ [Fact]+ public void AnEnemyPathGoesRoundAPlayersLocalityItIsNotSentTo()+ {+ var c = LoadWithKibbutz();+ var s = With(c, Enemy(1, 4, 1));+ var spent = new Dictionary<int, int>();+ Assert.Null(Movement.Move(c, s, 1, 2, 1, spent, new List<Cause>(), enemy: true));+ Assert.Equal(3, spent[1]);+ var t = With(c, Enemy(1, 4, 1));+ var sent = new Dictionary<int, int>();+ Assert.Null(Movement.Move(c, t, 1, 3, 1, sent, new List<Cause>(), enemy: true));+ Assert.Equal(((3, 1), 1), ((t.Units[1].Q, t.Units[1].R), sent[1]));+ }++ // R-CTRL-006 and R-CTRL-016 for an annexed target, the owner's answer on #2955 (8 November 2026): "Can be taken". Option+ // (a): enemy units can take an annexed town like any Israeli town, and Israeli units retaking it make it annexed again.+ // Fixture values, not history: town_a is annexed on 1948-06-01, and its people are not added by this fixture.+ static GameState Annexed(Content c, params Unit[] units)+ {+ var s = With(c, units);+ s.Settlements["town_a"] = new SettlementControl(Movement.PlayerSide, SettlementControl.Annexed, new DateTime(1948, 6, 1), fled: true);+ return s;+ }++ // R-CTRL-006 for an annexed target ("Can be taken", #2955): an enemy military unit alone on it takes it, with no choice+ // and the same Why line as any Israeli town. The record loses only its owner, so the place is enemy-held again; no other+ // field, resource, city or the RNG changes.+ [Fact]+ public void AnEnemyUnitAloneOnAnAnnexedTargetTakesIt()+ {+ var c = Load(AllTargets);+ var s = Annexed(c, Enemy(1, 1, 0));+ var before = s.Clone();+ var why = Capture(c, s);+ var x = s.Settlements["town_a"];+ Assert.Equal(("", SettlementControl.Annexed, new DateTime(1948, 6, 1), false, true, 0, "", 0),+ (x.Owner, x.State, x.Since, x.Depopulated, x.Fled, x.Combatants, x.Buildings, x.Turns));+ var line = Assert.Single(why);+ Assert.Equal(("town_a", "place_lost"), (line.Target, line.Key));+ Assert.Equal("TOWN A is lost: enemy units hold it and no Israeli unit is there", line.Message);+ Assert.Equal(before.RngState, s.RngState);+ s.Settlements["town_a"] = before.Settlements["town_a"];+ Assert.Equal(before.Describe(), s.Describe());+ var both = Annexed(c, Enemy(1, 1, 0), Soldier(2, 1, 0));+ Assert.Empty(Capture(c, both));+ Assert.Equal(Movement.PlayerSide, both.Settlements["town_a"].Owner);+ }++ // R-CTRL-006 for an annexed target, retaking (#2955 option (a)): Israeli military units alone on a lost annexed target+ // make it annexed again, the same record as before the loss. It is no new capture: no awaiting_choice, no second+ // annexation (no city or people added again). Nobody on it, or both sides, leaves it lost.+ [Fact]+ public void IsraeliUnitsRetakingAnAnnexedTargetMakeItAnnexedAgain()+ {+ var c = Load(AllTargets);+ var s = Annexed(c, Enemy(1, 1, 0));+ var annexed = s.Settlements["town_a"];+ Capture(c, s);+ s.Units.Clear();+ Assert.Empty(Capture(c, s));+ Assert.Equal("", s.Settlements["town_a"].Owner);+ s.Units[1] = Enemy(1, 1, 0);+ s.Units[2] = Soldier(2, 1, 0);+ Assert.Empty(Capture(c, s));+ Assert.Equal("", s.Settlements["town_a"].Owner);+ s.Units.Remove(1);+ var before = s.Clone();+ var why = Capture(c, s);+ Assert.Equal(annexed.Canonical(), s.Settlements["town_a"].Canonical());+ var line = Assert.Single(why);+ Assert.Equal(("town_a", "place_retaken"), (line.Target, line.Key));+ Assert.Equal("TOWN A is retaken: Israeli units hold it again and no enemy unit is there", line.Message);+ s.Settlements["town_a"] = before.Settlements["town_a"];+ Assert.Equal(before.Describe(), s.Describe());+ }++ // R-ENEMY-001 for an annexed target, with the owner's pass-through answer on #2955 (8 November 2026): "Destination only+ // (Recommended)". An enemy move may end on an annexed target it is sent to, and its path goes round one it is not sent+ // to: from (0, 0) to (2, 0) the way through town_a on (1, 0) costs 2; the way round costs 3. A retreat never ends there+ // (NoEntry). A lost annexed target is enemy-held again, so it is open to enemy paths and closed to the player's retreats.+ [Fact]+ public void AnEnemyUnitMayBeSentOntoAnAnnexedTarget()+ {+ var c = Load(AllTargets);+ var s = Annexed(c, Enemy(1, 0, 0));+ Assert.Contains((1, 0), Movement.NoEntry(c, s, true));+ Assert.DoesNotContain((1, 0), Movement.NoEntry(c, s));+ var spent = new Dictionary<int, int>();+ Assert.Null(Movement.Move(c, s, 1, 2, 0, spent, new List<Cause>(), enemy: true));+ Assert.Equal(3, spent[1]);+ var t = Annexed(c, Enemy(1, 0, 0));+ var sent = new Dictionary<int, int>();+ Assert.Null(Movement.Move(c, t, 1, 1, 0, sent, new List<Cause>(), enemy: true));+ Assert.Equal(((1, 0), 1), ((t.Units[1].Q, t.Units[1].R), sent[1]));+ Capture(c, t);+ Assert.Equal("", t.Settlements["town_a"].Owner);+ Assert.DoesNotContain((1, 0), Movement.NoEntry(c, t, true));+ Assert.Contains((1, 0), Movement.NoEntry(c, t));+ }++ // R-CTRL-004 with a lost annexed target: an Israeli unit moving onto it in the turn is no new capture (the instant check+ // leaves it lost); step 3 makes it annexed again.+ [Fact]+ public void ALostAnnexedTargetIsNotCapturedAgainAsANewCapture()+ {+ var c = Load(AllTargets);+ var s = Annexed(c, Enemy(1, 1, 0));+ Capture(c, s);+ s.Units.Clear();+ s.Units[2] = Soldier(2, 0, 0);+ Assert.Null(Movement.Move(c, s, 2, 1, 0, new Dictionary<int, int>(), new List<Cause>()));+ var instant = new List<Cause>();+ SettlementControl.CaptureHeld(c, s, instant);+ Assert.Empty(instant);+ Assert.Equal(("", SettlementControl.Annexed), (s.Settlements["town_a"].Owner, s.Settlements["town_a"].State));+ var next = Simulation.Step(c, s, Array.Empty<Command>());+ Assert.Equal((Movement.PlayerSide, SettlementControl.Annexed), (next.State.Settlements["town_a"].Owner, next.State.Settlements["town_a"].State));+ Assert.Contains(next.Why, x => x.Key == "place_retaken" && x.Target == "town_a");+ Assert.DoesNotContain(next.Why, x => x.Key == "place_captured");+ }++ // R-CTRL-006 through the whole resolver: an enemy unit alone on a player's locality at End turn takes it in step 3.+ [Fact]+ public void TheResolverRecordsTheLossAtTurnEnd()+ {+ var c = LoadWithKibbutz();+ var s = With(c, Enemy(1, 3, 1));+ var next = Simulation.Step(c, s, Array.Empty<Command>());+ AssertLost(next.State, "town_b", next.State.Date);+ Assert.Contains(next.Why, x => x.Key == "place_lost" && x.Target == "town_b");+ }++ // #1305 done-when: on the shipped content no player's locality is lost on the first turn (Historical mode; Open mode+ // arrives with milestone M4).+ [Fact]+ public void RealContentLosesNoPlayersLocalityOnTheFirstTurn()+ {+ var c = ContentLoader.Load(RealContentTests.ContentRoot());+ var s = Simulation.NewGame(c, 42, Mode.Historical);+ var next = Simulation.Step(c, s, Array.Empty<Command>());+ Assert.DoesNotContain(next.Why, x => x.Key == "place_lost");+ Assert.Empty(next.State.Settlements);+ }}diff --git a/sim/Statecraft.Sim.Tests/EnemyAITests.cs b/sim/Statecraft.Sim.Tests/EnemyAITests.csindex 192bca534..67fcaacf9 100644--- a/sim/Statecraft.Sim.Tests/EnemyAITests.cs+++ b/sim/Statecraft.Sim.Tests/EnemyAITests.cs@@ -58,7 +58,8 @@ public class EnemyAITests}// R-ENEMY-001: an enemy order goes through the player's validation, with the sides swapped, and a refused one leaves the- // state as it was. The locality rule is R-MOVE-005's mirror: no enemy unit enters a locality off enemy_held_localities.+ // state as it was. The locality rule, R-MOVE-005's mirror less the player's localities an enemy move may now take+ // (R-CTRL-006), is in CaptureTests.AnEnemyUnitMayMoveOntoAPlayersLocality: this fixture's one place, town_a, is a player's.[Fact]public void AnInvalidEnemyOrderIsRefusedLikeThePlayers(){@@ -69,7 +70,6 @@ public class EnemyAITestsvar why = new List<Cause>();Assert.Equal("That unit is not yours", Movement.Move(c, s, 1, 4, 0, spent, why, enemy: true));Assert.Equal("An enemy unit holds that hex", Movement.Move(c, s, 2, 3, 0, spent, why, enemy: true));- Assert.Equal("Units may not enter an enemy-held locality before its capture is possible", Movement.Move(c, s, 2, 1, 0, spent, why, enemy: true));Assert.Equal("Units cannot enter water or leave the map", Movement.Move(c, s, 2, 2, -1, spent, why, enemy: true));Assert.Equal("That hex already holds 2 units of that side, the most one hex can hold", Movement.Move(c, s, 5, 2, 2, spent, why, enemy: true));Assert.Equal("That unit is not yours", Combat.Give(c, s, 1, 2, 0, why, enemy: true));diff --git a/sim/Statecraft.Sim.Tests/RealContentTests.cs b/sim/Statecraft.Sim.Tests/RealContentTests.csindex 1e5aab345..e7b21a029 100644--- a/sim/Statecraft.Sim.Tests/RealContentTests.cs+++ b/sim/Statecraft.Sim.Tests/RealContentTests.cs@@ -148,17 +148,39 @@ public class RealContentTests}// R-ENEMY-001 at 4.4 km (owner review of #1796, 27 October): Rehovot shares Ramla's hex (-4, 24), and Ramla being enemy-held- // must not open Rehovot's hex to an enemy move.+ // must not open Rehovot's hex to an enemy move. No enemy retreat ends there; since R-CTRL-006 (#1305) a move sent to it+ // may, and then takes Rehovot, a player's locality, not Ramla.[Fact]- public void NoEnemyMoveEndsOnRehovotsHexItSharesWithRamla()+ public void NoEnemyMoveEndsOnRehovotsHexItSharesWithRamlaUnlessSentThere(){var s = Simulation.NewGame(C, 42, Mode.Historical);var e = s.Units.Values.First(u => u.Side != Movement.PlayerSide);s.Units.Clear();s.Units.Add(1, new Unit(1, e.Type, -4, 25, side: e.Side, strength: 2)); // next to (-4, 24)Assert.Contains((-4, 24), Movement.NoEntry(C, s, true));- Assert.Equal("Units may not enter an enemy-held locality before its capture is possible",- Movement.Move(C, s, 1, -4, 24, new Dictionary<int, int>(), new List<Cause>(), enemy: true));+ Assert.Null(Movement.Move(C, s, 1, -4, 24, new Dictionary<int, int>(), new List<Cause>(), enemy: true));+ var why = new List<Cause>();+ SettlementControl.Capture(C, s, s.Date.AddMonths(1), why);+ Assert.Equal(new[] { ("rehovot", "place_lost") }, why.Select(x => (x.Target, x.Key)));+ }++ // R-CTRL-006 for an annexed target at 4.4 km (the owner on #2955, 8 November 2026: "Can be taken"; "Destination only+ // (Recommended)"): an annexed Ramla is taken on its target hex (-3, 24), not Rehovot's (-4, 24), and only by a move sent+ // there; no enemy path or retreat ends there otherwise.+ [Fact]+ public void AnAnnexedRamlaIsTakenOnItsTargetHexOnlyWhenSentThere()+ {+ var s = Simulation.NewGame(C, 42, Mode.Historical);+ var e = s.Units.Values.First(u => u.Side != Movement.PlayerSide);+ s.Units.Clear();+ s.Units.Add(1, new Unit(1, e.Type, -3, 25, side: e.Side, strength: 2)); // next to (-3, 24)+ s.Settlements["ramla"] = new SettlementControl(Movement.PlayerSide, SettlementControl.Annexed, new DateTime(1948, 7, 12));+ Assert.Contains((-3, 24), Movement.NoEntry(C, s, true));+ Assert.Null(Movement.Move(C, s, 1, -3, 24, new Dictionary<int, int>(), new List<Cause>(), enemy: true));+ var why = new List<Cause>();+ SettlementControl.Capture(C, s, s.Date.AddMonths(1), why);+ Assert.Equal(new[] { ("ramla", "place_lost") }, why.Select(x => (x.Target, x.Key)));+ Assert.Equal(("", SettlementControl.Annexed), (s.Settlements["ramla"].Owner, s.Settlements["ramla"].State));}// R-MOVE-005 for the player at 4.4 km (owner review of #1796, 31 October): an enemy-held Ramla closes its target hex (-3, 24)diff --git a/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.cs b/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.csindex 5bc569f60..3ccf45932 100644--- a/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.cs+++ b/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.cs@@ -2,7 +2,7 @@ using System.Text.RegularExpressions;namespace Statecraft.Sim.Tests;-/// <summary>#1682's 68 source producers plus city_held (#1711), 69 in all, including rare branches. The pre-key constructor expressions are pinned to+/// <summary>#1682's 68 source producers plus city_held (#1711) and R-CTRL-006's place_lost and place_retaken (#1305), 71 in all, including rare branches. The pre-key constructor expressions are pinned to/// c7851de so Message, Target and Delta cannot drift while metadata is added. This is not runtime branch coverage.</summary>public class RemainingCauseKeysTests{@@ -74,6 +74,8 @@ public class RemainingCauseKeysTestsyield return new object[] { "TurnResolver.cs", "EraEnded", "new Cause(\"era\", s.GameOver, u.Id, PlayerText.GameOver(s.GameOver)" };yield return new object[] { "SettlementControl.cs", "PlaceCaptured", "new Cause(\"map\", t.Id, 0, $\"{c.SettlementNames[t.Id]} is captured: Israeli units hold it and no enemy unit is there. \"\n + (fled ? \"Its residents fled. \" : \"\") + \"It awaits a decision\"" };yield return new object[] { "SettlementControl.cs", "EnemyRegained", "new Cause(\"map\", t.Id, 0, $\"{c.SettlementNames[t.Id]} is under enemy control again: enemy units hold it and no Israeli unit is there\"\n + (record.Fled ? \". \" + FledLine : \"\")" };+ yield return new object[] { "SettlementControl.cs", "PlaceLost", "new Cause(\"map\", id, 0, $\"{c.SettlementNames[id]} is lost: enemy units hold it and no Israeli unit is there\"" }; // R-CTRL-006 (#1305)+ yield return new object[] { "SettlementControl.cs", "PlaceRetaken", "new Cause(\"map\", id, 0, $\"{c.SettlementNames[id]} is retaken: Israeli units hold it again and no enemy unit is there\"" }; // R-CTRL-006 (#1305)yield return new object[] { "SettlementControl.cs", "PlaceAnnexed", "new Cause(\"map\", id, 0, x.Fled\n ? $\"{name} is annexed. Its residents fled when it was captured, so no people, homes or jobs are added\"\n : $\"{name} is annexed. Its residents join the population\"" };yield return new object[] { "SettlementControl.cs", "PlaceWithdrawn", "new Cause(\"map\", id, 0, moved.Count > 0\n ? $\"{name}: Israeli units withdrew and it is under enemy control again. {residents}\"\n : $\"{name} is under enemy control again. {residents}\"" };yield return new object[] { "SettlementControl.cs", "PlaceDeported", "new Cause(\"map\", id, 0, $\"{name}: Deport. Its residents are displaced and the place is depopulated\"" };@@ -98,9 +100,9 @@ public class RemainingCauseKeysTests}[Fact]- public void InventoryContainsExactly69ProducerSites()+ public void InventoryContainsExactly71ProducerSites(){- Assert.Equal(69, Producers().Count());+ Assert.Equal(71, Producers().Count());}[Fact]@@ -116,7 +118,7 @@ public class RemainingCauseKeysTestssites++;}}- Assert.Equal(131, sites); // 131 with #1694's ledger harvest field Food line (R-FIELD-002, Pools.Harvest given a month, #1725 PR 7); 130 with R-UNIT-005's ledger Send home Arms line (owner, 8 November 2026, "Yes, one Why line (Recommended)", #1725 PR 7); 129 with R-ENEMY-007's truce-break line (a late operation inside an accepted truce, #2543); 128 with R-ENEMY-007's lapse cost (Q8, the event-amount Security line of a lapsed operation, #2543); 127 with R-ENEMY-007's keyed postponed/lapsed operation producer (#2543); 126 with #2558: EconomySystem.MoneyLine, the event Debt line worded for the Money row; 125 with #1711's CityHeld (R-CITY-010); 124 with #2534's enemy attack-order line (Combat.Give marks the order's own cause); 123 with #2471's gdd-0.3 field Food line (R-FIELD-002); 122 with #2527's FoodImported and the conversion's fx_reserves line; 120 with #2457's event Debt line (R-EFX-009); 119 with #1700 slice B's ProjectBuilderFreed; 118 with #1700's builders (R-CITY-011: two ProjectBuilder lines, ProjectWaiting, the build order's job-default line); 114 with #1703's gdd-0.3 housing surcharge and housing cohesion lines; 112 with the arms workshops' five (R-ARMS-005 with its job-default line, R-ARMS-006; #1701); 107 with R-MONEY-004's DollarsConverted (#813); 106 since #2212: EconomySystem.OtherMoney's line (105 since #2199: PayOrBorrow's Paid line)+ Assert.Equal(133, sites); // 133 with R-CTRL-006's place_lost and place_retaken lines (#1305); 131 with #1694's ledger harvest field Food line (R-FIELD-002, Pools.Harvest given a month, #1725 PR 7); 130 with R-UNIT-005's ledger Send home Arms line (owner, 8 November 2026, "Yes, one Why line (Recommended)", #1725 PR 7); 129 with R-ENEMY-007's truce-break line (a late operation inside an accepted truce, #2543); 128 with R-ENEMY-007's lapse cost (Q8, the event-amount Security line of a lapsed operation, #2543); 127 with R-ENEMY-007's keyed postponed/lapsed operation producer (#2543); 126 with #2558: EconomySystem.MoneyLine, the event Debt line worded for the Money row; 125 with #1711's CityHeld (R-CITY-010); 124 with #2534's enemy attack-order line (Combat.Give marks the order's own cause); 123 with #2471's gdd-0.3 field Food line (R-FIELD-002); 122 with #2527's FoodImported and the conversion's fx_reserves line; 120 with #2457's event Debt line (R-EFX-009); 119 with #1700 slice B's ProjectBuilderFreed; 118 with #1700's builders (R-CITY-011: two ProjectBuilder lines, ProjectWaiting, the build order's job-default line); 114 with #1703's gdd-0.3 housing surcharge and housing cohesion lines; 112 with the arms workshops' five (R-ARMS-005 with its job-default line, R-ARMS-006; #1701); 107 with R-MONEY-004's DollarsConverted (#813); 106 since #2212: EconomySystem.OtherMoney's line (105 since #2199: PayOrBorrow's Paid line)}[Fact]diff --git a/sim/Statecraft.Sim/Cause.cs b/sim/Statecraft.Sim/Cause.csindex d0bfe0eba..a315607c8 100644--- a/sim/Statecraft.Sim/Cause.cs+++ b/sim/Statecraft.Sim/Cause.cs@@ -229,6 +229,10 @@ namespace Statecraft.Simpublic const string PlaceCaptured = "place_captured";/// <summary>Args: record.Fled ? "1" : "0".</summary>public const string EnemyRegained = "enemy_regained";+ /// <summary>Args: none. R-CTRL-006: enemy units took a player's locality.</summary>+ public const string PlaceLost = "place_lost";+ /// <summary>Args: none. R-CTRL-006: Israeli units took a lost player's locality back.</summary>+ public const string PlaceRetaken = "place_retaken";/// <summary>Args: x.Fled ? "1" : "0".</summary>public const string PlaceAnnexed = "place_annexed";/// <summary>Args: moved.Count > 0 ? "1" : "0"; residentsFled ? "1" : "0".</summary>@@ -284,7 +288,7 @@ namespace Statecraft.SimEventNew, EventChosen, EventDelegated, EventDelegatedPartial, OperationPostponed, OperationLapsed, OperationLapsedSigned, OperationLapsedUnitLost, OperationWaitsForArmistice, EventAmount, EventStock, EventGrant, EventCity,EventUnlock, EventPolicy, EventSetRung, EventRejoin, MilitaryUpkeep, HousingSurcharge, HousingCohesion,ObjectiveCompleted, PrisonersReturned, SoldiersReturned,- WorkersAssigned, WagesPaid, ImmigrantsHoused, HousingShortage, ImmigrantsWaiting, RecruitsVeteran, CorridorStarted, CorridorCancelled, CorridorCompleted, PioneersVeteran, MapBorrowed, MapBuilt, LandWorkStarted, SiteStarted, SiteCancelled, SiteCompleted, ProjectStarted, ProjectCancelled, ProjectCompleted, ProjectBuilder, ProjectBuilderFreed, ProjectWaiting, ArmsBought, WorkshopWorkers, WorkshopArms, WorkshopPaused, DollarsConverted, DollarsConvertedFx, FoodHarvest, FieldFood, FoodShortage, FoodWithoutImports, FoodImported, PrisonerFood, PrisonerFoodShortage, CraftsmenReturned, CraftsmenReassigned, PioneerReturned, PioneersReassigned, TrainingStarted, TrainingArms, TrainingCancelled, TrainingArmsReturned, SentHomeArmsReturned, ReplacementsStopped, ReplacementsJoined, MilitaryTrained, PioneersTrained, CraftsmenTrained, Appointed, Reshuffle, AppointmentsEnded, ApprovalStability, CoalitionCollapsed, LegislatureConvened, GovernmentTookOffice, CoalitionChanged, EraEnded, AdvisoryPolicyRejected, PolicyRejected, PolicySet, AdvisoryBudgetRejected, BudgetRejected, PlaceCaptured, EnemyRegained, PlaceAnnexed, PlaceWithdrawn, PlaceDeported, DeportEffect, DeportCost, OccupationStarted, PendingBecameRaid, OccupationLostUnit, OccupationCountdown, DepopulationSupport, CityHeld,+ WorkersAssigned, WagesPaid, ImmigrantsHoused, HousingShortage, ImmigrantsWaiting, RecruitsVeteran, CorridorStarted, CorridorCancelled, CorridorCompleted, PioneersVeteran, MapBorrowed, MapBuilt, LandWorkStarted, SiteStarted, SiteCancelled, SiteCompleted, ProjectStarted, ProjectCancelled, ProjectCompleted, ProjectBuilder, ProjectBuilderFreed, ProjectWaiting, ArmsBought, WorkshopWorkers, WorkshopArms, WorkshopPaused, DollarsConverted, DollarsConvertedFx, FoodHarvest, FieldFood, FoodShortage, FoodWithoutImports, FoodImported, PrisonerFood, PrisonerFoodShortage, CraftsmenReturned, CraftsmenReassigned, PioneerReturned, PioneersReassigned, TrainingStarted, TrainingArms, TrainingCancelled, TrainingArmsReturned, SentHomeArmsReturned, ReplacementsStopped, ReplacementsJoined, MilitaryTrained, PioneersTrained, CraftsmenTrained, Appointed, Reshuffle, AppointmentsEnded, ApprovalStability, CoalitionCollapsed, LegislatureConvened, GovernmentTookOffice, CoalitionChanged, EraEnded, AdvisoryPolicyRejected, PolicyRejected, PolicySet, AdvisoryBudgetRejected, BudgetRejected, PlaceCaptured, EnemyRegained, PlaceLost, PlaceRetaken, PlaceAnnexed, PlaceWithdrawn, PlaceDeported, DeportEffect, DeportCost, OccupationStarted, PendingBecameRaid, OccupationLostUnit, OccupationCountdown, DepopulationSupport, CityHeld,};/// <summary>A number as an Arg: invariant and round-trip, so the UI rounds exactly the value Message rounded.</summary>diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.csindex ef95472f9..6b7048097 100644--- a/sim/Statecraft.Sim/Content.cs+++ b/sim/Statecraft.Sim/Content.cs@@ -1509,6 +1509,9 @@ namespace Statecraft.Simpublic List<SettlementTarget> SettlementTargets = new List<SettlementTarget>();/// <summary>The display name of each settlement id (map/settlements_1948.yaml name), for text the player reads.</summary>public Dictionary<string, string> SettlementNames = new Dictionary<string, string>();+ /// <summary>The ids of the arab_town rows of map/settlements_1948.yaml. Every other row that is not enemy-held is a+ /// player's locality (R-CTRL-006; #796 default 3).</summary>+ public HashSet<string> ArabTowns = new HashSet<string>(StringComparer.Ordinal);/// <summary>The GDD cities' start values (cities.yaml), in file order. Empty in the legacy loop.</summary>public List<CityStart> Cities = new List<CityStart>();/// <summary>The GDD population and unit types (unit_types.yaml). Empty in the legacy loop.</summary>diff --git a/sim/Statecraft.Sim/ContentLoader.cs b/sim/Statecraft.Sim/ContentLoader.csindex b41f795a5..d6fe2340d 100644--- a/sim/Statecraft.Sim/ContentLoader.cs+++ b/sim/Statecraft.Sim/ContentLoader.cs@@ -427,6 +427,7 @@ namespace Statecraft.Simvar settlements = ReadSettlements(readFile);var settlementIds = settlements.Select(x => x.id).ToList();foreach (var (id, name, _) in settlements) c.SettlementNames[id] = name; // a duplicate id fails in ValidateMap+ c.ArabTowns = new HashSet<string>(settlements.Where(x => x.type == ArabTown).Select(x => x.id), StringComparer.Ordinal);c.SettlementTargets = Read<SettlementTargetsFile>(readFile, SettlementTargetsFileName).Targets;ValidateSettlementTargets(c, settlements.Where(x => x.type == ArabTown).Select(x => x.id));// Event files (content/events/*.yaml), one GameEvent each. Keys, for content authors:diff --git a/sim/Statecraft.Sim/Movement.cs b/sim/Statecraft.Sim/Movement.csindex 0acdb0e47..1fc1dba26 100644--- a/sim/Statecraft.Sim/Movement.cs+++ b/sim/Statecraft.Sim/Movement.cs@@ -290,7 +290,7 @@ namespace Statecraft.Simif (Closed(c, s, enemy).Contains((q, r))) return RefusedClosed;if (Full(c, s, u, q, r) is string full) return full;spent.TryGetValue(unitId, out var used);- var (dist, _) = Search(c, s, u, points - used, fresh: used == 0, card: card);+ var (dist, _) = Search(c, s, u, points - used, fresh: used == 0, card: card, to: (q, r));if (!dist.TryGetValue((q, r), out var cost)) return RefusedOutOfReach;// Moving clears fortify at once (Q-HOLD-1, "lost on move"; the standing orders' "fortify", or "fortifying" the turn it// is given, with the hex it names), so a unit that goes out and comes back the same turn is not fortified; hold moves with@@ -320,15 +320,16 @@ namespace Statecraft.Sim}/// <summary>R-MOVE-005: the hexes of mvp.enemy_held_localities. For the enemy (R-ENEMY-001, the rule's mirror) every- /// other locality's hex, so no enemy move ends on a player's locality while enemy capture (Q-TGT-2 (c)) is unbuilt.</summary>+ /// other locality's hex, so no enemy retreat ends on a player's locality (#2932). An enemy move may, but only on the+ /// one it is sent to (R-CTRL-006, <see cref="Closed"/>, <see cref="Search"/>).</summary>internal static HashSet<(int Q, int R)> NoEntry(Content c, GameState s, bool enemy = false){- // An annexed target is Israeli for good (R-CTRL-016, OWNER QUESTION 3 (a) on #799): not enemy-held.- var ids = c.RulesAt(s.Date).Mvp!.EnemyHeldLocalities- .Where(id => !(s.Settlements.TryGetValue(id, out var x) && x.State == SettlementControl.Annexed)).ToList();+ var ids = Held(c, s);// The enemy's set is built from the player's localities, not as all hexes minus the enemy-held ones: at 4.4 km (#1183)// Rehovot shares Ramla's hex (-4, 24), which must stay closed to the enemy while Ramla is enemy-held (owner review, #1796).- if (enemy) return new HashSet<(int Q, int R)>(c.SettlementHexes.Where(h => !ids.Contains(h.Id)).Select(h => (h.Q, h.R)));+ // An annexed target closes its target's hex too (Ramla's (-3, 24), #1796), where R-CTRL-006 checks it (#2955).+ if (enemy) return new HashSet<(int Q, int R)>(c.SettlementHexes.Where(h => !ids.Contains(h.Id)).Select(h => (h.Q, h.R))+ .Concat(c.SettlementTargets.Where(t => HeldAnnexed(s, t.Id)).Select(t => (t.Q, t.R))));// A target's hex, not its settlement's, as in Closed: for Ramla (ContentLoader.TargetOnANeighbour, #1796) that is// (-3, 24), so a retreat or a Raid's withdrawal never ends where it would capture the place, while Rehovot's shared// settlement hex (-4, 24) stays open (owner review, #1796).@@ -336,14 +337,33 @@ namespace Statecraft.Sim.Select(h => (h.Q, h.R)).Concat(c.SettlementTargets.Where(t => ids.Contains(t.Id)).Select(t => (t.Q, t.R))));}+ /// <summary>mvp.enemy_held_localities less the annexed targets Israel holds: an annexed target is Israeli (R-CTRL-016,+ /// OWNER QUESTION 3 (a) on #799), not enemy-held, until enemy units take it (R-CTRL-006; the owner on #2955, "Can be+ /// taken"); then it is enemy-held again.</summary>+ static List<string> Held(Content c, GameState s) => c.RulesAt(s.Date).Mvp!.EnemyHeldLocalities+ .Where(id => !HeldAnnexed(s, id)).ToList();++ /// <summary>An annexed target Israel holds: its record is annexed and Israeli, not taken by enemy units (R-CTRL-006).</summary>+ static bool HeldAnnexed(GameState s, string id) =>+ s.Settlements.TryGetValue(id, out var x) && x.State == SettlementControl.Annexed && x.Owner == PlayerSide;+/// <summary>R-MOVE-005 in Phase 6 (#1304): the hexes a move and its path may not enter. For the player, those of/// mvp.enemy_held_localities that are not curated targets (settlement_targets.yaml), so a target can be captured in play/// (the owner's #793 ruling) while the rest, Gaza today, stay closed, and so does a depopulated target's hex (R-CTRL-020);- /// for the enemy, <see cref="NoEntry"/>'s mirror unchanged. Raid's withdrawal and combat retreat still read- /// <see cref="NoEntry"/>, so neither ends on an enemy-held place.</summary>+ /// for the enemy, <see cref="NoEntry"/>'s mirror less the player's localities, which an enemy move may now end on+ /// when it is sent there (R-CTRL-006; <see cref="Search"/> keeps every other one off its path), and so may it on an+ /// annexed target Israel holds (the owner on #2955, "Can be taken"), so only an arab_town that is not enemy-held (Jaffa)+ /// stays closed to them. A hex one of those shares stays closed. Raid's withdrawal and combat retreat still read <see cref="NoEntry"/>, so neither+ /// ends on an enemy-held place, nor an enemy retreat on a player's locality.</summary>static HashSet<(int Q, int R)> Closed(Content c, GameState s, bool enemy){- if (enemy) return NoEntry(c, s, true);+ if (enemy)+ {+ var open = new HashSet<string>(SettlementControl.PlayerLocalities(c, s).Select(h => h.Id)+ .Concat(c.SettlementTargets.Where(t => HeldAnnexed(s, t.Id)).Select(t => t.Id)), StringComparer.Ordinal);+ var held = Held(c, s);+ return new HashSet<(int Q, int R)>(c.SettlementHexes.Where(h => !held.Contains(h.Id) && !open.Contains(h.Id)).Select(h => (h.Q, h.R)));+ }// A depopulated target (R-CTRL-020) stays closed: Deport leaves nothing to capture there again.var ids = c.RulesAt(s.Date).Mvp!.EnemyHeldLocalities.Except(c.SettlementTargets.Select(t => t.Id).Where(id => !(s.Settlements.TryGetValue(id, out var x) && x.Depopulated))).ToList();@@ -360,7 +380,7 @@ namespace Statecraft.Sim{var points = Points(c, u);if (points == 0) return null;- var (dist, prev) = Search(c, s, u, int.MaxValue);+ var (dist, prev) = Search(c, s, u, int.MaxValue, to: (q, r));if (!dist.ContainsKey((q, r)) || (u.Q, u.R) == (q, r)) return null;var h = (q, r);while (dist[h] > points && prev[h] != (u.Q, u.R)) h = prev[h];@@ -394,13 +414,18 @@ namespace Statecraft.Sim/// (R-MOVE-001, OQ-3). Stacking limits only where a move ends, so it is not checked here. With <paramref name="card"/>, an/// operation card's go-to to that hex (R-ENEMY-005; the owner's answer 1 on #2087, 31 October 2026), every enemy-held/// locality (<see cref="NoEntry"/>) but that hex is closed too, open target or not: the march never ends on, and so- /// never captures, a place it was not sent to.</summary>+ /// never captures, a place it was not sent to. An enemy unit's path, the same way, enters no player's locality and no+ /// annexed target Israel holds but <paramref name="to"/>, the hex it is sent to (R-CTRL-006; the owner on #2955,+ /// "Destination only (Recommended)").</summary>static (Dictionary<(int Q, int R), int> Dist, Dictionary<(int Q, int R), (int Q, int R)> Prev) Search(- Content c, GameState s, Unit u, int budget, bool fresh = false, (int Q, int R)? card = null)+ Content c, GameState s, Unit u, int budget, bool fresh = false, (int Q, int R)? card = null, (int Q, int R)? to = null){var costs = c.RulesAt(s.Date).Mvp!.MoveCost; // the loader requires a cost for every land biome in the GDD loopvar blocked = Closed(c, s, IsEnemy(u));if (card is (int, int) sent) blocked.UnionWith(NoEntry(c, s).Where(h => h != sent));+ // R-CTRL-006: an enemy path goes round every player's locality but the one it is sent to, as a card's go-to does+ // (the owner's answer 1 on #2087), so an enemy march never ends on, and so never takes, a place it was not sent to.+ if (IsEnemy(u)) blocked.UnionWith(NoEntry(c, s, true).Where(h => h != to));var built = BuiltSegments(c, s);foreach (var x in s.Units.Values) if (IsEnemy(x) != IsEnemy(u)) blocked.Add((x.Q, x.R));var dist = new Dictionary<(int Q, int R), int> { [(u.Q, u.R)] = 0 };diff --git a/sim/Statecraft.Sim/SettlementControl.cs b/sim/Statecraft.Sim/SettlementControl.csindex 75ecaae16..1d7465bf0 100644--- a/sim/Statecraft.Sim/SettlementControl.cs+++ b/sim/Statecraft.Sim/SettlementControl.cs@@ -25,9 +25,10 @@ namespace Statecraft.Simvar enemyHeld = new HashSet<string>(c.RulesAt(s.Date).Mvp!.EnemyHeldLocalities, StringComparer.Ordinal);foreach (var t in c.SettlementTargets.Where(x => enemyHeld.Contains(x.Id)).OrderBy(x => x.Id, StringComparer.Ordinal)){- // An ownerless, non-depopulated record marks a place returned to enemy control and can be taken again.+ // An ownerless, non-depopulated record marks a place returned to enemy control and can be taken again. An+ // ownerless annexed record is an annexed target enemy units took (R-CTRL-006): retaking it is no new capture.if (Holder(s, t.Q, t.R) != Movement.PlayerSide- || (s.Settlements.TryGetValue(t.Id, out var old) && !(old.Owner == "" && !old.Depopulated))) continue;+ || (s.Settlements.TryGetValue(t.Id, out var old) && !(old.Owner == "" && !old.Depopulated && old.State != Annexed))) continue;var fled = t.Residents == ContentLoader.Fled;s.Settlements[t.Id] = new SettlementControl(Movement.PlayerSide, AwaitingChoice, fled: fled);why.Add(new Cause("map", t.Id, 0, $"{c.SettlementNames[t.Id]} is captured: Israeli units hold it and no enemy unit is there. "@@ -47,7 +48,8 @@ namespace Statecraft.Sim}/// <summary>Resolver step 3, after enemy combat: perform any remaining player capture, stamp its date, then return- /// an awaiting-choice target held by enemy military units alone to enemy control. No resident field or RNG changes.</summary>+ /// an awaiting-choice target held by enemy military units alone to enemy control, then take or give back the player's+ /// localities (R-CTRL-006). No resident field or RNG changes.</summary>public static void Capture(Content c, GameState s, DateTime next, List<Cause> why){CaptureHeld(c, s, why);@@ -60,8 +62,47 @@ namespace Statecraft.Simwhy.Add(new Cause("map", t.Id, 0, $"{c.SettlementNames[t.Id]} is under enemy control again: enemy units hold it and no Israeli unit is there"+ (record.Fled ? ". " + FledLine : ""), key: CauseKeys.EnemyRegained, args: new[] { record.Fled ? "1" : "0" }));}+ // R-CTRL-006 (Q-TGT-2 (c); #796 default 3): enemy military units alone on a player's locality take it, with no+ // choice, as an ownerless record dated the turn's end (the lost marker); Israeli military units alone on it again+ // give it back by removing that record. An annexed target is taken the same way, on its target's hex (the owner on+ // #2955, "Can be taken"): its record loses only its owner, and a retake gives the owner back, so it is annexed again+ // with nothing added a second time. In ordinal id; a record of any other shape is left alone.+ var annexed = c.SettlementTargets.Where(t => s.Settlements.TryGetValue(t.Id, out var a) && a.State == Annexed).Select(t => (t.Id, t.Q, t.R));+ foreach (var (id, q, r) in PlayerLocalities(c, s).Select(h => (h.Id, h.Q, h.R)).Concat(annexed).OrderBy(x => x.Id, StringComparer.Ordinal).ToList())+ {+ var holder = Holder(s, q, r);+ var has = s.Settlements.TryGetValue(id, out var x);+ var isAnnexed = has && x!.State == Annexed;+ if (holder == Enemy && (isAnnexed ? x!.Owner == Movement.PlayerSide : !has))+ {+ s.Settlements[id] = isAnnexed ? WithOwner(x!, "") : new SettlementControl(since: next);+ why.Add(new Cause("map", id, 0, $"{c.SettlementNames[id]} is lost: enemy units hold it and no Israeli unit is there", key: CauseKeys.PlaceLost));+ }+ else if (holder == Movement.PlayerSide && has && (isAnnexed ? x!.Owner == "" : IsLost(x!)))+ {+ if (isAnnexed) s.Settlements[id] = WithOwner(x!, Movement.PlayerSide);+ else s.Settlements.Remove(id);+ why.Add(new Cause("map", id, 0, $"{c.SettlementNames[id]} is retaken: Israeli units hold it again and no enemy unit is there", key: CauseKeys.PlaceRetaken));+ }+ }}+ /// <summary>R-CTRL-006 (#796 default 3, owner, 21 October 2026): the player's localities, every map/settlements_1948.yaml+ /// row that is not an arab_town and not on mvp.enemy_held_localities, in file order. An annexed target is an arab_town,+ /// so it is not one of them; <see cref="Capture"/> adds the annexed targets itself (#2955).</summary>+ internal static IEnumerable<SettlementHex> PlayerLocalities(Content c, GameState s)+ {+ var enemyHeld = c.RulesAt(s.Date).Mvp!.EnemyHeldLocalities;+ return c.SettlementHexes.Where(h => !c.ArabTowns.Contains(h.Id) && !enemyHeld.Contains(h.Id));+ }++ /// <summary>R-CTRL-006 for an annexed target: the same record with <paramref name="owner"/>.</summary>+ static SettlementControl WithOwner(SettlementControl x, string owner) =>+ new SettlementControl(owner, x.State, x.Since, x.Depopulated, x.Combatants, x.Buildings, x.Turns, x.Fled);++ /// <summary>R-CTRL-006: the lost marker of a player's locality, an ownerless, inhabited record with no state.</summary>+ static bool IsLost(SettlementControl x) => x.Owner == "" && x.State == "" && !x.Depopulated;+/// <summary>The kind of <see cref="ResolveCapture"/>: one attention_cost key for every outcome, so none is cheaper (Q-TECH-3).</summary>public const string ResolveKind = "resolve_capture";public const string Raid = "raid";@@ -144,7 +185,8 @@ namespace Statecraft.Sim/// <summary>The outcomes of EndOccupation (R-CTRL-015; Q-PUP-1 (c): no puppet regime).</summary>public const string Annex = "annex";public const string WithdrawOutcome = "withdraw";- /// <summary>The <see cref="State"/> of an annexed place: Israeli for good, no timer, upkeep or garrison (R-CTRL-016).</summary>+ /// <summary>The <see cref="State"/> of an annexed place: no timer, upkeep or garrison (R-CTRL-016). Israeli while its owner+ /// is; enemy units can take it, which clears only the owner, and a retake gives it back (R-CTRL-006; the owner on #2955).</summary>public const string Annexed = "annexed";/// <summary>R-CTRL-015: the end outcomes in their one fixed order, the ruling's words "annex or withdraw".</summary>diff --git a/unity/Assets/Scripts/UI/CauseText.cs b/unity/Assets/Scripts/UI/CauseText.csindex a3df07b50..74a202f13 100644--- a/unity/Assets/Scripts/UI/CauseText.cs+++ b/unity/Assets/Scripts/UI/CauseText.cs@@ -130,7 +130,7 @@ namespace Statecraft.Game.UI// #1682: these branches use captured ids, values and resident flags, never the live GameState.static readonly HashSet<string> RemainingKeys = new HashSet<string>{- CauseKeys.WorkersAssigned, CauseKeys.WagesPaid, CauseKeys.ImmigrantsHoused, CauseKeys.HousingShortage, CauseKeys.ImmigrantsWaiting, CauseKeys.RecruitsVeteran, CauseKeys.CorridorStarted, CauseKeys.CorridorCancelled, CauseKeys.CorridorCompleted, CauseKeys.PioneersVeteran, CauseKeys.MapBorrowed, CauseKeys.MapBuilt, CauseKeys.LandWorkStarted, CauseKeys.SiteStarted, CauseKeys.SiteCancelled, CauseKeys.SiteCompleted, CauseKeys.ProjectStarted, CauseKeys.ProjectCancelled, CauseKeys.ProjectCompleted, CauseKeys.ProjectBuilder, CauseKeys.ProjectBuilderFreed, CauseKeys.ProjectWaiting, CauseKeys.ArmsBought, CauseKeys.WorkshopWorkers, CauseKeys.WorkshopArms, CauseKeys.WorkshopPaused, CauseKeys.DollarsConverted, CauseKeys.DollarsConvertedFx, CauseKeys.FoodHarvest, CauseKeys.FoodShortage, CauseKeys.FoodWithoutImports, CauseKeys.FoodImported, CauseKeys.PrisonerFood, CauseKeys.PrisonerFoodShortage, CauseKeys.CraftsmenReturned, CauseKeys.CraftsmenReassigned, CauseKeys.PioneerReturned, CauseKeys.PioneersReassigned, CauseKeys.TrainingStarted, CauseKeys.TrainingArms, CauseKeys.TrainingCancelled, CauseKeys.TrainingArmsReturned, CauseKeys.ReplacementsStopped, CauseKeys.ReplacementsJoined, CauseKeys.MilitaryTrained, CauseKeys.PioneersTrained, CauseKeys.CraftsmenTrained, CauseKeys.Appointed, CauseKeys.Reshuffle, CauseKeys.AppointmentsEnded, CauseKeys.ApprovalStability, CauseKeys.CoalitionCollapsed, CauseKeys.LegislatureConvened, CauseKeys.GovernmentTookOffice, CauseKeys.CoalitionChanged, CauseKeys.EraEnded, CauseKeys.AdvisoryPolicyRejected, CauseKeys.PolicyRejected, CauseKeys.PolicySet, CauseKeys.AdvisoryBudgetRejected, CauseKeys.BudgetRejected, CauseKeys.PlaceCaptured, CauseKeys.EnemyRegained, CauseKeys.PlaceAnnexed, CauseKeys.PlaceWithdrawn, CauseKeys.PlaceDeported, CauseKeys.DeportEffect, CauseKeys.DeportCost, CauseKeys.OccupationStarted, CauseKeys.PendingBecameRaid, CauseKeys.OccupationLostUnit, CauseKeys.OccupationCountdown, CauseKeys.DepopulationSupport, CauseKeys.CityHeld+ CauseKeys.WorkersAssigned, CauseKeys.WagesPaid, CauseKeys.ImmigrantsHoused, CauseKeys.HousingShortage, CauseKeys.ImmigrantsWaiting, CauseKeys.RecruitsVeteran, CauseKeys.CorridorStarted, CauseKeys.CorridorCancelled, CauseKeys.CorridorCompleted, CauseKeys.PioneersVeteran, CauseKeys.MapBorrowed, CauseKeys.MapBuilt, CauseKeys.LandWorkStarted, CauseKeys.SiteStarted, CauseKeys.SiteCancelled, CauseKeys.SiteCompleted, CauseKeys.ProjectStarted, CauseKeys.ProjectCancelled, CauseKeys.ProjectCompleted, CauseKeys.ProjectBuilder, CauseKeys.ProjectBuilderFreed, CauseKeys.ProjectWaiting, CauseKeys.ArmsBought, CauseKeys.WorkshopWorkers, CauseKeys.WorkshopArms, CauseKeys.WorkshopPaused, CauseKeys.DollarsConverted, CauseKeys.DollarsConvertedFx, CauseKeys.FoodHarvest, CauseKeys.FoodShortage, CauseKeys.FoodWithoutImports, CauseKeys.FoodImported, CauseKeys.PrisonerFood, CauseKeys.PrisonerFoodShortage, CauseKeys.CraftsmenReturned, CauseKeys.CraftsmenReassigned, CauseKeys.PioneerReturned, CauseKeys.PioneersReassigned, CauseKeys.TrainingStarted, CauseKeys.TrainingArms, CauseKeys.TrainingCancelled, CauseKeys.TrainingArmsReturned, CauseKeys.ReplacementsStopped, CauseKeys.ReplacementsJoined, CauseKeys.MilitaryTrained, CauseKeys.PioneersTrained, CauseKeys.CraftsmenTrained, CauseKeys.Appointed, CauseKeys.Reshuffle, CauseKeys.AppointmentsEnded, CauseKeys.ApprovalStability, CauseKeys.CoalitionCollapsed, CauseKeys.LegislatureConvened, CauseKeys.GovernmentTookOffice, CauseKeys.CoalitionChanged, CauseKeys.EraEnded, CauseKeys.AdvisoryPolicyRejected, CauseKeys.PolicyRejected, CauseKeys.PolicySet, CauseKeys.AdvisoryBudgetRejected, CauseKeys.BudgetRejected, CauseKeys.PlaceCaptured, CauseKeys.EnemyRegained, CauseKeys.PlaceLost, CauseKeys.PlaceRetaken, CauseKeys.PlaceAnnexed, CauseKeys.PlaceWithdrawn, CauseKeys.PlaceDeported, CauseKeys.DeportEffect, CauseKeys.DeportCost, CauseKeys.OccupationStarted, CauseKeys.PendingBecameRaid, CauseKeys.OccupationLostUnit, CauseKeys.OccupationCountdown, CauseKeys.DepopulationSupport, CauseKeys.CityHeld};static string Remaining(Cause cause, Content c, UiText text, IReadOnlyDictionary<string, string>? namesHe)@@ -286,6 +286,9 @@ namespace Statecraft.Game.UIreturn text.Format(key, Settlement(cause.Target), A(0) == "1" ? text["why.cause.fled_capture"] : "");case CauseKeys.EnemyRegained:return text.Format(key, Settlement(cause.Target), A(0) == "1" ? ". " + Residents(A(0)) : "");+ case CauseKeys.PlaceLost: // R-CTRL-006 (#1305)+ case CauseKeys.PlaceRetaken:+ return text.Format(key, Settlement(cause.Target));case CauseKeys.PlaceAnnexed:return text.Format(key, Settlement(cause.Target), text["why.cause.annexed." + A(0)]);case CauseKeys.PlaceWithdrawn:diff --git a/unity/Assets/Tests/EditMode/CauseTextTests.cs b/unity/Assets/Tests/EditMode/CauseTextTests.csindex 64872a599..24cfc1158 100644--- a/unity/Assets/Tests/EditMode/CauseTextTests.cs+++ b/unity/Assets/Tests/EditMode/CauseTextTests.cs@@ -590,6 +590,8 @@ public class CauseTextTestsnew Cause("draft", "budget", 0, "Body voted the budget down", key: CauseKeys.BudgetRejected, args: new[] { "leg" }),new Cause("draft", "town", 0, "Town is captured: Israeli units hold it and no enemy unit is there. Its residents fled. It awaits a decision", key: CauseKeys.PlaceCaptured, args: new[] { "1" }),new Cause("draft", "town", 0, "Town is under enemy control again: enemy units hold it and no Israeli unit is there. Its residents fled when it was captured", key: CauseKeys.EnemyRegained, args: new[] { "1" }),+ new Cause("draft", "town", 0, "Town is lost: enemy units hold it and no Israeli unit is there", key: CauseKeys.PlaceLost), // R-CTRL-006 (#1305)+ new Cause("draft", "town", 0, "Town is retaken: Israeli units hold it again and no enemy unit is there", key: CauseKeys.PlaceRetaken),new Cause("draft", "town", 0, "Town is annexed. Its residents fled when it was captured, so no people, homes or jobs are added", key: CauseKeys.PlaceAnnexed, args: new[] { "1" }),new Cause("draft", "town", 0, "Town: Israeli units withdrew and it is under enemy control again. Its residents fled when it was captured", key: CauseKeys.PlaceWithdrawn, args: new[] { "1", "1" }),new Cause("draft", "town", 0, "Town: Deport. Its residents are displaced and the place is depopulated", key: CauseKeys.PlaceDeported),diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yamlindex 1ef1ea938..4b636a30c 100644--- a/unity/Assets/UI/strings.en.yaml+++ b/unity/Assets/UI/strings.en.yaml@@ -1257,6 +1257,9 @@ why.cause.advisory_budget_rejected: "{0} voted against the budget, but its votewhy.cause.budget_rejected: "{0} voted the budget down"why.cause.place_captured: "{0} is captured: Israeli units hold it and no enemy unit is there. {1}It awaits a decision"why.cause.enemy_regained: "{0} is under enemy control again: enemy units hold it and no Israeli unit is there{1}"+# R-CTRL-006 (#1305): enemy units took a player's locality; Israeli units took it back.+why.cause.place_lost: "{0} is lost: enemy units hold it and no Israeli unit is there"+why.cause.place_retaken: "{0} is retaken: Israeli units hold it again and no enemy unit is there"why.cause.place_annexed: "{0} is annexed. {1}"why.cause.place_withdrawn: "{0}{1} {2}"why.cause.place_deported: "{0}: Deport. Its residents are displaced and the place is depopulated"diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yamlindex fe286a59e..5841380d5 100644--- a/unity/Assets/UI/strings.he.yaml+++ b/unity/Assets/UI/strings.he.yaml@@ -1500,6 +1500,9 @@ why.cause.advisory_budget_rejected: "הצבעת {0} נגד התקציב, אך הwhy.cause.budget_rejected: "דחיית התקציב בהצבעת {0}"why.cause.place_captured: "{0}: המקום נכבש ומוחזק בידי יחידות ישראליות ללא יחידת אויב. {1}המקום ממתין להחלטה"why.cause.enemy_regained: "{0}: המקום שוב בשליטת האויב ומוחזק בידי יחידות אויב ללא יחידה ישראלית{1}"+# For the native reviewer (#564): agent-drafted, #1305 (R-CTRL-006), in the words of place_captured and enemy_regained.+why.cause.place_lost: "{0}: המקום אבד ומוחזק בידי יחידות אויב ללא יחידה ישראלית"+why.cause.place_retaken: "{0}: המקום נכבש מחדש ומוחזק שוב בידי יחידות ישראליות ללא יחידת אויב"why.cause.place_annexed: "{0}: המקום סופח. {1}"why.cause.place_withdrawn: "{0}{1} {2}"why.cause.place_deported: "{0}: גירוש. התושבים נעקרו והמקום התרוקן מתושביו"