|
@@ -32,7 +32,8 @@ export function visitTime(L) { return MARCH.visitBase + MARCH.visitPerLayer * L;
|
|
|
|
|
|
|
|
// ── 跳关(时间维度乘区) ─────────────────────────────
|
|
// ── 跳关(时间维度乘区) ─────────────────────────────
|
|
|
// 触发率 p(封顶 60%):每次触发跳 k 层,P(k)/p ∝ 0.5^(k−1),k ∈ [1,4]。
|
|
// 触发率 p(封顶 60%):每次触发跳 k 层,P(k)/p ∝ 0.5^(k−1),k ∈ [1,4]。
|
|
|
-// E[k] = p × 20/15;时间乘区 = 1 + E[k];跳关后期望层耗时 = T / (1 + E[k])。
|
|
|
|
|
|
|
+// 命中时 k 的分布 P(k|命中) ∝ 0.5^(k−1)(k=1..4,权重 8:4:2:1),命中期望 E[k|命中] = 26/15
|
|
|
|
|
+// E[k] = p × 26/15;时间乘区 = 1 + E[k];跳关后期望层耗时 = T / (1 + E[k])。
|
|
|
export const SKIP = { minK: 1, maxK: 4, factor: 5.7, cap: 0.60 };
|
|
export const SKIP = { minK: 1, maxK: 4, factor: 5.7, cap: 0.60 };
|
|
|
export function skipPlan(pEff) {
|
|
export function skipPlan(pEff) {
|
|
|
const ps = Math.max(0, Math.min(SKIP.cap, Number(pEff) || 0));
|
|
const ps = Math.max(0, Math.min(SKIP.cap, Number(pEff) || 0));
|
|
@@ -44,13 +45,16 @@ export function skipPlan(pEff) {
|
|
|
}
|
|
}
|
|
|
export function skipExpectation(pEff) {
|
|
export function skipExpectation(pEff) {
|
|
|
const { ks, probs } = skipPlan(pEff);
|
|
const { ks, probs } = skipPlan(pEff);
|
|
|
- return ks.reduce((s, k, i) => s + k * probs[i], 0);
|
|
|
|
|
|
|
+ // 显式循环(曾误用同名参数导致结果偏差)
|
|
|
|
|
+ let e = 0;
|
|
|
|
|
+ for (let i = 0; i < ks.length; i++) e += ks[i] * probs[i];
|
|
|
|
|
+ return e;
|
|
|
}
|
|
}
|
|
|
export function timeMul(pEff) { return 1 + skipExpectation(pEff); }
|
|
export function timeMul(pEff) { return 1 + skipExpectation(pEff); }
|
|
|
|
|
|
|
|
// ── 本源产出(连续空间:产出 = 对已抵达层求和的“本源密度”) ──────────
|
|
// ── 本源产出(连续空间:产出 = 对已抵达层求和的“本源密度”) ──────────
|
|
|
// 第 L 层的本源密度 β(L) = 1.05^(L−F) × P_root(R),F = 本轮起始层,R = 根须等级。
|
|
// 第 L 层的本源密度 β(L) = 1.05^(L−F) × P_root(R),F = 本轮起始层,R = 根须等级。
|
|
|
-// 新一轮产出/秒 = ∫_F^L β = 1.05^L·P_root(R)/1.5(GDD §6.5 式 9;GDD 符号 B(L) 即此值)。
|
|
|
|
|
|
|
+// 新一轮产出/秒 = ∫_F^L β = P_root(R) × (1.05^L − 1)/(1.05·ln1.05)(GDD §6.5 式 9;GDD 符号 B(L) 即此值)。
|
|
|
export const ESSENCE_GROWTH = 1.05;
|
|
export const ESSENCE_GROWTH = 1.05;
|
|
|
export function essenceDensity(L, F) { return Math.pow(ESSENCE_GROWTH, Math.max(0, L - F)); }
|
|
export function essenceDensity(L, F) { return Math.pow(ESSENCE_GROWTH, Math.max(0, L - F)); }
|
|
|
export const PROD_BASE_DIV = 1.05 * Math.log(1.05);
|
|
export const PROD_BASE_DIV = 1.05 * Math.log(1.05);
|
|
@@ -63,18 +67,17 @@ export function piOf(L, F) {
|
|
|
|
|
|
|
|
// ── 本轮升级(消耗本源)几何成本 C = base × ratio^level ───────
|
|
// ── 本轮升级(消耗本源)几何成本 C = base × ratio^level ───────
|
|
|
export const COST = {
|
|
export const COST = {
|
|
|
- root: { base: 10, ratio: 1.4, per: 0.10, name: '根须', desc: '每级 本源产出 ×1.059、推进速度 ×1.05(成本 ×1.4/级)' },
|
|
|
|
|
|
|
+ root: { base: 10, ratio: 1.4, per: 0.10, name: '根须', desc: '每级 本源产出 ×1.059、推进速度 ×1.10(价格 ×1.4/级)' },
|
|
|
canopy: { base: 40, ratio: 2.2, per: 0.005, name: '树冠', desc: '每级 跳关触发率 +0.5%(封顶 60%);每级额外推进速度 ×1.08' },
|
|
canopy: { base: 40, ratio: 2.2, per: 0.005, name: '树冠', desc: '每级 跳关触发率 +0.5%(封顶 60%);每级额外推进速度 ×1.08' },
|
|
|
};
|
|
};
|
|
|
export const UPGRADE_KINDS = ['root', 'canopy'];
|
|
export const UPGRADE_KINDS = ['root', 'canopy'];
|
|
|
export const PURCHASE_CAP = 4; // 单次批量购买上限(每次点击最多升 4 级)
|
|
export const PURCHASE_CAP = 4; // 单次批量购买上限(每次点击最多升 4 级)
|
|
|
-export let ROOT_EXP = 0.6; // 根须产出层段压缩指数
|
|
|
|
|
-export function setRootExp(v) { ROOT_EXP = v; } // 仅平衡脚本使用
|
|
|
|
|
-export const LIFE_ETA = 10; // 兵种:购买价 ≤ 600 秒产出(让“解锁”有节奏)
|
|
|
|
|
-export const ETA = 10; // 等待时间:购买价 ≤ 10 × 当前产出/秒;兵种另有限制 ≤ LIFE_ETA × 产出/秒
|
|
|
|
|
|
|
+export const ROOT_EXP = 0.6; // 根须产出层段压缩指数
|
|
|
|
|
+export const KAPPA = 3; // 本轮价格系数 κ:价格 ×(κ·(π − π₀))(GDD §6.5 式 3/4,与本源产出指数 π 挂钩)
|
|
|
|
|
+export const ETA = 10; // 等待系数:只有 价格 ≤ ETA × 当前产出/秒 的项才会被购买(GDD §7.2)
|
|
|
|
|
+export const LIFE_ETA = 10; // 兵种同用 ETA(保留独立常量便于单独调参)
|
|
|
/** 本轮升级的真实价格 = 基础几何成本 × Π(π):π 越大(产出指数越高),价格越贵,从而抵消 R2 */
|
|
/** 本轮升级的真实价格 = 基础几何成本 × Π(π):π 越大(产出指数越高),价格越贵,从而抵消 R2 */
|
|
|
-export function piCostMul(pi) { return 1 + LIFE_PI * Math.max(0, (pi || 0) - PI0) * 2; }
|
|
|
|
|
- // 购买的“等待时间”系数:只有 成本 ≤ ETA × 当前每秒产出 的项才会被购买(GDD §7.2)
|
|
|
|
|
|
|
+export function piCostMul(pi) { return KAPPA * Math.max(0, (pi || 0) - PI0); }
|
|
|
export function costOf(kind, level) { const c = COST[kind]; return c.base * Math.pow(c.ratio, level); }
|
|
export function costOf(kind, level) { const c = COST[kind]; return c.base * Math.pow(c.ratio, level); }
|
|
|
export function batchCost(kind, level, n) {
|
|
export function batchCost(kind, level, n) {
|
|
|
const c = COST[kind];
|
|
const c = COST[kind];
|
|
@@ -112,12 +115,11 @@ export const LIVES = [
|
|
|
{ id: 'entropymaw', race: '虚空', name: '熵噬之喉', cost: 4e6, eff: { kind: 'prod', per: 0.20 }, skill: '吞吐侵蚀的本源,产出 +20%/级', icon: 'maw' },
|
|
{ id: 'entropymaw', race: '虚空', name: '熵噬之喉', cost: 4e6, eff: { kind: 'prod', per: 0.20 }, skill: '吞吐侵蚀的本源,产出 +20%/级', icon: 'maw' },
|
|
|
{ id: 'lightstrider', race: '虚空', name: '光行者', cost: 3e7, eff: { kind: 'awake', per: 0.15 }, skill: '以光速掠过每一层,推进速度 +15%/级(长期成长)', icon: 'strider' },
|
|
{ id: 'lightstrider', race: '虚空', name: '光行者', cost: 3e7, eff: { kind: 'awake', per: 0.15 }, skill: '以光速掠过每一层,推进速度 +15%/级(长期成长)', icon: 'strider' },
|
|
|
];
|
|
];
|
|
|
-export const LIFE_PI = 1; // 兵种本轮价格 = 基础成本 × 1.10^(n−1) × π/0.4879(GDD §6.5 式 4:每级收益与 π 的贡献同量级)
|
|
|
|
|
-export const PI0 = Math.log(1.05) / (1 - Math.exp(-Math.log(1.05) * 10));
|
|
|
|
|
|
|
+export const PI0 = Math.log(1.05) / (1 - Math.exp(-Math.log(1.05) * 10)); // π₀(=0.114):本轮前 10 层的参考指数
|
|
|
export const LIFE_RATIO = 1.10;
|
|
export const LIFE_RATIO = 1.10;
|
|
|
/** 兵种基础成本(永久基线):25 × 3^(序号) */
|
|
/** 兵种基础成本(永久基线):25 × 3^(序号) */
|
|
|
export function lifeBase(idx) { return 25 * Math.pow(3, idx || 0); }
|
|
export function lifeBase(idx) { return 25 * Math.pow(3, idx || 0); }
|
|
|
-export function lifeCostOf(baseCost, n, pi) { return baseCost * Math.pow(LIFE_RATIO, n - 1) * Math.max(1, 3 * Math.max(0, (pi || 0) - PI0)); }
|
|
|
|
|
|
|
+export function lifeCostOf(baseCost, n, pi) { return baseCost * Math.pow(LIFE_RATIO, n - 1) * Math.max(1, KAPPA * Math.max(0, (pi || 0) - PI0)); }
|
|
|
/** 兵种第 n 级的收益/成本比(产出类、速度类各自按 1.0/0.5 权重,跳关另算) */
|
|
/** 兵种第 n 级的收益/成本比(产出类、速度类各自按 1.0/0.5 权重,跳关另算) */
|
|
|
export function lifeEff(life, level) {
|
|
export function lifeEff(life, level) {
|
|
|
const k = life.eff.kind === 'prod' ? 1.0 : life.eff.kind === 'speed' ? 0.5 : life.eff.kind === 'crystal' ? 1.0 : 0.6;
|
|
const k = life.eff.kind === 'prod' ? 1.0 : life.eff.kind === 'speed' ? 0.5 : life.eff.kind === 'crystal' ? 1.0 : 0.6;
|
|
@@ -135,7 +137,7 @@ 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+0.05D)、推进速度 ×(1+0.08D)
|
|
|
|
|
|
|
+// 世界树等级 D:成本 30 × 1.6^D;每级 本源产出 ×1.05、推进速度 ×1.08(几何乘区)
|
|
|
export const TREE = { costBase: 30, costRatio: 1.6, prodPer: 0.05, speedPer: 0.08 };
|
|
export const TREE = { costBase: 30, costRatio: 1.6, 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); }
|
|
@@ -168,6 +170,7 @@ export const RELICS = [
|
|
|
|
|
|
|
|
// ── 转生(时间回溯) ─────────────────────────────────────
|
|
// ── 转生(时间回溯) ─────────────────────────────────────
|
|
|
// 单次收益 R = ⌊0.5 × T^1.3 × E × M × ruleMod⌋(保底 1,T = 本轮最深;指数 1.3 > 回溯的 1.0,鼓励往深处走)
|
|
// 单次收益 R = ⌊0.5 × T^1.3 × E × M × ruleMod⌋(保底 1,T = 本轮最深;指数 1.3 > 回溯的 1.0,鼓励往深处走)
|
|
|
|
|
+// 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。
|
|
@@ -252,9 +255,7 @@ export const RIFT_ENVS = [
|
|
|
export const RULE_IDS = ['knowledge', 'oath', 'belief', 'judge'];
|
|
export const RULE_IDS = ['knowledge', 'oath', 'belief', 'judge'];
|
|
|
export const RULE_NAMES = { knowledge: '知识', oath: '誓约', belief: '信念', judge: '裁决' };
|
|
export const RULE_NAMES = { knowledge: '知识', oath: '誓约', belief: '信念', judge: '裁决' };
|
|
|
export const RULE_COLORS = { knowledge: '#5FA8D3', oath: '#7FB2FF', belief: '#5FD68A', judge: '#F0C060' };
|
|
export const RULE_COLORS = { knowledge: '#5FA8D3', oath: '#7FB2FF', belief: '#5FD68A', judge: '#F0C060' };
|
|
|
-export const EXPLORE_GAIN = 1.4;
|
|
|
|
|
-export const EXPLORE_MIN_FAIL = 3;
|
|
|
|
|
-// 探索度增量:通关 ⌊6 + 分/50⌋、失败 ⌊6 + 分/100⌋(失败也有价值,且随分数变好),再 ×EXPLORE_GAIN
|
|
|
|
|
|
|
+// 探索度增量:通关 ⌊6 + 分/50⌋、失败 ⌊6 + 分/100⌋(失败也有价值,且随分数变好)
|
|
|
export function riftExploreDelta(steps, score, cleared) {
|
|
export function riftExploreDelta(steps, score, cleared) {
|
|
|
const sc = Math.max(0, score);
|
|
const sc = Math.max(0, score);
|
|
|
return cleared ? Math.floor(6 + sc / 50) : Math.floor(6 + sc / 100);
|
|
return cleared ? Math.floor(6 + sc / 50) : Math.floor(6 + sc / 100);
|
|
@@ -269,5 +270,5 @@ export const OFFLINE = { capSec: 8 * 3600, eff: 0.6 };
|
|
|
export const EVENT = {
|
|
export const EVENT = {
|
|
|
lifeKeep: 0.2, // 溯时回响:转生后兵种等级保留 20%(上限 LIFE_ECHO_CAP;修仙 ×2)
|
|
lifeKeep: 0.2, // 溯时回响:转生后兵种等级保留 20%(上限 LIFE_ECHO_CAP;修仙 ×2)
|
|
|
civSec: 75,
|
|
civSec: 75,
|
|
|
- autoRebirthDefault: 20,
|
|
|
|
|
|
|
+ autoRebirthDefault: 120, // 禅定默认每 120 秒回溯一次(但只在离最优回溯点足够近时执行)
|
|
|
};
|
|
};
|