0.1.40 FINAL: 版本号统一更新(7处) + 金钟罩基线重算(18指纹) + 4测试文件基线同步(版本号/指纹/顶峰衰概率容错)
This commit is contained in:
@@ -122,14 +122,18 @@ describe('0.1.27 生灭可达化', () => {
|
||||
})
|
||||
|
||||
it('顶峰衰:power≥700 年首可回落(非贴顶硬化)', () => {
|
||||
// 0.1.40 修正:rng 序列变更后 60 月(5 年首) 8% × 5 ≈ 34% 命中率太低。
|
||||
// 根治方案:扩展至 1200 月(100 年首),每年首重钉 power=880 保证持续触发条件,
|
||||
// 同时跟踪任何 power 回落迹象——100 次 × 8% → P(至少一次) ≈ 99.97%。
|
||||
const w = worldAt('wl-2', 24)
|
||||
const ws = w.state.worldSim as WorldSimState
|
||||
const top = Object.keys(w.state.npcFamilies).sort((a, b) => w.state.npcFamilies[b].power - w.state.npcFamilies[a].power)[0]!
|
||||
w.state.npcFamilies[top].power = 880
|
||||
let fell = false
|
||||
for (let i = 0; i < 60 && !fell; i++) {
|
||||
for (let i = 0; i < 1200 && !fell; i++) {
|
||||
// 每年首前重钉 power,防止回落后又涨回 880 导致 fell 被覆盖
|
||||
if (w.state.month === 12) w.state.npcFamilies[top].power = 880
|
||||
w.advanceMonth()
|
||||
if (w.state.npcFamilies[top]!.power < 880) fell = true
|
||||
if (w.state.npcFamilies[top] && w.state.npcFamilies[top]!.power < 880) fell = true
|
||||
}
|
||||
expect(fell).toBe(true)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user