summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Kernel.Tests/DeterminismTests.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-20 14:20:54 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-20 14:20:54 +0800
commit7e197babfbb68d7f7d1866d6a0ca47cf17d3af23 (patch)
treeabf951825edce69139f099a73dfb6f2575ff0259 /src/LivingVillage.Kernel.Tests/DeterminismTests.fs
parent4f8aca922e6cf47dce95aab79541065d487d5272 (diff)
downloadliving-village-7e197babfbb68d7f7d1866d6a0ca47cf17d3af23.tar.gz
feat(m5): 增加可交互对话、需求观察与编年史
[变更性质] - 本提交新增 M5 用户能力,不是缺陷修复。 [新增功能] - 增加玩家六意图对话、需求面板、可见 NPC 观察、编年史与因果谣言冒烟验收。 [实现方案] - 在 Kernel 中扩展 Avatar Mind、对话结果、观察数据、Annals 和确定性谣言链。 - 在 Desktop 中加入键盘交互、像素文本面板和运行时状态展示,并补充 Headless 与测试覆盖。 [影响范围] - 覆盖 Kernel、Headless、Desktop 及测试工程;保留既有 M3/M4 确定性与交易、关系、谣言行为。
Diffstat (limited to 'src/LivingVillage.Kernel.Tests/DeterminismTests.fs')
-rw-r--r--src/LivingVillage.Kernel.Tests/DeterminismTests.fs19
1 files changed, 15 insertions, 4 deletions
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