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.

Sim: israel_bonds adds equal Debt under gdd-0.3 (Fixes #2457) (#2487)

Beri845aa4897dac
diff --git a/changelog.d/2457-israel-bonds-debt.md b/changelog.d/2457-israel-bonds-debt.md
new file mode 100644
index 000000000..d20f5a62a
--- /dev/null
+++ b/changelog.d/2457-israel-bonds-debt.md
@@ -0,0 +1,3 @@
+- GDD 0.3: the Israel Bonds card is back (#2457). Launching the bond issue adds the $52m of foreign currency and the same
+ amount to Debt in IL at the rate on the day, IL 18.564m, with its own line on the Why screen. Relying on donations adds
+ no Debt. GDD 0.1 is unchanged.
diff --git a/content/events/israel_bonds.yaml b/content/events/israel_bonds.yaml
index 5469f82a0..48b4bceb2 100644
--- a/content/events/israel_bonds.yaml
+++ b/content/events/israel_bonds.yaml
@@ -31,6 +31,9 @@ options:
effects:
- { target: fx_reserves, delta: 52 }
- { target: intl_standing, delta: 0.02 }
+ # R-EFX-009 (#2457; owner, 2 November 2026, #2224: "Add equal Debt", "use 52"): the same $52m also goes onto Debt under
+ # gdd-0.3, at the mvp.il_per_dollar rate in force on the event's date. donations_only adds no Debt.
+ debt_dollars: 52
- id: donations_only
text: Rely on donations and loans
text_he: להסתמך על תרומות והלוואות
diff --git a/content/gdd03-events.yaml b/content/gdd03-events.yaml
index ba761f907..00ccf2fcf 100644
--- a/content/gdd03-events.yaml
+++ b/content/gdd03-events.yaml
@@ -1,5 +1,6 @@
# yaml-language-server: $schema=./schema/gdd03-events.schema.json
-# R-EFX-001/002/005/007, #1718: availability only; shared reviewed event records stay byte-identical.
+# R-EFX-001/002/005/007, #1718: availability only; shared reviewed event records stay byte-identical, except that
+# israel_bonds' launch option gains debt_dollars (#2457, R-EFX-009).
# No replacement amounts, effects, review statuses or sign-offs are authored here.
ruleset: gdd-0.3
exclusions:
@@ -9,14 +10,5 @@ exclusions:
reason: Foreign-currency debit and aid, with Food supply effects, need authored ledger and stock contracts.
- id: iraqi_exodus
reason: National housing effects need regional population and facility accounting.
- - id: israel_bonds
- reason: >-
- Owner, 2 November 2026 (#2224, https://github.com/eyalgolan/statecraft-israel/issues/2224#issuecomment-6570025445):
- "Add equal Debt", "Rate in force on the date (Recommended)" and "No Debt for donations; use 52 (Recommended)".
- In plain words: the launch option's $52m (fx_reserves +52) also goes onto Debt, converted to IL at the rate in force
- on the event's date; "use 52" means the card's own 52, not the $54.1m received by the end of 1951; and
- donations_only ($10m) adds no Debt.
- Blocked: Debt is not yet an event-effect target, and the IL Debt uses the dated mvp.il_per_dollar table from #2204.
- Do not restore the card as written: its launch option would add foreign currency with no Debt.
- id: maabarot_policy
reason: Maabarot policy and national housing effects need approved facility and population accounting.
diff --git a/content/schema/event.schema.json b/content/schema/event.schema.json
index 391e362f4..3242183fc 100644
--- a/content/schema/event.schema.json
+++ b/content/schema/event.schema.json
@@ -178,6 +178,7 @@
"description": "R-EFX-008 (GDD loop only): projects.yaml ids of locked kinds this option makes available to StartProject. A sensitive event may not unlock (R-EFX-005).",
"items": { "type": "string", "minLength": 1 }
},
+ "debt_dollars": { "type": "number", "exclusiveMinimum": 0, "description": "R-EFX-009 (applied under gdd-0.3 only): US$ millions, more than 0, this option also adds to Debt, in IL millions at the mvp.il_per_dollar rate in force on the event's date." },
"alternative": { "$ref": "#/definitions/alternative" }
}
}
diff --git a/docs/WRITING_EVENTS.md b/docs/WRITING_EVENTS.md
index 6f98ad60f..435bc11b6 100644
--- a/docs/WRITING_EVENTS.md
+++ b/docs/WRITING_EVENTS.md
@@ -244,6 +244,7 @@ Each option has:
| `city_effects` | no | GDD loop only. A list of `{ city, field, delta }`: see "grant_units and city_effects". |
| `unlock_projects` | no | GDD loop only. A list of `projects.yaml` ids: see "grant_units and city_effects". |
| `unit_orders` | no | GDD loop only, applied under gdd-0.1 only. A list of `{ unit, q, r }`: see "unit_orders". |
+| `debt_dollars` | no | Applied under gdd-0.3 only. US$ millions, more than 0, that the option also adds to Debt, in IL at the `mvp.il_per_dollar` rate in force on the event's date (R-EFX-009). |
| `alternative` | on every option that did not happen, in an event with a historical option | Who put it forward, on what record. See below. |
| `rejoin` | no | Consequence cards only. The id of the event whose road the card follows; choosing this option returns later cards to the recorded course (R-ALT-009). See "kind". |
@@ -545,18 +546,21 @@ office, date)` are the only readers. Lines that change across an era boundary ar
## GDD 0.3 first-slice availability (#1718)
-Legacy and gdd-0.1 continue to load every shared event file, with their existing content identity and effects.
+Legacy and gdd-0.1 continue to load every shared event file, with their existing effects. Their content identity is
+unchanged except for `israel_bonds`, whose source pin changed when it gained `debt_dollars` (#2457); its effects
+outside gdd-0.3 did not change.
Only the `gdd-0.3` identity reads and hashes `content/gdd03-events.yaml`. It must contain `ruleset: gdd-0.3`
and an explicit `exclusions` list of `{ id, reason }` entries. Its schema is `content/schema/gdd03-events.schema.json`.
Missing/null manifests, unknown/duplicate ids, blank reasons, and references from active requirements, variants,
rejoin options or objective cards to excluded ids are content errors. Every source file still parses strictly;
the remaining catalogue receives the usual cross-reference, effect and sensitivity validation.
-The approved first slice excludes exactly `austerity_1949`, `clothing_rationing_1950`, `forex_crisis_1951`,
-`iraqi_exodus`, `israel_bonds`, `maabarot_policy`, `reparations_claim` and `reparations_vote`, including all their
-options (`reparations_vote` joined with #1575, for the same reason as `reparations_claim`).
-Six of these are hard anchors: they are unavailable in 0.3. Shared records, Hebrew, tags, status and human
-sign-offs remain unchanged and available to review tools. Removing an exclusion requires a reviewed follow-up
+The approved first slice excludes exactly `austerity_1949`, `forex_crisis_1951`, `iraqi_exodus` and
+`maabarot_policy`, including all their options. `clothing_rationing_1950`, `reparations_claim` and `reparations_vote`
+came back with #2224, and `israel_bonds` with its equal Debt (#2457, R-EFX-009).
+Two of these, `austerity_1949` and `maabarot_policy`, are hard anchors: they are unavailable in 0.3. Shared records, Hebrew, tags, status and human
+sign-offs remain unchanged and available to review tools, except that `israel_bonds` gained `debt_dollars` (its source
+pin changed; its text, Hebrew, sources and status did not). Removing an exclusion requires a reviewed follow-up
with approved accounting and authored values; it does not itself approve a replacement or transfer a sign-off.
There is no automatic review promotion, and all existing release gates still apply.
diff --git a/docs/gdd03-event-inventory.md b/docs/gdd03-event-inventory.md
index 53bcd9a8c..8ecb66e0b 100644
--- a/docs/gdd03-event-inventory.md
+++ b/docs/gdd03-event-inventory.md
@@ -12,13 +12,15 @@ and review the diff. Do not edit the table by hand.
**How to read a row.**
-- **Old target** and **old delta**: the field as authored, which `legacy` and `gdd-0.1` apply (R-EFX-001). A
+- **Old target** and **old delta**: the field as authored, which `legacy` and `gdd-0.1` apply (R-EFX-001). The
+ exception is `debt_dollars`: those rulesets read it but only `gdd-0.3` applies it (R-EFX-009, #2457). A
`set_policy` or `set_rung` field sets a level instead of adding a delta.
- **gdd-0.3 target**: "same" when the card is in the `gdd-0.3` catalogue. The loader has then validated the field
under `gdd-0.3` (R-EFX-001, R-EFX-002) and it applies with the same delta. "Legacy rulesets only" when
`content/gdd03-events.yaml` excludes the whole card: none of its options is in play under `gdd-0.3`.
-- **Review reset**: "no" on every row. No card's source bytes change (`AllThirtyNineSourceRecordsIncludingReviewsAndHebrewAreUnchanged`),
- and the test checks that a kept card keeps its status and human sign-off under `gdd-0.3`. An excluded card keeps
+- **Review reset**: "no" on every row. Only `israel_bonds` changes its source bytes: its `launch` option gains
+ `debt_dollars: 52` and a comment (#2457), with its text, Hebrew, sources and review status unchanged. Every card's
+ bytes are pinned (`AllFortyOneSourceRecordsIncludingReviewsAndHebrewAreUnchanged`), and the test checks that a kept card keeps its status and human sign-off under `gdd-0.3`. An excluded card keeps
its record and review for the legacy rulesets.
**What decides it.** Decision D1 and answers Q1 to Q4 (owner, 1 November 2026, "Approve all six (Recommended)" for
@@ -27,7 +29,7 @@ retire among the economy targets, `fx_reserves` stays the foreign-currency ledge
stay readouts that an event cannot write (R-EFX-001). No shipped card targets Attention, the passive budget, the Food
refill or a city-loss defeat. Treasury costs borrow their shortfall as under `gdd-0.1` (R-MONEY-003).
-**The excluded cards.** The second table probes each of the five excluded cards: it removes that one exclusion and
+**The excluded cards.** The second table probes each of the four excluded cards: it removes that one exclusion and
reports what the `gdd-0.3` loader then says. It is a probe only. Returning a card to `gdd-0.3` still needs the
reviewed follow-up that `docs/WRITING_EVENTS.md` ("GDD 0.3 first-slice availability") describes; this file changes no
exclusion.
@@ -97,9 +99,10 @@ exclusion.
| `iraqi_exodus` | `airlift` | `effects[1].morale` | 0.03 | legacy rulesets only (card excluded) | none (not in play) | no |
| `iraqi_exodus` | `pace` | `effects[0].morale` | -0.05 | legacy rulesets only (card excluded) | none (not in play) | no |
| `iraqi_exodus` | `pace` | `effects[1].intl_standing` | -0.02 | legacy rulesets only (card excluded) | none (not in play) | no |
-| `israel_bonds` | `launch` | `effects[0].fx_reserves` | 52 | legacy rulesets only (card excluded) | none (not in play) | no |
-| `israel_bonds` | `launch` | `effects[1].intl_standing` | 0.02 | legacy rulesets only (card excluded) | none (not in play) | no |
-| `israel_bonds` | `donations_only` | `effects[0].fx_reserves` | 10 | legacy rulesets only (card excluded) | none (not in play) | no |
+| `israel_bonds` | `launch` | `effects[0].fx_reserves` | 52 | `effects[0].fx_reserves` (same) | 52 | no |
+| `israel_bonds` | `launch` | `effects[1].intl_standing` | 0.02 | `effects[1].intl_standing` (same) | 0.02 | no |
+| `israel_bonds` | `launch` | `debt_dollars` | 52 (US$ m; Debt under gdd-0.3 only) | `debt_dollars` (same) | 52 (US$ m; Debt under gdd-0.3 only) | no |
+| `israel_bonds` | `donations_only` | `effects[0].fx_reserves` | 10 | `effects[0].fx_reserves` (same) | 10 | no |
| `jerusalem_ceasefire` | `keep` | `effects[0].security` | 0.015 | `effects[0].security` (same) | 0.015 | no |
| `jerusalem_ceasefire` | `hold_out` | `effects[0].security` | -0.015 | `effects[0].security` (same) | -0.015 | no |
| `jerusalem_ceasefire` | `hold_out` | `effects[1].intl_standing` | -0.03 | `effects[1].intl_standing` (same) | -0.03 | no |
@@ -158,14 +161,13 @@ exclusion.
| `ten_days` | `southern_front` | `set_rung` | set 5 | `set_rung` (same) | set 5 | no |
| `ten_days` | `southern_front` | `effects[0].security` | 0.015 | `effects[0].security` (same) | 0.015 | no |
-121 rows: 41 cards under gdd-0.1, 36 under gdd-0.3.
+122 rows: 41 cards under gdd-0.1, 37 under gdd-0.3.
| Excluded card | gdd-0.3 loader with only this exclusion removed |
|---|---|
| `austerity_1949` | refused at `events[austerity_1949].options[impose].set_policy.rationing`: retired policy write under gdd-0.3 (R-EFX-001) |
| `forex_crisis_1951` | refused at `events[forex_crisis_1951].options[cut_imports].effects.food_supply`: unsupported event target under gdd-0.3 (R-EFX-001) |
| `iraqi_exodus` | refused at `events[iraqi_exodus].options[airlift].effects.housing`: unsupported event target under gdd-0.3 (R-EFX-001) |
-| `israel_bonds` | loads: every field passes the gdd-0.3 checks |
| `maabarot_policy` | refused at `events[maabarot_policy].options[maabarot].set_policy.maabarot`: retired policy write under gdd-0.3 (R-EFX-001) |
<!-- inventory:end -->
diff --git a/docs/rules/mvp.md b/docs/rules/mvp.md
index 4dc54044a..85d457a64 100644
--- a/docs/rules/mvp.md
+++ b/docs/rules/mvp.md
@@ -514,7 +514,7 @@ R-NAT-004: "Low international support" (`low_intl_support`) is a situation on `i
R-EFX-001: In legacy and gdd-0.1, an option's effect may target an indicator id from `model.yaml`, `treasury` or `fx_reserves` (game money), or `food`, the national Food stock: the effect moves the stock by whole units (the delta rounds half away from zero) and the stock never drops below 0, so a cut larger than the stock applies only to what is there. Any other target is a load error naming file and field. The Arms stock becomes a target with its pool (#781): `arms` moves it the same way.
-Under gdd-0.3 (#1718, first slice landed in PR #1772 on 26 October 2026): only the active event catalogue is simulated. `content/gdd03-events.yaml` is required, read and hashed only for this identity; it explicitly excludes whole cards by id with a reason. Unknown or duplicate exclusions and stranded requirements, variants, rejoin edges or objective cards are errors. All source YAML is still parsed strictly. Five legacy cards are excluded without changing their source bytes or reviews (eight until the owner's ruling of 2 November 2026, "Bring back 3, design bonds (Recommended)", restored `clothing_rationing_1950`, `reparations_claim` and `reparations_vote`, #2224). There are no replacement amounts. Approved indicator writes and explicit `treasury`, `food`, `arms` effects retain finite checks, stock rounding and bounds. Writable `food_supply`, national `housing`, Attention and city-loss/defeat command targets are rejected before compatibility-indicator acceptance. Under decision D1 and answers Q1 and Q2 (owner, 1 November 2026, "Approve all six (Recommended)" on #1668) the passive budget, the monthly Food refill and the foreign-currency ledger stay, so `fx_reserves` and the budget and Food-refill spellings load under gdd-0.3 exactly as under gdd-0.1: `fx_reserves` moves the ledger, and a budget or refill spelling is accepted only where `model.yaml` defines it, otherwise it is an unknown target. Retired `rationing` and `maabarot` policy writes are errors. Structured `grant_units`, `city_effects` and `unlock_projects` await approved population/facility accounting and are errors in this slice. Explicit Treasury costs continue borrowing with the existing cause under R-MONEY-003; the owner's 26 October 2026 ruling on #1718 overrides the proposal's no-borrowing text. No transaction refusal or new debt limit is introduced. Every effect field of every event option, with its `gdd-0.3` target (the same, or legacy rulesets only for an excluded card), its delta and its review state, is listed in `docs/gdd03-event-inventory.md`; `Gdd03EventInventoryTests` regenerates that table from the loader and fails when the file no longer matches the content (#1718).
+Under gdd-0.3 (#1718, first slice landed in PR #1772 on 26 October 2026): only the active event catalogue is simulated. `content/gdd03-events.yaml` is required, read and hashed only for this identity; it explicitly excludes whole cards by id with a reason. Unknown or duplicate exclusions and stranded requirements, variants, rejoin edges or objective cards are errors. All source YAML is still parsed strictly. Four legacy cards are excluded without changing their source bytes or reviews (eight until the owner's ruling of 2 November 2026, "Bring back 3, design bonds (Recommended)", restored `clothing_rationing_1950`, `reparations_claim` and `reparations_vote`, #2224; five until `israel_bonds` came back with its Debt, R-EFX-009, #2457). There are no replacement amounts. Approved indicator writes and explicit `treasury`, `food`, `arms` effects retain finite checks, stock rounding and bounds. Writable `food_supply`, national `housing`, Attention and city-loss/defeat command targets are rejected before compatibility-indicator acceptance. Under decision D1 and answers Q1 and Q2 (owner, 1 November 2026, "Approve all six (Recommended)" on #1668) the passive budget, the monthly Food refill and the foreign-currency ledger stay, so `fx_reserves` and the budget and Food-refill spellings load under gdd-0.3 exactly as under gdd-0.1: `fx_reserves` moves the ledger, and a budget or refill spelling is accepted only where `model.yaml` defines it, otherwise it is an unknown target. Retired `rationing` and `maabarot` policy writes are errors. Structured `grant_units`, `city_effects` and `unlock_projects` await approved population/facility accounting and are errors in this slice. Explicit Treasury costs continue borrowing with the existing cause under R-MONEY-003; the owner's 26 October 2026 ruling on #1718 overrides the proposal's no-borrowing text. No transaction refusal or new debt limit is introduced. Every effect field of every event option, with its `gdd-0.3` target (the same, or legacy rulesets only for an excluded card), its delta and its review state, is listed in `docs/gdd03-event-inventory.md`; `Gdd03EventInventoryTests` regenerates that table from the loader and fails when the file no longer matches the content (#1718).
R-EFX-002: In every ruleset, an option of an event tagged `holocaust`, `terror`, `massacre` or `war-casualties` cannot raise `treasury`, `fx_reserves`, `food`, `arms`, `food_supply`, `morale` or `intl_standing` (Q-EFX-2, decided 15 October 2026: the no-gain rule covers all five resources, with the legacy indicators standing for Food, Social cohesion and International Support; `food` is Food's own target, and Arms joins the rule with its pool, #781). A cost stays allowed. Under gdd-0.3, R-EFX-001 first rejects retired compatibility targets; the remaining Money, Food, Arms and indicator effects keep these no-gain checks. Availability changes do not reset sensitivity tags, review status or human sign-off, and no alias grants an exception (R-EFX-005/007).
@@ -536,6 +536,8 @@ R-EFX-006: The structured effects apply after the numeric effects, grants first,
R-EFX-008: A `projects.yaml` kind may say `locked: true` (default false). `StartProject` refuses a locked kind, like the other R-PROJ-001 refusals, until an option whose `unlock_projects` lists it has applied; from then on it is an ordinary kind for the rest of the game. The unlocked kinds are game state, hashed as `unlocked[...]` only when one is unlocked (R-LOOP-002). The loader refuses an `unlock_projects` entry that names an unknown kind or one that is not locked, since it would do nothing.
+R-EFX-009: Under gdd-0.3 only, an option's `debt_dollars` (US$ millions) also adds to Debt, in IL millions: that amount times the `mvp.il_per_dollar` rate in force on the event's date (the day `EventSystem.FillDate` gives, inside the window), scaled by a delegation's share as the numeric effects are (R-EVT-003). It adds no interest and no repayment schedule (GDD Q5). Its line is an `event_amount` line on `debt`, and it is listed in `EventSystem.OptionEffects` after the numeric effects (R-EVT-005). The Debt it adds has no Treasury line, so `EconomySystem.MovesMoney` counts that line as a Money (net) cause, with its sign reversed (`EconomySystem.MoneyDelta`). The loader refuses a value that is not a finite number above 0 in every ruleset, since every ruleset reads the same cards; legacy and gdd-0.1 apply nothing. The owner's rulings of 2 November 2026 on #2224 ("Add equal Debt", "Rate in force on the date (Recommended)", "No Debt for donations; use 52 (Recommended)") give `israel_bonds/launch` `debt_dollars: 52` (IL 18.564m at 0.357 on 10 May 1951), and `donations_only` none (#2457). Tests: `Gdd03EventRulesTests.DebtDollarsAddDebtAtTheEventsDateRateUnderGdd03Only`, `DelegatedHalfShareHalvesTheDebt`, `DebtDollarsMustBeAFinitePositiveAmount`, `IsraelBondsLaunchAddsEqualDebtAndDonationsAddNone`, `RestoredCardsLoadWithLegacyEffectsAndFireOnTheirTurns`, `Gdd03MoneyLedgerTests.EveryTurnOfAWholeGdd03GameReconciles`.
+
## Events
D-H1 in the GDD loop (GDD Phase 7 PR 1, #805). The owner took the plan's recommendations for Q-EVT-1 to Q-EVT-4 on 17 October 2026 (#784). As the plan's Decided rows record them (`docs/superpowers/plans/2026-10-15-gdd-phase-7.md`), that keeps windows, hard anchors and the cap of 3 soft events a turn, keeps delegation, adds no delayed effects in the MVP, and shows every effect of every option from the sim's preview. These rules state what the code already does; no behaviour changed. On 18 October 2026 the owner added loyalty to delegation (#107: "Yes: minister loyalty changes a delegated event's outcome, with labelled values in the PR"); R-EVT-003 states it, with two design values (`delegation_loyalty_floor`, `disloyal_effect_share`).
diff --git a/sim/Statecraft.Sim.Tests/Gdd03EventInventoryTests.cs b/sim/Statecraft.Sim.Tests/Gdd03EventInventoryTests.cs
index 4ac8a7c08..204529f4f 100644
--- a/sim/Statecraft.Sim.Tests/Gdd03EventInventoryTests.cs
+++ b/sim/Statecraft.Sim.Tests/Gdd03EventInventoryTests.cs
@@ -18,7 +18,8 @@ public class Gdd03EventInventoryTests
static string Num(double v) => v.ToString("G", CultureInfo.InvariantCulture);
/// <summary>Every effect field of every option, in the card's own order: set_policy (by key), set_rung, effects, then
- /// the structured grant_units, city_effects and unlock_projects. Same-target effects keep their list index.</summary>
+ /// the structured grant_units, city_effects and unlock_projects, then debt_dollars (R-EFX-009, applied under gdd-0.3
+ /// only). Same-target effects keep their list index.</summary>
static IEnumerable<(string Field, string Change)> Fields(EventOption o)
{
foreach (var kv in o.SetPolicy.OrderBy(kv => kv.Key, StringComparer.Ordinal))
@@ -32,6 +33,7 @@ public class Gdd03EventInventoryTests
yield return ($"city_effects[{i}].{o.CityEffects[i].City}.{o.CityEffects[i].Field}", Num(o.CityEffects[i].Delta));
for (int i = 0; i < o.UnlockProjects.Count; i++)
yield return ($"unlock_projects[{i}]", o.UnlockProjects[i]);
+ if (o.DebtDollars is double debt) yield return ("debt_dollars", Num(debt) + " (US$ m; Debt under gdd-0.3 only)");
}
static string Render()
diff --git a/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.cs b/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.cs
index 1d49cbd09..4afe39460 100644
--- a/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.cs
+++ b/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.cs
@@ -6,9 +6,10 @@ public class Gdd03EventRulesTests
{
const string Manifest = "gdd03-events.yaml";
const string Empty = "ruleset: gdd-0.3\nexclusions: []\n";
- static readonly string[] Excluded = { "austerity_1949", "forex_crisis_1951", "iraqi_exodus", "israel_bonds", "maabarot_policy" };
+ static readonly string[] Excluded = { "austerity_1949", "forex_crisis_1951", "iraqi_exodus", "maabarot_policy" };
// #2224 (owner, 2 November 2026, "Bring back 3, design bonds (Recommended)"): D1/Q2 keep the foreign-currency ledger,
- // so these three cards, excluded by #1772 for want of a ledger mapping, are active again. israel_bonds stays excluded.
+ // so these three cards, excluded by #1772 for want of a ledger mapping, are active again. israel_bonds came back with
+ // its equal Debt (#2457, R-EFX-009; owner, 2 November 2026, #2224: "Add equal Debt").
static readonly string[] Restored = { "clothing_rationing_1950", "reparations_claim", "reparations_vote" };
static string Card(string id = "probe", string option = "") =>
$"id: {id}\ntitle: Fixture\ntext: Fixture.\nfrom: 1948-05-15\noptions:\n - id: ok\n text: Accept\n historical: true\n" + option;
@@ -189,7 +190,7 @@ public class Gdd03EventRulesTests
}, Directory.GetFiles(Path.Combine(root, "events"), "*.yaml").Select(p => "events/" + Path.GetFileName(p)));
}
[Fact]
- public void RealCatalogueExcludesExactlyFiveWholeCardsAndKeepsOrder()
+ public void RealCatalogueExcludesExactlyFourWholeCardsAndKeepsOrder()
{
var old = Real(false); var modern = Real(true);
Assert.Equal(41, old.Events.Count); // Deport's two cards (#801) are not excluded
@@ -334,7 +335,8 @@ public class Gdd03EventRulesTests
[Fact]
public void AllTwentyFourAffectedAssignmentsRetainTheirLegacyValues()
{
- Assert.Equal(Inventory.OrderBy(x => x, StringComparer.Ordinal), Rows(Real(false), Excluded).OrderBy(x => x, StringComparer.Ordinal));
+ // israel_bonds is no longer excluded (#2457), but its three rows keep the legacy values #1772 pinned.
+ Assert.Equal(Inventory.OrderBy(x => x, StringComparer.Ordinal), Rows(Real(false), Excluded.Append("israel_bonds")).OrderBy(x => x, StringComparer.Ordinal));
Assert.All(Real(false).Events, e => Assert.All(e.Options, o =>
{ Assert.Empty(o.GrantUnits); Assert.Empty(o.CityEffects); Assert.Empty(o.UnlockProjects); }));
}
@@ -371,7 +373,92 @@ public class Gdd03EventRulesTests
Assert.Equal(new DateTime(1950, 7, 15), CardDate("clothing_rationing_1950"));
Assert.Equal(new DateTime(1951, 3, 15), CardDate("reparations_claim"));
Assert.Equal(new DateTime(1951, 12, 15), CardDate("reparations_vote"));
- Assert.Null(CardDate("israel_bonds"));
+ // #2457: back under gdd-0.3 on the turn EventRetimingTests pins for it in the gdd-0.1 golden run. As a hard anchor
+ // left unanswered in Historical mode it takes launch, so the Debt it adds is the IL equivalent of the card's $52m.
+ Assert.Equal(new DateTime(1951, 5, 15), CardDate("israel_bonds"));
+ Assert.Equal("launch", s.ChosenOptions["israel_bonds"]);
+ }
+
+ // R-EFX-009 (#2457; owner, 2 November 2026, #2224: "Add equal Debt", "Rate in force on the date (Recommended)"): under
+ // gdd-0.3 an option's debt_dollars adds that many US$ millions to Debt in IL millions, at the mvp.il_per_dollar rate in
+ // force on the event's date. The fixture's rate is 0.5 from 15 May 1948 and 0.25 from 15 August: the card's window
+ // ends on 10 August and the turn is 15 August, so the event's date (9 August) gives 0.5, the turn's date would give 0.25.
+ // gdd-0.1 reads the field and leaves Debt alone. Red without the effect: Debt stays put under gdd-0.3 too.
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void DebtDollarsAddDebtAtTheEventsDateRateUnderGdd03Only(bool modern)
+ {
+ var card = Card(option: " effects: [{ target: fx_reserves, delta: 52 }]\n debt_dollars: 52\n").Replace("from: 1948-05-15", "from: 1948-08-01\nto: 1948-08-10");
+ var c = Load(Files(modern), card);
+ Assert.Equal(modern, c.Ruleset == SaveGame.Gdd03Ruleset);
+ var s = Simulation.NewGame(c, 1, Mode.Historical);
+ s.Date = new DateTime(1948, 8, 15); s.PendingEvents.Add("probe");
+ var (fx, debt, treasury) = (s.FxReserves, s.Debt, s.Treasury);
+ var preview = EventSystem.OptionEffects(c, s, c.Events.Single(e => e.Id == "probe").Options[0]);
+ var why = new List<Cause>();
+ Assert.Null(EventSystem.Choose(c, s, "probe", "ok", why));
+ Assert.Equal(fx + 52, s.FxReserves);
+ Assert.Equal(treasury, s.Treasury);
+ Assert.Equal(debt + (modern ? 26 : 0), s.Debt, 9);
+ var lines = why.Where(x => x.Target == "debt").ToList();
+ var shown = preview.Where(x => x.Target == "debt").ToList();
+ if (!modern) { Assert.Empty(lines); Assert.Empty(shown); return; }
+ var line = Assert.Single(lines);
+ Assert.Equal((CauseKeys.EventAmount, 26.0), (line.Key, line.Delta));
+ Assert.StartsWith("Debt", line.Message);
+ Assert.EndsWith("(Fixture)", line.Message);
+ Assert.Equal((CauseKeys.EventAmount, 26.0), (Assert.Single(shown).Key, shown[0].Delta));
+ }
+ // R-EFX-009, R-EVT-003: a disloyal minister's half share halves the Debt with the foreign currency.
+ [Fact]
+ public void DelegatedHalfShareHalvesTheDebt()
+ {
+ var c = Load(Files(), Card(option: " effects: [{ target: fx_reserves, delta: 4 }]\n debt_dollars: 4\n") + "office: prime_minister\n");
+ foreach (var p in c.People) p.Loyalty = 0;
+ var s = Simulation.NewGame(c, 1, Mode.Historical); s.Debt = 0;
+ var fx = s.FxReserves;
+ EventSystem.Delegate(c, s, new List<Cause>());
+ Assert.Equal((fx + 2, 1.0), (s.FxReserves, s.Debt));
+ }
+ // R-EFX-009: the loader checks the field in every ruleset, since every ruleset reads the same cards.
+ [Theory]
+ [InlineData(true, "0")]
+ [InlineData(true, "-52")]
+ [InlineData(true, ".nan")]
+ [InlineData(false, ".inf")]
+ public void DebtDollarsMustBeAFinitePositiveAmount(bool modern, string value)
+ {
+ var ex = Assert.Throws<ContentException>(() => Load(Files(modern), Card(option: $" debt_dollars: {value}\n")));
+ Assert.Equal(("events/probe.yaml", "events[probe].options[ok].debt_dollars"), (ex.File, ex.Field));
+ }
+ // R-EFX-009 (review on #2487): a value that is not a number is a content error in every ruleset, reported at
+ // the card's file and the debt_dollars line (line 9 of the fixture), before any ruleset check runs.
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void DebtDollarsThatIsNotANumberIsRefused(bool modern)
+ {
+ var ex = Assert.Throws<ContentException>(() => Load(Files(modern), Card(option: " debt_dollars: nope\n")));
+ Assert.Equal(("events/probe.yaml", "line 9"), (ex.File, ex.Field));
+ Assert.Contains("nope", ex.Message);
+ }
+ // R-EFX-009 (#2457): on the real card, launch adds the $52m and IL 18.564m of Debt (52 x 0.357, the rate in force on
+ // 10 May 1951); donations_only adds its $10m and no Debt (owner: "No Debt for donations; use 52 (Recommended)").
+ [Theory]
+ [InlineData("launch", 52, 18.564)]
+ [InlineData("donations_only", 10, 0)]
+ public void IsraelBondsLaunchAddsEqualDebtAndDonationsAddNone(string option, double dollars, double debt)
+ {
+ var c = Real(true);
+ var s = Simulation.NewGame(c, GoldenRun.Seed, Mode.Historical);
+ s.Date = new DateTime(1951, 5, 15); s.PendingEvents.Add("israel_bonds");
+ var (fx, before) = (s.FxReserves, s.Debt);
+ var why = new List<Cause>();
+ Assert.Null(EventSystem.Choose(c, s, "israel_bonds", option, why));
+ Assert.Equal(fx + dollars, s.FxReserves, 9);
+ Assert.Equal(before + debt, s.Debt, 9);
+ Assert.Equal(debt == 0 ? 0 : 1, why.Count(x => x.Target == "debt" && x.Key == CauseKeys.EventAmount));
}
static readonly string[] SourceBytes =
{
@@ -397,7 +484,7 @@ public class Gdd03EventRulesTests
"hula_drainage:b7ec7159b5cb6ecc009e1ff7e12a7f2426ee1c4b992b8c91c4675c8df3cc1bf5", // re-pinned for #1065 (Beri's native Hebrew read)
"idf_founding:caad7affcf0309a41c56956c10dd15936ec319ac996ddff6f2cd85efbcebc51e", // re-pinned for #1065 (Beri's native Hebrew read)
"iraqi_exodus:461dbb8a0685b7dceb6242d8e819635a27bb10033463e66d1a2e3ac68c9b8521", // re-pinned for #1065 (Beri's native Hebrew read)
- "israel_bonds:9bb4e8f38b8c9dc41b339645457efe1ce8d74580c53556faf4c81df50f67a992", // re-pinned for #1065 (Beri's native Hebrew read)
+ "israel_bonds:e91587a9e0a9004c5549e1ce4babb6f6c564f4db0514acc98769e51605e05160", // re-pinned for #1065 (Beri's native Hebrew read), then for #2457 (R-EFX-009: launch's debt_dollars: 52 and its comment; owner, 2 November 2026, #2224, "Add equal Debt"; card text, Hebrew, sources, review status and the 52 unchanged)
"jerusalem_ceasefire:b850682a7736dcf2870550322f32a2d5c30963a05529dc9162dd68c9234648d6", // re-pinned for #1065 (Beri's native Hebrew read)
"jerusalem_demilitarisation_guard:a9693784deafaad901268afd8a0c47a2f5b7d5f75eba33d6180f94b62913fb53", // re-pinned for #1065 (owner's native read; flag removed in 05b5777d9), then for the stale reviewer comment (comment-only)
"jerusalem_military_government:526dbc88eabe4691e3ee1f3ed2c5fdeb640f11ae0a7a632c63066175b9c18176", // re-pinned for #1065 (Beri's native Hebrew read)
diff --git a/sim/Statecraft.Sim.Tests/Gdd03MoneyLedgerTests.cs b/sim/Statecraft.Sim.Tests/Gdd03MoneyLedgerTests.cs
index a8100f252..93ef1d9c0 100644
--- a/sim/Statecraft.Sim.Tests/Gdd03MoneyLedgerTests.cs
+++ b/sim/Statecraft.Sim.Tests/Gdd03MoneyLedgerTests.cs
@@ -34,7 +34,7 @@ public class Gdd03MoneyLedgerTests
/// without a line; (c) the Treasury ends at 0 or more.</summary>
internal static void AssertReconciles(GameState before, StepResult r, string what)
{
- var money = r.Why.Where(EconomySystem.MovesMoney).Sum(w => w.Delta);
+ var money = r.Why.Where(EconomySystem.MovesMoney).Sum(EconomySystem.MoneyDelta);
var net = (r.State.Treasury - r.State.Debt) - (before.Treasury - before.Debt);
Assert.True(Math.Abs(money - net) <= Tolerance, $"{what}: the Money causes add up to {N(money)}, Treasury minus Debt moved {N(net)}");
var debt = r.Why.Where(w => w.Target == "debt").Sum(w => w.Delta);
diff --git a/sim/Statecraft.Sim.Tests/MoneyCausesTests.cs b/sim/Statecraft.Sim.Tests/MoneyCausesTests.cs
index 55c5227b7..13df91630 100644
--- a/sim/Statecraft.Sim.Tests/MoneyCausesTests.cs
+++ b/sim/Statecraft.Sim.Tests/MoneyCausesTests.cs
@@ -22,7 +22,7 @@ public class MoneyCausesTests
static void AssertAddsUp(GameState before, StepResult r, string what)
{
var lines = r.Why.Where(EconomySystem.MovesMoney).ToList();
- var sum = lines.Sum(w => w.Delta);
+ var sum = lines.Sum(EconomySystem.MoneyDelta);
var change = (r.State.Treasury - r.State.Debt) - (before.Treasury - before.Debt);
string N(double v) => v.ToString("0.000###", CultureInfo.InvariantCulture);
Assert.True(Math.Abs(sum - change) <= Tolerance,
@@ -200,12 +200,12 @@ public class MoneyCausesTests
var largest = Largest(r.Why, 2);
var other = EconomySystem.OtherMoney(Real, r.Why, largest);
Assert.NotNull(other);
- var rest = r.Why.Where(w => EconomySystem.MovesMoney(w) && !largest.Contains(w)).Sum(w => w.Delta);
+ var rest = r.Why.Where(w => EconomySystem.MovesMoney(w) && !largest.Contains(w)).Sum(EconomySystem.MoneyDelta);
Assert.Equal(("economy", "treasury", CauseKeys.MoneyOther, rest), (other!.System, other.Target, other.Key, other.Delta));
Assert.Equal($"{PlayerText.Change(Real, "treasury", rest)} (other causes)", other.Message);
Assert.DoesNotContain(other, r.Why); // the UI's line, never a line of the turn
var change = (r.State.Treasury - r.State.Debt) - (s.Treasury - s.Debt);
- Assert.True(Math.Abs(largest.Sum(w => w.Delta) + other.Delta - change) <= Tolerance, "the two lines and Other add up to the change");
+ Assert.True(Math.Abs(largest.Sum(EconomySystem.MoneyDelta) + other.Delta - change) <= Tolerance, "the two lines and Other add up to the change");
}
// #2212: no Other line when every Money cause is shown (two or fewer), or when the rest rounds to IL 0.0m as shown.
diff --git a/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.cs b/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.cs
index cac7e50eb..b3e505f03 100644
--- a/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.cs
+++ b/sim/Statecraft.Sim.Tests/RemainingCauseKeysTests.cs
@@ -115,7 +115,7 @@ public class RemainingCauseKeysTests
sites++;
}
}
- Assert.Equal(119, sites); // 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(120, sites); // 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.Tests/SchemaTests.cs b/sim/Statecraft.Sim.Tests/SchemaTests.cs
index 52cf498c6..d0cf5f370 100644
--- a/sim/Statecraft.Sim.Tests/SchemaTests.cs
+++ b/sim/Statecraft.Sim.Tests/SchemaTests.cs
@@ -29,7 +29,7 @@ public class SchemaTests
static readonly HashSet<string> Supported = new HashSet<string>
{
"$schema", "$ref", "title", "description", "definitions", "type", "properties", "additionalProperties", "required",
- "items", "minItems", "minLength", "pattern", "minimum", "maximum", "enum",
+ "items", "minItems", "minLength", "pattern", "minimum", "exclusiveMinimum", "maximum", "enum",
};
static void Check(JsonElement schema, JsonElement root, JsonNode? value, string path, List<string> errors)
@@ -58,6 +58,7 @@ public class SchemaTests
else if (val.TryGetValue<double>(out var num) || (val.TryGetValue<long>(out var whole) && (num = whole) == whole))
{
if (schema.TryGetProperty("minimum", out var mn) && num < mn.GetDouble()) errors.Add($"{path}: must be at least {mn.GetDouble()}");
+ if (schema.TryGetProperty("exclusiveMinimum", out var xm) && num <= xm.GetDouble()) errors.Add($"{path}: must be more than {xm.GetDouble()}");
if (schema.TryGetProperty("maximum", out var mx) && num > mx.GetDouble()) errors.Add($"{path}: must be at most {mx.GetDouble()}");
}
}
@@ -334,6 +335,15 @@ people:
Assert.Contains(Errors("event.schema.json", good.Replace("https://", "http://")), e => e.Contains("does not match"));
}
+ // R-EFX-009 (review on #2487): debt_dollars is "more than 0", as the loader checks.
+ [Fact]
+ public void DebtDollarsMustBeMoreThanZero()
+ {
+ var card = "id: e\ntitle: T\ntext: X\nfrom: 1950-01-01\noptions:\n - { id: a, text: A, debt_dollars: AMOUNT }\nsources: [{ url: \"https://example.org\", checked: 2026-10-09 }]\n";
+ Assert.Empty(Errors("event.schema.json", card.Replace("AMOUNT", "52")));
+ Assert.Contains(Errors("event.schema.json", card.Replace("AMOUNT", "0")), e => e.Contains("debt_dollars: must be more than 0"));
+ }
+
[Fact]
public void ThePartiesSchemaRejectsATypo() =>
Assert.Contains(Errors("parties.schema.json", "parties:\n - { id: mapai, nmae: Mapai }\n"), e => e.Contains("nmae"));
diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.cs
index 20e993991..4e3a6c538 100644
--- a/sim/Statecraft.Sim/Content.cs
+++ b/sim/Statecraft.Sim/Content.cs
@@ -1080,6 +1080,9 @@ namespace Statecraft.Sim
public List<string> UnlockProjects { get; set; } = new List<string>();
/// <summary>R-ENEMY-005: go-to orders this option gives to units of map/units_1948.yaml rows, in list order (Q-ENEMY-5).</summary>
public List<UnitOrderEffect> UnitOrders { get; set; } = new List<UnitOrderEffect>();
+ /// <summary>R-EFX-009 (#2457): US$ millions this option also adds to Debt, under gdd-0.3 only, in IL millions at the
+ /// mvp.il_per_dollar rate in force on the event's date. Null when absent.</summary>
+ public double? DebtDollars { get; set; }
/// <summary>Who put this non-historical option forward, and on what record (R-ALT-003). Null when absent.</summary>
public OptionAlternative? Alternative { get; set; }
/// <summary>The event whose historical course this consequence option rejoins (R-ALT-009), or empty.</summary>
diff --git a/sim/Statecraft.Sim/EconomySystem.cs b/sim/Statecraft.Sim/EconomySystem.cs
index 7573f3d82..c1dd8a9a4 100644
--- a/sim/Statecraft.Sim/EconomySystem.cs
+++ b/sim/Statecraft.Sim/EconomySystem.cs
@@ -35,8 +35,13 @@ namespace Statecraft.Sim
/// Money, R-MONEY-001), its Delta that change: a Treasury line, and a city's job income (R-CITY-002), whose Target is the
/// city. A borrowing line (Target debt) is not one: it moves the Treasury and the Debt by the same amount, and the cost it
/// borrowed for has its own Treasury line. The turn's lines it picks add up to the change (MoneyCausesTests); the turn
- /// report and the meter tip show the largest (HudModel.Causes).</summary>
- public static bool MovesMoney(Cause w) => w.Target == "treasury" || w.Key == CauseKeys.WagesPaid;
+ /// report and the meter tip show the largest (HudModel.Causes). An event's Debt line (R-EFX-009, #2457) is one too: the
+ /// Debt it adds has no Treasury line, so it moves the Money (net) by <see cref="MoneyDelta"/>, its Delta negated.</summary>
+ public static bool MovesMoney(Cause w) => w.Target == "treasury" || w.Key == CauseKeys.WagesPaid
+ || (w.Target == "debt" && w.Key == CauseKeys.EventAmount);
+
+ /// <summary>The change a <see cref="MovesMoney"/> line makes to the Money (net): its Delta, negated for a Debt line.</summary>
+ public static double MoneyDelta(Cause w) => w.Target == "debt" ? -w.Delta : w.Delta;
/// <summary>#2212: the one Money line for the causes a list leaves out. The turn report and the meter tip show the
/// largest Money causes (HudModel.Causes, at most HudModel.MaxCauses); this is the sum of the turn's other lines
@@ -45,7 +50,7 @@ namespace Statecraft.Sim
/// (PlayerText.MoneyChange's rounding). The line is the UI's, never one of the turn's (StepResult.Why).</summary>
public static Cause? OtherMoney(Content c, IEnumerable<Cause> why, IReadOnlyCollection<Cause> shown)
{
- var rest = why.Where(w => MovesMoney(w) && !shown.Contains(w)).Sum(w => w.Delta);
+ var rest = why.Where(w => MovesMoney(w) && !shown.Contains(w)).Sum(MoneyDelta);
if (PlayerText.MoneyChange(c, "treasury", rest) == PlayerText.MoneyChange(c, "treasury", 0)) return null;
return new Cause("economy", "treasury", rest, $"{PlayerText.Change(c, "treasury", rest)} (other causes)", key: CauseKeys.MoneyOther);
}
diff --git a/sim/Statecraft.Sim/EventRules.cs b/sim/Statecraft.Sim/EventRules.cs
index c04c27f25..58247f651 100644
--- a/sim/Statecraft.Sim/EventRules.cs
+++ b/sim/Statecraft.Sim/EventRules.cs
@@ -101,6 +101,9 @@ namespace Statecraft.Sim
if (sensitive && NoGainTargets.Contains(fx.Target) && fx.Delta > 0)
throw new ContentException(e.File, F($"options[{o.Id}].effects.{fx.Target}"), $"sensitive events cannot reward {fx.Target}");
}
+ // R-EFX-009: checked in every ruleset, since every ruleset reads the same cards; only gdd-0.3 applies it.
+ if (o.DebtDollars is double debt && !(double.IsFinite(debt) && debt > 0))
+ throw new ContentException(e.File, F($"options[{o.Id}].debt_dollars"), "must be a finite number > 0 (US$ millions)");
}
}
CheckRequirementCycles(c);
diff --git a/sim/Statecraft.Sim/EventSystem.cs b/sim/Statecraft.Sim/EventSystem.cs
index e15b6f06e..685b76285 100644
--- a/sim/Statecraft.Sim/EventSystem.cs
+++ b/sim/Statecraft.Sim/EventSystem.cs
@@ -141,6 +141,13 @@ namespace Statecraft.Sim
why.Add(new Cause("events", fx.Target, change, $"{PlayerText.Change(c, fx.Target, change)} ({title})",
key: fx.Target == Pools.FoodTarget || fx.Target == Pools.ArmsTarget ? CauseKeys.EventStock : CauseKeys.EventAmount, args: Context(title, localizedTitle)));
}
+ // R-EFX-009 (#2457): the bond's dollars also go onto Debt, at the event's date's rate, scaled like the numeric effects.
+ if (DebtFor(c, Get(c, eventId), o, s.Date) is double debt)
+ {
+ s.Debt += debt * share;
+ why.Add(new Cause("events", "debt", debt * share, $"{PlayerText.Change(c, "debt", debt * share)} ({title})",
+ key: CauseKeys.EventAmount, args: Context(title, localizedTitle)));
+ }
// R-EFX-006: the structured effects after the numeric ones, in list order. The loader has checked every target.
foreach (var g in o.GrantUnits)
{
@@ -206,6 +213,16 @@ namespace Statecraft.Sim
Armistice.Resolved(c, s, eventId, o.Id); // R-WAR-006, R-WAR-007: gdd-0.3 only
}
+ /// <summary>R-EFX-009 (owner, 2 November 2026, #2224: "Add equal Debt", "Rate in force on the date (Recommended)"): the
+ /// IL millions of Debt the option's debt_dollars adds under gdd-0.3, at the mvp.il_per_dollar rate in force on the
+ /// event's date (<see cref="FillDate"/>); null under any other ruleset or with no debt_dollars.</summary>
+ static double? DebtFor(Content c, GameEvent e, EventOption o, DateTime date)
+ {
+ if (c.Ruleset != SaveGame.Gdd03Ruleset || o.DebtDollars is not double dollars) return null;
+ var day = FillDate(e, date);
+ return dollars * c.RulesAt(day).Mvp!.IlPerDollarOn(day);
+ }
+
/// <summary>A late-fired event can be resolved after a dated record's window has ended (chapters design 3.2): an
/// effect on a target that no longer exists reaches nothing.</summary>
static bool Reaches(GameState s, string target) => EventRules.SpecialTargets.Contains(target) || s.Indicators.ContainsKey(target);
@@ -282,6 +299,9 @@ namespace Statecraft.Sim
Add(stock ? OptionEffectPreviewKind.Stock : OptionEffectPreviewKind.Amount, fx.Target, fx.Delta,
PlayerText.Change(c, fx.Target, fx.Delta), fx.Target, name, amount);
}
+ if (c.Events.FirstOrDefault(e => e.Options.Contains(o)) is GameEvent owner && DebtFor(c, owner, o, s.Date) is double debt)
+ Add(OptionEffectPreviewKind.Amount, "debt", debt, PlayerText.Change(c, "debt", debt), "debt", PlayerText.Target(c, "debt"),
+ PlayerText.MoneyChange(c, "debt", debt));
foreach (var g in o.GrantUnits)
{
var place = GrantPlace(c, g).Name;
diff --git a/unity/Assets/Tests/EditMode/CauseTextTests.cs b/unity/Assets/Tests/EditMode/CauseTextTests.cs
index c92ca5853..c2daa006d 100644
--- a/unity/Assets/Tests/EditMode/CauseTextTests.cs
+++ b/unity/Assets/Tests/EditMode/CauseTextTests.cs
@@ -251,6 +251,23 @@ public class CauseTextTests
}
}
+ /// <summary>R-EFX-009 (#2457): the Debt line an option's debt_dollars writes (an EventAmount cause on "debt") is worded
+ /// in both languages: English is the Message and starts "Debt"; Hebrew names חוב with the event's amount and title.</summary>
+ [Test]
+ public void TheEventDebtLineIsWordedInBothLanguages()
+ {
+ var debt = new Cause("events", "debt", 18.564, $"{PlayerText.Change(C, "debt", 18.564)} (Bonds)",
+ key: CauseKeys.EventAmount, args: new[] { "Bonds", "אג״ח ישראל" });
+ var en = CauseText.Line(debt, C, NoRows, En);
+ Assert.AreEqual(debt.Message, en);
+ StringAssert.StartsWith("Debt", en);
+ var he = CauseText.Line(debt, C, NoRows, He);
+ StringAssert.Contains("חוב", he);
+ StringAssert.Contains(PlayerText.MoneyChange(C, "debt", 18.564), he);
+ StringAssert.Contains("אג״ח ישראל", he);
+ AssertHebrew(he, debt.Key);
+ }
+
[Test]
public void AResolvedEventUsesItsHistoricalContentSnapshots()
{