From 7e197babfbb68d7f7d1866d6a0ca47cf17d3af23 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Sun, 20 Sep 2026 14:20:54 +0800 Subject: feat(m5): 增加可交互对话、需求观察与编年史 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [变更性质] - 本提交新增 M5 用户能力,不是缺陷修复。 [新增功能] - 增加玩家六意图对话、需求面板、可见 NPC 观察、编年史与因果谣言冒烟验收。 [实现方案] - 在 Kernel 中扩展 Avatar Mind、对话结果、观察数据、Annals 和确定性谣言链。 - 在 Desktop 中加入键盘交互、像素文本面板和运行时状态展示,并补充 Headless 与测试覆盖。 [影响范围] - 覆盖 Kernel、Headless、Desktop 及测试工程;保留既有 M3/M4 确定性与交易、关系、谣言行为。 --- src/LivingVillage.Kernel.Tests/DeterminismTests.fs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/LivingVillage.Kernel.Tests/DeterminismTests.fs') diff --git a/src/LivingVillage.Kernel.Tests/DeterminismTests.fs b/src/LivingVillage.Kernel.Tests/DeterminismTests.fs index cc1944f..52cae89 100644 --- a/src/LivingVillage.Kernel.Tests/DeterminismTests.fs +++ b/src/LivingVillage.Kernel.Tests/DeterminismTests.fs @@ -233,10 +233,21 @@ type DeterminismTests () = | Rest -> 0.4f | Pay -> 0.2f | Hungry -> -0.4f - | Chatted _ -> Sim.chatValence - | Rumor _ -> 0.1f - | Bought _ -> 0.3f - | Sold _ -> 0.3f + | Chatted _ -> Sim.chatValence + | Rumor _ -> 0.1f + | Bought _ -> 0.3f + | Sold _ -> 0.3f + | Dialogue (_, _, response) -> + match response with + | Friendly -> 0.4f + | Helpful -> 0.5f + | Bargaining -> 0.2f + | Amused -> 0.35f + | Forgiving -> 0.45f + | Hostile -> -0.5f + | Reserved -> 0.0f + | Refused -> -0.1f + | Offended -> -0.4f if e.Valence <> expected then Assert.Fail($"valence/kind mismatch: {e.Kind} -> {e.Valence}") if e.Valence < -1.0f || e.Valence > 1.0f then -- cgit v1.2.3