A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
sim: prisoner values cite the owner's ruling, two test gaps closed (follow-up to #1264, refs #751) (#1271)
Berida9761bdd021
diff --git a/changelog.d/sim-prisoners-cite-751.md b/changelog.d/sim-prisoners-cite-751.mdnew file mode 100644index 000000000..981a4d78d--- /dev/null+++ b/changelog.d/sim-prisoners-cite-751.md@@ -0,0 +1,5 @@+### Changed+- Prisoners (follow-up to #1264, refs #751): the four prisoner amounts and the ALA and local-force rule now cite the+ owner's ruling (owner, 21 October 2026, #751) in `rules.yaml`, `docs/rules/mvp.md` and `DesignValuesTests`. Two tests+ closed the gaps the owner's review named: the exchange card waiting for prisoners now plays past its 1 July window, and+ delegating an exchange card is checked to draw no random number. No behaviour changes; goldens do not move.diff --git a/content/rules.yaml b/content/rules.yamlindex 8d064eaba..08e253f11 100644--- a/content/rules.yaml+++ b/content/rules.yaml@@ -202,11 +202,12 @@ mvp:# the 2:1 row of combat_table, the first where the defenders can be made to retreat. Not a historical figure.enemy_attack_ratio_percent: 200 # DESIGN VALUE: owner-set balance, not a historical figure (D-G7, Q-ENEMY-2: the least attack : defence ratio an enemy unit attacks at, percent)# Prisoners (R-POW-002, R-POW-004, R-POW-005; Q-POW-2, Q-POW-4, Q-POW-5, owner, 15 October 2026, #375). The amounts are- # agent defaults posted on #751 (https://github.com/eyalgolan/statecraft-israel/issues/751#issuecomment-6318787961) for- # the owner to set or accept; none is a historical figure. A prisoner unit eats the ration any population unit eats (one- # Food is one unit's food for a month, R-FOOD-001). A return scores a tenth of an objective (D-B6) per unit. The player's- # soldiers held cost one month of income_per_job_per_year (0.06 / 12) a unit, in Money, so Q-CIV-3 keeps the Food- # shortfall as its one cohesion exemption.+ # agent defaults posted on #751 (https://github.com/eyalgolan/statecraft-israel/issues/751#issuecomment-6318787961)+ # and accepted by the owner as design values (owner, 21 October 2026, #751:+ # https://github.com/eyalgolan/statecraft-israel/issues/751#issuecomment-6321366548); none is a historical figure. A prisoner+ # unit eats the ration any population unit eats (one Food is one unit's food for a month, R-FOOD-001). A return scores a+ # tenth of an objective (D-B6) per unit. The player's soldiers held cost one month of income_per_job_per_year (0.06 /+ # 12) a unit, in Money, so Q-CIV-3 keeps the Food shortfall as its one cohesion exemption.food_per_prisoner_unit: 1 # DESIGN VALUE: owner-set balance, not a historical figure (D-C2, Q-POW-5: Food a population unit of prisoners eats a turn)prisoner_shortfall_cohesion: 0.01 # DESIGN VALUE: owner-set balance, not a historical figure (D-C1, Q-POW-5: Social cohesion lost per unit of the prisoners' Food not given)points_per_prisoner_unit_returned: 10 # DESIGN VALUE: owner-set balance, not a historical figure (D-B6, Q-POW-2: points per population unit of prisoners returned)diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex e465dc774..a2acdfee7 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -238,7 +238,7 @@ R-ENEMY-006: No enemy unit attacks inside a truce window (owner, 21 October 2026## Prisoners-Phase 5 PR 12 (#751). The impact plan's §4.3 as written (Q-POW-1), points per unit returned (Q-POW-2), a sourced event card per front (Q-POW-3), the player's soldiers counted with a cost (Q-POW-4) and a Food cost whose shortfall costs cohesion (Q-POW-5): the owner's picks of 15 October 2026 (#375). The four amounts (`rules.yaml` `mvp.food_per_prisoner_unit`, `mvp.prisoner_shortfall_cohesion`, `mvp.points_per_prisoner_unit_returned`, `mvp.held_soldier_cost_per_turn`), the front of each side and the captor of the player's soldiers are agent defaults posted on #751 (https://github.com/eyalgolan/statecraft-israel/issues/751#issuecomment-6318787961) for the owner to set or accept. The four sourced exchange cards are not in `content/` yet: they wait for a person's source check (CONTENT_POLICY §2) and the owner's sensitivity review.+Phase 5 PR 12 (#751). The impact plan's §4.3 as written (Q-POW-1), points per unit returned (Q-POW-2), a sourced event card per front (Q-POW-3), the player's soldiers counted with a cost (Q-POW-4) and a Food cost whose shortfall costs cohesion (Q-POW-5): the owner's picks of 15 October 2026 (#375). The four amounts (`rules.yaml` `mvp.food_per_prisoner_unit`, `mvp.prisoner_shortfall_cohesion`, `mvp.points_per_prisoner_unit_returned`, `mvp.held_soldier_cost_per_turn`) are agent defaults posted on #751 (https://github.com/eyalgolan/statecraft-israel/issues/751#issuecomment-6318787961), accepted by the owner as design values (owner, 21 October 2026, #751: https://github.com/eyalgolan/statecraft-israel/issues/751#issuecomment-6321366548). The same ruling says ALA and local-force prisoners belong to no front, so they stay held, and fed, to the game's end. It does not name the front of each side or the captor of the player's soldiers; those stay agent defaults. The four sourced exchange cards are not in `content/` yet: they wait for a person's source check (CONTENT_POLICY §2) and the owner's sensitivity review.R-POW-001: Prisoners come only from a surrender in combat (R-COMBAT-003). The surrendered enemy unit's strength, in population units, is added to `GameState.PrisonersHeld` under its side; residents never become prisoners (R-CTRL-003). No command and no event effect adds to or takes from the count: no effect target names it. The surrender's Why line ends "They are held as prisoners", and nothing on screen celebrates a capture (impact plan §4.3 item 4).diff --git a/sim/Statecraft.Sim.Tests/DesignValuesTests.cs b/sim/Statecraft.Sim.Tests/DesignValuesTests.csindex 576467f59..5b36862c1 100644--- a/sim/Statecraft.Sim.Tests/DesignValuesTests.cs+++ b/sim/Statecraft.Sim.Tests/DesignValuesTests.cs@@ -174,7 +174,7 @@ public class DesignValuesTests("rules.yaml", "mvp.arms_start"),("rules.yaml", "mvp.arms_price"),("rules.yaml", "mvp.arms_per_recruit_group"),- // Prisoners (Phase 5 PR 12, #751; Q-POW-2, Q-POW-4, Q-POW-5): agent defaults for the owner to set or accept.+ // Prisoners (Phase 5 PR 12, #751; Q-POW-2, Q-POW-4, Q-POW-5): agent defaults, accepted by the owner as design values (owner, 21 October 2026, #751).("rules.yaml", "mvp.food_per_prisoner_unit"),("rules.yaml", "mvp.prisoner_shortfall_cohesion"),("rules.yaml", "mvp.points_per_prisoner_unit_returned"),@@ -283,7 +283,7 @@ public class DesignValuesTestsAssert.Equal((5, 0.5), (m.DelegationLoyaltyFloor, m.DisloyalEffectShare)); // R-EVT-003, #107 (D-H1)Assert.Equal((12, 1.0, 1, 1.0), (m.ArmsStart, m.ArmsPrice, m.ArmsPerRecruitGroup, c.Rules.AttentionCost["buy_arms"])); // #781 (D-G6)Assert.Equal((1, 5, 6), (m.ArmsPerAttack, m.CombatTable.Count, m.CombatTable[0].AttackerLoss.Count)); // #747 (D-G6, D-G3), accepted by the owner 20 Oct 2026- Assert.Equal((1, 0.01, 10, 0.005), (m.FoodPerPrisonerUnit, m.PrisonerShortfallCohesion, m.PointsPerPrisonerUnitReturned, m.HeldSoldierCostPerTurn)); // #751 (Q-POW-2, Q-POW-4, Q-POW-5), agent defaults+ Assert.Equal((1, 0.01, 10, 0.005), (m.FoodPerPrisonerUnit, m.PrisonerShortfallCohesion, m.PointsPerPrisonerUnitReturned, m.HeldSoldierCostPerTurn)); // #751 (Q-POW-2, Q-POW-4, Q-POW-5), accepted by the owner (owner, 21 October 2026, #751)Assert.Equal(12, c.Cities.Count);foreach (var x in c.Cities) // the listed housing and job values are the ones Cities.Init starts fromAssert.Equal(((int)x.Housing!.Value, (int)x.Jobs!.Value), (x.HousingCapacity, x.JobSlots));diff --git a/sim/Statecraft.Sim.Tests/PrisonersTests.cs b/sim/Statecraft.Sim.Tests/PrisonersTests.csindex e52f54f9c..5f0f7ae64 100644--- a/sim/Statecraft.Sim.Tests/PrisonersTests.cs+++ b/sim/Statecraft.Sim.Tests/PrisonersTests.cs@@ -18,11 +18,11 @@ public class PrisonersTests+ " - { id: irregular, kind: unit, side: ala, class: infantry, movement_points: 3 }\n"+ " - { id: egypt_gun, kind: unit, side: egypt, class: artillery, movement_points: 2, range: 2, arms_per_fire: 3, combat_percent: 200 }\n";- static string Card(string id, string front, string from) => $@"+ static string Card(string id, string front, string from, string anchor = "hard") => $@"id: {id}title: Prisoners exchangedtext: The prisoners are exchanged.-anchor: hard+anchor: {anchor}prisoners: {front}from: {from}to: 1950-01-01@@ -223,11 +223,28 @@ options:var c = Load();var s = Simulation.NewGame(c, 1, Mode.Historical);s.PrisonersHeld["ala"] = 1; // no front's card returns them- for (int i = 0; i < 4; i++) s = Simulation.Step(c, s, Array.Empty<Command>()).State;+ // 16 weekly turns end after the fixture cards' 1 July window opens, so only the Prisoners.Held filter keeps them back.+ for (int i = 0; i < 16; i++) s = Simulation.Step(c, s, Array.Empty<Command>()).State;+ Assert.True(s.Date > new DateTime(1948, 7, 1));Assert.DoesNotContain("pow_egypt", s.FiredEvents);Assert.DoesNotContain("pow_jordan", s.FiredEvents);}+ // R-POW-004: delegating an exchange card draws no RNG, like an objective's card. A soft-anchored card, because a hard-anchored+ // one takes its historical option without a draw anyway and would hide the missing exemption.+ [Fact]+ public void AnExchangeCardResolvesWithoutAnRngDraw()+ {+ var c = Load(new Dictionary<string, string> { ["pow_egypt.yaml"] = Card("pow_egypt", "egypt", "1948-07-01", "soft") });+ var s = Simulation.NewGame(c, 1, Mode.Historical);+ s.PrisonersHeld["egypt"] = 3;+ s = UntilCard(c, s, "pow_egypt").State;+ var before = s.RngState;+ EventSystem.Delegate(c, s, new List<Cause>());+ Assert.Empty(s.PendingEvents);+ Assert.Equal(before, s.RngState);+ }+// R-POW-002 (Q-POW-5): prisoners eat food_per_prisoner_unit a unit in step 7, after the nation and the import.[Fact]public void PrisonersEatFood()