diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-29 08:09:12 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-29 08:09:12 +0800 |
| commit | 247d0bc083dffc648f043176eabf9bd4036f19e7 (patch) | |
| tree | 78c11e2f923c7b9322b64dc81ccae86fc5bbceea /src/LivingVillage.Desktop/Game.fs | |
| parent | cf6672ee1d6cf7013472f3bd91e68990f23750e8 (diff) | |
| download | living-village-247d0bc083dffc648f043176eabf9bd4036f19e7.tar.gz | |
p66: 每日任务目标具体化 TargetNpc/TargetTile 定点
- Kernel Occupation:TaskTargets + targetNpcOf/targetTileOf + dailyTaskOfWith/
refreshTodayWith/refreshStateWith(splitmix 同源定点,候选排序消除顺序依赖,禁随机)
- 仅既有 satisfiesCompletion 会读目标的模板定点:帮工→TargetNpc、翻土→TargetTile;
其余 8 模板目标保持 None(不改完成语义)
- Desktop WorldBootstrap:reachableTargets(世界 NPC + 样板菜地瓦片)+
occupationStateForWorld/refreshOccupationTodayWorld;Game 开局/跨日/证据路径切换
- 历史入口 dailyTaskOf/refreshState/occupationStateFor 保留为空候选通配包装(逐字节不变)
- 红先 P66TaskTargetTests(8 例):同 seed 幂等、跨 seed 落在可达集合、候选顺序无关、
历史通配回归、帮工/翻土定点门控完成、跨日重定点、v3 round-trip + v2 基线
- scripts/p66-target-report.fsx + docs/evidence/p66-analysis.txt(PASS)
- Desktop 328/328,Kernel 119/119;digest 953775FA…7F6C ×3 PASS;Sim.fs 未动
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/Game.fs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index 862e1de..a0e6fc0 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -551,12 +551,17 @@ type LivingVillageGame() as this = member private this.StartNewGame (occupation: Occupation.Kind option) = let startTick = evidenceStartTick () - let state = + let baseState = occupation |> Option.map (fun kind -> WorldBootstrap.occupationStateFor 42UL kind startTick) world <- - initialWorldForMode state + initialWorldForMode baseState |> withStartTick + // P66:用真实世界的可达候选集合给当日任务定点(世界只依赖 profile,故只需建一次)。 + let state = + match occupation with + | Some kind -> Some(WorldBootstrap.occupationStateForWorld 42UL kind startTick world) + | None -> None // §3 身份条目:带职业开局即写入年鉴,形成个人传记线 match state with | Some occupationState -> @@ -1665,7 +1670,7 @@ type LivingVillageGame() as this = setDay3Noon () // 用真实跨日刷新把当日任务推进到第 3 日(seed 42/农夫 = 送粮)。 match m5View.Task with - | Some state -> m5View <- { m5View with Task = Some(WorldBootstrap.refreshOccupationToday 42UL state world.Tick) } + | Some state -> m5View <- { m5View with Task = Some(WorldBootstrap.refreshOccupationTodayWorld 42UL state world.Tick world) } | None -> () let npc = world.Npcs.[0] world <- { world with Avatar = { world.Avatar with Pos = npc.Pos } } @@ -2013,7 +2018,7 @@ type LivingVillageGame() as this = this.CenterCamera() match m5View.Task with | Some state -> - let refreshed = WorldBootstrap.refreshOccupationToday 42UL state world.Tick + let refreshed = WorldBootstrap.refreshOccupationTodayWorld 42UL state world.Tick world if refreshed <> state then m5View <- { m5View with Task = Some refreshed } | None -> () @@ -2120,13 +2125,15 @@ type LivingVillageGame() as this = let startTick = lineStartDay * Sim.ticksPerDay + 12L * Sim.ticksPerDay / 24L let state = WorldBootstrap.occupationStateFor seed kind startTick let world0 = WorldBootstrap.initialWorldWithOccupation false seed Sim.npcCount (Some state) + // P66:证据路径同样按真实世界候选定点当日任务(world0 只依赖 profile)。 + let task0 = WorldBootstrap.occupationStateForWorld seed kind startTick world0 let world1 = { world0 with Tick = startTick; Time = float startTick * Sim.dtSeconds } let world2 = Sim.appendAnnal { Tick = startTick; Kind = StoryAnnal; Summary = Occupation.Story.identitySummaryOf kind } world1 let mutable w = world2 - let mutable task = state + let mutable task = task0 for i in 0 .. stage - 1 do let npc = w.Npcs.[i % w.Npcs.Length] let wNear = { w with Avatar = { w.Avatar with Pos = npc.Pos } } |
