Selaa lähdekoodia

test: 回溯起点单元测试同步偶层对齐

LiuYuYang 1 viikko sitten
vanhempi
commit
2c9fdccded
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      tests/unit.mjs

+ 1 - 1
tests/unit.mjs

@@ -41,7 +41,7 @@ ok('UI 预期 = state.rebirth() 实得', (() => {
   const a = S.newState(); a.maxLayerRound = 120; a.layer = 120; a.lives = { constsign: 4 }; a.exploreSum = 60; a.planes[0].explore = 60;
   const exp = F.rebirthEstimate(a); const r = S.rebirth(a); return r.gain === exp;
 })());
-ok('回溯起点 F = ⌊L − 16√L⌋', (() => { const L = 123.7; return C.earlyLayer(L, C.PLANE_RULES[0]) === Math.max(0, Math.floor(L - 16 * Math.sqrt(L))); })());
+ok('回溯起点 F = ⌊(L − 16√L)/2⌋×2(偶层对齐)', (() => { const L = 123.7; const exp = Math.max(Math.min(L, Math.floor((L - 16 * Math.sqrt(L)) / 2) * 2), Math.floor(L / 2) * 2); return C.earlyLayer(L, C.PLANE_RULES[0]) === exp; })());
 ok('修仙道基起始层 +100', C.earlyLayer(400, C.PLANE_RULES[3]) === C.earlyLayer(400, C.PLANE_RULES[0]) + 100);
 ok('里世界中主世界冻结:炼化预期为 0', (() => { const a = S.newState(); a.planeRun = { state: 'fight', active: true }; a.layer = 50; a.maxLayerRound = 50; return F.rebirthEstimate(a) === 0; })());