W5: sim一轮裁定落地+二轮校准 — 冤煞独立表(wrath_layers 22行)/宿慧渐近封顶F-1/跳过钳制F-2/验收门#2#3#10#13#14修订;二轮4/5 FAIL转PASS,#13 R4残留0.396(带外0.021),硬门#5#10不回归,红线9.5e15→7.007B,test_runner 750检查8/8用例
This commit is contained in:
1 parent
c534e95458
commit
c0a5c52cb7
37 files changed
+49293
-153
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -37,6 +37,32 @@ func run(a, data: BalanceData) -> void:
|
||||
a.eq(data.tune_text("tune_restart_curve", ""), "1:0.6:0.4:0.3", "重开曲线文本")
|
||||
a.near(data.tune_num("tune_wrath_layers", 0.0), 22.0, 1e-9, "冤煞 22 层")
|
||||
a.near(data.tune_num("tune_click_base", 0.0), 1.0, 1e-9, "点击基础值 1")
|
||||
# W5 裁定调参(sim 一轮裁定 §2.3/§2.4):宿慧渐近 + 跳过封顶 + 削减速加深
|
||||
a.near(data.tune_num("tune_suihui_global_max", 0.0), 0.5, 1e-9, "宿慧渐近上限 0.50")
|
||||
a.near(data.tune_num("tune_suihui_global_scale", 0.0), 420.0, 1e-9, "宿慧衰减尺度 420")
|
||||
a.near(data.tune_num("tune_skip_level_cap_per_gen", 0.0), 50.0, 1e-9, "跳过每档封顶 50")
|
||||
a.near(data.tune_num("tune_wrath_penalty", 0.0), 0.04, 1e-9, "削减速 4%/层")
|
||||
a.near(data.tune_num("tune_wrath_penalty_cap", 0.0), 0.4, 1e-9, "削减速封顶 40%")
|
||||
a.false_(data.has_tune("tune_wrath_bonus"), "tune_wrath_bonus 已迁入 wrath_layers.csv")
|
||||
a.false_(data.has_tune("tune_wrath_cost_base"), "tune_wrath_cost_base 已迁入 wrath_layers.csv")
|
||||
a.false_(data.has_tune("tune_wrath_cost_exp"), "tune_wrath_cost_exp 已迁入 wrath_layers.csv")
|
||||
a.false_(data.has_tune("tune_suihui_global_pct"), "tune_suihui_global_pct 已被渐近公式取代")
|
||||
# W5 G-1:冤煞层表(22 行;m07/m08 联动)
|
||||
a.eq(data.wrath_layers.size(), 22, "wrath_layers 22 行")
|
||||
a.near(data.wrath_layers[0].effect, 0.15, 1e-9, "L1 effect 0.15")
|
||||
a.near(data.wrath_layers[14].effect, 0.15, 1e-9, "L15 effect 0.15")
|
||||
a.near(data.wrath_layers[15].effect, 0.0, 1e-9, "L16 effect 0(归零)")
|
||||
a.eq(data.wrath_layers[0].cost, 8, "L1 成本 8")
|
||||
a.eq(data.wrath_layers[21].cost, 2087, "L22 成本 2087")
|
||||
var m07 := data.meta("meta_07")
|
||||
a.near(m07.effect_param, 0.20, 1e-9, "m07 削减 40%→20%(W5 联动)")
|
||||
a.eq(data.meta("meta_08").name_cn, "幽冥恩荫", "m08 更名幽冥恩荫(P-4 消歧)")
|
||||
# W5 裁定 P-28:halls 到达目标列新值(H10 保持 180;殿门阈值不动)
|
||||
var expect_targets := [10, 20, 36, 56, 80, 102, 122, 142, 164, 180]
|
||||
for i in expect_targets.size():
|
||||
a.eq(int(data.halls[i].target_min), expect_targets[i], "H%d 到达目标 %d min" % [i + 1, expect_targets[i]])
|
||||
a.near(data.halls[0].gate_merit, 2000.0, 0.5, "H1 殿门阈值不动(2K)")
|
||||
a.near(data.halls[9].gate_merit, 1.5e9, 0.5, "H10 殿门阈值不动(1.5B)")
|
||||
# 跨表引用完整性(schema 管单表;这里查跨表)
|
||||
a.true_(data.check_references().is_empty(), "跨表引用无悬挂(%s)" % str(data.check_references()))
|
||||
# 每殿恰一场殿王战 + 色板
|
||||
|
||||
@@ -29,9 +29,11 @@ func run(a, _data: BalanceData) -> void:
|
||||
a.eq(PrestigeModel.wrath_layer_cost(1, 8.0, 1.8), 8, "怨煞层 1 成本 8")
|
||||
a.eq(PrestigeModel.wrath_layer_cost(2, 8.0, 1.8), 28, "怨煞层 2 成本 28")
|
||||
a.eq(PrestigeModel.wrath_layer_cost(22, 8.0, 1.8), 2087, "怨煞层 22 成本 2087")
|
||||
a.near(PrestigeModel.wrath_penalty(10, 0.03, 0.3, 0.0), 0.3, 1e-9, "冤气削减封顶 30%")
|
||||
a.near(PrestigeModel.wrath_penalty(10, 0.03, 0.3, 0.15), 0.15, 1e-9, "m07 改 15%")
|
||||
a.near(PrestigeModel.wrath_penalty(5, 0.03, 0.3, 0.0), 0.15, 1e-9, "5 层 = 15%")
|
||||
# W5 新参数(裁定 P-26):削减速 −4%/层封顶 −40%;m07 改 20%
|
||||
a.near(PrestigeModel.wrath_penalty(10, 0.04, 0.4, 0.0), 0.4, 1e-9, "冤气削减封顶 40%")
|
||||
a.near(PrestigeModel.wrath_penalty(10, 0.04, 0.4, 0.20), 0.20, 1e-9, "m07 改 20%")
|
||||
a.near(PrestigeModel.wrath_penalty(5, 0.04, 0.4, 0.0), 0.2, 1e-9, "5 层 = 20%")
|
||||
a.near(PrestigeModel.wrath_penalty(9, 0.04, 0.4, 0.0), 0.36, 1e-9, "9 层 = 36%(未触顶)")
|
||||
a.eq(PrestigeModel.skip_count(23, 5), 4, "skip 23/5 = 4")
|
||||
a.eq(PrestigeModel.skip_count(23, 4), 5, "skip 23/4 = 5(m04)")
|
||||
a.near(PrestigeModel.restart_target(0), 1.0, 1e-9, "重开曲线 R1")
|
||||
@@ -40,6 +42,41 @@ func run(a, _data: BalanceData) -> void:
|
||||
a.true_(PrestigeModel.enthrone_available(2, 2), "敕封:转世 2 可")
|
||||
a.true_(not PrestigeModel.enthrone_available(1, 2), "敕封:转世 1 不可")
|
||||
|
||||
# ---- W5 G-1:wrath_layers.csv 22 行(效果/成本逐行;[B§12] 漏登补登)----
|
||||
var wl := _data.wrath_layers
|
||||
a.eq(wl.size(), 22, "冤煞层 22 行")
|
||||
var sum_effect := 0.0
|
||||
var prev_cost := -1
|
||||
for row in wl:
|
||||
a.eq(row.layer_index, wl.find(row) + 1, "layer_index 从 1 连续(%s)" % row.id)
|
||||
# 成本列 = round(8×n^1.8) 逐行一致(表 = 公式落盘,双源交叉校验)
|
||||
a.eq(row.cost, PrestigeModel.wrath_layer_cost(row.layer_index, 8.0, 1.8),
|
||||
"成本 = 公式(%s)" % row.id)
|
||||
a.true_(row.cost > prev_cost, "成本严格递增(%s)" % row.id)
|
||||
prev_cost = row.cost
|
||||
# effect 剖面:L1-15 = 0.15;L16-22 = 0.00(合计封顶 +225%)
|
||||
if row.layer_index <= 15:
|
||||
a.near(row.effect, 0.15, 1e-9, "L%d effect = 0.15" % row.layer_index)
|
||||
else:
|
||||
a.near(row.effect, 0.0, 1e-9, "L%d effect = 0(归零)" % row.layer_index)
|
||||
sum_effect += row.effect
|
||||
a.near(sum_effect, 2.25, 1e-9, "22 层合计 effect = +225%(15 层封顶)")
|
||||
a.near(_data.wrath_layer_effect_sum(15), 2.25, 1e-9, "effect_sum(15) = +225%")
|
||||
a.near(_data.wrath_layer_effect_sum(10), 1.5, 1e-9, "effect_sum(10) = +150%")
|
||||
a.near(_data.wrath_layer_effect_sum(22), 2.25, 1e-9, "effect_sum(22) 仍 +225%(16-22 归零)")
|
||||
a.near(_data.wrath_layer_effect_sum(0), 0.0, 1e-9, "effect_sum(0) = 0")
|
||||
a.eq(_data.wrath_layer(1).cost, 8, "wrath_layer(1) 成本 8")
|
||||
a.eq(_data.wrath_layer(22).cost, 2087, "wrath_layer(22) 成本 2087")
|
||||
a.true_(_data.wrath_layer(23) == null, "wrath_layer(23) 越界 = null")
|
||||
# W5 新调参(裁定 F-1/F-2):宿慧渐近 + 跳过封顶
|
||||
a.near(_data.tune_num("tune_suihui_global_max", 0.0), 0.5, 1e-9, "宿慧渐近上限 0.50")
|
||||
a.near(_data.tune_num("tune_suihui_global_scale", 0.0), 420.0, 1e-9, "宿慧衰减尺度 420")
|
||||
a.near(_data.tune_num("tune_skip_level_cap_per_gen", 0.0), 50.0, 1e-9, "跳过每档封顶 50")
|
||||
a.near(_data.tune_num("tune_wrath_penalty", 0.0), 0.04, 1e-9, "削减速 0.04/层")
|
||||
a.near(_data.tune_num("tune_wrath_penalty_cap", 0.0), 0.4, 1e-9, "削减速封顶 0.40")
|
||||
a.false_(_data.has_tune("tune_wrath_bonus"), "tune_wrath_bonus 已迁入表(防双源)")
|
||||
a.false_(_data.has_tune("tune_suihui_global_pct"), "tune_suihui_global_pct 已被渐近公式取代")
|
||||
|
||||
# ---- OfflineModel 分带 + 72h 封顶 + 时钟回拨 + 长明灯加法 + 硬顶 ----
|
||||
# W4 契约 v2(systems-spec §2.4/§2.5):第三参数由 offline_mult(乘性)改为
|
||||
# offline_add(加法,直接加在各档速率上,各档硬顶 100%)。
|
||||
|
||||
@@ -8,6 +8,8 @@ func run(a, data: BalanceData) -> void:
|
||||
_test_upgrades_and_meta(a, data)
|
||||
_test_wrath(a, data)
|
||||
_test_prestige(a, data)
|
||||
_test_suihui_asymptotic(a, data)
|
||||
_test_skip_cap(a, data)
|
||||
_test_enthrone(a, data)
|
||||
_test_event_and_offline(a, data)
|
||||
|
||||
@@ -82,12 +84,14 @@ func _test_wrath(a, data: BalanceData) -> void:
|
||||
e.devour(100.0)
|
||||
a.near(e.wrath, 100.0, 1e-9, "吞噬 +100 冤气")
|
||||
a.eq(e.devour_count, 1, "吞噬计数")
|
||||
a.eq(e.wrath_layer_cost(), 8, "第 1 层成本 8")
|
||||
a.eq(e.wrath_layer_cost(), 8, "第 1 层成本 8(wrath_layers.csv 逐行)")
|
||||
var r: Dictionary = e.buy_wrath_layer()
|
||||
a.true_(bool(r.get("ok", false)), "买第 1 层怨煞")
|
||||
a.eq(e.wrath_layers, 1, "1 层")
|
||||
a.near(e.global_mult(), 1.25, 1e-9, "全局 ×1.25(每层 +25%)")
|
||||
a.near(e.wrath_penalty(), 0.03, 1e-9, "宿慧削减 3%")
|
||||
# W5 裁定 P-25:每层全局 +25% → +15%(合计 15 层后封顶 +225%)
|
||||
a.near(e.global_mult(), 1.15, 1e-9, "全局 ×1.15(每层 +15%)")
|
||||
# W5 裁定 P-26:宿慧削减 +3%/层 → +4%/层(封顶 40%)
|
||||
a.near(e.wrath_penalty(), 0.04, 1e-9, "宿慧削减 4%")
|
||||
e.wrath = 0.0
|
||||
var r2: Dictionary = e.buy_wrath_layer()
|
||||
a.true_(not bool(r2.get("ok", false)), "冤气不足买不了")
|
||||
@@ -97,6 +101,11 @@ func _test_wrath(a, data: BalanceData) -> void:
|
||||
a.eq(e.wrath_layers, 22, "22 层上限")
|
||||
var r3: Dictionary = e.buy_wrath_layer()
|
||||
a.true_(not bool(r3.get("ok", false)), "满层后再买失败")
|
||||
# W5:L1-15 各 +15%(合计 +225% = ×3.25);L16-22 effect = 0(过盛不顶用)
|
||||
a.near(e.global_mult(), 1.0 + 15.0 * 0.15, 1e-9, "满层全局 ×3.25(15 层后归零)")
|
||||
a.near(e.wrath_penalty(), 0.4, 1e-9, "22 层削减封顶 40%")
|
||||
# 成本列逐行 = round(8×n^1.8)(表即公式落盘;抽检首/中/末)
|
||||
a.eq(e.wrath_layer_cost(), 2087, "满层后下一层成本回退末行 2087")
|
||||
|
||||
|
||||
# ---- 轮回转世 ----
|
||||
@@ -113,11 +122,80 @@ func _test_prestige(a, data: BalanceData) -> void:
|
||||
a.eq(e.suihui, 193, "宿慧入账")
|
||||
a.eq(e.rebirths, 1, "转世 1 次")
|
||||
a.near(e.merit, 0.0, 1e-9, "阴德清零")
|
||||
a.eq(e.gen_levels[0], 950, "跳过机制:193/5=38 ×25 = 950 级")
|
||||
# W5 裁定 F-2:跳过每档封顶 50 级(193/5=38 次 ×25 = 950 → 钳到 50;
|
||||
# 注意 do_prestige 先清零班底([B§4.1] 全清)再加跳过,故原有 50 级不计入)
|
||||
a.eq(e.gen_levels[0], 50, "跳过封顶:193 宿慧 → 50 级/档(旧口径 950)")
|
||||
a.eq(e.halls_passed, 0, "殿门进度重置")
|
||||
a.eq(e.bought.size(), 0, "升级清空")
|
||||
# 第二轮更快(宿慧全局 +3%)
|
||||
a.near(e.global_mult(), 1.0 + 193 * 0.03, 1e-9, "宿慧全局加成")
|
||||
# 第二轮更快(宿慧全局渐近加成,F-1)
|
||||
var smax: float = data.tune_num("tune_suihui_global_max", 0.5)
|
||||
var sscale: float = data.tune_num("tune_suihui_global_scale", 420.0)
|
||||
a.near(e.global_mult(), 1.0 + smax * (1.0 - exp(-193.0 / sscale)), 1e-9, "宿慧全局渐近加成(193 → +18.4%)")
|
||||
|
||||
|
||||
# ---- 宿慧全局渐近封顶(W5 裁定 F-1:线性无界 → 0.50×(1−e^(−宿慧/420)))----
|
||||
func _test_suihui_asymptotic(a, data: BalanceData) -> void:
|
||||
var e := EconomyState.new(data)
|
||||
var smax: float = data.tune_num("tune_suihui_global_max", 0.5)
|
||||
var sscale: float = data.tune_num("tune_suihui_global_scale", 420.0)
|
||||
e.suihui = 0
|
||||
e.recompute()
|
||||
a.near(e.global_mult(), 1.0, 1e-9, "0 宿慧 → 无加成")
|
||||
# 裁定 §2.4 查点表:193→+18.4%;386→+30.1%;579→+37.4%;772→+42.0%
|
||||
for s in [193, 386, 579, 772, 1550, 5000]:
|
||||
e.suihui = s
|
||||
e.recompute()
|
||||
var want: float = 1.0 + smax * (1.0 - exp(-float(s) / sscale))
|
||||
a.near(e.global_mult(), want, 1e-9, "宿慧 %d → 加成 %.4f" % [s, want - 1.0])
|
||||
# 渐近上限:宿慧 → ∞ 也只到 +50%(封死"银行式刷宿慧"死亡螺旋)
|
||||
e.suihui = 100000000
|
||||
e.recompute()
|
||||
a.near(e.global_mult(), 1.0 + smax, 1e-6, "巨量宿慧仍封顶 +50%")
|
||||
# 单调不减(渐近函数的基本性质)
|
||||
var prev := 0.0
|
||||
for s in [0, 10, 50, 100, 193, 386, 579, 772, 1550, 5000]:
|
||||
e.suihui = s
|
||||
e.recompute()
|
||||
var gm := e.global_mult()
|
||||
a.true_(gm >= prev - 1e-12, "宿慧加成单调不减 @%d" % s)
|
||||
prev = gm
|
||||
|
||||
|
||||
# ---- 跳过机制钳制(W5 裁定 F-2:每档 min(floor(宿慧/5)×25, 50))----
|
||||
func _test_skip_cap(a, data: BalanceData) -> void:
|
||||
var cap: int = int(data.tune_num("tune_skip_level_cap_per_gen", 50.0))
|
||||
a.eq(cap, 50, "调参:每档封顶 50 级")
|
||||
var e := EconomyState.new(data)
|
||||
# 公式直测:_apply_rebirth_start_levels 是纯应用函数。走 do_prestige 测不了
|
||||
# 低宿慧区——H10 门 1.5e9 决定每轮 gain ≥ 193(38 次触发必触顶)。
|
||||
_apply_skip(e, 5)
|
||||
a.eq(e.gen_levels[0], 25, "5 宿慧 → 25 级/档(未触顶)")
|
||||
_apply_skip(e, 10)
|
||||
a.eq(e.gen_levels[0], 50, "10 宿慧 → 50 级/档(恰触顶)")
|
||||
_apply_skip(e, 400)
|
||||
a.eq(e.gen_levels[0], 50, "400 宿慧 → 仍 50 级/档(钳制生效)")
|
||||
# 三档覆盖:前 3 档各 +50(skip_gens = 3)
|
||||
a.eq(e.gen_levels[1], 50, "第 2 档同获赠")
|
||||
a.eq(e.gen_levels[2], 50, "第 3 档同获赠")
|
||||
a.eq(e.gen_levels[3], 0, "第 4 档不受跳过覆盖")
|
||||
# 集成:do_prestige 后(gain 193 入账)R2 开盘 = 50 级/档
|
||||
e.merit_run_total = 1.5e9
|
||||
var r: Dictionary = e.do_prestige()
|
||||
a.true_(bool(r.get("ok", false)), "轮回(集成)")
|
||||
a.eq(e.gen_levels[0], 50, "do_prestige 后 50 级/档(钳制生效;旧口径 950)")
|
||||
# m04(间隔 5→4):400/4=100 次 ×25 = 2500 → 同样钳到 50
|
||||
var rm: Dictionary = e.buy_meta("meta_04")
|
||||
a.true_(bool(rm.get("ok", false)), "买 m04 天生熟练(间隔 4)")
|
||||
_apply_skip(e, 400)
|
||||
a.eq(e.gen_levels[0], 50, "m04 下仍钳到 50 级/档")
|
||||
|
||||
|
||||
## 测试辅助:清零班底级数 → 设宿慧 → 应用跳过/开局加成(_apply 为加法,须先清零)
|
||||
func _apply_skip(e: EconomyState, suihui_v: int) -> void:
|
||||
for i in e.gen_levels.size():
|
||||
e.gen_levels[i] = 0
|
||||
e.suihui = suihui_v
|
||||
e._apply_rebirth_start_levels()
|
||||
|
||||
|
||||
# ---- 阴司敕封 + gen12 愿景档 ----
|
||||
@@ -136,11 +214,14 @@ func _test_enthrone(a, data: BalanceData) -> void:
|
||||
a.true_(bool(r2.get("ok", false)), "执行受敕")
|
||||
a.true_(e.enthroned, "enthroned 旗标")
|
||||
a.true_(e.generator_unlocked(11), "受敕 → gen12 解锁")
|
||||
# 全局区 = 1 + 宿慧100×3% + 敕封 25% = 4.25
|
||||
a.near(e.global_mult(), 4.25, 1e-9, "全局 ×4.25(宿慧+敕封)")
|
||||
# 全局区 = 1 + 宿慧100 渐近加成 + 敕封 25%(W5 F-1:宿慧项改渐近公式)
|
||||
var smax: float = data.tune_num("tune_suihui_global_max", 0.5)
|
||||
var sscale: float = data.tune_num("tune_suihui_global_scale", 420.0)
|
||||
var want_global: float = 1.0 + smax * (1.0 - exp(-100.0 / sscale)) + 0.25
|
||||
a.near(e.global_mult(), want_global, 1e-9, "全局 = 1 + 宿慧渐近 + 敕封 25%(≈×1.356)")
|
||||
# gen12 产出接入
|
||||
e.gen_levels[11] = 1
|
||||
a.near(e.output_per_sec(), 1073741824.0 * 4.25, 1.0, "gen12 1 级产出")
|
||||
a.near(e.output_per_sec(), 1073741824.0 * want_global, 1.0, "gen12 1 级产出")
|
||||
|
||||
|
||||
# ---- 事件瞬时区 + 离线加法(契约 v2:长明灯 ×2.31 → 加法 +30%) ----
|
||||
|
||||
Reference in new issue
Block a user