A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
GDD 0.3: R-CTRL-011/013/014/017 re-pointed to the #1712 rulings and pinned under gdd-0.3 (Refs #1712) (#2185)
Eyal Golan7d7d0047d606
diff --git a/changelog.d/1712-mvp-repoint.md b/changelog.d/1712-mvp-repoint.mdnew file mode 100644index 000000000..c0e399a0d--- /dev/null+++ b/changelog.d/1712-mvp-repoint.md@@ -0,0 +1,4 @@+- Tests and rule text only, no change to play (Refs #1712): R-CTRL-011, R-CTRL-013, R-CTRL-014 and R-CTRL-017 now cite the+ owner's 27 October 2026 rulings ("Existing Raid/Occupy", "3 turns, keep upkeep") and the 1 November 2026 MVP scope ("30 Oct+ wins for the MVP (Recommended)"). New tests check that the end-of-occupation preview equals the result, that annexing Acre and+ annexing Nazareth each add one city and no unit, and that occupying, withdrawing, retaking and annexing play the same under gdd-0.3.diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex 83a7112ab..8af5c2e2e 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -52,19 +52,19 @@ R-CTRL-009: `HistoricalAI` answers every capture awaiting the choice with Raid,R-CTRL-010: Raid and withdraw (Q-RAID-1 (a), owner, 18 October 2026, #783 batch 3). The player's units on the place's hex, soldiers and halutzim alike, leave in ascending id, each to the first neighbouring hex in the fixed neighbour order (R-MOVE-002) that is land, holds no enemy unit, is not an enemy-held locality (R-MOVE-005) and has room under the stack limit (R-MOVE-003). Leaving costs no movement points, and the units keep their orders, as after a `Move` that ends on another hex: a fortify is lost at the turn's order step (R-ORDER-002); both are defaults proposed on #797. The record is removed, so the place is under enemy control again at once, and its residents are unchanged. Raid changes nothing else: no resource, parameter, city, score or objective, and no RNG draw. If a unit has no such hex, Raid is refused with a reason and the state is unchanged, so the choice waits. For a fled place the record stays ownerless and fled (R-CTRL-004), and the line says "Its residents fled when it was captured" instead of "Its residents are unchanged" (OWNER QUESTION 2 (b), owner, 24 October 2026, #799).-R-CTRL-011: Occupy (Q-OCC-1 (a), owner, 18 October 2026, #783 batch 3): `ResolveCapture(settlement, occupy)` keeps the place under the player's control. It needs an Israeli military unit on the place's hex, the one unit that stays (a halutz holds nothing, #796), and is refused with a reason otherwise, the state unchanged. It moves no unit. It changes the record's state to `occupied` and starts its timer (R-CTRL-012), and nothing else: no resident field (the place stays inhabited, R-CTRL-003), unit, resource, parameter, city, score or objective, so its preview (R-CTRL-008) is all zeros. Each turn's step 10, while the place is occupied or awaiting `EndOccupation`, the Treasury pays `mvp.occupation_upkeep_per_turn` for it, borrowing what it lacks (R-MONEY-003); the Occupy turn pays too. The upkeep is a design value accepted by the owner on 22 October 2026 (https://github.com/eyalgolan/statecraft-israel/pull/1324#issuecomment-6338594839): IL 0.005m, one month of `income_per_job_per_year` for the one population unit that stays, derived as `held_soldier_cost_per_turn` is. It comes on top of the garrison formation's own `military_upkeep_per_turn` (IL 0.05m, R-UNIT-010), so holding a place costs IL 0.055m a turn in all (owner ruling, 22 October 2026, https://github.com/eyalgolan/statecraft-israel/pull/1324#issuecomment-6341877796). Money is shown to one decimal of IL millions, so when the Treasury has to borrow for it the Why line shows the borrowed amount, at most IL 0.005m, as "IL 0.0m". For a fled place Occupy's line ends "Its residents fled when it was captured", and Occupy and the timer keep `fled=1` on every record (OWNER QUESTION 2 (b), owner, 24 October 2026, #799).+R-CTRL-011: Occupy (Q-OCC-1 (a), owner, 18 October 2026, #783 batch 3): `ResolveCapture(settlement, occupy)` keeps the place under the player's control. It needs an Israeli military unit on the place's hex, the one unit that stays (a halutz holds nothing, #796), and is refused with a reason otherwise, the state unchanged. It moves no unit. It changes the record's state to `occupied` and starts its timer (R-CTRL-012), and nothing else: no resident field (the place stays inhabited, R-CTRL-003), unit, resource, parameter, city, score or objective, so its preview (R-CTRL-008) is all zeros. Each turn's step 10, while the place is occupied or awaiting `EndOccupation`, the Treasury pays `mvp.occupation_upkeep_per_turn` for it, borrowing what it lacks (R-MONEY-003); the Occupy turn pays too. The upkeep is a design value accepted by the owner on 22 October 2026 (https://github.com/eyalgolan/statecraft-israel/pull/1324#issuecomment-6338594839): IL 0.005m, one month of `income_per_job_per_year` for the one population unit that stays, derived as `held_soldier_cost_per_turn` is. It comes on top of the garrison formation's own `military_upkeep_per_turn` (IL 0.05m, R-UNIT-010), so holding a place costs IL 0.055m a turn in all (owner ruling, 22 October 2026, https://github.com/eyalgolan/statecraft-israel/pull/1324#issuecomment-6341877796). Money is shown to one decimal of IL millions, so when the Treasury has to borrow for it the Why line shows the borrowed amount, at most IL 0.005m, as "IL 0.0m". For a fled place Occupy's line ends "Its residents fled when it was captured", and Occupy and the timer keep `fled=1` on every record (OWNER QUESTION 2 (b), owner, 24 October 2026, #799). The owner's rulings of 27 October 2026 on #1712 (https://github.com/eyalgolan/statecraft-israel/issues/1712#issuecomment-6461246243) keep this flow for capture, "Existing Raid/Occupy", and the occupation "3 turns, keep upkeep" (R-CTRL-012); the owner's ruling of 1 November 2026, "30 Oct wins for the MVP (Recommended)", leaves Occupy as written here for the MVP. It holds unchanged under gdd-0.3: a capture, Occupy, a withdrawal and a retake end every turn as under gdd-0.1, the Attention pool aside (`OccupyTests.WithdrawingOnTurnTwoAndRetakingIsTheSameUnderGdd03`).R-CTRL-012: The occupation timer (Q-OCC-3 (a), owner, 18 October 2026, #783 batch 4: one X for every place). Occupy sets the record's `Turns` to `mvp.occupation_turns`, X, a design value: 3 monthly turns (owner, 27 October 2026, #1712, "3 turns, keep upkeep", https://github.com/eyalgolan/statecraft-israel/issues/1712#issuecomment-6461246243; confirmed by the owner on 1 November 2026, "3 turns (27 Oct)"), replacing the 6 monthly turns the owner accepted on 22 October 2026 (https://github.com/eyalgolan/statecraft-israel/pull/1324#issuecomment-6338594839). Resolver step 10, after step 9's arrivals and before objectives and score (step 11), takes each occupied place in ordinal id order and counts one turn off, the Occupy turn included; at 0 the place's state is `awaiting_end`, where it awaits `EndOccupation` (Phase 6 PR 7) and the count stops. `Turns` is written to the hash as `turns=` only when non-zero (R-CTRL-002). The step draws nothing from the RNG.-R-CTRL-013: Withdrawal before the timer ends (Q-OCC-2 (a), owner, 18 October 2026, #783 batch 3: allowed, and it becomes a Raid). An occupation lasts while an Israeli military unit is on the place's hex. When step 10 finds none on an occupied or `awaiting_end` place (the player moved them out, or they were lost), the occupation ends as a Raid does: the record is removed, so the place is under enemy control again at once, its residents unchanged, and no upkeep is paid that turn. Nothing else changes, and nothing is refunded. A halutz left on the hex keeps nothing. For a fled place the timer's raid keeps the ownerless fled record and its line says the residents fled when it was captured (OWNER QUESTION 2 (b), owner, 24 October 2026, #799).+R-CTRL-013: Withdrawal before the timer ends (Q-OCC-2 (a), owner, 18 October 2026, #783 batch 3: allowed, and it becomes a Raid). An occupation lasts while an Israeli military unit is on the place's hex. When step 10 finds none on an occupied or `awaiting_end` place (the player moved them out, or they were lost), the occupation ends as a Raid does: the record is removed, so the place is under enemy control again at once, its residents unchanged, and no upkeep is paid that turn. Nothing else changes, and nothing is refunded. A halutz left on the hex keeps nothing. For a fled place the timer's raid keeps the ownerless fled record and its line says the residents fled when it was captured (OWNER QUESTION 2 (b), owner, 24 October 2026, #799). The owner's rulings of 27 October 2026 on #1712 ("Existing Raid/Occupy", "3 turns, keep upkeep"; 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: a withdrawal on the occupation's second turn returns the town and clears its timer, and a retake is a new capture, whose Occupy starts a fresh timer. It holds unchanged under gdd-0.3 (`OccupyTests.WithdrawingOnTurnTwoAndRetakingIsTheSameUnderGdd03`).-R-CTRL-014: `EndOccupation(settlement, outcome)` answers the end of an occupation (#799). It is one deferred command kind (not instant, R-TURN-004) with one `attention_cost.end_occupation`, set at 0 as a design value proposed on #799 (D-A6: unit orders are free). It is valid only for a place in `awaiting_end` with an Israeli military unit on its hex, as Occupy needs (R-CTRL-011), and an outcome of `annex` or `withdraw`; the unit is checked for both outcomes. Otherwise it is refused with a reason, the state unchanged and the Attention refunded. It draws nothing from the RNG. Saved as `endocc <settlement> <outcome>`; scenario kind `end_occupation`.+R-CTRL-014: `EndOccupation(settlement, outcome)` answers the end of an occupation (#799). It is one deferred command kind (not instant, R-TURN-004) with one `attention_cost.end_occupation`, set at 0 as a design value proposed on #799 (D-A6: unit orders are free). It is valid only for a place in `awaiting_end` with an Israeli military unit on its hex, as Occupy needs (R-CTRL-011), and an outcome of `annex` or `withdraw`; the unit is checked for both outcomes. Otherwise it is refused with a reason, the state unchanged and the Attention refunded. It draws nothing from the RNG. Saved as `endocc <settlement> <outcome>`; scenario kind `end_occupation`. The owner's rulings of 27 October 2026 on #1712 (https://github.com/eyalgolan/statecraft-israel/issues/1712#issuecomment-6461246243) set the occupation it ends at "3 turns, keep upkeep" (R-CTRL-012), and the owner's ruling of 1 November 2026, "30 Oct wins for the MVP (Recommended)", keeps its outcomes to Annex and Withdraw for the MVP (R-CTRL-015, R-CTRL-016). Each option's preview equals its result (`EndOccupationTests.TheEndPreviewIsTheOutcome`), and annexing a stayed town adds one city and no unit (`EndOccupationTests.AnnexingAStayedRealTownAddsOneCityAndNoUnit`). It holds unchanged under gdd-0.3: Occupy, the three turns, Annex and the unit's leaving end every turn as under gdd-0.1, the Attention pool aside (`EndOccupationTests.OccupyThenAnnexIsTheSameUnderGdd03`).R-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; 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-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).+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`).R-CTRL-018: Deport (impact plan section 4.1; owner ruling 1, "honest cost, no reward"; Q-DEP-1 (a), Q-DEP-5 (c) and Q-DEP-7 (c), which includes (a), owner, 18 October 2026, #783 "Accept all 16 drafts"): `ResolveCapture(settlement, deport)`, only while `mvp.deport_in_play` is on (R-CTRL-007). The player's units on the place's hex leave exactly as in Raid (R-CTRL-010), and Deport is refused the same way, the state unchanged, when one has nowhere to go: it gives no military advantage over Raid and pays no occupation upkeep. Social cohesion (`morale`) falls at once by `mvp.deport_cohesion_cost` and International Support (`intl_standing`) by `mvp.deport_support_cost`, through the permanent event shift. The Treasury pays `mvp.deport_money_cost` at once, borrowing what it lacks (R-MONEY-003), so Deport never pays on Money (owner decision, 22 October 2026, https://github.com/eyalgolan/statecraft-israel/pull/1327#issuecomment-6337946480): a design value set at or above the most Occupy can pay in upkeep over the whole game plus the dearest city project, IL 6.25m. The place is added to `DisplacedByPlayer`. From then on, every turn's resolver step 10, after the occupation timers, International Support falls by `mvp.deport_support_drag_per_turn` for each place in `DisplacedByPlayer`, the Deport turn included, for the rest of the game; and International Support's ceiling is 1 less `mvp.deport_support_ceiling_drop` for each such place (never below 0), which every write to it respects. The four indicator values (0.15, 0.15, 0.005 and 0.25, the drag and the ceiling drop per place) and the IL 6.25m were proposed on #800 and #1327 and accepted by the owner on 22 October 2026 (https://github.com/eyalgolan/statecraft-israel/pull/1327#issuecomment-6350226175); they stay design values the balance pass (#813) may revisit. Nothing draws from the RNG. For a place whose record is `fled` (its residents fled at capture, R-CTRL-005) Deport stays listed third and is refused, the state unchanged, with the reason "Its residents fled when it was captured, so there is no one to deport", which the options helper shows on its button (OWNER QUESTION 4 (a), owner, 24 October 2026, "Hide it, button explains (Recommended)", https://github.com/eyalgolan/statecraft-israel/issues/799#issuecomment-6375591758).diff --git a/sim/Statecraft.Sim.Tests/EndOccupationTests.cs b/sim/Statecraft.Sim.Tests/EndOccupationTests.csindex 9e78cf921..1623347ef 100644--- a/sim/Statecraft.Sim.Tests/EndOccupationTests.cs+++ b/sim/Statecraft.Sim.Tests/EndOccupationTests.cs@@ -88,11 +88,14 @@ public class EndOccupationTestsAssert.Equal(before, s.Describe());}- // R-CTRL-017 (Q-ANNEX-2 (a)): a depopulated place (no state) is never answered.- [Fact]- public void ADepopulatedPlaceIsNeverAnnexed()+ // R-CTRL-017 (Q-ANNEX-2 (a)): a depopulated place (no state) is never answered, under gdd-0.1 and gdd-0.3 alike.+ [Theory]+ [InlineData(false)]+ [InlineData(true)]+ public void ADepopulatedPlaceIsNeverAnnexed(bool gdd03){- var c = CaptureTests.Load(CaptureTests.AllTargets);+ var c = OccupyTests.Load(gdd03);+ Assert.Equal(gdd03 ? SaveGame.Gdd03Ruleset : SaveGame.GddRuleset, c.Ruleset);var s = CombatTests.With(c, Soldier(1, 1, 0));s.Settlements["town_a"] = new SettlementControl(since: s.Date, depopulated: true);Assert.Empty(SettlementControl.EndOptions(c, s, "town_a"));@@ -217,4 +220,91 @@ public class EndOccupationTestsAssert.DoesNotContain((1, 0), Movement.NoEntry(c, s));Assert.Contains((1, 0), Movement.NoEntry(c, s, true));}++ // R-CTRL-014, R-CTRL-015 (R-CTRL-008's contract; owner, 27 October 2026, #1712: "Existing Raid/Occupy", with the preview+ // equal to the result): each end option's preview is the change resolving it makes, checked on a clone the test resolves+ // itself. end_occupation is given a cost here, so the Attention field is checked at a value other than 0. EndOptions+ // leaves the state as it found it.+ [Fact]+ public void TheEndPreviewIsTheOutcome()+ {+ var c = CaptureTests.Load(f => f["rules.yaml"] = f["rules.yaml"].Replace("end_occupation: 0", "end_occupation: 1"), CaptureTests.AllTargets);+ var s = AwaitingEnd(c, "town_c", false, Soldier(1, 4, 0)); // town_a is a fixture city+ s.Attention = 5;+ var cost = AttentionSystem.Cost(c, s, SettlementControl.EndKind);+ Assert.True(cost > 0);+ var before = s.Describe();+ var options = SettlementControl.EndOptions(c, s, "town_c");+ Assert.Equal(new[] { SettlementControl.Annex, SettlementControl.WithdrawOutcome }, options.Where(o => o.Preview != null).Select(o => o.Outcome).ToArray());+ foreach (var o in options)+ {+ var after = s.Clone();+ Assert.Null(AttentionSystem.TrySpend(c, after, SettlementControl.EndKind));+ Assert.Null(SettlementControl.End(c, after, "town_c", o.Outcome, new List<Cause>()));+ var p = o.Preview!;+ Assert.Equal(after.Attention - s.Attention, p.Attention);+ Assert.Equal(after.Treasury - s.Treasury, p.Money);+ Assert.Equal(after.Debt - s.Debt, p.Debt);+ Assert.Equal(after.Food - s.Food, p.Food);+ Assert.Equal(after.Arms - s.Arms, p.Arms);+ Assert.Equal(after.Indicators.GetValueOrDefault("morale") - s.Indicators.GetValueOrDefault("morale"), p.SocialCohesion);+ Assert.Equal(after.Indicators.GetValueOrDefault("intl_standing") - s.Indicators.GetValueOrDefault("intl_standing"), p.InternationalSupport);+ Assert.Equal(after.Score - s.Score, p.Score);+ Assert.Equal(-cost, p.Attention);+ }+ Assert.Equal(before, s.Describe());+ }++ // R-CTRL-014, R-CTRL-016 under gdd-0.3 (owner, 27 October 2026, #1712: "3 turns, keep upkeep", "Keep joined city"; owner,+ // 1 November 2026: "30 Oct wins for the MVP (Recommended)", so the annexation is for good): Occupy, three turns to the+ // end of the timer, Annex of the stayed town_c, then the soldier is removed and the place stays annexed and a city.+ // Every turn ends the same under gdd-0.1 and gdd-0.3, the Attention pool aside.+ [Fact]+ public void OccupyThenAnnexIsTheSameUnderGdd03()+ {+ var turns = new[]+ {+ new Command[] { new ResolveCapture("town_c", SettlementControl.Occupy) }, Array.Empty<Command>(), Array.Empty<Command>(),+ new Command[] { new EndOccupation("town_c", SettlementControl.Annex) }, Array.Empty<Command>(),+ };+ var expected = new[] { "occupied/2@4,0", "occupied/1@4,0", "awaiting_end/0@4,0", "annexed/0@4,0", "annexed/0@gone" };+ var runs = new[] { false, true }.Select(gdd03 =>+ {+ var c = OccupyTests.Load(gdd03);+ var s = CombatTests.With(c, Soldier(1, 4, 0));+ s.Settlements["town_c"] = new SettlementControl(Movement.PlayerSide, SettlementControl.AwaitingChoice, s.Date);+ var run = OccupyTests.Play(c, s, "town_c", (i, x) => { if (i == 4) x.Units.Remove(1); }, turns);+ return run;+ }).ToList();+ Assert.Equal(expected, runs[0].Select(x => x.Trace));+ Assert.Equal(expected, runs[1].Select(x => x.Trace));+ Assert.Equal(runs[0].Select(x => x.State), runs[1].Select(x => x.State));+ Assert.All(runs[1].Skip(3), x => Assert.Contains("town_c=6,3,6,3,0", x.State)); // the joined city: 60 people, 6 units, 3 employed+ }++ // R-CTRL-016, R-CTRL-014 (OWNER QUESTION 1 (a) on #799; owner, 27 October 2026, #1712: "Keep joined city"): annexing a+ // stayed town of the real content adds exactly one city, with its id, and no unit: the unit set and the next unit id+ // are what they were (no free units, no local military). SettlementControl.End is called directly, as a Step would+ // also bring in the turn's dated arrivals.+ [Theory]+ [InlineData("acre")]+ [InlineData("nazareth")]+ public void AnnexingAStayedRealTownAddsOneCityAndNoUnit(string id)+ {+ var c = ContentLoader.Load(RealContentTests.ContentRoot());+ var t = c.SettlementTargets.Single(x => x.Id == id);+ Assert.Equal(ContentLoader.Stayed, t.Residents);+ var s = Simulation.NewGame(c, 1, Mode.Historical);+ var u = s.Units.Values.First(x => x.Side == Movement.PlayerSide);+ s.Units[u.Id] = new Unit(u.Id, u.Type, t.Q, t.R, u.Service, u.Side, u.Strength, u.Order, u.OrderTarget, u.HomeCity, u.Full);+ s.Settlements[id] = new SettlementControl(Movement.PlayerSide, SettlementControl.AwaitingEnd, s.Date);+ static string Units(GameState x) => string.Join(";", x.Units.Values.Select(v => v.Canonical()));+ var (units, nextId, cities) = (Units(s), s.NextId, s.Cities.Keys.ToList());+ Assert.DoesNotContain(id, cities);+ Assert.Null(SettlementControl.End(c, s, id, SettlementControl.Annex, new List<Cause>()));+ Assert.Equal(units, Units(s));+ Assert.Equal(nextId, s.NextId);+ Assert.Equal(cities.Append(id).OrderBy(x => x, StringComparer.Ordinal), s.Cities.Keys.OrderBy(x => x, StringComparer.Ordinal));+ Assert.Equal(SettlementControl.Annexed, s.Settlements[id].State);+ }}diff --git a/sim/Statecraft.Sim.Tests/NoAttentionTests.cs b/sim/Statecraft.Sim.Tests/NoAttentionTests.csindex 7d38e3f25..9cf287e3a 100644--- a/sim/Statecraft.Sim.Tests/NoAttentionTests.cs+++ b/sim/Statecraft.Sim.Tests/NoAttentionTests.cs@@ -5,7 +5,7 @@ using System.Text.RegularExpressions;public class NoAttentionTests{public static IEnumerable<object[]> Kinds() => CommandGuardTests.Samples.Values.Select(c => new object[] { c.Kind });- static void Select(Dictionary<string,string> files, bool modern)+ internal static void Select(Dictionary<string,string> files, bool modern){if (modern) files["eras.yaml"] = files["eras.yaml"].Replace("loop: gdd", "loop: gdd, ruleset: gdd-0.3");files[Gdd03BalanceCatalogue.FileName] = File.ReadAllText(Path.Combine(RealContentTests.ContentRoot(),Gdd03BalanceCatalogue.FileName));@@ -18,7 +18,7 @@ public class NoAttentionTests{foreach (var r in c.EraRules.Values.Append(c.Rules)) { r.AttentionCost.Clear(); r.AttentionPerTurn=double.NaN; r.RungAttentionStep=double.NaN; }}- static string WithoutLegacyAccounting(string canonical) =>+ internal static string WithoutLegacyAccounting(string canonical) =>Regex.Replace(Regex.Replace(canonical, @"\npopulation-ledger\{(?:\n [^\n]*)*", "").Replace("ruleset=gdd-0.3;", ""), @"\natt=[^\n]*", "");static bool Unavailable(string kind) => kind is "map_action" or "set_mobilization" or "security_order";static (Content c,GameState s,Command valid,Command invalid) Case(string kind,bool modern)diff --git a/sim/Statecraft.Sim.Tests/OccupyTests.cs b/sim/Statecraft.Sim.Tests/OccupyTests.csindex 6aab708a6..06e5a6350 100644--- a/sim/Statecraft.Sim.Tests/OccupyTests.cs+++ b/sim/Statecraft.Sim.Tests/OccupyTests.cs@@ -249,4 +249,49 @@ public class OccupyTestsAssert.Equal(("rules.yaml", field), (ex.File, ex.Field));Assert.Contains(message, ex.Message);}++ /// <summary>CaptureTests' fixture as it loads (gdd-0.1), or with the exact gdd-0.3 ruleset swapped in as NoAttentionTests+ /// swaps it.</summary>+ internal static Content Load(bool gdd03) => CaptureTests.Load(gdd03 ? f => NoAttentionTests.Select(f, true) : null, CaptureTests.AllTargets);++ /// <summary>Plays <paramref name="turns"/> from <paramref name="s"/>, running <paramref name="between"/> on the state+ /// before each turn's orders (null leaves it alone), and after each turn records <paramref name="id"/>'s record as+ /// state/turns ("none" with no record) with soldier 1's hex, and the canonical state with the Attention pool and the+ /// ruleset name taken out (NoAttentionTests.WithoutLegacyAccounting).</summary>+ internal static List<(string Trace, string State)> Play(Content c, GameState s, string id, Action<int, GameState>? between, params Command[][] turns)+ {+ var seen = new List<(string, string)>();+ for (int i = 0; i < turns.Length; i++)+ {+ between?.Invoke(i, s);+ var result = Simulation.Step(c, s, turns[i]);+ Assert.Empty(result.Rejected);+ s = result.State;+ var where = s.Units.TryGetValue(1, out var u) ? FormattableString.Invariant($"{u.Q},{u.R}") : "gone";+ var record = s.Settlements.TryGetValue(id, out var x) ? FormattableString.Invariant($"{x.State}/{x.Turns}") : "none";+ seen.Add((record + "@" + where, NoAttentionTests.WithoutLegacyAccounting(s.Describe())));+ }+ Assert.Equal(c.Ruleset == SaveGame.Gdd03Ruleset, s.Describe().Contains("ruleset=gdd-0.3", StringComparison.Ordinal));+ return seen;+ }++ // R-CTRL-011, R-CTRL-013 under gdd-0.3 (owner, 27 October 2026, #1712: "Existing Raid/Occupy", "3 turns, keep upkeep";+ // owner, 1 November 2026: "30 Oct wins for the MVP (Recommended)"): a move captures town_a, Occupy starts the timer, the+ // soldier leaves on the occupation's second turn, so the town returns to enemy control and its timer is cleared, and a+ // retake then starts a fresh timer (X - 1 = 2 after its first turn, not the 1 the old timer had left). Every turn ends+ // the same under gdd-0.1 and gdd-0.3, the Attention pool aside.+ [Fact]+ public void WithdrawingOnTurnTwoAndRetakingIsTheSameUnderGdd03()+ {+ var turns = new[]+ {+ new Command[] { new Move(1, 1, 0) }, new Command[] { Occupy() }, new Command[] { new Move(1, 2, 0) },+ new Command[] { new Move(1, 1, 0) }, new Command[] { Occupy() },+ };+ var expected = new[] { "awaiting_choice/0@1,0", "occupied/2@1,0", "none@2,0", "awaiting_choice/0@1,0", "occupied/2@1,0" };+ var runs = new[] { false, true }.Select(gdd03 => { var c = Load(gdd03); return Play(c, CombatTests.With(c, Soldier(1, 2, 0)), "town_a", null, turns); }).ToList();+ Assert.Equal(expected, runs[0].Select(x => x.Trace));+ Assert.Equal(expected, runs[1].Select(x => x.Trace));+ Assert.Equal(runs[0].Select(x => x.State), runs[1].Select(x => x.State));+ }}