【引擎审计修复】 - P0:大比 once(原整年刷 12 场、奖励通胀);flag 年份键 3 年剪枝(长线膨胀) - P1:飞升离世累加 feishengCount(飞升之资称号可达);圣者护族接消费(原死代码); 大比/传薪挂能力卡门控;pending 抢渡劫时不再重设 - P2:version 硬编码统一 0.1.11;yearaxis 飞升归类;MonumentList 挂载 【UI 审计修复】 - P0:已故成员卡显示「已殁」(原秀活动 status);空队迎战禁用+提示(原静默失效) - P1:指婚候选去截断(滚动列表);终局出口(回卷/主菜单按钮);saveNow 反馈; 事件来临写入 feed(k-event 使用);遣队「最强 N 人/清空」一键;寻衅确认+联姻原因提示; 未建建筑视觉 uc 类 - P2:speed 死代码;Modal 分层 z-index;FamilyPanel 在世/先人分隔 【UX 三件套】 - 警讯徽章(瓶颈/重伤/在外/媒缘/孤嗣之忧)顶栏一屏秒答「我该干嘛」 - 首启引导任务条(四步目标 + 完成推进,可跳不强制) - 顶栏丹药瘦身(4 资源);数字千/万化;瓶颈卡红框高亮 【测试】905→923(urgency/guide/format 三模块 + 审计修复回归 6 项) 金钟罩三档重固化(0.1.11),typecheck/build 通过
49 lines
1.9 KiB
TypeScript
49 lines
1.9 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
||
import { stateFingerprint, longRun } from './fingerprint.helper'
|
||
import { World } from '../src/renderer/game/engine/world'
|
||
|
||
/**
|
||
* 金钟罩:固定种子长跑 560 月的状态指纹。
|
||
* 任何改动(重构日程/调平衡/加系统)若改变了确定性序列或结果,此测试立刻报红。
|
||
* 更新规则:仅当**有意**变更序列逻辑时,三枚 seed 指纹同版更新并注明原因。
|
||
*/
|
||
// 0.1.10 基线:长线数值重建(修炼提速/寿元放宽/渡劫修复)后三档固化为 47/100/180 年。
|
||
// 0.1.8 时修复批次后为 9af71ecb/63cede89/ebfec4a4;0.1.10 有意变更数值后按三档重算。
|
||
const GOLDEN: Record<string, Record<number, string>> = {
|
||
'bell-seed-1': { 560: 'ffdd3fb1', 1200: '76787bd9', 2160: 'e3f0a1cd' },
|
||
'bell-seed-2': { 560: '1dd432bb', 1200: '8ab8db6d', 2160: '2340e385' },
|
||
'bell-seed-3': { 560: '195b8aaa', 1200: 'a19e1a90', 2160: '2d767a64' }
|
||
}
|
||
|
||
const TIERS = [
|
||
[560, '47 年(4 个十年)'],
|
||
[1200, '100 年'],
|
||
[2160, '180 年']
|
||
] as const
|
||
|
||
describe('金钟罩 · 长跑确定性指纹(三档:47/100/180 年)', () => {
|
||
for (const [seed, tiers] of Object.entries(GOLDEN)) {
|
||
for (const [months, label] of TIERS) {
|
||
it(`${seed} ${label}指纹 === ${tiers[months]}`, () => {
|
||
const w = run(seed, months)
|
||
expect(stateFingerprint(w.state)).toBe(tiers[months])
|
||
})
|
||
}
|
||
}
|
||
|
||
it('同 seed 两次长跑指纹一致(无状态污染)', () => {
|
||
const a = stateFingerprint(longRun('bell-seed-1').state)
|
||
const b = stateFingerprint(longRun('bell-seed-1').state)
|
||
expect(a).toBe(b)
|
||
})
|
||
})
|
||
|
||
function run(seed: string, months: number): ReturnType<typeof longRun> {
|
||
const w = World.create({ seed, surname: '钟', familyName: '钟家', motto: 'm', difficulty: 'normal' })
|
||
for (let i = 0; i < months; i++) {
|
||
if (w.state.gameOver) break
|
||
w.advanceMonth()
|
||
}
|
||
return w
|
||
}
|