A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Advisor course: the later lessons (Refs #2933) (#3002)
Eyal Golan8d4ec9c0aaa4
diff --git a/changelog.d/c30-2933-course-later-rows.md b/changelog.d/c30-2933-course-later-rows.mdnew file mode 100644index 000000000..f355aa122--- /dev/null+++ b/changelog.d/c30-2933-course-later-rows.md@@ -0,0 +1,4 @@+- Advisors: the new-player course goes on after the first turn (Refs #2933): Dayan explains the turn report and the+ truce on turn 2 and how to attack on turn 6, and Ben-Gurion what the score counts and how the game is lost on turn 7.+ At the new help level, the first fight's report brings a line on losses and Attack. Each line shows once, is dropped+ unseen if it has not shown by its last turn, and is in Hebrew too.diff --git a/unity/Assets/Resources/Advisors/advisor-messages.yaml b/unity/Assets/Resources/Advisors/advisor-messages.yamlindex 1c124703e..8839f48cc 100644--- a/unity/Assets/Resources/Advisors/advisor-messages.yaml+++ b/unity/Assets/Resources/Advisors/advisor-messages.yaml@@ -19,7 +19,7 @@ messages:- { id: opening.greeting, advisor: ben_gurion, signal: opening, level: new, he_review: approved, media: { picture: opening.greeting.mp4, narration: { en: opening.greeting.en.wav }, cues: { en: [0.00, 4.31, 6.64] }, label: advisor.media_label, credit: advisor.credit.ben_gurion } }# #2933: the war and its armies, then the first turn's moves on a real unit. The order is the requires links, not the file's.# The six new rows' Hebrew was approved by the owner, 8 Nov 2026 ("Approve all six"). A fallback row is what a player who quit or pressed X still gets.- - { id: opening.invasion, advisor: dayan, signal: opening, level: new, he_review: approved, requires: [opening.greeting], fallback: course_open, lapse_after: 3 }+ - { id: opening.invasion, advisor: dayan, signal: opening, level: new, he_review: approved, requires: [opening.greeting], fallback: course_open, lapse_after: 3, priority: 3 }- { id: opening.units, advisor: dayan, signal: opening, level: new, he_review: approved, requires: [opening.invasion] }- { id: opening.cities, advisor: meyerson, signal: opening, level: new, he_review: approved, requires: [opening.units], actions: [{ encyclopedia: cities }] }# opening.attention and opening.event: copy-fix wording approved by the owner in chat, 24 October 2026, 04:14 UTC: "Approve all 8".@@ -30,9 +30,17 @@ messages:- { id: opening.move, advisor: dayan, signal: opening, level: new, he_review: approved, requires: [opening.move_how], actions: [{ show_me: unit_move }, { encyclopedia: units_movement }], media: { picture: opening.move.mp4, narration: { en: opening.move.en.wav }, cues: { en: [0.00, 5.77] }, label: advisor.media_label, credit: advisor.credit.dayan } }- { id: opening.orders, advisor: dayan, signal: opening, level: new, he_review: approved, requires: [opening.move], actions: [{ show_me: unit_orders }, { encyclopedia: standing_orders }] }- { id: opening.event, advisor: ben_gurion, signal: opening, level: new, he_review: approved, requires: [opening.orders], when: { cards_waiting_at_least: 1 }, actions: [{ show_me: decision_waiting }, { open_card: true }], media: { picture: opening.event.mp4, narration: { en: opening.event.en.wav }, cues: { en: [0.00, 5.38] }, label: advisor.media_label, credit: advisor.credit.ben_gurion } }- - { id: opening.end_turn, advisor: ben_gurion, signal: opening, level: new, he_review: approved, requires: [opening.event], fallback: course_open, lapse_after: 3, actions: [{ show_me: end_turn }, { encyclopedia: turns }] }+ - { id: opening.end_turn, advisor: ben_gurion, signal: opening, level: new, he_review: approved, requires: [opening.event], fallback: course_open, lapse_after: 3, priority: 3, actions: [{ show_me: end_turn }, { encyclopedia: turns }] }# #2933: objectives, opening.city and opening.training left the chain for the turns they are of use in; words and Hebrew unchanged.- { id: opening.objectives, advisor: ben_gurion, signal: course_open, level: new, he_review: approved, when: { turn_at_least: 3 }, lapse_after: 6, actions: [{ show_me: nav_objectives }, { encyclopedia: objectives }] }+# #2933 section 3: the later lessons, words as the issue gives them, each from its turn floor to its last turn (lapse_after).+# Priority 3 goes first, the fallback steps above included, so a step put off by X keeps its turn. lesson.combat follows+# the first fight's report, not the course: combat_seen is its signal (owner, 9 Nov 2026: "Allow it (Recommended)").+# The four rows' Hebrew, agent-drafted, was approved by the owner, 9 Nov 2026 ("Approve all four (Recommended)").+ - { id: lesson.report, advisor: dayan, signal: course_open, level: new, priority: 3, he_review: approved, when: { turn_at_least: 2 }, lapse_after: 4, actions: [{ encyclopedia: truces }] }+ - { id: lesson.attack, advisor: dayan, signal: course_open, level: new, priority: 3, he_review: approved, when: { turn_at_least: 6 }, lapse_after: 8, actions: [{ encyclopedia: combat }] }+ - { id: lesson.stakes, advisor: ben_gurion, signal: course_open, level: new, he_review: approved, when: { turn_at_least: 7 }, lapse_after: 10, actions: [{ encyclopedia: objectives }] }+ - { id: lesson.combat, advisor: dayan, signal: combat_seen, level: new, priority: 2, he_review: approved, when: { turn_at_least: 2 }, lapse_after: 8, actions: [{ encyclopedia: combat }] }# Spec 6's critical warnings (shown at every help level, Off included) and the defeat lines. Their words and speakers are the# recorded clips' (owner, 24 October 2026: "Adopt clip words"; talking-v3/lines.csv): dayan.city_at_risk isdiff --git a/unity/Assets/Tests/EditMode/AdvisorOpeningTests.cs b/unity/Assets/Tests/EditMode/AdvisorOpeningTests.csindex 1b93c612e..6edf0a68c 100644--- a/unity/Assets/Tests/EditMode/AdvisorOpeningTests.cs+++ b/unity/Assets/Tests/EditMode/AdvisorOpeningTests.cs@@ -328,6 +328,80 @@ public class AdvisorOpeningTestsAssert.AreEqual(AdvisorCatalog.Approved, row.HeReview);}+ /// <summary>#2933 section 3: the later lessons, each a teaching row from its turn floor to its last turn, outside the chain,+ /// in the issue's words, under the word cap, and its Hebrew approved by the owner.</summary>+ [TestCase("lesson.report", "course_open", 2, 4, 3, "That report shows what moved and what was fought. If the truce was accepted, your brigades cannot attack until it ends.")]+ [TestCase("lesson.attack", "course_open", 6, 8, 3, "The truce period is over. Select a brigade next to an enemy to see Attack and its odds. An attack can force the enemy back.")]+ [TestCase("lesson.stakes", "course_open", 7, 10, 1, "Your score counts objectives, how early you reach them, and prisoners returned. Battles wear brigades down. If Money and Food stay exhausted, the game ends.")]+ [TestCase("lesson.combat", "combat_seen", 2, 8, 2, "When fighting breaks out, the report shows losses and who fell back. Select a brigade next to an enemy to see Attack and its odds.")]+ public void ALaterLessonIsATeachingRowFromItsFloorToItsLastTurn(string id, string signal, int floor, int last, int priority, string english)+ {+ var catalog = AdvisorCatalog.Load(); var row = catalog.Messages.Single(m => m.Id == id);+ CollectionAssert.DoesNotContain(AdvisorPresenter.ChainIds(catalog), id);+ Assert.AreEqual(signal, row.Signal); Assert.AreEqual("", row.Fallback); Assert.IsEmpty(row.Requires);+ Assert.AreEqual("new", row.Level); Assert.IsTrue(row.Teaching); Assert.AreEqual(AdvisorCatalog.Once, row.Repeat);+ CollectionAssert.AreEquivalent(new[] { "turn_at_least" }, row.When.Keys);+ Assert.AreEqual(floor, row.When["turn_at_least"]); Assert.AreEqual(last, row.LapseAfter); Assert.AreEqual(priority, row.Priority);+ Assert.AreEqual(AdvisorCatalog.Approved, row.HeReview, "the owner approved the four, 9 Nov 2026 (\"Approve all four (Recommended)\")");+ Assert.IsTrue(row.ApprovedIn(true), "so it shows in Hebrew too");+ Assert.AreEqual(english, En["advisor." + id + ".text"]);+ Assert.LessOrEqual(english.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Length, AdvisorCatalog.MaxWords);+ Assert.AreNotEqual("advisor." + id + ".text", He["advisor." + id + ".text"], "its Hebrew is there");+ }++ /// <summary>#2933: "Priority 3 rows go first, fallback rows included". Without it, lesson.report (priority 3) would take+ /// turn 2 from a fallback step that X put off, and opening.end_turn would lapse unseen on turn 3.</summary>+ [TestCase("opening.invasion")] [TestCase("opening.end_turn")]+ public void AFallbackStepGoesFirstAmongTheCourseRows(string id)+ {+ var row = AdvisorCatalog.Load().Messages.Single(m => m.Id == id);+ Assert.AreEqual(AdvisorSignals.CourseOpen, row.Fallback); Assert.AreEqual(3, row.Priority);+ }++ /// <summary>#2933: X on step 2, then a turn at a time: both fallback steps come back first, then each course row on its own+ /// turn, a bumped row waiting while it can; opening.city waits to its last turn, and nothing is missed.</summary>+ [Test]+ public void XOnStepTwoThenTheWholeCourseOneRowATurn()+ {+ var store = Store();+ using var rig = new Rig(En, store, session: new AdvisorSession(AdvisorCatalog.Load(), new AdvisorSettings(store), true));+ rig.Advisor.NewGame(); rig.Advisor.NextStep();+ rig.Ui.Press("advisor-close");+ rig.Card.Collapse(takeFocus: false);+ Assert.IsNull(rig.Advisor.Shown, "one teaching line a turn: the greeting was it");+ var expected = new[] { "opening.invasion", "opening.end_turn", "lesson.report", "opening.objectives", "lesson.attack", "opening.city", "opening.training", "lesson.stakes", null };+ for (int turn = 2; turn < 2 + expected.Length; turn++)+ {+ rig.Bridge.State.Turn = turn - 1; rig.Advisor.Notice(AdvisorSignals.TurnEnded);+ Assert.AreEqual(expected[turn - 2], rig.Advisor.Shown?.Id, "game turn " + turn);+ if (rig.Advisor.Shown != null) rig.Ui.Press("advisor-got-it");+ }+ Assert.IsFalse(rig.Session.Queue.History.Any(e => e.Outcome == AdvisorQueue.Outcome.Missed));+ }++ /// <summary>#2933: lesson.combat waits for the first fight's report, and goes ahead of the priority 1 rows the turn after+ /// lesson.report; a first fight after its last turn (8) brings nothing. The queue alone, as the presenter drives it.</summary>+ [TestCase(1, new[] { "lesson.report", "lesson.combat", "opening.objectives", "opening.city", "lesson.attack", "opening.training", "lesson.stakes", null, null })]+ [TestCase(8, new[] { "lesson.report", "opening.objectives", "opening.city", "opening.training", "lesson.attack", "lesson.stakes", null, null, null })]+ public void TheCombatLessonFollowsTheFirstFight(int firstFight, string?[] fromTurnTwo)+ {+ var settings = new AdvisorSettings(null);+ settings.MarkSeen("opening.invasion"); settings.MarkSeen("opening.end_turn"); // the chain walked+ var queue = new AdvisorQueue(AdvisorCatalog.Load(), settings);+ var shown = new List<string?>();+ for (int turn = 1; turn <= 9; turn++) // State.Turn; game turn 2 to 10+ {+ var t = turn;+ var holding = t >= firstFight ? new[] { AdvisorSignals.CourseOpen, "combat_seen" } : new[] { AdvisorSignals.CourseOpen };+ bool When(IReadOnlyDictionary<string, double> w) { CollectionAssert.IsSubsetOf(w.Keys, new[] { "turn_at_least" }); return !w.TryGetValue("turn_at_least", out var v) || t + 1 >= v; }+ queue.Offer(holding, When, t); queue.Prune(holding, When, t, DateTime.MinValue);+ var head = queue.Head(t, false); shown.Add(head?.Id);+ if (head != null) queue.Done(head, t, DateTime.MinValue);+ }+ CollectionAssert.AreEqual(fromTurnTwo, shown);+ Assert.AreEqual(firstFight <= 7, settings.Seen("lesson.combat"));+ }+[Test]public void TheOldGuidesSeenMarkPreventsAnAutomaticChain(){@@ -542,10 +616,11 @@ public class AdvisorOpeningNoAttentionTestsAssert.AreEqual("player", rig.Selection);}- /// <summary>#2933: the moved rows reach a gdd-0.3 player though opening.attention is never marked there, one a turn from- /// their floors, in both languages (their Hebrew stayed approved); the walked chain's fallback steps do not come back.</summary>+ /// <summary>#2933: the course rows reach a gdd-0.3 player though opening.attention is never marked there, one a turn from+ /// their floors; the walked chain's fallback steps do not come back. Every course row's Hebrew is approved (the later+ /// lessons' on 9 Nov 2026, "Approve all four (Recommended)"), so a Hebrew player gets the same course, nothing missed.</summary>[TestCase(false)] [TestCase(true)]- public void MovedRowsShowFromTheirFloorsAfterTheChain(bool he)+ public void CourseRowsShowFromTheirFloorsAfterTheChain(bool he){var store = Store();using var rig = new AdvisorTour1688Fixture.Rig(he, store, catalog: AdvisorCatalog.Load());@@ -553,16 +628,21 @@ public class AdvisorOpeningNoAttentionTestsfor (int n = 0; rig.Advisor.InChain && n < 10; n++) rig.Advisor.NextStep();Assert.IsFalse(rig.Advisor.InChain);rig.Card.Collapse(takeFocus: false);- string? At(int turn) { rig.Bridge.State.Turn = turn - 1; rig.Advisor.Notice(AdvisorSignals.TurnEnded); return rig.Advisor.Shown?.Id; }- Assert.IsNull(At(2), "nothing waits on turn 2");- Assert.AreEqual("opening.objectives", At(3)); rig.Ui.Press("advisor-got-it");- Assert.AreEqual("opening.city", At(4)); rig.Ui.Press("advisor-got-it");- Assert.AreEqual("opening.training", At(5)); rig.Ui.Press("advisor-got-it");- Assert.IsNull(At(6));+ var expected = new[] { "lesson.report", "opening.objectives", "opening.city", "opening.training", "lesson.attack", "lesson.stakes", null, null, null, null };+ for (int turn = 2; turn < 2 + expected.Length; turn++) // to game turn 11, past lesson.stakes' last (10)+ {+ rig.Bridge.State.Turn = turn - 1; rig.Advisor.Notice(AdvisorSignals.TurnEnded);+ Assert.AreEqual(expected[turn - 2], rig.Advisor.Shown?.Id, "game turn " + turn);+ if (rig.Advisor.Shown != null) rig.Ui.Press("advisor-got-it");+ }+ foreach (var id in new[] { "lesson.report", "lesson.attack", "lesson.stakes" }) Assert.IsTrue(rig.Session.Settings.Seen(id), id);+ Assert.IsFalse(rig.Session.Queue.History.Any(e => e.Outcome == AdvisorQueue.Outcome.Missed), "nothing missed");+ Assert.IsFalse(rig.Session.Queue.History.Any(e => e.Id == "lesson.combat"), "no fight, no combat lesson");Assert.IsFalse(rig.Session.Settings.Seen("opening.attention"));}- /// <summary>#2933: a moved row not reached by its last turn is gone, the others keep their own days.</summary>+ /// <summary>#2933: a course row not reached by its last turn is gone, the others keep their own days; a priority 3 lesson+ /// goes ahead of a moved row on its last turn.</summary>[Test]public void AMovedRowLapsesAfterItsLastTurn(){@@ -571,15 +651,20 @@ public class AdvisorOpeningNoAttentionTestsrig.Advisor.NewGame();for (int n = 0; rig.Advisor.InChain && n < 10; n++) rig.Advisor.NextStep();rig.Card.Collapse(takeFocus: false);- rig.Bridge.State.Turn = 6; rig.Advisor.Notice(AdvisorSignals.TurnEnded); // game turn 7: objectives' last was 6- Assert.AreEqual("opening.city", rig.Advisor.Shown?.Id, "its last turn");+ rig.Bridge.State.Turn = 6; rig.Advisor.Notice(AdvisorSignals.TurnEnded); // game turn 7: objectives' last was 6, lesson.report's 4+ Assert.AreEqual("lesson.attack", rig.Advisor.Shown?.Id, "priority 3, ahead of opening.city on its last turn");rig.Ui.Press("advisor-got-it");rig.Bridge.State.Turn = 7; rig.Advisor.Notice(AdvisorSignals.TurnEnded);Assert.AreEqual("opening.training", rig.Advisor.Shown?.Id, "its last turn");rig.Ui.Press("advisor-got-it");rig.Bridge.State.Turn = 8; rig.Advisor.Notice(AdvisorSignals.TurnEnded);+ Assert.AreEqual("lesson.stakes", rig.Advisor.Shown?.Id);+ rig.Ui.Press("advisor-got-it");+ rig.Bridge.State.Turn = 9; rig.Advisor.Notice(AdvisorSignals.TurnEnded);Assert.IsNull(rig.Advisor.Shown);- Assert.IsFalse(rig.Session.Settings.Seen("opening.objectives"));+ Assert.IsFalse(rig.Session.Settings.Seen("opening.objectives")); Assert.IsFalse(rig.Session.Settings.Seen("lesson.report"));+ Assert.IsFalse(rig.Session.Settings.Seen("opening.city"));+ Assert.IsTrue(rig.Session.Queue.History.Any(e => e.Id == "opening.city" && e.Outcome == AdvisorQueue.Outcome.Missed), "lapsed, recorded as missed");}// R-GOV-002: new controls; every original old-mode test above is untouched.diff --git a/unity/Assets/Tests/EditMode/AdvisorSignalsTests.cs b/unity/Assets/Tests/EditMode/AdvisorSignalsTests.csindex b78d010fe..76dce98e3 100644--- a/unity/Assets/Tests/EditMode/AdvisorSignalsTests.cs+++ b/unity/Assets/Tests/EditMode/AdvisorSignalsTests.cs@@ -213,6 +213,15 @@ public class AdvisorSignalsTestspublic void ACourseStepsApprovedHebrewIsTheTextTheOwnerRead(string id, string hebrew) =>AnApprovedHebrewLineIsTheTextTheOwnerRead(id, hebrew);+ /// <summary>#2933's four later lessons, approved by the owner word for word (9 November 2026: "Approve all four+ /// (Recommended)"). A different text needs a new approval, so it must also set he_review back to pending.</summary>+ [TestCase("lesson.report", "המסך ״מה קרה בתור הזה״ מראה מה נע ואילו קרבות נערכו. אם ההפוגה התקבלה, החטיבות שלכם אינן יכולות לתקוף עד שהיא נגמרת.")]+ [TestCase("lesson.attack", "תקופת ההפוגה נגמרה. בחרו חטיבה הסמוכה לאויב כדי לראות את ״התקפה״ ואת יחס הכוחות. התקפה יכולה להדוף את האויב לאחור.")]+ [TestCase("lesson.stakes", "הניקוד שלכם סופר יעדים, כמה מוקדם השגתם אותם, ושבויים שהוחזרו. קרבות שוחקים את החטיבות. אם הכסף והמזון אוזלים ונשארים כך, המשחק נגמר.")]+ [TestCase("lesson.combat", "כשפורץ קרב, המסך ״מה קרה בתור הזה״ מראה את האבדות ומי נסוג. בחרו חטיבה הסמוכה לאויב כדי לראות את ״התקפה״ ואת יחס הכוחות.")]+ public void ACourseLessonsApprovedHebrewIsTheTextTheOwnerRead(string id, string hebrew) =>+ AnApprovedHebrewLineIsTheTextTheOwnerRead(id, hebrew);+[Test]public void TheEconomySignalsReadTheShownState(){diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yamlindex 59381398f..6b6288bf9 100644--- a/unity/Assets/UI/strings.en.yaml+++ b/unity/Assets/UI/strings.en.yaml@@ -991,6 +991,11 @@ advisor.opening.cities.text: "Your cities hold your people, jobs and training, aadvisor.opening.move_how.text: "To move, select a brigade, press Move, then click a lit hex. Click a farther hex and the brigade goes there over several turns."advisor.opening.orders.text: "A brigade with no order holds up End turn. Fortify and Hold stay until you change them, and a route carries on by itself. Skip this turn lasts one turn."advisor.opening.end_turn.text: "When no unit needs orders, press End turn. If the button says a unit needs orders, pressing it takes you to that unit. The month then plays out and a report follows."+# The later lessons (#2933 section 3): the issue's words.+advisor.lesson.report.text: "That report shows what moved and what was fought. If the truce was accepted, your brigades cannot attack until it ends."+advisor.lesson.attack.text: "The truce period is over. Select a brigade next to an enemy to see Attack and its odds. An attack can force the enemy back."+advisor.lesson.stakes.text: "Your score counts objectives, how early you reach them, and prisoners returned. Battles wear brigades down. If Money and Food stay exhausted, the game ends."+advisor.lesson.combat.text: "When fighting breaks out, the report shows losses and who fell back. Select a brigade next to an enemy to see Attack and its odds."advisor.next: "Next"advisor.done: "Done"# {0} the step, {1} the steps in the chain now.diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yamlindex 7e365d038..84cbd1833 100644--- a/unity/Assets/UI/strings.he.yaml+++ b/unity/Assets/UI/strings.he.yaml@@ -1184,6 +1184,12 @@ advisor.opening.cities.text: "בערים שלכם נמצאים האנשים, הadvisor.opening.move_how.text: "כדי לנוע, בחרו חטיבה, לחצו על ״תנועה״ ואז על משבצת מוארת. לחיצה על משבצת רחוקה יותר שולחת אליה את החטיבה במשך כמה תורות."advisor.opening.orders.text: "חטיבה ללא הוראה מעכבת את ״סיום התור״. ״ביצור״ ו״החזקה״ נשארים עד שתשנו אותם, ומסלול ממשיך מעצמו. ״דילוג על התור״ חל על תור אחד."advisor.opening.end_turn.text: "כשאף יחידה לא ממתינה להוראות, לחצו על ״סיום התור״. אם הכפתור מציג ״יחידה ממתינה להוראות״, לחיצה עליו תביא אתכם אל היחידה. אחר כך החודש מתנהל, ואחריו מוצג ״מה קרה בתור הזה״."+# The later lessons (#2933 section 3), agent-drafted: native review: owner, 9 Nov 2026 ("Approve all four+# (Recommended)"). The report is named by its screen title, as step 10's is.+advisor.lesson.report.text: "המסך ״מה קרה בתור הזה״ מראה מה נע ואילו קרבות נערכו. אם ההפוגה התקבלה, החטיבות שלכם אינן יכולות לתקוף עד שהיא נגמרת."+advisor.lesson.attack.text: "תקופת ההפוגה נגמרה. בחרו חטיבה הסמוכה לאויב כדי לראות את ״התקפה״ ואת יחס הכוחות. התקפה יכולה להדוף את האויב לאחור."+advisor.lesson.stakes.text: "הניקוד שלכם סופר יעדים, כמה מוקדם השגתם אותם, ושבויים שהוחזרו. קרבות שוחקים את החטיבות. אם הכסף והמזון אוזלים ונשארים כך, המשחק נגמר."+advisor.lesson.combat.text: "כשפורץ קרב, המסך ״מה קרה בתור הזה״ מראה את האבדות ומי נסוג. בחרו חטיבה הסמוכה לאויב כדי לראות את ״התקפה״ ואת יחס הכוחות."advisor.next: "הבא"advisor.done: "סיום"advisor.step: "שלב {0} מתוך {1}"