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.

New game: the Tel Aviv raid card before the advisors (PR 1 of 2) (#2968)

Eyal Golan6bd744cfbe28
diff --git a/ASSETS.yaml b/ASSETS.yaml
index afa812157..5cde77c82 100644
--- a/ASSETS.yaml
+++ b/ASSETS.yaml
@@ -1857,6 +1857,13 @@ rules:
source: "Veo 3.1 Lite (ElevenLabs), text-to-video (no start frame; the archival photograph was not an input), 16:9, 1080p (1920x1080), 4 s, 24 fps, 96 frames, sound off, prompt enhancer off, generated 2026-11-02 (opening shot O3, take 2, yemen-v2-raw.mp4, not in the repository; 5036220 B, sha256 76867fc673450c4eaeebe9660da3b5a35b3d60af91c72e574c003fcac27fc166). Cleaned 2026-11-02 (owner, 2 Nov 2026: 'Fix it in editing (Recommended)') with ffmpeg 9.0.1, every region fixed for all 96 frames since the camera and the aircraft do not move: a camera tripod in the left foreground (x 0-300, y 640-1070 of the 1920x1080 frame) covered by a feathered copy of the sand beside it in the same frame (x 330-670, y 700-1080; its head by the sand at x 100-220, y 760-840); a US star-and-bar insignia on the rear fuselage (x 1228-1300, y 486-534) covered by one still 100x76 RGBA patch at (1214,472), inpainted (OpenCV Telea) from the raw clip's frame at t=2 s (ffmpeg -ss 2 -i yemen-v2-raw.mp4 -frames:v 1 raw_mid.png; that PNG's sha256 c7156d6fef2ab4ec2493b4aa41b723ee5031ed8db3a67596421099c2c794975c) and given the fine texture of the plain fuselage 74 px to its right, alpha feathered (patch star_patch.png, not in the repository; sha256 468bd4cf258bf4394de1d11aa57c8f2ea410d13126d0e893b5fde6a5f6bea2c9, reproduced byte for byte from that frame with OpenCV 5.0.0 and numpy 2.5.4); an emblem on the fin (x 1408-1442, y 324-362) covered by a feathered copy of the fin 44 px above it. Never a blur; nothing else changed. Cleaned master H.264 CRF 12 (not in the repository; sha256 160dc3c88a12a9871cb0fc51700bb184a4ca1491578d654e21adbec00d8d2e1e), then encoded with tools/encode_event_videos.py's pinned settings (its filter_graph() and FFMPEG_VIDEO: 960x540 Lanczos cover crop, 24 fps, H.264 High CRF 28, no audio, faststart; problems() clean, 96 frames), with no burned-in caption (owner ruling of 2026-10-14: no need to say they were created by AI); re-running that encode on the master gives the same bytes. Encoded file 417857 B, sha256 d7143e1de4a6d9be339552b4e76c33357f6fe330ad90b5828985301106aa70c6"
status: verified
note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13, merged in #449): the generator terms were not checked, by the owner's choice. Owner choice of 2026-11-02: 'B: A + one new Yemen shot (~2,424)'. Take 1 (Veo 3.1 Fast) showed the wrong aircraft, a high-wing turboprop; owner, 2 Nov 2026: 'regenerate with the currect plane', so take 2 asks for the C-54/DC-4 type of the panel's photograph (Commons: Douglas C-54 Skymaster NC67548, Aden, May 1950). Why the cleanup: the tripod is a generation artefact; the Magic Carpet aircraft were civilian charters, so a US military star-and-bar is wrong for them, and the shot's avoid list bans painted emblems. Shown on the opening's Yemen panel after its archival photograph (Benno Rothenberg / Meitar / NLI, CC BY 4.0), labelled 'AI-generated illustration', never in place of it (unity/Assets/UI/Opening/opening.yaml; docs/event-videos.md). A generic unmarked DC-4/C-54-type propliner on a sandy apron, not a reconstruction of NC67548; no mountains, sea or buildings. No identifiable real person: the families are small and seen from behind (frames checked 2026-11-02). SENSITIVE: the owner reviewed the cleaned clip on 2026-11-02 ('Approve it'), so sensitivity_reviewed is true on its opening.yaml clip and a shareable build may carry it (Build.cs). Visual sources for every detail of the prompt: the shot's sourcing table (2 Nov 2026; Wikipedia Operation Magic Carpet (Yemen) oldid 1374658937, the Commons photo above, Jewish Virtual Library, JewishGen KehilaLinks). Prompt: Painterly, hand-painted cinematic look, soft brush texture, filmic 35 mm lens, gentle grain; a muted, warm, low-saturation palette close to an old sepia photograph, soft natural daylight under a pale sky with scattered clouds. Aden airport, 1949-1950: a parked, unmarked, silver Douglas C-54 Skymaster (DC-4) airliner of the 1940s: a long, rounded, cylindrical fuselage; LOW wings attached at the bottom of the fuselage; four round radial piston engines with three-bladed propellers, standing still; a single tall rounded vertical tail fin; tricycle landing gear with a nose wheel, so the fuselage sits level. It stands on a flat, pale, sandy apron that stretches to a low, level horizon, with a plain metal boarding stair against a passenger door at the rear left side of the fuselage. Wide shot, from far behind and slightly to the side: a quiet line of Yemenite Jewish families, small in the frame, walks slowly away from the camera across the sand toward the stair, carrying cloth bundles; they wear long, loose, plain garments and the women wear head coverings. A few other small figures wait in the shade under the wing. The people move calmly and naturally, steps and fabric moving gently. Everyone is seen from behind or far away; faces stay turned away or in shadow; no face is shown in close-up. The aircraft stays parked and does not move; the horizon and every object keep their place; nothing appears or disappears. Camera: locked-off on a tripod, completely static, no pan, no zoom, no shake. Calm, documentary mood. No text, no letters, no numbers, no logos, no watermark. Negative prompt: high wing, high-mounted wings, wings on top of the fuselage, turboprop, military cargo plane, C-130, rear cargo ramp, twin tail, jet, text, letters, numbers, logos, watermark, subtitles, registration numbers, airline name, livery lettering, painted emblem, eagle emblem, flags, signs, Star of David, map, face close-up, frontal faces, recognisable faces, people looking at camera, crowd crush, running, crying, distress, injury, sick people, stretchers, soldiers, guns, armed guards, barbed wire, fence, camp, tents, aircraft moving, taxiing, spinning propellers, propeller morphing, aircraft changing shape, extra engines, jet engines, modern aircraft, modern clothing, modern objects, plastic containers, suitcases with wheels, vehicles appearing, fuel truck, mountains, palm trees, sea, sliding feet, extra limbs, objects changing shape, sudden lighting change, colour flicker"
+ # --- The Tel Aviv raid card's clip on New game (owner, 8 Nov 2026; docs/event-videos.md, "On New game") ---
+ - glob: "unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4"
+ licence: CC0-1.0
+ ai_generated: true
+ source: "Veo 3.1 Lite image-to-video, 720p, 4 s, audio off, count 1, on the site whose runs .superpowers/coordination/handover-1107/opening-film/clips/LOG.md records (its run 2 row 'V19c take1 (start full S9b with crowd)'), generated for the opening film as shot V19c take 1 (V19c-take1.mp4, file date 2026-11-06, not in the repository; 1280x720, 24 fps, 96 frames, 4.0 s, video only, 4897093 B, sha256 5814b30559e20665dda52fa12e59451b4ce4c674c2b947e3d64e1f6cea037f9b). Its start frame is the AI still S9b-take1.png (file date 2026-11-06, made with no reference image, opening-film/stills2/LOG.md; not in the repository; sha256 99769dcfe327670d784b83117cb99e55af542aed58e0b73c42c69176c217cf8d). No photograph was an input. Encoded 2026-11-08 whole (0 to 4.0 s, no cut) with tools/encode_event_videos.py's pinned settings (encode_command(): its filter_graph() and FFMPEG_VIDEO: 960x540 Lanczos cover crop, 24 fps, H.264 High CRF 28 preset slow, GOP 48, no audio, faststart, metadata stripped) under ffmpeg 9.0.1, with no burned-in caption (owner ruling of 2026-10-14: no need to say they were created by AI); problems() clean, 96 frames; a second run gave the same bytes. Encoded file 751972 B, sha256 c61c291029ff75092fb23bd24ecd4a55307612a734338865abf4e74fd0843e3a"
+ status: verified
+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13, merged in #449): the generator terms were not checked, by the owner's choice. Owner, 8 Nov 2026: 'only use the first video and dont cut it after 0.4 seconds', then 'Yes, V19c whole (Recommended)'; these replace the earlier choice 'V19c 0.45 s, then A1+B1 (Recommended)', so the NLI photograph clips A1 and B1 are not in this file. Fact recorded, not argued: opening-film/CLIP-REVIEW-v8.md line 30 records the soldier's camouflage trousers from about 0.5 s, clear by 0.7 s, and a modern-looking white shirt and dark trousers at the right by 0.7 s; the owner was told before choosing. Shown on the New game raid card (unity/Assets/Resources/RaidIntro/raid-intro.yaml), labelled 'AI-generated illustration'. SENSITIVE: people running from a bombing; sensitivity_reviewed is false in raid-intro.yaml, and a player build does not show the card until it is true (RaidCardContent.MayPresent). No gore, no one hurt in view (clips/LOG.md; frames checked 2026-11-08). AI-made faces, no real person. The prompts of S9b and V19c are not recorded verbatim in the logs; the log records only the start frame and the settings."
# --- Decision outcome clips: played once at End Turn for the historical order (docs/event-videos.md; owner ruling D-V) ---
- glob: "unity/Assets/StreamingAssets/video/maabarot_policy-outcome.mp4"
licence: CC0-1.0
diff --git a/changelog.d/c30-tlv-raid-intro.md b/changelog.d/c30-tlv-raid-intro.md
new file mode 100644
index 000000000..06222469e
--- /dev/null
+++ b/changelog.d/c30-tlv-raid-intro.md
@@ -0,0 +1,7 @@
+### Added
+
+- New game now shows a card about the Egyptian air raid on Tel Aviv on the morning of 15 May 1948, after the opening and
+ before the turn 1 advisors, with an AI-generated clip of people running from the bombing (from the opening film) and
+ only an OK button. The card gives the number killed across all the Egyptian air raids on Tel Aviv in the war.
+ Continue and loaded games skip it. It is a draft: only the Editor shows it until the
+ owner's sensitivity review and a native Hebrew read.
diff --git a/docs/ai-disclosure.md b/docs/ai-disclosure.md
index b96d0ea46..4c459f34d 100644
--- a/docs/ai-disclosure.md
+++ b/docs/ai-disclosure.md
@@ -180,6 +180,7 @@ This is not a licence clearance or a completed store content survey. owner-verif
| unity/Assets/StreamingAssets/video/operation_yoav.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W04a, promo/demo3/clips/W04a.mp4, not in the repository; sha256 26bf28dae5b96170057a5b4b894eff2d80c5f81503d53f4affad228055393d91); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with no burned-in caption (owner ruling of 2026-10-14: no need to say they were created by AI); nothing else changed | verified |
| unity/Assets/StreamingAssets/video/reparations_vote.mp4 | ASSETS.yaml | Seedance 2.0 Fast (Dreamina, 1080p, 5 s), image-to-video from the A10 still made in Dreamina with GPT Image 2.5 Sunburst (16:9 1K, the promo still promo/final/03-gameplay-1936.png as style reference, per promo/demo2/PROMPTS.md); the Dreamina AI badge is kept, generated 2026-10-12 (promo shot A10, demo 2, promo/demo2/clips/A10.mp4, not in the repository; sha256 909f5a0693f8ebcea570ff537d77129ffcf6fa03fcedd28356192c31051fe694); encoded 2026-10-31 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with no burned-in caption (owner ruling of 2026-10-14: no need to say they were created by AI); nothing else changed. Encoded file sha256 66b635d4dd31bb3006b5ac631655d44868e10b3283184140b7e0cf4098be2f8c | verified |
| unity/Assets/StreamingAssets/video/ten_days.mp4 | ASSETS.yaml | Veo 3.1 (ElevenLabs), from a GPT Image 2.5 still, generated 2026-10-13 (promo shot J09, promo/demo2/clips-v2/J09.mp4, not in the repository; sha256 7a1242da163d3fae432889643a64abf7fd9eff73d700cad978d30c0c32b6c571); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with no burned-in caption (owner ruling of 2026-10-14: no need to say they were created by AI); nothing else changed | verified |
+| unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4 | ASSETS.yaml | Veo 3.1 Lite image-to-video, 720p, 4 s, audio off, count 1, on the site whose runs .superpowers/coordination/handover-1107/opening-film/clips/LOG.md records (its run 2 row 'V19c take1 (start full S9b with crowd)'), generated for the opening film as shot V19c take 1 (V19c-take1.mp4, file date 2026-11-06, not in the repository; 1280x720, 24 fps, 96 frames, 4.0 s, video only, 4897093 B, sha256 5814b30559e20665dda52fa12e59451b4ce4c674c2b947e3d64e1f6cea037f9b). Its start frame is the AI still S9b-take1.png (file date 2026-11-06, made with no reference image, opening-film/stills2/LOG.md; not in the repository; sha256 99769dcfe327670d784b83117cb99e55af542aed58e0b73c42c69176c217cf8d). No photograph was an input. Encoded 2026-11-08 whole (0 to 4.0 s, no cut) with tools/encode_event_videos.py's pinned settings (encode_command(): its filter_graph() and FFMPEG_VIDEO: 960x540 Lanczos cover crop, 24 fps, H.264 High CRF 28 preset slow, GOP 48, no audio, faststart, metadata stripped) under ffmpeg 9.0.1, with no burned-in caption (owner ruling of 2026-10-14: no need to say they were created by AI); problems() clean, 96 frames; a second run gave the same bytes. Encoded file 751972 B, sha256 c61c291029ff75092fb23bd24ecd4a55307612a734338865abf4e74fd0843e3a | verified |
## Audio
diff --git a/docs/event-videos.md b/docs/event-videos.md
index c8950a42f..d7345dd60 100644
--- a/docs/event-videos.md
+++ b/docs/event-videos.md
@@ -144,6 +144,33 @@ loop, and Yemen has one new shot made for it. All three follow the same rules as
two card clips in the opening on 2 November 2026 ("Approve both") and the Yemen clip the same day ("Approve it"). A
clip needs its caption, and a shareable build refuses a caption whose Hebrew is not `he_review: approved`.
+## On New game
+
+Owner, 8 Nov 2026: "show the bombing of tel aviv differently - as the game starts, show the player the planes coming from
+egypt and bombing tel aviv, and then flying back. then show an event card with an explanation about the bombing and how
+many were killed, with the video we have of people running from the bombing from what we did for the opening video. the
+player only has an option of clicking ok". The owner chose "15 May dawn raid (Recommended)" and "Film, raid, card,
+advisors (Recommended)". For the clip, owner, 8 Nov 2026: "only use the first video and dont cut it after 0.4 seconds",
+then "Yes, V19c whole (Recommended)"; these replace the earlier "V19c 0.45 s, then A1+B1 (Recommended)". For the toll,
+owner, 8 Nov 2026: "show the total number of killed accross all the egyptian raids on tel aviv", so the card gives the
+war's total for all the Egyptian air raids on Tel Aviv, with every figure found on its source list.
+
+- **When.** Only on New game (the start screen's or the top bar's): after the opening, before the turn 1 advisor chain.
+ Continue, a loaded game, the tools' `Begin` and the automated runs never show it (`GameRoot.PlayNewGameIntro`).
+- **The card.** One card in the event-card frame: title, text, the clip and only OK. Esc is the same OK. OK hands over to
+ the advisors. It reads no sim state and changes no number, so the goldens and the content hash cannot move for it.
+- **The content.** `unity/Assets/Resources/RaidIntro/raid-intro.yaml`, read strictly by `RaidCardContent.Parse`: every
+ fact has its source, the claim it supports and the date it was checked, and the Hebrew comes complete or not at all.
+- **The clip.** `tlv_raid_intro.mp4`: the opening film's shot V19c, whole (4.0 s), people running from a bombed street,
+ an AI-only clip (CC0, no photograph in it, so no credit line), looping silently in the card's frame with the cards'
+ `event.ai_label`. No card uses it, so it has no `event-videos.yaml` row; it is encoded with
+ `tools/encode_event_videos.py`'s `encode_command()`, and its `ASSETS.yaml` row records the whole recipe. A clip that fails
+ drops the frame and keeps the text and OK; with video off there is no frame.
+- **The gate.** A player build shows the card only when `status` is `sensitivity-reviewed`, every source is checked, the
+ Hebrew is `he_review: approved` and the clip is `sensitivity_reviewed: true` (`RaidCardContent.MayPresent`). The Editor
+ shows the draft with the opening's preview label. `tools/tests/test_raid_intro_sources.py` checks the sources, the
+ `ASSETS.yaml` row (AI-generated, CC0, verified), the `docs/ai-disclosure.md` line and that the card has no credit line.
+
## Where things are
| What | Where |
diff --git a/tools/tests/test_raid_intro_sources.py b/tools/tests/test_raid_intro_sources.py
new file mode 100644
index 000000000..cf7662c72
--- /dev/null
+++ b/tools/tests/test_raid_intro_sources.py
@@ -0,0 +1,138 @@
+"""The New game raid card's sources and clip record (owner, 8 Nov 2026, "15 May dawn raid (Recommended)"): every source
+has its url, the claim it supports and the date a person checked it; the Hebrew is complete or absent; the clip names a
+file in StreamingAssets/video whose ASSETS.yaml row marks it ai_generated, CC0 (an AI-only clip, decision D1; owner, 8 Nov
+2026: "Yes, V19c whole (Recommended)"), verified and listed in docs/ai-disclosure.md; the card carries no credit line for
+it. The draft is not shareable: RaidCardContent
+(unity/Assets/Scripts/UI/RaidCardContent.cs) shows it only in the Editor until every review below is done.
+"""
+import copy
+from datetime import date
+from pathlib import Path
+
+import yaml12
+
+REPO = Path(__file__).resolve().parents[2]
+CARD = REPO / "unity/Assets/Resources/RaidIntro/raid-intro.yaml"
+VIDEO = REPO / "unity/Assets/StreamingAssets/video"
+
+
+def actual():
+ return yaml12.load(CARD.read_text(encoding="utf-8"))
+
+
+def assets_rules():
+ return yaml12.load((REPO / "ASSETS.yaml").read_text(encoding="utf-8"))["rules"]
+
+
+def source_problems(doc):
+ result = []
+ if not doc.get("sources"):
+ result.append("sources required")
+ for i, source in enumerate(doc.get("sources", []), 1):
+ if not source.get("url") or not source.get("supports"):
+ result.append(f"source {i}: URL and supported claim required")
+ checked = str(source.get("checked", ""))
+ try:
+ if date.fromisoformat(checked).isoformat() != checked:
+ raise ValueError(checked)
+ except ValueError:
+ result.append(f"source {i}: a person must add checked: YYYY-MM-DD")
+ fields = [doc.get("title_he"), doc.get("text_he"), doc.get("he_review")]
+ if any(f is not None for f in fields) and not all(isinstance(f, str) and f.strip() for f in fields):
+ result.append("the Hebrew comes complete or not at all (title_he, text_he, he_review)")
+ return result
+
+
+def shareable_problems(doc):
+ """What a player build still needs (the C# Reviewed rule, restated for the Python checks)."""
+ result = []
+ if doc.get("status") != "sensitivity-reviewed":
+ result.append("the card needs the owner's sensitivity review")
+ if doc.get("he_review") != "approved":
+ result.append("the Hebrew needs a native read (he_review: approved)")
+ if doc.get("clip", {}).get("sensitivity_reviewed") is not True:
+ result.append("the clip needs the owner's sensitivity review")
+ return result
+
+
+def clip_problems(doc, rules, disclosure):
+ clip = doc.get("clip", {})
+ name = clip.get("file", "")
+ path = f"unity/Assets/StreamingAssets/video/{name}"
+ if not (VIDEO / name).is_file():
+ return [f"{name} is not in StreamingAssets/video"]
+ row = next((r for r in rules if r.get("glob") == path), None)
+ if row is None:
+ return [f"{path} has no ASSETS.yaml row"]
+ result = []
+ if row.get("ai_generated") is not True or row.get("status") != "verified" or row.get("licence") != "CC0-1.0":
+ result.append(f"{path}: its row needs ai_generated: true, licence: CC0-1.0 (AI-only, decision D1) and status: verified")
+ if "credit" in clip:
+ result.append(f"{path}: the AI-only clip takes no credit line on the card")
+ if f"| {path} | ASSETS.yaml |" not in disclosure:
+ result.append(f"docs/ai-disclosure.md does not list {path}")
+ return result
+
+
+def clip_inputs():
+ return assets_rules(), (REPO / "docs/ai-disclosure.md").read_text(encoding="utf-8")
+
+
+def test_the_real_card_has_its_sources_and_hebrew():
+ assert source_problems(actual()) == []
+
+
+def test_the_real_card_is_a_draft_that_is_not_shareable():
+ assert actual()["status"] == "draft"
+ assert set(shareable_problems(actual())) == {
+ "the card needs the owner's sensitivity review",
+ "the Hebrew needs a native read (he_review: approved)",
+ "the clip needs the owner's sensitivity review"}
+
+
+def test_a_reviewed_fixture_is_shareable():
+ """Only an in-memory fixture: this test never writes review markers to disk."""
+ doc = copy.deepcopy(actual())
+ doc["status"], doc["he_review"] = "sensitivity-reviewed", "approved"
+ doc["clip"]["sensitivity_reviewed"] = True
+ assert shareable_problems(doc) == []
+
+
+def test_missing_impossible_and_short_dates_are_not_checks():
+ for bad in (None, "", "2026-02-30", "2026-11-8", "yesterday"):
+ doc = copy.deepcopy(actual())
+ if bad is None:
+ del doc["sources"][0]["checked"]
+ else:
+ doc["sources"][0]["checked"] = bad
+ assert "source 1: a person must add checked: YYYY-MM-DD" in source_problems(doc), bad
+
+
+def test_a_source_without_its_claim_and_partial_hebrew_fail():
+ doc = copy.deepcopy(actual())
+ del doc["sources"][1]["supports"]
+ del doc["text_he"]
+ assert source_problems(doc) == ["source 2: URL and supported claim required",
+ "the Hebrew comes complete or not at all (title_he, text_he, he_review)"]
+
+
+def test_the_real_clip_has_its_provenance():
+ assert clip_problems(actual(), *clip_inputs()) == []
+
+
+def test_a_clip_without_its_row_or_disclosure_or_with_a_credit_fails():
+ rules, disclosure = clip_inputs()
+ path = "unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4"
+ assert clip_problems(actual(), [r for r in rules if r.get("glob") != path], disclosure) == \
+ [f"{path} has no ASSETS.yaml row"]
+ assert clip_problems(actual(), rules, disclosure.replace(f"| {path} | ASSETS.yaml |", "")) == \
+ [f"docs/ai-disclosure.md does not list {path}"]
+ cc_by = [dict(r, licence="CC-BY-4.0") if r.get("glob") == path else r for r in rules]
+ assert clip_problems(actual(), cc_by, disclosure) == \
+ [f"{path}: its row needs ai_generated: true, licence: CC0-1.0 (AI-only, decision D1) and status: verified"]
+ doc = copy.deepcopy(actual())
+ doc["clip"]["credit"] = "anything"
+ assert clip_problems(doc, rules, disclosure) == [f"{path}: the AI-only clip takes no credit line on the card"]
+ doc = copy.deepcopy(actual())
+ doc["clip"]["file"] = "no_such_clip.mp4"
+ assert clip_problems(doc, rules, disclosure) == ["no_such_clip.mp4 is not in StreamingAssets/video"]
diff --git a/unity/Assets/Resources/RaidIntro.meta b/unity/Assets/Resources/RaidIntro.meta
new file mode 100644
index 000000000..65ab07242
--- /dev/null
+++ b/unity/Assets/Resources/RaidIntro.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: edf0227548d8428e9ca670fa5272df4a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/unity/Assets/Resources/RaidIntro/raid-intro.yaml b/unity/Assets/Resources/RaidIntro/raid-intro.yaml
new file mode 100644
index 000000000..7af57a8e6
--- /dev/null
+++ b/unity/Assets/Resources/RaidIntro/raid-intro.yaml
@@ -0,0 +1,64 @@
+# The Tel Aviv raid card on New game (owner, 8 Nov 2026): after the opening and before the turn 1 advisor chain, a
+# card that explains the Egyptian air raid on Tel Aviv on the morning the game starts and how many were killed, with
+# the opening film's clip of people running from the bombing, and only an OK button. The owner chose the options
+# labelled "15 May dawn raid (Recommended)" and "Film, raid, card, advisors (Recommended)"; for the clip, owner, 8 Nov
+# 2026: "only use the first video and dont cut it after 0.4 seconds", then "Yes, V19c whole (Recommended)", which
+# replace the earlier "V19c 0.45 s, then A1+B1 (Recommended)". For the toll, owner, 8 Nov 2026: "show the total number
+# of killed accross all the egyptian raids on tel aviv", so the card gives the war's total, not 15 May's. Presentation only: it reads no sim state, changes no
+# number and is not game content (RaidCardContent; docs/event-videos.md, "On New game").
+# A player build shows it only once status is sensitivity-reviewed, every source is checked, the Hebrew is approved by
+# a native read and the clip has the owner's sensitivity review (RaidCardContent.MayPresent); the Editor shows the
+# draft with the opening's preview label.
+# For the native reviewer (#564): agent-drafted Hebrew. Names as the game and he.wiki write them: שדה דב (he.wiki
+# "נמל התעופה דב הוז"), ספיטפייר and נ״מ (he.wiki, with the typographic gershayim of HE-06), התחנה המרכזית הישנה (the
+# NLI records' own title), dates as date.day_month_year ("15 במאי 1948"); no parentheses or quotation marks, and no
+# Latin letters (HE-09).
+status: draft
+title: "Egyptian planes bomb Tel Aviv"
+title_he: "מטוסים מצריים מפציצים את תל אביב"
+text: "Early on the morning of 15 May 1948, the day after independence was declared, Egyptian Spitfires attacked Tel Aviv. They bombed the Sde Dov airfield in the north of the city and damaged aircraft and buildings there. Anti-aircraft fire brought down one of the attackers, and its pilot was taken prisoner. Bombs also hit the old Central Bus Station, and more raids followed that day. Across all the Egyptian air raids on Tel Aviv in the war, 172 people were killed, most of them civilians."
+text_he: "בשעות הבוקר המוקדמות של 15 במאי 1948, יום לאחר הכרזת העצמאות, תקפו מטוסי ספיטפייר מצריים את תל אביב. הם הפציצו את שדה התעופה שדה דב בצפון העיר וגרמו שם נזק למטוסים ולמבנים. אש נ״מ הפילה את אחד המטוסים התוקפים, וטייסו נלקח בשבי. פצצות פגעו גם בתחנה המרכזית הישנה, ובמהלך היום באו פשיטות נוספות. בכל הפשיטות האוויריות המצריות על תל אביב במהלך המלחמה נהרגו 172 בני אדם, רובם אזרחים."
+he_review: pending
+# The toll (owner: the total across all the Egyptian raids on Tel Aviv): 172 killed, from Naor (2008), the one read
+# source with a footnote, which cites the Civil Guard's comprehensive summary of the bombings in Tel Aviv (Tel Aviv
+# Municipality Archive 4/408). It covers both waves of raids: 15 May to the First Truce on 11 June, and the Ten Days
+# from 9 July, so it includes the 18 May bus-station raid. he.wiki gives "150 ויותר" with no footnote, en.wiki 150
+# citing the NLI blog (403 to a reader on 2026-11-08), and Walla "כ-150" with no source. 172 is within he.wiki's "150
+# and more". The 15 May raid's own toll is left off: he.wiki's 5 killed and 9 wounded has no footnote, UPI that day
+# reports no casualties, and the NYT's five killed (17 May 1948) are for 16 May.
+sources:
+ - url: "https://he.wikipedia.org/wiki/נמל_התעופה_דב_הוז"
+ supports: "'ב-15 במאי 1948, מיד לאחר הכרזת המדינה וראשית הפלישה המצרית, תקפו ארבעה מטוסי ספיטפייר מצריים את השדה וגרמו נזק למטוסים ולמבנים'; 'אחד מהמטוסים התוקפים הופל באש נ\"מ וטייסו נלקח בשבי'; 'בהתקפה נהרגו חמישה אנשים ונפצעו תשעה.' (no footnote on the paragraph)"
+ checked: 2026-11-08
+ - url: "https://he.wikipedia.org/wiki/תל_אביב_במלחמת_העצמאות"
+ supports: "'ב-15 במאי 1948, ביום שלאחר הכרזת העצמאות', Egyptian Spitfires attacked the Sde Dov airfield 'במספר גיחות שהחלו בשעות הבוקר המוקדמות'; 'בהתקפה נהרגו חמישה אנשים ונפצעו תשעה'; for all the raids, 'סה\"כ גרמו ההפצצות למותם של 150 איש ויותר', 'כ-130 מתוכם היו אזרחים' (no footnote on that paragraph); the 18 May raid on the central bus station 'גרמו ל-42 הרוגים'"
+ checked: 2026-11-08
+ - url: "https://ismi.emory.edu/documents/Readings/Naor_Moshe.pdf"
+ supports: "Moshe Naor, 'Israel's 1948 War of Independence as a Total War', Journal of Contemporary History 43(2), 2008, p. 254 (doi 10.1177/0022009408089031): 'In Tel Aviv, 172 people, most of them civilians, were killed as a result of the air raids, and 321 were injured.' (dash replaced by commas), footnote 58: 'The Civil Guard, Account of the Bombings in Tel Aviv, Comprehensive Summary, Tel Aviv Municipality Archive 4/408'; the raids are those of the Egyptian air force from 15 May to the First Truce on 11 June and in the Ten Days from 9 July"
+ checked: 2026-11-08
+ - url: "https://en.wikipedia.org/wiki/Egyptian_airstrike_on_the_Old_Tel_Aviv_central_bus_station"
+ supports: "'a bombing campaign by Egyptian forces in Tel Aviv that killed 150 people in total', citing the NLI blog 'When the Egyptians Bombed Tel Aviv' (2020), which answered 403 when read on 2026-11-08; 42 killed in the 18 May raid"
+ checked: 2026-11-08
+ - url: "https://www.walla.co.il/news/military/3821651"
+ supports: "Eli Ashkenazi, Walla: 'כ-150 תושבי תל אביב נהרגו בהפצצות חסרות האבחנה של המצרים', over 'קרוב לחודשיים'; it names no source"
+ checked: 2026-11-08
+ - url: "https://www.upi.com/Archives/1948/05/15/Arab-nations-Attack-Israel/6118818754330"
+ supports: "UPI, 15 May 1948: 'The first Egyptian air raid on Tel Aviv came early today.'; a second attack 'within two hours' bombed 'the airport just north of this new Jewish capital'; a third raid before noon; 'one Egyptian pilot was taken prisoner'. It reports no casualties ('Little damage resulted.')"
+ checked: 2026-11-08
+ - url: "https://commons.wikimedia.org/wiki/File:Tel_Aviv-Yafo_(997008136796305171).jpg"
+ supports: "NLI record 997008136796305171, taken on 15 May 1948 (Benno Rothenberg): 'אוטובוס מפויח של חברת דן בתחנה המרכזית הישנה בת\"א לאחר שהופגזה ע\"י מטוסים מצריים בעקבות הכרזת העצמאות'. The NLI blog and en.wiki put the bus-station raid on 18 May; owner, 7 Nov 2026: keep, go by the record"
+ checked: 2026-11-08
+ - url: "https://commons.wikimedia.org/wiki/File:Tel_Aviv-Yafo_(997008136796105171).jpg"
+ supports: "NLI record 997008136796105171, taken on 15 May 1948 (Benno Rothenberg): 'עשן מיתמר מהתחנה המרכזית הישנה בת\"א לאחר שהופגזה ע\"י מטוסים מצריים בעקבות הכרזת העצמאות'"
+ checked: 2026-11-08
+# The clip: the opening film's shot V19c, whole (0 to 4.0 s), an AI-only clip (CC0; ASSETS.yaml has the recipe). It
+# loops silently in the card's frame, labelled with the cards' "AI-generated illustration" string; with no photograph
+# in it, it has no credit line. CLIP-REVIEW-v8.md records the soldier's camouflage trousers from about 0.5 s.
+clip:
+ file: tlv_raid_intro.mp4
+ alt: "Illustration: people run down a street from a bomb-damaged white building as smoke rises, a man carrying a child, a woman and a soldier, past rubble, an old car and a palm."
+ alt_he: "המחשה: אנשים רצים ברחוב מבניין לבן שנפגע בהפצצה ועשן מיתמר, גבר נושא ילד, אישה וחייל, על פני הריסות, מכונית ישנה ועץ דקל."
+ alt_he_review: agent-checked
+ ai_generated: true
+ sensitive: true
+ sensitivity_reviewed: false
diff --git a/unity/Assets/Resources/RaidIntro/raid-intro.yaml.meta b/unity/Assets/Resources/RaidIntro/raid-intro.yaml.meta
new file mode 100644
index 000000000..9c2196882
--- /dev/null
+++ b/unity/Assets/Resources/RaidIntro/raid-intro.yaml.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 525bcd0e52b94a86afbf53ae66a338d6
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/unity/Assets/Scripts/UI/AdvisorPresenter.cs b/unity/Assets/Scripts/UI/AdvisorPresenter.cs
index c5c1115c3..9475a2f6a 100644
--- a/unity/Assets/Scripts/UI/AdvisorPresenter.cs
+++ b/unity/Assets/Scripts/UI/AdvisorPresenter.cs
@@ -197,11 +197,11 @@ namespace Statecraft.Game.UI
/// Covered(hudRoot) alone misses Settings, and Next's focus would steal the screen's own (#1915).</summary>
bool ScreenOpen() => Covered(hudRoot) || hudRoot.ClassListContains(ScreenNav.ScreenOpenClass);
- /// <summary>A modal layer is open (spec 4.2): the start screen, the opening (#530), the open decision card, the capture
+ /// <summary>A modal layer is open (spec 4.2): the start screen, the opening (#530), the raid card on New game, the open decision card, the capture
/// dialog, the turn report, an outcome clip, the end screen; and, on the two-row HUD, any side screen (it takes the full width).</summary>
public static bool Covered(VisualElement hudRoot) =>
hudRoot.ClassListContains(StartScreenPresenter.OpenClass) || hudRoot.ClassListContains(OpeningPresenter.OpenClass)
- || hudRoot.ClassListContains(EventCardPresenter.OpenClass)
+ || hudRoot.ClassListContains(RaidCardPresenter.OpenClass) || hudRoot.ClassListContains(EventCardPresenter.OpenClass)
|| hudRoot.ClassListContains(CaptureDialogPresenter.OpenClass) || hudRoot.ClassListContains(TurnReportPresenter.OpenClass)
|| hudRoot.ClassListContains(OutcomePresenter.OpenClass) || hudRoot.ClassListContains(EndScreenPresenter.OpenClass)
|| (hudRoot.ClassListContains(HudPresenter.TwoRowClass) && hudRoot.ClassListContains(ScreenNav.ScreenOpenClass));
@@ -652,7 +652,7 @@ namespace Statecraft.Game.UI
}
bool HardMediaCover() => hudRoot.ClassListContains(StartScreenPresenter.OpenClass) || hudRoot.ClassListContains(OpeningPresenter.OpenClass)
- || hudRoot.ClassListContains(EventCardPresenter.OpenClass)
+ || hudRoot.ClassListContains(RaidCardPresenter.OpenClass) || hudRoot.ClassListContains(EventCardPresenter.OpenClass)
|| hudRoot.ClassListContains(CaptureDialogPresenter.OpenClass) || hudRoot.ClassListContains(TurnReportPresenter.OpenClass)
|| hudRoot.ClassListContains(OutcomePresenter.OpenClass) || hudRoot.ClassListContains(EndScreenPresenter.OpenClass)
|| hudRoot.ClassListContains(FeedbackPresenter.OpenClass) || hudRoot.ClassListContains(SharePresenter.OpenClass);
diff --git a/unity/Assets/Scripts/UI/GameRoot.cs b/unity/Assets/Scripts/UI/GameRoot.cs
index f3a87c3ef..36c95a9c7 100644
--- a/unity/Assets/Scripts/UI/GameRoot.cs
+++ b/unity/Assets/Scripts/UI/GameRoot.cs
@@ -61,6 +61,7 @@ namespace Statecraft.Game.UI
NavigationGuard? navGuard;
StartScreenPresenter? start;
OpeningPresenter? opening;
+ RaidCardPresenter? raid;
EventCardPresenter? card;
/// <summary>Tests: the decision card of the last Begin.</summary>
internal EventCardPresenter? Card => card;
@@ -142,6 +143,9 @@ namespace Statecraft.Game.UI
/// <summary>The opening (#530) outside Play mode: off by default, so EditMode tests that press New Game meet the advisors
/// as a player's first game does; the opening's own tests set it.</summary>
internal bool OpeningInEditMode { get; set; }
+ /// <summary>The Tel Aviv raid card on New game outside Play mode: off by default, as OpeningInEditMode; its own tests
+ /// set it.</summary>
+ internal bool RaidCardInEditMode { get; set; }
/// <summary>The start menu's music (#39) outside Play mode: off by default, so EditMode tests stay silent and fetch
/// nothing; its wiring test sets it.</summary>
internal bool MenuMusicInEditMode { get; set; }
@@ -286,6 +290,9 @@ namespace Statecraft.Game.UI
// where a test asks for it with the start screen (OpeningInEditMode).
bool enableOpening = smoke == 0 && !StartScreenPresenter.Skipped()
&& (Application.isPlaying || startScreen && OpeningInEditMode);
+ // The raid card on New game, likewise (RaidCardInEditMode).
+ bool enableRaid = smoke == 0 && !StartScreenPresenter.Skipped()
+ && (Application.isPlaying || startScreen && RaidCardInEditMode);
// A companion this Begin runs again keeps the page's panel until its replacement publishes (WebCompanion.Dispose).
Shutdown(keepCompanionPage: companion != null && CompanionWanted());
smokeRun = smoke > 0;
@@ -533,7 +540,7 @@ namespace Statecraft.Game.UI
if (smoke == 0) Own(new AchievementReporter(bridge, () => PlatformServices.Current));
// An outcome clip holds the pointer while it shows and in the frame it closes (the skipping click selects no hex).
- Func<Vector2, bool> overUi = p => opening?.HoldsThePointer == true || outcomes?.HoldsThePointer == true || UiPointer.IsOverUi(root.panel, p, Screen.height);
+ Func<Vector2, bool> overUi = p => opening?.HoldsThePointer == true || raid?.HoldsThePointer == true || outcomes?.HoldsThePointer == true || UiPointer.IsOverUi(root.panel, p, Screen.height);
var terrain = map.Terrain;
var size = terrain.terrainData.size;
var oldBounds = cameraController.Bounds;
@@ -666,7 +673,7 @@ namespace Statecraft.Game.UI
// the start screen. Closing the scene disposes it after the camera is gone, hence the null check.
opening = Own(new OpeningPresenter(root, openingSource, openingData, text,
shown => { if (cameraController != null) cameraController.enabled = !shown && start?.IsOpen != true; },
- replay => { if (!replay) advisor?.NewGame(); },
+ replay => { if (!replay) PlayNewGameIntro(); },
video == null ? null : Own(new CardVideo()))); // its own player: no clip in the automated runs either
replayOpening.text = text["opening.replay"];
replayOpening.style.display = DisplayStyle.Flex;
@@ -675,6 +682,22 @@ namespace Statecraft.Game.UI
owned.Add(new Undo(() => replayOpening.clicked -= replayClick));
}
}
+ // The Tel Aviv raid card (owner, 8 Nov 2026, "Film, raid, card, advisors (Recommended)"): on New game only, after
+ // the opening and before the turn 1 advisor chain, which its OK starts (PlayNewGameIntro). It reads no sim state.
+ // A player build shows it only once it is reviewed (RaidCardContent.MayPresent); the Editor shows the labelled draft.
+ if (enableRaid && RaidCardContent.Load() is RaidCardContent.Document raidData)
+ {
+#if UNITY_EDITOR
+ const bool raidPreview = true;
+#else
+ const bool raidPreview = false;
+#endif
+ if (RaidCardContent.MayPresent(raidData, raidPreview))
+ raid = Own(new RaidCardPresenter(root, raidData, text,
+ shown => { if (cameraController != null) cameraController.enabled = !shown && start?.IsOpen != true; },
+ () => advisor?.NewGame(),
+ video == null ? null : Own(new CardVideo()))); // its own player: no clip in the automated runs either
+ }
// The start screen goes up in the same frame the loading state ends, so the HUD never flashes before it. While it
// shows, the camera keys are off (keyboard pan would otherwise move the hidden map; plan amendment A4).
if (showsStart) // newGame is made above whenever smoke == 0
@@ -686,7 +709,7 @@ namespace Statecraft.Game.UI
{
if (cam != null) cam.enabled = !shown;
music?.Show(shown); // loops on the menu, fades out as a game starts
- if (!shown) { if (start?.Resumed != false) advisor?.Resume(); else if (opening == null) advisor?.NewGame(); }
+ if (!shown) { if (start?.Resumed != false) advisor?.Resume(); else if (opening == null) PlayNewGameIntro(); }
}, recording, text, SettingsFile(), switchLanguage));
start.Show();
}
@@ -779,7 +802,7 @@ namespace Statecraft.Game.UI
{
// The start screen's no-save New Game has no Started; its closing already starts the advisors when there
// is no opening, so that route only plays the opening.
- Action freshGame = () => { if (opening != null) opening.Show(replay: false); else advisor?.NewGame(); };
+ Action freshGame = () => { if (opening != null) opening.Show(replay: false); else PlayNewGameIntro(); };
Action freshOpened = () => opening?.Show(replay: false);
// #2712: a New Game keeps the map, so the camera goes back to the opening view here, as MapScene.Build sets it
// at boot: Tel Aviv and Jaffa in frame at the start zoom.
@@ -1056,6 +1079,16 @@ namespace Statecraft.Game.UI
internal static void ConfigureCameraHeading(CameraController controller, string ruleset) =>
controller.SetFixedNorth(CameraHeadingPolicy.IsFixedNorth(ruleset));
+ /// <summary>What a new game plays after its opening, or at once without one (owner, 8 Nov 2026, "Film, raid, card,
+ /// advisors (Recommended)"): the raid card, whose OK starts the turn 1 advisor chain; the chain at once when there is no
+ /// card. Never on Continue or a load (the start screen's close calls Resume then). New game can report one game twice
+ /// (the start screen's close and Started); RaidCardPresenter.Show and AdvisorPresenter.NewGame both ignore the second.</summary>
+ void PlayNewGameIntro()
+ {
+ if (raid != null) raid.Show();
+ else advisor?.NewGame();
+ }
+
/// <summary>Disposes every presenter, the autosave and the camera/pointer hooks (newest first). Safe to call twice.</summary>
/// <param name="keepCompanionPage">A rebuild whose next companion replaces the page's panel: the old one goes without
/// clearing it, so the panel does not blink, the canvas is not resized twice and the status is not read again.</param>
@@ -1074,7 +1107,7 @@ namespace Statecraft.Game.UI
owned.Clear();
savePersistenceResult = null;
if (hoveredCity != null) { hoveredCity = null; HandCursor(false); } // the next Begin's pills start unlit
- companion = null; minimap = null; unseenSkipped = null; labels = null; nav = null; start = null; opening = null; card = null; outcomes = null; report = null; end = null; advisor = null; cabinet = null; budgetScreen = null; newGame = null; encyclopedia = null; feedback = null; share = null; info = null; rig = null; drawn = null; drawnSites = null; units = null; Regions = null; logCamera = false;
+ companion = null; minimap = null; unseenSkipped = null; labels = null; nav = null; start = null; opening = null; raid = null; card = null; outcomes = null; report = null; end = null; advisor = null; cabinet = null; budgetScreen = null; newGame = null; encyclopedia = null; feedback = null; share = null; info = null; rig = null; drawn = null; drawnSites = null; units = null; Regions = null; logCamera = false;
// A ?profile run cut short (a stopped coroutine never reaches its restore line) must not leave the terrain at the
// profile's pixel error (Task 24 review M1). Nothing else changes it, so restoring is always right.
if (map != null && map.Terrain != null) map.Terrain.heightmapPixelError = MapBuilder.TerrainPixelError;
@@ -1220,6 +1253,9 @@ namespace Statecraft.Game.UI
// A reviewed opening is part of the normal media path: the instrument uses its actual Skip control.
if (hud.ClassListContains(OpeningPresenter.OpenClass)
&& !Press(root.Q<Button>("opening-skip"), s => log(s.Replace("SMOKE FAIL", "FIRST CARD FAIL")))) yield break;
+ // So is the raid card after it (RaidCardPresenter): its only control, OK.
+ if (hud.ClassListContains(RaidCardPresenter.OpenClass)
+ && !Press(root.Q<Button>("raid-ok"), s => log(s.Replace("SMOKE FAIL", "FIRST CARD FAIL")))) yield break;
while (now() - began <= FirstCardBudgetSeconds)
{
var option = root.Q<VisualElement>("event-options")?.Q<Button>();
@@ -1260,11 +1296,12 @@ namespace Statecraft.Game.UI
// takes the Cancel event when it has the focus), and so on the open capture dialog (CaptureDialogPresenter.Escape),
// which shows only while the card does not.
// The report panel (#1169) and the share panel (#1170) are over everything: their Escape goes no further.
- // Nor does the opening's (#530), over all but those two, in the frame it closes too.
+ // Nor does the opening's (#530), over all but those two, in the frame it closes too; nor the raid card's after it (its OK).
// Nor does the advisors' popup's, with the focus inside it (AdvisorPresenter.Escape, also in the frame its Cancel closed it).
if (UnityEngine.InputSystem.Keyboard.current?.escapeKey.wasPressedThisFrame == true
&& feedback?.Escape() != true && share?.Escape() != true && advisor?.Escape() != true
- && opening?.ClosedThisFrame != true && opening?.Escape() != true)
+ && opening?.ClosedThisFrame != true && opening?.Escape() != true
+ && raid?.ClosedThisFrame != true && raid?.Escape() != true)
{
bool done = outcomes?.SkipAll() == true || outcomes?.ClosedThisFrame == true;
if (!done) done = advisor?.CloseOverlay() == true || advisor?.OverlayClosedThisFrame == true;
diff --git a/unity/Assets/Scripts/UI/KeyScroll.cs b/unity/Assets/Scripts/UI/KeyScroll.cs
index a433a94a6..0d3133171 100644
--- a/unity/Assets/Scripts/UI/KeyScroll.cs
+++ b/unity/Assets/Scripts/UI/KeyScroll.cs
@@ -47,6 +47,7 @@ namespace Statecraft.Game.UI
static ScrollView? Target(VisualElement root, string? screen, bool cardOpen)
{
if ((root.Q("root") ?? root).ClassListContains(OpeningPresenter.OpenClass)) return root.Q<ScrollView>("opening-scroll");
+ if ((root.Q("root") ?? root).ClassListContains(RaidCardPresenter.OpenClass)) return root.Q<ScrollView>("raid-scroll");
if ((root.Q("root") ?? root).ClassListContains(StartScreenPresenter.OpenClass)) return null;
// Topmost first, the order Escape closes them in (GameRoot.Update): the ending is over the turn report, and both
// cover the screens, the card, the capture dialog and the info panel (ScreenNav.DisableCovered).
diff --git a/unity/Assets/Scripts/UI/RaidCardContent.cs b/unity/Assets/Scripts/UI/RaidCardContent.cs
new file mode 100644
index 000000000..362b7350e
--- /dev/null
+++ b/unity/Assets/Scripts/UI/RaidCardContent.cs
@@ -0,0 +1,102 @@
+#nullable enable
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+using UnityEngine;
+using YamlDotNet.Serialization;
+using YamlDotNet.Serialization.NamingConventions;
+
+namespace Statecraft.Game.UI
+{
+ /// <summary>The Tel Aviv raid card's text, sources and clip (Resources/RaidIntro/raid-intro.yaml; owner, 8 Nov 2026,
+ /// "15 May dawn raid (Recommended)"). Presentation only, like the opening (#530): not game content, no sim event, no
+ /// number, no save. A strict reader: unknown or repeated fields, a source without its claim, a clip not labelled as an
+ /// AI illustration or Hebrew that is not complete fail closed.</summary>
+ public static class RaidCardContent
+ {
+ public const string ResourcePath = "RaidIntro/raid-intro";
+ public const string SourcePath = "Assets/Resources/RaidIntro/raid-intro.yaml";
+
+ public sealed class Clip
+ {
+ public string File { get; set; } = "";
+ public string Alt { get; set; } = "";
+ public string AltHe { get; set; } = "";
+ public string AltHeReview { get; set; } = "";
+ public bool AiGenerated { get; set; }
+ public bool Sensitive { get; set; }
+ public bool SensitivityReviewed { get; set; }
+ }
+
+ public sealed class Document
+ {
+ public string Status { get; set; } = "";
+ public string Title { get; set; } = "";
+ public string? TitleHe { get; set; }
+ public string Text { get; set; } = "";
+ public string? TextHe { get; set; }
+ public string? HeReview { get; set; }
+ public List<OpeningContent.Source> Sources { get; set; } = new List<OpeningContent.Source>();
+ public Clip Clip { get; set; } = new Clip();
+ public bool HasHebrew => !string.IsNullOrWhiteSpace(TitleHe) && !string.IsNullOrWhiteSpace(TextHe)
+ && !string.IsNullOrWhiteSpace(HeReview);
+ public bool HebrewApproved => HasHebrew && HeReview == OpeningContent.HeApproved;
+ /// <summary>What a player build needs: the reviewed status, every source checked, the Hebrew read by a native
+ /// speaker who did not write it, and the owner's sensitivity review of the clip.</summary>
+ public bool Reviewed => Status == Statecraft.Sim.ReleaseGate.ReviewedStatus && Sources.Count > 0
+ && Sources.All(s => s.IsChecked) && HebrewApproved && Clip.SensitivityReviewed;
+ }
+
+ public static Document Parse(string yaml)
+ {
+ Document? doc;
+ try
+ {
+ doc = new DeserializerBuilder().WithNamingConvention(UnderscoredNamingConvention.Instance)
+ .WithDuplicateKeyChecking().Build().Deserialize<Document>(yaml ?? "");
+ }
+ catch (YamlDotNet.Core.YamlException e) { throw new InvalidOperationException(SourcePath + ": " + e.Message, e); }
+ if (doc == null || string.IsNullOrWhiteSpace(doc.Title) || string.IsNullOrWhiteSpace(doc.Text) || doc.Clip == null)
+ throw new InvalidOperationException(SourcePath + ": title, text and clip are required");
+ if (doc.Sources == null || doc.Sources.Count == 0 || doc.Sources.Any(s => s == null
+ || string.IsNullOrWhiteSpace(s.Url) || string.IsNullOrWhiteSpace(s.Supports)))
+ throw new InvalidOperationException(SourcePath + ": every fact needs a source with its url and what it supports");
+ bool anyHebrew = doc.TitleHe != null || doc.TextHe != null || doc.HeReview != null;
+ if (anyHebrew && !doc.HasHebrew)
+ throw new InvalidOperationException(SourcePath + ": the Hebrew comes complete or not at all (title_he, text_he, he_review)");
+ if (doc.HeReview != null && doc.HeReview != OpeningContent.HePending && doc.HeReview != OpeningContent.HeApproved)
+ throw new InvalidOperationException(SourcePath + ": he_review must be " + OpeningContent.HePending + " or "
+ + OpeningContent.HeApproved);
+ if (ClipProblem(doc.Clip) is string problem) throw new InvalidOperationException(SourcePath + ": clip: " + problem);
+ return doc;
+ }
+
+ /// <summary>Why the clip row is malformed, or null (the event-videos.yaml and opening.yaml clip rules): a bare .mp4
+ /// name in StreamingAssets/video, an alt text that says it is an illustration, Hebrew alt text marked agent-checked
+ /// where present, ai_generated, and sensitive (the aftermath of a raid that killed
+ /// people).</summary>
+ static string? ClipProblem(Clip clip)
+ {
+ if (!Regex.IsMatch(clip.File ?? "", "^[a-z0-9_-]+\\.mp4$"))
+ return "file must be the bare name of an .mp4 in StreamingAssets/video (got '" + clip.File + "')";
+ if (clip.Alt == null || !clip.Alt.StartsWith("Illustration: ", StringComparison.Ordinal) || clip.Alt.Length < 30)
+ return "alt text must start 'Illustration: ' and say what it shows";
+ if (!string.IsNullOrWhiteSpace(clip.AltHeReview) && (string.IsNullOrWhiteSpace(clip.AltHe) || clip.AltHeReview != "agent-checked"))
+ return "alt_he_review must be agent-checked, with alt_he";
+ if (!clip.AiGenerated) return "ai_generated must be true";
+ if (!clip.Sensitive) return "sensitive must be true";
+ return null;
+ }
+
+ /// <summary>The shipped card, or null when the file is missing.</summary>
+ public static Document? Load()
+ {
+ var asset = Resources.Load<TextAsset>(ResourcePath);
+ return asset == null ? null : Parse(asset.text);
+ }
+
+ /// <summary>A fixture or an AI reading cannot approve it: only Editor QA may preview the labelled draft.</summary>
+ public static bool MayPresent(Document data, bool editorPreview) => data.Reviewed || editorPreview;
+ }
+}
diff --git a/unity/Assets/Scripts/UI/RaidCardContent.cs.meta b/unity/Assets/Scripts/UI/RaidCardContent.cs.meta
new file mode 100644
index 000000000..e35f961dd
--- /dev/null
+++ b/unity/Assets/Scripts/UI/RaidCardContent.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 6d47e57d8305405f9be878b6b2571e7d
diff --git a/unity/Assets/Scripts/UI/RaidCardPresenter.cs b/unity/Assets/Scripts/UI/RaidCardPresenter.cs
new file mode 100644
index 000000000..d420b4415
--- /dev/null
+++ b/unity/Assets/Scripts/UI/RaidCardPresenter.cs
@@ -0,0 +1,127 @@
+#nullable enable
+using System;
+using UnityEngine;
+using UnityEngine.UIElements;
+
+namespace Statecraft.Game.UI
+{
+ /// <summary>The Tel Aviv raid card on New game (owner, 8 Nov 2026: "then show an event card with an explanation about the
+ /// bombing and how many were killed ... the player only has an option of clicking ok"): one card in the event-card frame,
+ /// with its silent clip looping, labelled "AI-generated illustration", and only OK. Escape is the same OK. No bridge,
+ /// commands, RNG or save access. GameRoot shows it after the opening and hands over to the turn 1 advisor chain on OK
+ /// ("Film, raid, card, advisors (Recommended)").</summary>
+ public sealed class RaidCardPresenter : IDisposable
+ {
+ public const string OpenClass = "raid-open";
+ readonly VisualElement root, layer, media;
+ readonly Label title, body, ai, preview;
+ readonly Button ok;
+ readonly ScrollView scroll;
+ readonly RaidCardContent.Document data;
+ readonly Action<bool> shownChanged;
+ readonly Action finished;
+ readonly CardVideo? video;
+ readonly bool hebrew;
+ readonly Action onOk;
+ readonly EventCallback<NavigationCancelEvent> onCancel;
+ readonly PressSource presses;
+ bool disposed;
+ int closedFrame = -1;
+ public bool IsOpen { get; private set; }
+ public bool ClosedThisFrame => closedFrame == Time.frameCount;
+ public bool HoldsThePointer => IsOpen || ClosedThisFrame;
+
+ /// <param name="video">The clip's player, or null when video is off (CardVideo.ForcedOff): the card then shows no
+ /// media frame.</param>
+ public RaidCardPresenter(VisualElement root, RaidCardContent.Document data, UiText text, Action<bool> shownChanged,
+ Action finished, CardVideo? video = null)
+ {
+ this.root = root.Q("root") ?? root; this.data = data; this.shownChanged = shownChanged; this.finished = finished;
+ this.video = video;
+ hebrew = text["ui.lang"] == UiLanguage.Hebrew;
+ layer = root.Q("raid-layer"); media = layer.Q("raid-media");
+ title = layer.Q<Label>("raid-title"); body = layer.Q<Label>("raid-text");
+ ai = layer.Q<Label>("raid-ai"); preview = layer.Q<Label>("raid-preview");
+ scroll = layer.Q<ScrollView>("raid-scroll");
+ ok = layer.Q<Button>("raid-ok");
+ ok.text = text["raid.ok"];
+ preview.text = text["opening.preview"]; preview.style.display = data.Reviewed ? DisplayStyle.None : DisplayStyle.Flex;
+ // The Hebrew UI shows the Hebrew where the file has it, as the opening does; a player build shows the card only
+ // once that Hebrew is approved (RaidCardContent.MayPresent).
+ bool he = hebrew && data.HasHebrew;
+ Say(title, he ? data.TitleHe! : data.Title, he);
+ Say(body, he ? data.TextHe! : data.Text, he);
+ // The AI label is in the UI's language. The clip is AI-only (CC0, ASSETS.yaml), so it has no credit line.
+ ai.text = text["event.ai_label"]; ai.languageDirection = hebrew ? LanguageDirection.RTL : LanguageDirection.LTR;
+ media.tooltip = hebrew && !string.IsNullOrWhiteSpace(data.Clip.AltHe) ? data.Clip.AltHe : data.Clip.Alt;
+ onOk = () => Close(finish: true);
+ ok.clicked += onOk;
+ onCancel = e => { if (Escape()) e.StopPropagation(); };
+ layer.RegisterCallback(onCancel);
+ presses = new PressSource(layer);
+ layer.style.display = DisplayStyle.None;
+ }
+
+ /// <summary>Opens the card; nothing while it is open (the start screen's close and New game's Started can both
+ /// report one new game) or after Dispose.</summary>
+ public void Show()
+ {
+ if (disposed || IsOpen) return;
+ IsOpen = true;
+ root.AddToClassList(OpenClass); layer.style.display = DisplayStyle.Flex;
+ ScreenNav.DisableCovered(root);
+ shownChanged(true);
+ scroll.scrollOffset = Vector2.zero;
+ ShowMedia(video != null);
+ if (video != null) video.Play(CardVideo.Url(data.Clip.File), media, _ => ClipFailed());
+ ok.Focus();
+ layer.schedule.Execute(() => { if (IsOpen && layer.focusController?.focusedElement == null) ok.Focus(); });
+ }
+
+ /// <summary>The clip failed or timed out (test seam: what CardVideo's failure calls): the card keeps its text and
+ /// OK and drops the empty frame and its label.</summary>
+ internal void ClipFailed()
+ {
+ if (video?.Current != null) video.Stop();
+ ShowMedia(false);
+ }
+
+ void ShowMedia(bool on)
+ {
+ var display = on ? DisplayStyle.Flex : DisplayStyle.None;
+ media.style.display = display; ai.style.display = display;
+ if (!on) media.style.backgroundImage = StyleKeyword.None;
+ }
+
+ public bool Escape() { if (!IsOpen) return false; Close(finish: true); return true; }
+
+ void Close(bool finish)
+ {
+ if (!IsOpen) return;
+ IsOpen = false; closedFrame = Time.frameCount;
+ if (video?.Current != null) video.Stop();
+ media.style.backgroundImage = StyleKeyword.None;
+ layer.style.display = DisplayStyle.None; root.RemoveFromClassList(OpenClass);
+ ScreenNav.DisableCovered(root); shownChanged(false);
+ if (finish && presses.ByKeyboard && !root.ClassListContains(EventCardPresenter.OpenClass)) FocusReturn.To(root.Q<Button>("end-turn"));
+ if (finish) finished();
+ }
+
+ /// <summary>A prose label's words and direction: Hebrew right to left; English left to right and left-aligned in
+ /// either UI (the opening's class).</summary>
+ static void Say(Label label, string words, bool hebrew)
+ {
+ label.text = words;
+ label.languageDirection = hebrew ? LanguageDirection.RTL : LanguageDirection.LTR;
+ label.EnableInClassList(OpeningPresenter.SourceEnglishClass, !hebrew);
+ }
+
+ public void Dispose()
+ {
+ if (disposed) return;
+ disposed = true; Close(finish: false);
+ ok.clicked -= onOk;
+ layer.UnregisterCallback(onCancel); presses.Dispose();
+ }
+ }
+}
diff --git a/unity/Assets/Scripts/UI/RaidCardPresenter.cs.meta b/unity/Assets/Scripts/UI/RaidCardPresenter.cs.meta
new file mode 100644
index 000000000..54241b793
--- /dev/null
+++ b/unity/Assets/Scripts/UI/RaidCardPresenter.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 7678fc968efb41ddb1d751efdfdeadca
diff --git a/unity/Assets/Scripts/UI/ScreenNav.cs b/unity/Assets/Scripts/UI/ScreenNav.cs
index 4afdc0074..af381dcbe 100644
--- a/unity/Assets/Scripts/UI/ScreenNav.cs
+++ b/unity/Assets/Scripts/UI/ScreenNav.cs
@@ -44,7 +44,8 @@ namespace Statecraft.Game.UI
public static void DisableCovered(VisualElement root)
{
var r = root.Q("root") ?? root;
- bool opening = r.ClassListContains(OpeningPresenter.OpenClass);
+ // The raid card on New game (RaidCardPresenter) covers the HUD as the opening does.
+ bool opening = r.ClassListContains(OpeningPresenter.OpenClass) || r.ClassListContains(RaidCardPresenter.OpenClass);
bool start = r.ClassListContains(StartScreenPresenter.OpenClass) || opening;
r.Q("start-screen")?.SetEnabled(!opening);
bool screen = r.ClassListContains(ScreenOpenClass);
diff --git a/unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4 b/unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4
new file mode 100644
index 000000000..d34406fd0
Binary files /dev/null and b/unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4 differ
diff --git a/unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4.meta b/unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4.meta
new file mode 100644
index 000000000..44067e446
--- /dev/null
+++ b/unity/Assets/StreamingAssets/video/tlv_raid_intro.mp4.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 41992fd800204120951658489511209d
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/unity/Assets/Tests/EditMode/EventVideoTests.cs b/unity/Assets/Tests/EditMode/EventVideoTests.cs
index e83c425fd..85630e154 100644
--- a/unity/Assets/Tests/EditMode/EventVideoTests.cs
+++ b/unity/Assets/Tests/EditMode/EventVideoTests.cs
@@ -47,13 +47,15 @@ public class EventVideoTests
var problems = EventVideoMapping.Problems(rows, C, id => Photos.Find(id) != null, f => File.Exists(Path.Combine(EventVideoMapping.ClipFolder, f)));
Assert.IsEmpty(problems, string.Join("\n", problems));
Assert.IsNotEmpty(EventVideoMapping.Load(), "the game finds the mapping in Resources");
- // Every file in the folder has a row (no stray clip ships): here, or an opening panel's clip (OpeningClipTests).
+ // Every file in the folder has a row (no stray clip ships): here, an opening panel's clip (OpeningClipTests) or the
+ // raid card's on New game (RaidCardTests).
var files = Directory.GetFiles(EventVideoMapping.ClipFolder, "*.mp4").Select(Path.GetFileName).OrderBy(x => x).ToArray();
var outcomes = EventVideoMapping.ParseOutcomes(File.ReadAllText(EventVideoMapping.Path)); // the End Turn clips (OutcomeClipTests)
var mapped = rows.Concat(outcomes).Select(r => r.File).ToList();
var openingOnly = AssetDatabase.LoadAssetAtPath<OpeningContent>("Assets/Resources/OpeningContent.asset").Read().Panels
.Where(p => p.Clip != null).Select(p => p.Clip!.File).Except(mapped); // law_of_return and iraqi_exodus are card rows
- CollectionAssert.AreEqual(mapped.Concat(openingOnly).OrderBy(x => x).ToArray(), files);
+ var raid = RaidCardContent.Parse(File.ReadAllText(RaidCardContent.SourcePath)).Clip.File;
+ CollectionAssert.AreEqual(mapped.Concat(openingOnly).Append(raid).OrderBy(x => x).ToArray(), files);
}
[Test]
diff --git a/unity/Assets/Tests/EditMode/RaidCardRoutingTests.cs b/unity/Assets/Tests/EditMode/RaidCardRoutingTests.cs
new file mode 100644
index 000000000..596fa648c
--- /dev/null
+++ b/unity/Assets/Tests/EditMode/RaidCardRoutingTests.cs
@@ -0,0 +1,206 @@
+#nullable enable
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using NUnit.Framework;
+using Statecraft.Game;
+using Statecraft.Game.Boot;
+using Statecraft.Game.Map;
+using Statecraft.Game.UI;
+using Statecraft.Sim;
+using UnityEditor.SceneManagement;
+using UnityEngine;
+using UnityEngine.TestTools;
+using UnityEngine.UIElements;
+using Object = UnityEngine.Object;
+
+/// <summary>The raid card's place in a new game (owner, 8 Nov 2026, "Film, raid, card, advisors (Recommended)"): New game
+/// only, after the opening and before the turn 1 advisor chain; Continue and a loaded game never show it. Booted as a
+/// player boots it (the start screen and a settings file), in the Editor, which shows the draft (RaidCardContent.MayPresent).
+/// With STATECRAFT_SHOT_DIR set, the layout test also writes the card's stills for the pull request.</summary>
+public class RaidCardRoutingTests
+{
+ static GameInputs? inputs;
+ static GameInputs Inputs => inputs ??= GameInputs.FromDisk(Paths.Content, Paths.StreamingMap);
+ readonly List<string> directories = new List<string>();
+ readonly List<(PanelSettings panel, RenderTexture texture)> panels = new List<(PanelSettings, RenderTexture)>();
+ static VisualElement Ui => Object.FindFirstObjectByType<UIDocument>().rootVisualElement;
+ static VisualElement Hud => Ui.Q("root");
+ static bool RaidOpen => Hud.ClassListContains(RaidCardPresenter.OpenClass);
+ static bool OpeningOpen => Hud.ClassListContains(OpeningPresenter.OpenClass);
+ string NewDirectory()
+ {
+ var dir = Path.Combine(Path.GetTempPath(), "statecraft-raid-routing-" + Guid.NewGuid().ToString("N"));
+ directories.Add(dir);
+ return dir;
+ }
+
+ GameRoot Open(bool saved, bool opening = false, string language = "en", int width = 1280, int height = 720, bool settings = true)
+ {
+ var store = new SaveStore(NewDirectory());
+ if (saved) store.WriteAutosave(GameSession.New(Inputs.Content, 23UL, Mode.Historical).Save.Write());
+ EditorSceneManager.OpenScene("Assets/Map.unity", OpenSceneMode.Single);
+ var doc = Object.FindFirstObjectByType<UIDocument>();
+ var panel = Object.Instantiate(doc.panelSettings);
+ var texture = new RenderTexture(width, height, 24);
+ panel.targetTexture = texture;
+ panels.Add((panel, texture));
+ doc.panelSettings = panel; // real layout/focus in EditMode; never mutate the shared PanelSettings asset
+ Object.FindFirstObjectByType<MapScene>().Build(Inputs.Map);
+ var root = Object.FindFirstObjectByType<GameRoot>();
+ root.Store = store; root.Settings = settings ? new SettingsStore(NewDirectory()) : null; root.Language = language;
+ root.OpeningInEditMode = opening; root.RaidCardInEditMode = true;
+ root.Begin(Inputs, 0, startScreen: true);
+ return root;
+ }
+
+ [TearDown]
+ public void Clean()
+ {
+ EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);
+ foreach (var dir in directories) if (Directory.Exists(dir)) Directory.Delete(dir, true);
+ directories.Clear();
+ foreach (var (panel, texture) in panels)
+ {
+ if (panel != null) Object.DestroyImmediate(panel);
+ if (texture != null) { texture.Release(); Object.DestroyImmediate(texture); }
+ }
+ panels.Clear();
+ }
+
+ [Test]
+ public void NewGameShowsTheCardThenItsOkStartsTheAdvisorChain()
+ {
+ var root = Open(saved: false);
+ Assert.IsFalse(RaidOpen, "not on the start screen");
+ UiTestKit.Press(Ui.Q<Button>("start-new-game"));
+ Assert.IsTrue(RaidOpen, "New game shows the card");
+ Assert.IsFalse(root.Advisor!.IsOpen, "the advisors wait for the card");
+ Assert.IsFalse(root.AdvisorSession!.Settings.OpeningSeen, "the chain has not been used up under the card");
+ var hash = root.Bridge!.State.Hash();
+ UiTestKit.Press(Ui.Q<Button>("raid-ok"));
+ Assert.IsFalse(RaidOpen);
+ Assert.IsTrue(root.Advisor.InChain, "OK hands over to the turn 1 advisor chain");
+ Assert.AreEqual(hash, root.Bridge.State.Hash(), "presentation only: the card changes no game state");
+ Assert.AreEqual(0, root.Bridge.State.Turn);
+ }
+
+ [Test]
+ public void TheOpeningComesFirstThenTheCardThenTheAdvisors()
+ {
+ var root = Open(saved: false, opening: true);
+ UiTestKit.Press(Ui.Q<Button>("start-new-game"));
+ Assert.IsTrue(OpeningOpen, "the opening plays first");
+ Assert.IsFalse(RaidOpen);
+ UiTestKit.Press(Ui.Q<Button>("opening-skip"));
+ Assert.IsTrue(RaidOpen, "the card follows the opening");
+ Assert.IsFalse(root.Advisor!.IsOpen);
+ UiTestKit.Press(Ui.Q<Button>("raid-ok"));
+ Assert.IsTrue(root.Advisor.InChain);
+ }
+
+ [UnityTest]
+ public IEnumerator ASavedGamesNewGameShowsTheCardOnceAndContinueNever()
+ {
+ var root = Open(saved: true);
+ UiTestKit.Press(Ui.Q<Button>("start-new-game"));
+ yield return null;
+ Assert.IsFalse(RaidOpen, "one press only asks to confirm");
+ UiTestKit.Press(Ui.Q<Button>("start-new-game"));
+ yield return null;
+ Assert.IsTrue(RaidOpen, "the confirmed New game shows it");
+ UiTestKit.Press(Ui.Q<Button>("raid-ok"));
+ Assert.IsFalse(RaidOpen, "one OK closes it: the start screen's close and New game's Started show it once");
+ Assert.IsTrue(root.Advisor!.InChain);
+
+ Open(saved: true);
+ yield return null;
+ UiTestKit.Press(Ui.Q<Button>("start-continue"));
+ yield return null;
+ Assert.IsFalse(Hud.ClassListContains(StartScreenPresenter.OpenClass), "precondition: Continue closed the start screen");
+ Assert.IsFalse(RaidOpen, "Continue never shows it");
+ }
+
+ [Test]
+ public void TheTopBarsNewGameShowsItAgain()
+ {
+ var root = Open(saved: false);
+ UiTestKit.Press(Ui.Q<Button>("start-new-game"));
+ UiTestKit.Press(Ui.Q<Button>("raid-ok"));
+ if (root.Advisor!.InChain) root.Advisor.CloseChain();
+ Assert.IsFalse(root.Advisor.IsOpen, "precondition: nothing covers the top bar");
+ UiTestKit.Press(Ui.Q<Button>("new-game"));
+ Assert.IsFalse(RaidOpen, "one press only arms New game");
+ UiTestKit.Press(Ui.Q<Button>("new-game"));
+ Assert.IsTrue(RaidOpen, "every New game shows it");
+ }
+
+ [Test]
+ public void AutomatedRunsAndTheToolsBeginNeverShowIt()
+ {
+ var root = Open(saved: false);
+ root.Begin(Inputs, 0); // the tools' Begin: no start screen
+ Assert.IsFalse(RaidOpen);
+ Assert.AreEqual(DisplayStyle.None, Ui.Q("raid-layer").resolvedStyle.display);
+ }
+
+ [Test]
+ public void FirstCardInstrumentPressesOkBeforeAwaitingTheCard()
+ {
+ // No settings file, as under ?firstcard: there the advisors never show by themselves (GameRoot's autoShow), so the
+ // turn 1 chain does not collapse the card the instrument waits for.
+ var root = Open(saved: false, settings: false);
+ var lines = new List<string>();
+ double clock = 0;
+ var check = GameRoot.FirstCardCheck(Ui, root.Card!, lines.Add, () => clock++);
+ int steps = 0;
+ while (check.MoveNext()) Assert.Less(++steps, 12, "the existing clock-bound instrument is finite");
+ Assert.IsFalse(RaidOpen);
+ Assert.IsTrue(lines.Any(line => line.StartsWith("FIRST CARD OK ", StringComparison.Ordinal)), string.Join("\n", lines));
+ }
+
+ /// <summary>The card fits a desktop and a phone window in both languages, OK in view; with STATECRAFT_SHOT_DIR set it
+ /// writes raid-card-&lt;lang&gt;-&lt;w&gt;x&lt;h&gt;.png there. EditMode decodes no video, so a still frame of the clip
+ /// named by STATECRAFT_RAID_FRAME (a PNG) stands in for it in the stills, and only there.</summary>
+ [UnityTest]
+ public IEnumerator TheCardFitsTheWindowWithOkInView(
+ [Values("en", "he")] string language, [Values(1920, 390)] int width)
+ {
+ int height = width == 1920 ? 1080 : 844;
+ LogAssert.ignoreFailingMessages = width == 390; // main's Hebrew 390x844 logs "Layout update is struggling" (StartScreenLanguageShots)
+ Open(saved: false, language: language, width: width, height: height);
+ UiTestKit.Press(Ui.Q<Button>("start-new-game"));
+ var card = Ui.Q("raid-card");
+ for (int i = 0; i < 60 && !(card.worldBound.height > 0); i++) yield return null;
+ var frame = Environment.GetEnvironmentVariable("STATECRAFT_RAID_FRAME");
+ var media = Ui.Q("raid-media");
+ if (!string.IsNullOrEmpty(frame) && File.Exists(frame))
+ {
+ var still = new Texture2D(2, 2);
+ still.LoadImage(File.ReadAllBytes(frame));
+ media.style.display = DisplayStyle.Flex;
+ media.style.backgroundImage = new StyleBackground(still);
+ Ui.Q("raid-ai").style.display = DisplayStyle.Flex;
+ }
+ for (int i = 0; i < 10; i++) yield return null;
+ var ok = Ui.Q<Button>("raid-ok");
+ var screen = Ui.worldBound;
+ Assert.IsTrue(RaidOpen);
+ Assert.Greater(ok.worldBound.height, 0f, "OK is laid out");
+ Assert.IsTrue(screen.Contains(ok.worldBound.min) && screen.Contains(ok.worldBound.max - Vector2.one), $"OK {ok.worldBound} in {screen}");
+ Assert.IsTrue(card.worldBound.xMin >= screen.xMin - 0.5f && card.worldBound.xMax <= screen.xMax + 0.5f, $"card {card.worldBound} in {screen}");
+ if (Environment.GetEnvironmentVariable("STATECRAFT_SHOT_DIR") is string dir && dir.Length > 0)
+ {
+ Directory.CreateDirectory(dir);
+ var rt = (RenderTexture)Object.FindFirstObjectByType<UIDocument>().panelSettings.targetTexture;
+ var prev = RenderTexture.active; RenderTexture.active = rt;
+ var tex = new Texture2D(rt.width, rt.height, TextureFormat.RGB24, false);
+ tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); tex.Apply();
+ RenderTexture.active = prev;
+ File.WriteAllBytes(Path.Combine(dir, $"raid-card-{language}-{width}x{height}.png"), tex.EncodeToPNG());
+ Object.DestroyImmediate(tex);
+ }
+ }
+}
diff --git a/unity/Assets/Tests/EditMode/RaidCardRoutingTests.cs.meta b/unity/Assets/Tests/EditMode/RaidCardRoutingTests.cs.meta
new file mode 100644
index 000000000..72b2bf3d9
--- /dev/null
+++ b/unity/Assets/Tests/EditMode/RaidCardRoutingTests.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 59f62b3baaa24080894391bcd066f8a7
diff --git a/unity/Assets/Tests/EditMode/RaidCardTests.cs b/unity/Assets/Tests/EditMode/RaidCardTests.cs
new file mode 100644
index 000000000..2dab4f352
--- /dev/null
+++ b/unity/Assets/Tests/EditMode/RaidCardTests.cs
@@ -0,0 +1,202 @@
+#nullable enable
+using System;
+using System.IO;
+using System.Linq;
+using NUnit.Framework;
+using Statecraft.Game.UI;
+using UnityEditor;
+using UnityEngine;
+using UnityEngine.UIElements;
+
+/// <summary>The Tel Aviv raid card on New game (owner, 8 Nov 2026): its strict reader, its review gate and the card itself.
+/// Fixtures live in memory only: none is a human review of the shipped file.</summary>
+public class RaidCardTests
+{
+ static string Shipped => AssetDatabase.LoadAssetAtPath<TextAsset>(RaidCardContent.SourcePath).text;
+ static UiText Text(string lang) => UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(
+ "Assets/UI/strings." + lang + ".yaml").text);
+
+ static RaidCardContent.Document ReviewedFixture()
+ {
+ var data = RaidCardContent.Parse(Shipped);
+ data.Status = Statecraft.Sim.ReleaseGate.ReviewedStatus;
+ foreach (var source in data.Sources) source.Checked = "2026-11-08";
+ data.HeReview = OpeningContent.HeApproved;
+ data.Clip.SensitivityReviewed = true;
+ return data; // memory only: a fixture is never a human sign-off on the shipped file
+ }
+
+ [Test]
+ public void TheShippedCardIsADraftThatOnlyTheEditorPreviews()
+ {
+ var data = RaidCardContent.Load();
+ Assert.IsNotNull(data, "Resources/" + RaidCardContent.ResourcePath + " loads");
+ Assert.AreEqual("draft", data!.Status, "the card stays draft until a human review");
+ Assert.AreEqual(OpeningContent.HePending, data.HeReview);
+ Assert.IsFalse(data.Clip.SensitivityReviewed, "the owner's sensitivity review of the clip is pending");
+ Assert.IsFalse(data.Reviewed);
+ Assert.IsFalse(RaidCardContent.MayPresent(data, editorPreview: false), "a player never sees the draft");
+ Assert.IsTrue(RaidCardContent.MayPresent(data, editorPreview: true), "the Editor shows it, labelled, for QA");
+ Assert.IsTrue(data.Sources.Count >= 2 && data.Sources.All(s => s.IsChecked), "every source carries its checked date");
+ Assert.IsTrue(data.Clip.AiGenerated);
+ Assert.IsTrue(File.Exists(Path.Combine(Application.streamingAssetsPath, "video", data.Clip.File)),
+ "the clip ships in StreamingAssets/video");
+ }
+
+ [Test]
+ public void AReviewedInMemoryFixtureMayBePresentedAndEachMissingReviewBlocksIt()
+ {
+ Assert.IsTrue(RaidCardContent.MayPresent(ReviewedFixture(), editorPreview: false), "an in-memory gate fixture, not a review");
+ var draft = ReviewedFixture(); draft.Status = "draft";
+ Assert.IsFalse(draft.Reviewed, "draft text");
+ var unchecked_ = ReviewedFixture(); unchecked_.Sources[0].Checked = "";
+ Assert.IsFalse(unchecked_.Reviewed, "an unchecked source");
+ var impossible = ReviewedFixture(); impossible.Sources[0].Checked = "2026-02-30";
+ Assert.IsFalse(impossible.Reviewed, "an impossible day is not a checked date");
+ var hebrew = ReviewedFixture(); hebrew.HeReview = OpeningContent.HePending;
+ Assert.IsFalse(hebrew.Reviewed, "the Hebrew needs its native read");
+ var clip = ReviewedFixture(); clip.Clip.SensitivityReviewed = false;
+ Assert.IsFalse(clip.Reviewed, "the clip needs the owner's sensitivity review");
+ Assert.IsTrue(RaidCardContent.MayPresent(clip, editorPreview: true), "the Editor preview relaxes only the reviews");
+ }
+
+ [TestCase("status: draft", "status: draft\nextra: 1", TestName = "an unknown key")]
+ [TestCase("status: draft", "status: draft\nstatus: draft", TestName = "a repeated key")]
+ [TestCase("he_review: pending", "he_review: maybe", TestName = "a he_review that is neither pending nor approved")]
+ [TestCase("title_he: ", "# title_he: ", TestName = "Hebrew that is not complete")]
+ [TestCase(" ai_generated: true", " ai_generated: false", TestName = "an AI clip not marked as one")]
+ [TestCase(" sensitive: true", " sensitive: false", TestName = "a clip of the raid's aftermath not marked sensitive")]
+ [TestCase(" alt: \"Illustration: ", " alt: \"", TestName = "a clip alt that does not say it is an illustration")]
+ [TestCase(" file: tlv_raid_intro.mp4", " file: ../tlv_raid_intro.mp4", TestName = "a clip that is not a bare mp4 name")]
+ [TestCase(" ai_generated: true", " credit: \"x\"\n ai_generated: true", TestName = "a credit line on the AI-only clip")]
+ [TestCase(" alt_he_review: agent-checked", " alt_he_review: approved", TestName = "an alt_he_review other than agent-checked")]
+ public void TheReaderFailsClosed(string from, string to)
+ {
+ StringAssert.Contains(from, Shipped, "precondition: the shipped file has the line the case changes");
+ var broken = ReplaceFirst(Shipped, from, to);
+ Assert.Throws<InvalidOperationException>(() => RaidCardContent.Parse(broken));
+ }
+
+ [Test]
+ public void TheReaderNeedsASourceWithAUrlAndWhatItSupports()
+ {
+ var head = Shipped.Substring(0, Shipped.IndexOf("sources:", StringComparison.Ordinal));
+ var clip = Shipped.Substring(Shipped.IndexOf("\nclip:", StringComparison.Ordinal));
+ Assert.Throws<InvalidOperationException>(() => RaidCardContent.Parse(head + "sources: []" + clip), "no source");
+ Assert.Throws<InvalidOperationException>(() => RaidCardContent.Parse(head
+ + "sources:\n - url: \"https://example.org\"\n checked: 2026-11-08" + clip), "a source that supports nothing");
+ Assert.DoesNotThrow(() => RaidCardContent.Parse(head
+ + "sources:\n - url: \"https://example.org\"\n supports: \"x\"\n checked: 2026-11-08" + clip), "positive control");
+ }
+
+ static string ReplaceFirst(string text, string from, string to)
+ {
+ int at = text.IndexOf(from, StringComparison.Ordinal);
+ return text.Substring(0, at) + to + text.Substring(at + from.Length);
+ }
+
+ [TestCase("en")]
+ [TestCase("he")]
+ public void TheCardShowsTheTextTheClipsLabelsAndOnlyAnOkButton(string lang)
+ {
+ using var ui = new UiTestKit();
+ var data = RaidCardContent.Parse(Shipped);
+ using var card = new RaidCardPresenter(ui.Root, data, Text(lang), _ => { }, () => { });
+ card.Show();
+ Assert.IsTrue(card.IsOpen);
+ var hud = ui.Q<VisualElement>("root");
+ Assert.IsTrue(hud.ClassListContains(RaidCardPresenter.OpenClass));
+ Assert.AreEqual(DisplayStyle.Flex, ui.Q<VisualElement>("raid-layer").style.display.value);
+ Assert.IsFalse(ui.Q<VisualElement>("top-bar").enabledInHierarchy, "the HUD under the card takes no input");
+ Assert.IsFalse(ui.Q<VisualElement>("event-layer").enabledInHierarchy, "nor does the turn 1 decision card");
+ var buttons = ui.Q<VisualElement>("raid-card").Query<Button>().ToList();
+ Assert.AreEqual(1, buttons.Count, "the player only has OK (owner, 8 Nov 2026)");
+ Assert.AreEqual("raid-ok", buttons[0].name);
+ Assert.AreEqual(Text(lang)["raid.ok"], buttons[0].text);
+ Assert.AreEqual(Text(lang)["opening.preview"], ui.Q<Label>("raid-preview").text);
+ Assert.AreEqual(DisplayStyle.Flex, ui.Q<Label>("raid-preview").style.display.value, "the Editor draft is labelled");
+ bool he = lang == "he";
+ Assert.AreEqual(he ? data.TitleHe : data.Title, ui.Q<Label>("raid-title").text);
+ Assert.AreEqual(he ? data.TextHe : data.Text, ui.Q<Label>("raid-text").text);
+ Assert.AreEqual(he ? LanguageDirection.RTL : LanguageDirection.LTR, ui.Q<Label>("raid-text").languageDirection);
+ Assert.IsNull(ui.Root.Q<Label>("raid-credit"), "the clip is AI-only (CC0, ASSETS.yaml): no credit line");
+ Assert.AreEqual(Text(lang)["event.ai_label"], ui.Q<Label>("raid-ai").text, "labelled as the cards label AI media");
+ Assert.AreEqual(he ? data.Clip.AltHe : data.Clip.Alt, ui.Q<VisualElement>("raid-media").tooltip);
+ Assert.AreEqual(DisplayStyle.None, ui.Q<VisualElement>("raid-media").style.display.value,
+ "with video off (CardVideo.ForcedOff) the card shows no empty frame");
+ }
+
+ [Test]
+ public void AReviewedCardHidesThePreviewLabel()
+ {
+ using var ui = new UiTestKit();
+ using var card = new RaidCardPresenter(ui.Root, ReviewedFixture(), Text("en"), _ => { }, () => { });
+ card.Show();
+ Assert.AreEqual(DisplayStyle.None, ui.Q<Label>("raid-preview").style.display.value);
+ }
+
+ [Test]
+ public void TheClipPlaysInTheCardsFrameAndAFailureHidesTheFrame()
+ {
+ using var ui = new UiTestKit();
+ var data = RaidCardContent.Parse(Shipped);
+ using var video = new CardVideo();
+ using var card = new RaidCardPresenter(ui.Root, data, Text("en"), _ => { }, () => { }, video);
+ card.Show();
+ var media = ui.Q<VisualElement>("raid-media");
+ Assert.AreEqual(DisplayStyle.Flex, media.style.display.value);
+ Assert.AreEqual(CardVideo.Url(data.Clip.File), video.Current, "the card's clip loops in its frame");
+ Assert.AreEqual(DisplayStyle.Flex, ui.Q<Label>("raid-ai").style.display.value, "labelled while it plays");
+ UiTestKit.Press(ui.Q<Button>("raid-ok"));
+ Assert.IsNull(video.Current, "closing stops the clip");
+ card.Show();
+ Assert.AreEqual(CardVideo.Url(data.Clip.File), video.Current, "a later New game plays it again");
+ card.ClipFailed();
+ Assert.IsNull(video.Current);
+ Assert.AreEqual(DisplayStyle.None, media.style.display.value, "a clip that fails leaves no black frame");
+ Assert.AreEqual(DisplayStyle.None, ui.Q<Label>("raid-ai").style.display.value, "nor its label");
+ Assert.IsTrue(card.IsOpen, "the card keeps its text and OK");
+ }
+
+ [Test]
+ public void OkClosesTheCardAndHandsOverOnce()
+ {
+ using var ui = new UiTestKit();
+ int finished = 0; var shown = new System.Collections.Generic.List<bool>();
+ using var card = new RaidCardPresenter(ui.Root, RaidCardContent.Parse(Shipped), Text("en"), shown.Add, () => finished++);
+ card.Show();
+ card.Show();
+ Assert.AreEqual(new[] { true }, shown.ToArray(), "a second Show while open does nothing (New game reports twice)");
+ UiTestKit.Press(ui.Q<Button>("raid-ok"));
+ Assert.IsFalse(card.IsOpen);
+ Assert.IsTrue(card.ClosedThisFrame, "Escape in the same frame goes no further");
+ Assert.IsFalse(ui.Q<VisualElement>("root").ClassListContains(RaidCardPresenter.OpenClass));
+ Assert.AreEqual(DisplayStyle.None, ui.Q<VisualElement>("raid-layer").style.display.value);
+ Assert.IsTrue(ui.Q<VisualElement>("top-bar").enabledInHierarchy, "the HUD is back");
+ Assert.AreEqual(1, finished);
+ UiTestKit.Press(ui.Q<Button>("raid-ok"));
+ Assert.AreEqual(1, finished, "a closed card hands over no second time");
+ Assert.AreEqual(new[] { true, false }, shown.ToArray());
+ }
+
+ [Test]
+ public void EscapeActsAsOkAndDisposeNeverHandsOver()
+ {
+ using var ui = new UiTestKit();
+ int finished = 0;
+ var card = new RaidCardPresenter(ui.Root, RaidCardContent.Parse(Shipped), Text("en"), _ => { }, () => finished++);
+ Assert.IsFalse(card.Escape(), "closed: Escape is not the card's");
+ card.Show();
+ Assert.IsTrue(card.Escape());
+ Assert.AreEqual(1, finished, "Escape is the same OK");
+ card.Show();
+ Assert.IsTrue(card.IsOpen, "a later New game shows it again");
+ card.Dispose();
+ Assert.AreEqual(1, finished, "disposing never starts the advisors");
+ Assert.IsFalse(ui.Q<VisualElement>("root").ClassListContains(RaidCardPresenter.OpenClass));
+ UiTestKit.Press(ui.Q<Button>("raid-ok"));
+ Assert.AreEqual(1, finished, "disposed callbacks do not fire");
+ card.Show();
+ Assert.IsFalse(card.IsOpen, "a disposed card never shows");
+ }
+}
diff --git a/unity/Assets/Tests/EditMode/RaidCardTests.cs.meta b/unity/Assets/Tests/EditMode/RaidCardTests.cs.meta
new file mode 100644
index 000000000..d3952cfcb
--- /dev/null
+++ b/unity/Assets/Tests/EditMode/RaidCardTests.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 0895bb97252e4bbba1c42811d4318e16
diff --git a/unity/Assets/UI/Game.uxml b/unity/Assets/UI/Game.uxml
index 2683fe769..315215133 100644
--- a/unity/Assets/UI/Game.uxml
+++ b/unity/Assets/UI/Game.uxml
@@ -699,6 +699,25 @@
<Statecraft.Game.UI.UiFrame />
</ui:VisualElement>
</ui:VisualElement>
+ <!-- The Tel Aviv raid card on New game (RaidCardPresenter; owner, 8 Nov 2026): after the opening, before the turn 1
+ advisors. One card in the event-card frame, its silent clip labelled as an AI illustration, and only OK.
+ Editor drafts are labelled; a player build shows it only once it is reviewed. -->
+ <ui:VisualElement name="raid-layer" class="raid-layer">
+ <ui:VisualElement name="raid-card" class="panel event-card raid-card">
+ <ui:Label name="raid-preview" class="muted opening-preview" />
+ <ui:Label name="raid-title" class="title event-title opening-source-en" />
+ <ui:VisualElement name="raid-media" class="raid-media">
+ <ui:Label name="raid-ai" class="event-photo-credit" />
+ </ui:VisualElement>
+ <ui:ScrollView name="raid-scroll" class="raid-scroll" mode="Vertical" horizontal-scroller-visibility="Hidden">
+ <ui:Label name="raid-text" class="opening-text opening-source-en" />
+ </ui:ScrollView>
+ <ui:VisualElement class="row raid-actions">
+ <ui:Button name="raid-ok" />
+ </ui:VisualElement>
+ <Statecraft.Game.UI.UiFrame />
+ </ui:VisualElement>
+ </ui:VisualElement>
<!-- "Report a bug or idea" (#1169, FeedbackPresenter): over everything, the start screen too, with what each GitHub
form opens with under its button; the game sends nothing itself. Before the toast, which stays readable. -->
<ui:VisualElement name="feedback-layer" class="feedback-layer">
diff --git a/unity/Assets/UI/Statecraft.uss b/unity/Assets/UI/Statecraft.uss
index 59720acff..c52c04a5a 100644
--- a/unity/Assets/UI/Statecraft.uss
+++ b/unity/Assets/UI/Statecraft.uss
@@ -1287,3 +1287,14 @@ Button.settings-choice-selected { -unity-font-definition: url("project://databas
.opening-source-en, .lang-he .opening-source-en { -unity-text-align: upper-left; white-space: normal; }
.opening-open .top-bar, .opening-open .left-column, .opening-open .community-column, .opening-open .right-column, .opening-open .event-layer, .opening-open .info-panel, .opening-open .screen, .opening-open .map-labels, .opening-open .start-screen, .opening-open .advisor-layer { display: none; }
.loading .opening-layer { display: none; }
+/* The Tel Aviv raid card on New game (RaidCardPresenter): the opening's card frame over a dim backdrop, so the map of
+ Tel Aviv shows around it; the HUD under it is hidden as under the opening. The clip keeps 16:9 inside its frame
+ (contain) and gives way first on a short window; OK stays outside the scrolling text. */
+.raid-layer { display: none; position: absolute; left: 0; top: 0; right: 0; bottom: 0; align-items: center; justify-content: center; padding: 16px; background-color: rgba(5, 9, 18, 0.72); }
+.raid-layer > .raid-card { display: flex; max-height: 100%; padding: 12px 24px; }
+.raid-layer > .raid-card > .raid-scroll { flex-shrink: 1; min-height: 48px; }
+.raid-media { height: 400px; max-height: 45%; min-height: 0; flex-shrink: 1000; margin: 4px 0; justify-content: flex-end; background-size: contain; background-position-x: center; background-position-y: center; background-repeat: no-repeat; background-color: var(--navy-deep); border-width: 1px; border-color: var(--gold); }
+.raid-actions { flex-wrap: wrap; justify-content: center; flex-shrink: 0; }
+.raid-actions > Button { min-height: 44px; min-width: 160px; margin: 4px 6px; }
+.raid-open .top-bar, .raid-open .left-column, .raid-open .community-column, .raid-open .right-column, .raid-open .event-layer, .raid-open .info-panel, .raid-open .screen, .raid-open .map-labels, .raid-open .start-screen, .raid-open .advisor-layer { display: none; }
+.loading .raid-layer { display: none; }
diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yaml
index e18646d8d..1ef1ea938 100644
--- a/unity/Assets/UI/strings.en.yaml
+++ b/unity/Assets/UI/strings.en.yaml
@@ -1321,6 +1321,10 @@ opening.return: "Return to the start screen"
opening.count: "Step {0} of {1}"
opening.preview: "Editor preview: draft text; human source checks pending."
+# The Tel Aviv raid card on New game (RaidCardPresenter; owner, 8 Nov 2026: "the player only has an option of clicking
+# ok"). Its text and sources are in Resources/RaidIntro/raid-intro.yaml; its preview label is opening.preview.
+raid.ok: "OK"
+
# #813 (R-MONEY-004; owner, 2 November 2026: "Spend the dollars (Recommended)"): the Defence screen's dollar conversion.
# The refusals are EconomySystem's own words, shown in the end-of-turn toast.
dollars.title: "Convert dollars"
diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yaml
index 4e0aef3d0..fe286a59e 100644
--- a/unity/Assets/UI/strings.he.yaml
+++ b/unity/Assets/UI/strings.he.yaml
@@ -1567,6 +1567,10 @@ opening.return: "חזרה למסך הפתיחה"
opening.count: "שלב {0} מתוך {1}"
opening.preview: "תצוגה מקדימה בעורך: טיוטה; בדיקת המקורות בידי אדם ממתינה."
+# The Tel Aviv raid card on New game. For the native reviewer (#564): agent-drafted; "אישור" as the Hebrew UI's OK
+# buttons commonly say it. The card's text is in Resources/RaidIntro/raid-intro.yaml, with its own he_review.
+raid.ok: "אישור"
+
# #813 (R-MONEY-004): the Defence screen's dollar conversion. Agent-drafted Hebrew; every line below is
# native-review-pending (#564).
dollars.title: "המרת דולרים"