|
@@ -6,8 +6,10 @@ export const SAVE_KEY = 'worldtree_escape_save_v1';
|
|
|
export const SAVE_VERSION = 1;
|
|
export const SAVE_VERSION = 1;
|
|
|
|
|
|
|
|
// ── 主线:逃离室女座空洞(连续空间) ─────────────────────────
|
|
// ── 主线:逃离室女座空洞(连续空间) ─────────────────────────
|
|
|
-// 逃逸进度 = 本轮回“抵达层数 / 1000”,连续流动;六章每 200 层一段,章内没有结算弹窗。
|
|
|
|
|
-export const TOTAL_LAYERS = 1000;
|
|
|
|
|
|
|
+// 逃逸进度 = 本轮回“抵达层数 / TOTAL_LAYERS”,连续流动;六章每 500 层一段,章内没有结算弹窗。
|
|
|
|
|
+// 每章 500 层。这个常数同时是“能量谷”的深度标尺:GM(L) 的线性段在 L/Gm 处平滑衔接(Gm = TOTAL×(ENV_STEP−1)/(GM_END−1) ≈ 1.71×TOTAL),
|
|
|
|
|
+// 调大 TOTAL 会让回跑段变得更“浅”,因此主曲线参数要跟着一起调(见 tests/balance-sim.mjs)。
|
|
|
|
|
+export const TOTAL_LAYERS = 2500;
|
|
|
export const CHAPTERS = [
|
|
export const CHAPTERS = [
|
|
|
{ idx: 0, short: '地球', title: '保护地球', desc: '空洞前沿已越过柯伊伯带,地球是最后一处有生命的声音。' },
|
|
{ idx: 0, short: '地球', title: '保护地球', desc: '空洞前沿已越过柯伊伯带,地球是最后一处有生命的声音。' },
|
|
|
{ idx: 1, short: '太阳系', title: '脱离太阳系', desc: '把整颗星球托进世界树的根系,太阳系成为空洞中的第一枚灯塔。' },
|
|
{ idx: 1, short: '太阳系', title: '脱离太阳系', desc: '把整颗星球托进世界树的根系,太阳系成为空洞中的第一枚灯塔。' },
|
|
@@ -16,7 +18,7 @@ export const CHAPTERS = [
|
|
|
{ idx: 4, short: '本星系群', title: '脱离本星系群', desc: '本星系群的引力潮被抵消,空洞的边界第一次出现在视野里。' },
|
|
{ idx: 4, short: '本星系群', title: '脱离本星系群', desc: '本星系群的引力潮被抵消,空洞的边界第一次出现在视野里。' },
|
|
|
{ idx: 5, short: '空洞外', title: '冲出空洞', desc: '室女座空洞之外,还有一片未被规则侵蚀的星空。' },
|
|
{ idx: 5, short: '空洞外', title: '冲出空洞', desc: '室女座空洞之外,还有一片未被规则侵蚀的星空。' },
|
|
|
];
|
|
];
|
|
|
-for (const ch of CHAPTERS) ch.at = ch.idx * 200; // 每章 200 层
|
|
|
|
|
|
|
+for (const ch of CHAPTERS) ch.at = ch.idx * 500; // 每章 500 层
|
|
|
|
|
|
|
|
/** 当前层数对应的章序号(0..5) */
|
|
/** 当前层数对应的章序号(0..5) */
|
|
|
export function chapterOf(layer) {
|
|
export function chapterOf(layer) {
|
|
@@ -97,10 +99,10 @@ export function canopySkip(level) { return Math.min(SKIP.cap, COST.canopy.per *
|
|
|
export function canopySpeedMul(level) { return Math.pow(1.08, level || 0); }
|
|
export function canopySpeedMul(level) { return Math.pow(1.08, level || 0); }
|
|
|
|
|
|
|
|
// 永久乘区(除世界树/遗物外的简单加乘)
|
|
// 永久乘区(除世界树/遗物外的简单加乘)
|
|
|
-export function multCreature(totalLevel) { return 1 + 0.08 * Math.max(0, (totalLevel || 0) - 30); }
|
|
|
|
|
|
|
+export function multCreature(totalLevel) { return Math.max(1e-6, 1 + 0.08 * Math.max(0, (totalLevel || 0) - 30)); }
|
|
|
export function multRelic(count) { return Math.pow(1.25, count || 0); }
|
|
export function multRelic(count) { return Math.pow(1.25, count || 0); }
|
|
|
-export function multRebirth(count) { return 1 + 0.10 * (count || 0); }
|
|
|
|
|
-export function multExploration(explore) { return 1 + 2 * Math.max(0, explore || 0) / 100; }
|
|
|
|
|
|
|
+export function multRebirth(count) { return Math.max(1e-6, 1 + 0.10 * (count || 0)); }
|
|
|
|
|
+export function multExploration(explore) { return Math.max(1e-6, 1 + 2 * Math.max(0, explore || 0) / 100); }
|
|
|
|
|
|
|
|
// ── 兵种(常驻推进跑道,持续生效) ──────────────────────────
|
|
// ── 兵种(常驻推进跑道,持续生效) ──────────────────────────
|
|
|
// 等级 n:升级成本 cost × 1.15^(n−1);技能强度 = 1 + per × n。解锁:上一兵种 ≥3 级。
|
|
// 等级 n:升级成本 cost × 1.15^(n−1);技能强度 = 1 + per × n。解锁:上一兵种 ≥3 级。
|
|
@@ -137,8 +139,8 @@ export const RACE_SKIP_BONUS = 0.05;
|
|
|
export function raceStacks(race, count) { return Math.max(0, count - (RACES[race].need - 1)); }
|
|
export function raceStacks(race, count) { return Math.max(0, count - (RACES[race].need - 1)); }
|
|
|
|
|
|
|
|
// ── 永久乘区(时间结晶,跨轮回) ───────────────────────────
|
|
// ── 永久乘区(时间结晶,跨轮回) ───────────────────────────
|
|
|
-// 世界树等级 D:成本 30 × 1.6^D;每级 本源产出 ×1.05、推进速度 ×1.08(几何乘区)
|
|
|
|
|
-export const TREE = { costBase: 30, costRatio: 1.6, prodPer: 0.05, speedPer: 0.08 };
|
|
|
|
|
|
|
+// 世界树等级 D:成本 30 × 1.9^D;每级 本源产出 ×1.05、推进速度 ×1.08(几何乘区)
|
|
|
|
|
+export const TREE = { costBase: 30, costRatio: 1.9, prodPer: 0.05, speedPer: 0.08 };
|
|
|
export function treeCost(level) { return Math.ceil(TREE.costBase * Math.pow(TREE.costRatio, level || 0)); }
|
|
export function treeCost(level) { return Math.ceil(TREE.costBase * Math.pow(TREE.costRatio, level || 0)); }
|
|
|
export function treeProdMul(level) { return Math.pow(1 + TREE.prodPer, level || 0); }
|
|
export function treeProdMul(level) { return Math.pow(1 + TREE.prodPer, level || 0); }
|
|
|
export function treeSpeedMul(level) { return Math.pow(1 + TREE.speedPer, level || 0); }
|
|
export function treeSpeedMul(level) { return Math.pow(1 + TREE.speedPer, level || 0); }
|
|
@@ -153,9 +155,9 @@ export function relicMul(count) { return Math.pow(1 + PERM.relicPer, count || 0)
|
|
|
|
|
|
|
|
// 自由轮回(首次逃逸后永久解锁):每完成一次完整的 1000 层轮回,自由轮回加成 +10%
|
|
// 自由轮回(首次逃逸后永久解锁):每完成一次完整的 1000 层轮回,自由轮回加成 +10%
|
|
|
export const FREEDOM = { per: 0.1 };
|
|
export const FREEDOM = { per: 0.1 };
|
|
|
-export function freedomMul(state) { return 1 + FREEDOM.per * (state.freeCycles || 0); }
|
|
|
|
|
|
|
+export function freedomMul(state) { return Math.max(1e-6, 1 + FREEDOM.per * (state.freeCycles || 0)); }
|
|
|
/** 残响(被动):炼化乘区 ×(1+0.02×已回溯次数) */
|
|
/** 残响(被动):炼化乘区 ×(1+0.02×已回溯次数) */
|
|
|
-export function resonanceMul(state) { return 1 + 0.02 * (state.rebirths || 0); }
|
|
|
|
|
|
|
+export function resonanceMul(state) { return Math.max(1e-6, 1 + 0.02 * (state.rebirths || 0)); }
|
|
|
|
|
|
|
|
export const RELICS = [
|
|
export const RELICS = [
|
|
|
{ id: 'seed', name: '初生之种', desc: '本源产出 ×1.25', icon: 'seed' },
|
|
{ id: 'seed', name: '初生之种', desc: '本源产出 ×1.25', icon: 'seed' },
|
|
@@ -169,12 +171,12 @@ export const RELICS = [
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
// ── 转生(时间回溯) ─────────────────────────────────────
|
|
// ── 转生(时间回溯) ─────────────────────────────────────
|
|
|
-// 单次收益 R = ⌊0.5 × T^1.3 × E × M × ruleMod⌋(保底 1,T = 本轮最深;指数 1.3 > 回溯的 1.0,鼓励往深处走)
|
|
|
|
|
|
|
+// 单次收益 R = ⌊0.5 × T^1.6 × E × M × ruleMod⌋(保底 1,T = 本轮最深;指数 1.6 > 回溯的 1.0,深度的收益超线性)
|
|
|
// E 计入见闻;同一轮回内重复回溯收益 ×0.5^n。
|
|
// E 计入见闻;同一轮回内重复回溯收益 ×0.5^n。
|
|
|
// E = 1 + 所有位面探索度之和/100(见闻)
|
|
// E = 1 + 所有位面探索度之和/100(见闻)
|
|
|
// M = 炼化乘区 = 兵种炼化技能 × 星穹羁绊 × 探索阶梯 × 跳关加成(1+min(0.3,0.5p)) × 见闻 × 自由轮回 × 残响
|
|
// M = 炼化乘区 = 兵种炼化技能 × 星穹羁绊 × 探索阶梯 × 跳关加成(1+min(0.3,0.5p)) × 见闻 × 自由轮回 × 残响
|
|
|
// 本轮回溯成本 C(T) = 1 + (T/40)²;效率 = R/C。同一轮回内再次炼化收益 ×0.5^n。
|
|
// 本轮回溯成本 C(T) = 1 + (T/40)²;效率 = R/C。同一轮回内再次炼化收益 ×0.5^n。
|
|
|
-export const REBIRTH = { k: 0.5, power: 1.3, exploreDiv: 100, min: 1, costDiv: 40, decay: 0.5, skipNoteCap: 0.3 };
|
|
|
|
|
|
|
+export const REBIRTH = { k: 0.5, power: 1.6, exploreDiv: 100, min: 1, costDiv: 40, decay: 0.5, skipNoteCap: 0.3 };
|
|
|
export function rebirthCost(T) { return 1 + Math.pow(Math.max(0, T) / REBIRTH.costDiv, 2); }
|
|
export function rebirthCost(T) { return 1 + Math.pow(Math.max(0, T) / REBIRTH.costDiv, 2); }
|
|
|
export function rebirthReward({ maxLayer = 0, exploreSum = 0, incomeMul = 1, ruleMod = 1 }) {
|
|
export function rebirthReward({ maxLayer = 0, exploreSum = 0, incomeMul = 1, ruleMod = 1 }) {
|
|
|
const T = Math.max(0, maxLayer);
|
|
const T = Math.max(0, maxLayer);
|