Skip to content

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

content: historical-only deputy titles and Kaplan's June 1952 handover (#4) (#140)

agamrafaeli-instinct632edbd15e19
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb7305151..ee67790ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
## [Unreleased]
### Added
+- Historical-only deputy titles and sourced 1951 terms; Kaplan's June 1952 Deputy Prime Minister title and the linked Finance/Agriculture succession (issue #4).
- People can carry a birth date and a source for each biographical value (Hebrew name, birth and death dates) in
`people.yaml`; the loader rejects unknown source keys, sources without a `url` or `checked` date, and impossible birth
dates.
diff --git a/content/offices.yaml b/content/offices.yaml
index 7513c91c0..73b9a7c9c 100644
--- a/content/offices.yaml
+++ b/content/offices.yaml
@@ -31,3 +31,9 @@ offices:
- { id: chief_of_staff, title: IDF Chief of the General Staff }
- { id: minister_without_portfolio, title: Minister without Portfolio }
- { id: president, title: President of Israel }
+ # Historical deputy titles: dated lookup/text only, never playable Cabinet seats or gameplay owners.
+ # Sources and the start-date conflict are in research_notes/M3 content 1950-51/deputy-titles.md.
+ - { id: deputy_agriculture_minister, title: Deputy Minister of Agriculture, historical_only: true }
+ - { id: deputy_transportation_minister, title: Deputy Minister of Transportation, historical_only: true }
+ - { id: deputy_education_minister, title: Deputy Minister of Education and Culture, historical_only: true }
+ - { id: deputy_prime_minister, title: Deputy Prime Minister, historical_only: true }
diff --git a/content/people.yaml b/content/people.yaml
index c743a0fb9..c52a962d1 100644
--- a/content/people.yaml
+++ b/content/people.yaml
@@ -6,7 +6,8 @@
# living: false is set only after confirming each person's death date (en.wikipedia.org infobox; 2026-10-09 for the
# 1948-49 cabinet, 2026-10-10 for people added in M3).
# Portraits: public-domain files fetched with license check (promo/CREDITS.md).
-# Not modelled: deputy ministers (Efrati, Shari, Kahana) and Kaplan's Deputy Prime Minister title (research notes 1c, 1e).
+# Deputy ministers (Efrati, Shari, Kahana) and Kaplan's Deputy Prime Minister title are historical-only titles
+# (offices.yaml `historical_only: true`); sources in research_notes/M3 content 1950-51/deputy-titles.md.
# portrait.focus_y: the face centre's height as a share of the picture (0 top, 1 bottom), measured on each picture;
# the event card keeps it in view (playtest 2, P2-5).
people:
@@ -36,6 +37,9 @@ people:
- id: kaplan
name: Eliezer Kaplan
living: false
+ # Died in office on 13 July 1952.
+ died: 1952-07-13
+ biography_sources: { died: [{ url: "https://en.wikipedia.org/wiki/Eliezer_Kaplan", checked: 2026-10-11 }, { url: "https://he.wikipedia.org/wiki/אליעזר_קפלן", checked: 2026-10-11 }] }
party: mapai
competence: 8
loyalty: 9
@@ -45,7 +49,22 @@ people:
- { office: finance_minister, from: 1949-03-10, to: 1950-11-01, sources: &first [{ url: "https://en.wikipedia.org/wiki/First_government_of_Israel", checked: 2026-10-10 }, { url: "https://bengurionarchive.bgu.ac.il/en/node/14566", checked: 2026-10-09 }] }
- { office: trade_minister, from: 1949-03-10, to: 1950-11-01, sources: *first }
- { office: finance_minister, from: 1950-11-01, to: 1951-10-08, sources: *second }
- - { office: finance_minister, from: 1951-10-08, sources: &third [{ url: "https://en.wikipedia.org/wiki/Third_government_of_Israel", checked: 2026-10-10 }, { url: "https://he.wikipedia.org/wiki/ממשלת_ישראל_השלישית", checked: 2026-10-10 }] }
+ - office: finance_minister
+ from: 1951-10-08
+ to: 1952-06-25
+ sources:
+ - &third_en { url: "https://en.wikipedia.org/wiki/Third_government_of_Israel", checked: 2026-10-10 }
+ - &third_he { url: "https://he.wikipedia.org/wiki/ממשלת_ישראל_השלישית", checked: 2026-10-10 }
+ - { url: "https://fs.knesset.gov.il/2/Plenum/2_ptm_250662.pdf", checked: 2026-10-11 }
+ # 25 June 1952: Kaplan leaves Finance and remains Deputy PM without portfolio; primary Knesset proceeding.
+ - office: deputy_prime_minister
+ from: 1952-06-25
+ to: 1952-07-13
+ sources: &june_1952
+ - { url: "https://fs.knesset.gov.il/2/Plenum/2_ptm_250662.pdf", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/members/kns_persontoposition/kns_persontoposition.csv", checked: 2026-10-11 }
+ - { url: "https://en.wikipedia.org/wiki/Eliezer_Kaplan", checked: 2026-10-11 }
+ - { office: minister_without_portfolio, from: 1952-06-25, to: 1952-07-13, sources: *june_1952 }
status: fact-checked
- id: sharett
name: Moshe Sharett
@@ -58,7 +77,7 @@ people:
- { office: foreign_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }
- { office: foreign_minister, from: 1949-03-10, to: 1950-11-01, sources: *first }
- { office: foreign_minister, from: 1950-11-01, to: 1951-10-08, sources: *second }
- - { office: foreign_minister, from: 1951-10-08, sources: *third }
+ - { office: foreign_minister, from: 1951-10-08, sources: &third [*third_en, *third_he] }
status: fact-checked
- id: shapira
name: Haim-Moshe Shapira
@@ -261,7 +280,8 @@ people:
competence: 8
loyalty: 8
offices:
- - { office: agriculture_minister, from: 1951-10-08, sources: *third }
+ - { office: agriculture_minister, from: 1951-10-08, to: 1952-06-25, sources: [*third_en, *third_he, { url: "https://fs.knesset.gov.il/2/Plenum/2_ptm_250662.pdf", checked: 2026-10-11 }] }
+ - { office: finance_minister, from: 1952-06-25, sources: *june_1952 }
status: fact-checked
- id: dinur
name: Ben-Zion Dinur
@@ -300,7 +320,8 @@ people:
competence: 7
loyalty: 8
offices:
- - { office: minister_without_portfolio, from: 1951-10-08, sources: *third }
+ - { office: minister_without_portfolio, from: 1951-10-08, to: 1952-06-25, sources: [*third_en, *third_he, { url: "https://fs.knesset.gov.il/2/Plenum/2_ptm_250662.pdf", checked: 2026-10-11 }] }
+ - { office: agriculture_minister, from: 1952-06-25, sources: *june_1952 }
status: fact-checked
- id: weizmann
name: Chaim Weizmann
@@ -334,3 +355,55 @@ people:
# In office through the M3 range: resigned 7 December 1952 (research notes 8).
- { office: chief_of_staff, from: 1949-11-09, sources: *cos }
status: fact-checked
+ # Deputies use neutral game ratings, not claims about historical ability or loyalty.
+ - id: efrati
+ name: Yosef Efrati
+ living: false
+ party: mapai
+ competence: 5
+ loyalty: 5
+ offices:
+ - office: deputy_agriculture_minister
+ from: 1951-02-26
+ to: 1951-10-08
+ sources: &deputies
+ - { url: "https://production.oknesset.org/pipelines/data/members/kns_persontoposition/kns_persontoposition.csv", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/plenum/kns_plmsessionitem/kns_plmsessionitem.csv", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/plenum/kns_plenumsession/kns_plenumsession.csv", checked: 2026-10-11 }
+ - { url: "https://en.wikipedia.org/wiki/Yosef_Efrati", checked: 2026-10-11 }
+ - { office: deputy_agriculture_minister, from: 1951-11-04, to: 1952-06-25, sources: *deputies }
+ status: fact-checked
+ - id: shari
+ name: Reuven Shari
+ living: false
+ party: mapai
+ competence: 5
+ loyalty: 5
+ offices:
+ # Knesset notification on 2 April, not the role table's 1 April. See deputy-titles.md and the 1951 law.
+ - office: deputy_transportation_minister
+ from: 1951-04-02
+ to: 1951-10-08
+ sources:
+ - { url: "https://fs.knesset.gov.il/1/law/1_lsr_208918.pdf", checked: 2026-10-11 }
+ - { url: "https://en.wikipedia.org/wiki/Reuven_Shari", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/plenum/kns_plmsessionitem/kns_plmsessionitem.csv", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/plenum/kns_plenumsession/kns_plenumsession.csv", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/members/kns_persontoposition/kns_persontoposition.csv", checked: 2026-10-11 }
+ status: fact-checked
+ - id: kahana
+ name: Kalman Kahana
+ living: false
+ party: poalei_agudat_yisrael
+ competence: 5
+ loyalty: 5
+ offices:
+ - office: deputy_education_minister
+ from: 1951-11-04
+ to: 1952-12-24
+ sources:
+ - { url: "https://production.oknesset.org/pipelines/data/members/kns_persontoposition/kns_persontoposition.csv", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/plenum/kns_plmsessionitem/kns_plmsessionitem.csv", checked: 2026-10-11 }
+ - { url: "https://production.oknesset.org/pipelines/data/plenum/kns_plenumsession/kns_plenumsession.csv", checked: 2026-10-11 }
+ - { url: "https://en.wikipedia.org/wiki/Kalman_Kahana", checked: 2026-10-11 }
+ status: fact-checked
diff --git a/docs/WRITING_EVENTS.md b/docs/WRITING_EVENTS.md
index e892ee7e2..571ac1609 100644
--- a/docs/WRITING_EVENTS.md
+++ b/docs/WRITING_EVENTS.md
@@ -246,3 +246,12 @@ a row to its "Rebaseline history". Contributors do not.
- [ ] no invented quotes; sensitive tags only where they apply, `status: fact-checked`
- [ ] `dotnet test sim/Statecraft.sln` passes
- [ ] a line in `CHANGELOG.md`
+
+### Historical-only titles
+
+An office with `historical_only: true` records a dated title without adding a playable Cabinet seat.
+Its terms in `people.yaml` can be used in text placeholders such as `{deputy_title}` when the
+event window has a holder throughout. It cannot own a policy, effect, budget line or an event's
+`office:` delegation. Use the responsible senior minister for those gameplay fields. Existing
+offices default to `historical_only: false`. A historical-only title ignores player appointments,
+including entries carried in an older save.
diff --git a/research_notes/M3 content 1950-51/deputy-titles.md b/research_notes/M3 content 1950-51/deputy-titles.md
new file mode 100644
index 000000000..fa03cbcf5
--- /dev/null
+++ b/research_notes/M3 content 1950-51/deputy-titles.md
@@ -0,0 +1,95 @@
+# Deputy titles for issue #4
+
+Checked 11 October 2026. This note distinguishes historical titles from gameplay responsibilities.
+
+## Model
+
+`historical_only: true` keeps ordinary dated office terms and text lookup, but does not add a Cabinet seat,
+player appointment, policy owner, effect owner, event delegate or budget line. Stale player appointments
+cannot replace its historical holder. No parent-office relationship or roster UI is added.
+
+The three new people have neutral game ratings (competence 5, loyalty 5), not historical assessments.
+Like other people, they can still be candidates for ordinary ministerial appointments. The historical-only
+flag restricts a title, not a person.
+
+## Records and dates
+
+| Person | Title | Interval [from, to) | Basis |
+| --- | --- | --- | --- |
+| Yosef Efrati | Deputy Agriculture | 26 Feb 1951-8 Oct 1951 | Official mirrored role rows 21964/21965; notification agenda 26 Feb |
+| Yosef Efrati | Deputy Agriculture | 4 Nov 1951-25 Jun 1952 | Official mirrored role row 21963; deputy appointments agenda 4 Nov |
+| Reuven Shari | Deputy Transport | 2 Apr 1951-8 Oct 1951 | Notification agenda 2 Apr and 1951 law; biography agrees |
+| Kalman Kahana | Deputy Education and Culture | 4 Nov 1951-24 Dec 1952 | Official mirrored role row 4586; deputy appointments agenda 4 Nov |
+| Eliezer Kaplan | Deputy Prime Minister | 25 Jun 1952-13 Jul 1952 | Primary 25 Jun 1952 proceeding and mirrored role row 3845; included with minimal 1952 succession fix |
+
+The role-table rows split at 20 Aug 1951 when the Knesset changes. Adjacent pieces of the same office
+are joined, without creating a break in the appointment. Efrati's 9 Jul 1952 reappointment is outside the
+1949-1951 starting-term scope and is not part of these entries.
+
+## Source chain
+
+Open Knesset describes its data as taken mostly from official Knesset interfaces, updated daily:
+https://oknesset.org/
+
+Downloaded and inspected:
+- Names/identities: https://production.oknesset.org/pipelines/data/members/kns_person/kns_person.csv
+- Role definitions: https://production.oknesset.org/pipelines/data/members/kns_position/kns_position.csv
+- Dated roles and factions: https://production.oknesset.org/pipelines/data/members/kns_persontoposition/kns_persontoposition.csv
+- Session dates: https://production.oknesset.org/pipelines/data/plenum/kns_plenumsession/kns_plenumsession.csv
+- Session agenda: https://production.oknesset.org/pipelines/data/plenum/kns_plmsessionitem/kns_plmsessionitem.csv
+- Transcript links: https://production.oknesset.org/pipelines/data/plenum/kns_documentplenumsession/kns_documentplenumsession.csv
+
+Resolved PersonIDs 2161 Efrati, 2666 Shari, 2404 Kahana, 2590 Kaplan. Position 40 is deputy minister, 50 Deputy PM.
+Roles/factions corroborate Mapai for Efrati/Shari and Poalei Agudat Yisrael for Kahana in the relevant terms.
+These are community-hosted mirrors of official records, not an independent historical source.
+
+The 1951 Transition Law amendment says a deputy enters office upon notification to the Knesset,
+acts within the minister's allocated matters/powers, and does not diminish the minister's responsibility:
+https://fs.knesset.gov.il/1/law/1_lsr_208918.pdf
+
+Notification agenda joins:
+- 26 Feb 1951 session 157470, item 492460: appointment of deputy Agriculture minister.
+- 2 Apr 1951 session 157481, item 492521: Transport minister notification of deputy appointment.
+- 4 Nov 1951 session 489635, item 492690: Justice minister notification of deputy appointments.
+
+The exact underlying transcripts were located but could not be read due to geographic-unavailable responses:
+https://fs.knesset.gov.il/1/Plenum/1_ptm_250070.pdf
+https://fs.knesset.gov.il/1/Plenum/1_ptm_250077.pdf
+https://fs.knesset.gov.il/2/Plenum/2_ptm_250618.pdf
+The agenda proves the notification date/topic, not the verbatim appointment text.
+
+Biographies checked for identity, non-living status and party:
+https://en.wikipedia.org/wiki/Yosef_Efrati
+https://en.wikipedia.org/wiki/Reuven_Shari
+https://en.wikipedia.org/wiki/Kalman_Kahana
+
+## Conflicting claims retained
+
+- Shari's role-table start is 1 Apr 1951, while the notification is 2 Apr and his English biography says 2 Apr.
+ Use 2 Apr under the notification-date rule. Whether 1 Apr was cabinet approval is unverified.
+- Efrati's Hebrew biography cites an Al HaMishmar article dated 5 Jan 1951 for an appointment, while the
+ formal role table/agenda gives 26 Feb. The article was not accessible, so no claim about its meaning
+ is made.
+- Kahana's Hebrew biography starts 8 Oct 1951 and the Education ministry table ends 18 Sep 1952. The
+ official mirrored role data gives 4 Nov 1951-24 Dec 1952, agreeing with the Third Government table.
+ The 4 Nov notification supports the later start; an end-date transcript remains unchecked.
+- Kaplan's Deputy PM start: en.wikipedia.org/wiki/Third_government_of_Israel lists him as Deputy Prime Minister from
+ 8 Oct 1951, as does facts.md ("Addendum (2026-10-10): Third Government portfolios"). The 25 Jun 1952 proceeding, the mirrored role row
+ and en.wikipedia.org/wiki/Deputy_Prime_Minister_of_Israel (25 Jun-13 Jul 1952) give the later date. Use 25 Jun 1952.
+- Do not repeat the English Shari biography's "first ever deputy" claim: Efrati's formal record starts earlier.
+
+## Kaplan and 1952 scope
+
+The 25 Jun 1952 proceeding explicitly says Kaplan leaves Finance, stays minister without portfolio
+as Deputy PM, Eshkol takes Finance and Naftali takes Agriculture:
+https://fs.knesset.gov.il/2/Plenum/2_ptm_250662.pdf
+The mirrored roles give Deputy PM 25 Jun-13 Jul 1952. Before this change, content left Kaplan in Finance and
+Eshkol in Agriculture open-ended after 1951. Adding Kaplan's title alone does not fix those 1952 senior
+portfolio gaps. This PR proposes the minimal 25 June 1952 succession fix for #4. The new Finance/Agriculture terms stay open-ended,
+like the rest of the file, until #26 adds the Fourth Government (24 December 1952); the rest of #26 remains separate.
+The same day Justice passed from Dov Yosef to Haim Cohn, and Lavon became Minister without Portfolio on 17 Aug 1952
+(en.wikipedia.org/wiki/Third_government_of_Israel); both are left to #26.
+No new Development office, government records or later terms are added.
+
+The existing 1950/1952 goldens end 27 February 1950 and 27 February 1952, before this June change.
+Both hashes stay unchanged. The new Cabinet boundary test checks the later rollover directly.
diff --git a/sim/Statecraft.Sim.Tests/CabinetTests.cs b/sim/Statecraft.Sim.Tests/CabinetTests.cs
index 8bef2ffd3..eb69bc30f 100644
--- a/sim/Statecraft.Sim.Tests/CabinetTests.cs
+++ b/sim/Statecraft.Sim.Tests/CabinetTests.cs
@@ -241,6 +241,29 @@ public class CabinetTests
Assert.Equal("Loy Alist reports a drought.", EventSystem.Render(c, s, drought));
}
+ [Fact]
+ public void HistoricalOnlyOfficesKeepTheirTermsButAreNotCabinetSeatsOrAppointable()
+ {
+ var c = ContentLoader.Load(Fixture.Write(new Dictionary<string, string>
+ {
+ ["offices.yaml"] = Fixture.Files["offices.yaml"] +
+ "\n - { id: historical_title, title: Historical title, historical_only: true }\n",
+ ["people.yaml"] = Fixture.Files["people.yaml"].Replace("office: finance_minister", "office: historical_title")
+ }));
+ var s = Simulation.NewGame(c, 42, Mode.Historical);
+ Assert.Equal("def_two", Offices.Holder(c, "historical_title", s.Date)?.Id);
+ Assert.DoesNotContain(Cabinet.Lineup(c, s), seat => seat.Office.Id == "historical_title");
+ Assert.Equal("Historical title is a historical title, not an appointable office",
+ Cabinet.Check(c, s, "historical_title", "pm_one"));
+ Assert.All(Cabinet.Candidates(c, s, "historical_title"), candidate => Assert.NotNull(candidate.reason));
+ Assert.NotNull(Cabinet.Appoint(c, s, "historical_title", "pm_one", new List<Cause>()));
+ Assert.Empty(s.Appointments);
+ s.AppointedUnder = Offices.Government(c, s.Date)!.Id;
+ s.Appointments["historical_title"] = new Appointment("pm_one", s.Date);
+ Assert.Equal("def_two", Cabinet.Holder(c, s, "historical_title")?.Id);
+ Assert.Equal("Def Two", Cabinet.Fill(c, s, "{historical_title}", s.Date));
+ }
+
[Fact]
public void TheLineupListsEveryExistingOfficeAndMarksAppointees()
{
diff --git a/sim/Statecraft.Sim.Tests/ContentLoaderTests.cs b/sim/Statecraft.Sim.Tests/ContentLoaderTests.cs
index 40402d9ff..6d8fa387a 100644
--- a/sim/Statecraft.Sim.Tests/ContentLoaderTests.cs
+++ b/sim/Statecraft.Sim.Tests/ContentLoaderTests.cs
@@ -16,6 +16,49 @@ public class ContentLoaderTests
Assert.Equal(5, c.Rules.StartRung);
}
+ [Theory]
+ [InlineData("policy", "model.yaml", "policies[rationing].office")]
+ [InlineData("effect", "model.yaml", "effects[rationing_food].office")]
+ [InlineData("event", "events/drought.yaml", "events[drought].office")]
+ [InlineData("budget", "rules.yaml", "budget_start.historical_title")]
+ public void HistoricalTitlesCannotOwnGameplayResponsibilities(string kind, string file, string field)
+ {
+ var overrides = new Dictionary<string, string>
+ {
+ ["offices.yaml"] = Fixture.Files["offices.yaml"] +
+ "\n - { id: historical_title, title: Historical title, historical_only: true }\n"
+ };
+ var events = new Dictionary<string, string>();
+ if (kind == "policy") overrides["model.yaml"] = Fixture.Files["model.yaml"].Replace(
+ "default: 0.0\n office: finance_minister", "default: 0.0\n office: historical_title");
+ if (kind == "effect") overrides["model.yaml"] = Fixture.Files["model.yaml"].Replace(
+ "inertia: 2\n office: finance_minister", "inertia: 2\n office: historical_title");
+ if (kind == "event") events["drought.yaml"] = ValidationTests.Event.Replace(
+ "office: finance_minister", "office: historical_title");
+ if (kind == "budget") overrides["rules.yaml"] = Fixture.Files["rules.yaml"].Replace(
+ "budget_start: { finance_minister: 1.0 }", "budget_start: { historical_title: 1.0 }");
+ var ex = Assert.Throws<ContentException>(() => ContentLoader.Load(Fixture.Write(overrides, events)));
+ Assert.Equal(file, ex.File);
+ Assert.Equal(field, ex.Field);
+ Assert.Contains("historical-only", ex.Message);
+ }
+
+ [Fact]
+ public void HistoricalTitlesRemainAvailableForDatedTextPlaceholders()
+ {
+ var c = ContentLoader.Load(Fixture.Write(new Dictionary<string, string>
+ {
+ ["offices.yaml"] = Fixture.Files["offices.yaml"] +
+ "\n - { id: historical_title, title: Historical title, historical_only: true }\n",
+ ["people.yaml"] = Fixture.Files["people.yaml"].Replace("office: finance_minister", "office: historical_title")
+ }, new Dictionary<string, string>
+ {
+ ["drought.yaml"] = ValidationTests.Event.Replace("{finance_minister}", "{historical_title}")
+ }));
+ Assert.Equal("Def Two reports a drought.", EventSystem.Render(c, c.Events[0], new DateTime(1948, 6, 1)));
+ Assert.Equal("finance_minister", c.Events[0].Office);
+ }
+
[Fact]
public void PersonLifeMetadataHasSourcesPerFieldAndRemainsOptional()
{
diff --git a/sim/Statecraft.Sim.Tests/RealContentTests.cs b/sim/Statecraft.Sim.Tests/RealContentTests.cs
index a39d1f40b..2f307ebb0 100644
--- a/sim/Statecraft.Sim.Tests/RealContentTests.cs
+++ b/sim/Statecraft.Sim.Tests/RealContentTests.cs
@@ -40,6 +40,60 @@ public class RealContentTests
Assert.All(all, s => { Assert.StartsWith("https://", s.Url); Assert.True(s.Checked >= Checked, $"{s.Url} checked {s.Checked:yyyy-MM-dd}, before {Checked:yyyy-MM-dd}"); }); // later re-checks are allowed
}
+ [Theory]
+ [InlineData("deputy_agriculture_minister", "efrati", 1951, 2, 26, 1951, 10, 8)]
+ [InlineData("deputy_agriculture_minister", "efrati", 1951, 11, 4, 1952, 6, 25)]
+ [InlineData("deputy_transportation_minister", "shari", 1951, 4, 2, 1951, 10, 8)]
+ [InlineData("deputy_education_minister", "kahana", 1951, 11, 4, 1952, 12, 24)]
+ public void DeputyTitlesHaveDatedTermsAndNoCabinetPowers(string office, string person,
+ int y1, int m1, int d1, int y2, int m2, int d2)
+ {
+ var from = new DateTime(y1, m1, d1);
+ var to = new DateTime(y2, m2, d2);
+ Assert.True(C.Offices.Single(o => o.Id == office).HistoricalOnly);
+ Assert.Null(Offices.Holder(C, office, from.AddDays(-1)));
+ Assert.Equal(person, Offices.Holder(C, office, from)?.Id);
+ Assert.Equal(person, Offices.Holder(C, office, to.AddDays(-1))?.Id);
+ Assert.Null(Offices.Holder(C, office, to));
+ var state = Simulation.NewGame(C, 42, Mode.Historical);
+ state.Date = from;
+ Assert.DoesNotContain(Cabinet.Lineup(C, state), seat => seat.Office.Id == office);
+ Assert.NotNull(Cabinet.Check(C, state, office, "ben_gurion"));
+ }
+
+ [Fact]
+ public void KaplanDeputyPrimeMinisterTitleFollowsHisDepartureFromFinance()
+ {
+ var change = new DateTime(1952, 6, 25);
+ var end = new DateTime(1952, 7, 13);
+ Assert.True(C.Offices.Single(o => o.Id == "deputy_prime_minister").HistoricalOnly);
+ Assert.Null(Offices.Holder(C, "deputy_prime_minister", change.AddDays(-1)));
+ Assert.Equal("kaplan", Offices.Holder(C, "finance_minister", change.AddDays(-1))?.Id);
+ Assert.Equal("eshkol", Offices.Holder(C, "agriculture_minister", change.AddDays(-1))?.Id);
+ Assert.Equal("naftali", Offices.Holder(C, "minister_without_portfolio", change.AddDays(-1))?.Id);
+ Assert.Equal("kaplan", Offices.Holder(C, "deputy_prime_minister", change)?.Id);
+ Assert.Equal("kaplan", Offices.Holder(C, "minister_without_portfolio", change)?.Id);
+ Assert.Equal("eshkol", Offices.Holder(C, "finance_minister", change)?.Id);
+ Assert.Equal("naftali", Offices.Holder(C, "agriculture_minister", change)?.Id);
+ Assert.Equal("kaplan", Offices.Holder(C, "deputy_prime_minister", end.AddDays(-1))?.Id);
+ Assert.Null(Offices.Holder(C, "deputy_prime_minister", end));
+ Assert.Null(Offices.Holder(C, "minister_without_portfolio", end));
+ // The new Finance/Agriculture terms stay open until #26 adds the Fourth Government (24 December 1952).
+ Assert.Equal("eshkol", Offices.Holder(C, "finance_minister", new DateTime(1952, 12, 24))?.Id);
+ Assert.Equal("naftali", Offices.Holder(C, "agriculture_minister", new DateTime(1952, 12, 24))?.Id);
+ var state = Simulation.NewGame(C, 42, Mode.Historical);
+ state.Date = change.AddDays(-1);
+ Assert.Equal(0.9, EffectsSystem.Multiplier(C, state, "agriculture_minister") /
+ EffectsSystem.BudgetFactor(state, "agriculture_minister"), 10);
+ state.Date = change;
+ Assert.Equal(0.85, EffectsSystem.Multiplier(C, state, "agriculture_minister") /
+ EffectsSystem.BudgetFactor(state, "agriculture_minister"), 10);
+ Assert.Equal("kaplan", Cabinet.Holder(C, state, "minister_without_portfolio")?.Id);
+ Assert.DoesNotContain(Cabinet.Lineup(C, state), seat => seat.Office.Id == "deputy_prime_minister");
+ state.Date = end;
+ Assert.Equal("Eliezer Kaplan died on " + PlayerText.Date(end), Cabinet.Check(C, state, "finance_minister", "kaplan"));
+ }
+
[Fact]
public void OpenQuestionsAreExactlyTheKnownOnes()
{
diff --git a/sim/Statecraft.Sim/Cabinet.cs b/sim/Statecraft.Sim/Cabinet.cs
index 8c2612906..888d3e5c3 100644
--- a/sim/Statecraft.Sim/Cabinet.cs
+++ b/sim/Statecraft.Sim/Cabinet.cs
@@ -33,6 +33,7 @@ namespace Statecraft.Sim
/// appointee who dies leaves office on the date of death, and the historical holder applies again).</summary>
static Appointment? Active(Content c, GameState s, string office, DateTime date)
{
+ if (c.Offices.Any(o => o.Id == office && o.HistoricalOnly)) return null;
if (!s.Appointments.TryGetValue(office, out var a) || date < a.From) return null;
var died = c.People.First(p => p.Id == a.Person).Died;
if (died.HasValue && date >= died.Value) return null;
@@ -53,9 +54,9 @@ namespace Statecraft.Sim
Holder(c, s, m.Groups[1].Value, date)?.Name
?? throw new InvalidOperationException(FormattableString.Invariant($"no holder of '{m.Groups[1].Value}' on {date:yyyy-MM-dd}")));
- /// <summary>Every office that exists on the state's date, in offices.yaml order, with its holder (null = vacant).</summary>
+ /// <summary>Every playable office that exists on the state's date, in offices.yaml order, with its holder (null = vacant).</summary>
public static IReadOnlyList<Seat> Lineup(Content c, GameState s) =>
- c.Offices.Where(o => !o.Until.HasValue || s.Date < o.Until.Value)
+ c.Offices.Where(o => !o.HistoricalOnly && (!o.Until.HasValue || s.Date < o.Until.Value))
.Select(o => new Seat(o, Holder(c, s, o.Id), Active(c, s, o.Id, s.Date) != null))
.ToList();
@@ -70,6 +71,7 @@ namespace Statecraft.Sim
{
var office = c.Offices.FirstOrDefault(o => o.Id == officeId);
if (office == null) return "That office does not exist in this game";
+ if (office.HistoricalOnly) return $"{office.Title} is a historical title, not an appointable office";
if (office.Until.HasValue && s.Date >= office.Until.Value)
return $"The office of {office.Title} was abolished on {PlayerText.Date(office.Until.Value)}";
if (officeId == "prime_minister") return "You are the Prime Minister: that office is not yours to fill";
diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.cs
index 1cc7c6295..03b109d65 100644
--- a/sim/Statecraft.Sim/Content.cs
+++ b/sim/Statecraft.Sim/Content.cs
@@ -12,6 +12,8 @@ namespace Statecraft.Sim
{
public string Id { get; set; } = "";
public string Title { get; set; } = "";
+ /// <summary>Historical record only: no Cabinet seat, player appointment or gameplay responsibility. Defaults false for existing offices.</summary>
+ public bool HistoricalOnly { get; set; }
/// <summary>Day the office was abolished (exclusive end, like a term's `to`); null while it still exists.</summary>
public DateTime? Until { get; set; }
}
diff --git a/sim/Statecraft.Sim/ContentLoader.cs b/sim/Statecraft.Sim/ContentLoader.cs
index a5a9ddc8a..92b5ffc02 100644
--- a/sim/Statecraft.Sim/ContentLoader.cs
+++ b/sim/Statecraft.Sim/ContentLoader.cs
@@ -288,6 +288,7 @@ namespace Statecraft.Sim
static void Validate(Content c, List<string> settlementIds)
{
var offices = new HashSet<string>(c.Offices.Select(o => o.Id));
+ var historicalOffices = new HashSet<string>(c.Offices.Where(o => o.HistoricalOnly).Select(o => o.Id));
var parties = new HashSet<string>(c.Parties.Select(p => p.Id));
var indicators = new HashSet<string>(c.Indicators.Select(i => i.Id));
var sources = new HashSet<string>(c.Policies.Select(p => p.Id).Concat(indicators));
@@ -423,7 +424,10 @@ namespace Statecraft.Sim
Unit("model.yaml", $"policies[{p.Id}].default", p.Default);
}
foreach (var p in c.Policies)
+ {
if (!offices.Contains(p.Office)) throw new ContentException("model.yaml", $"policies[{p.Id}].office", $"unknown office '{p.Office}'");
+ if (historicalOffices.Contains(p.Office)) throw new ContentException("model.yaml", $"policies[{p.Id}].office", "historical-only titles cannot own policies");
+ }
foreach (var e in c.Effects)
{
if (!sources.Contains(e.Source)) throw new ContentException("model.yaml", $"effects[{e.Id}].source", $"unknown policy or indicator '{e.Source}'");
@@ -431,6 +435,7 @@ namespace Statecraft.Sim
Finite("model.yaml", $"effects[{e.Id}].k", e.K);
if (e.Inertia < 1) throw new ContentException("model.yaml", $"effects[{e.Id}].inertia", "must be >= 1");
if (e.Office != "" && !offices.Contains(e.Office)) throw new ContentException("model.yaml", $"effects[{e.Id}].office", $"unknown office '{e.Office}'");
+ if (historicalOffices.Contains(e.Office)) throw new ContentException("model.yaml", $"effects[{e.Id}].office", "historical-only titles cannot own effects");
}
foreach (var s in c.Situations)
{
@@ -493,6 +498,7 @@ namespace Statecraft.Sim
foreach (var kv in r.BudgetStart)
{
if (!offices.Contains(kv.Key)) throw new ContentException("rules.yaml", $"budget_start.{kv.Key}", "unknown office");
+ if (historicalOffices.Contains(kv.Key)) throw new ContentException("rules.yaml", $"budget_start.{kv.Key}", "historical-only titles cannot have a budget line");
// A budget line must not silently stop mattering when its office is abolished: move it to the office that
// took over (plan amendment C3).
var until = c.Offices.First(o => o.Id == kv.Key).Until;
diff --git a/sim/Statecraft.Sim/EventRules.cs b/sim/Statecraft.Sim/EventRules.cs
index 6be967a8c..b4eb138a2 100644
--- a/sim/Statecraft.Sim/EventRules.cs
+++ b/sim/Statecraft.Sim/EventRules.cs
@@ -23,6 +23,8 @@ namespace Statecraft.Sim
ContentLoader.Status(e.File, F("status"), e.Status);
ContentLoader.Period(e.File, $"events[{e.Id}]", e.From, e.To);
if (e.Office != "" && !offices.Contains(e.Office)) throw new ContentException(e.File, F("office"), $"unknown office '{e.Office}'");
+ if (c.Offices.Any(o => o.Id == e.Office && o.HistoricalOnly))
+ throw new ContentException(e.File, F("office"), "historical-only titles cannot be delegated events");
CheckPlaceholders(c, e, F("title"), e.Title, offices);
CheckPlaceholders(c, e, F("text"), e.Text, offices);
foreach (var cond in e.Conditions)