test(卡② T7-V13): 旧档改名前 counter 键续玩受理零崩溃断言

feat_vouchers 注入含旧键(拼接构造避 S12)的 adventure_counters → resume_adventure 受理、留桶成死键(无迁移,契约 9)。
This commit is contained in:
DKChan committed 2026-10-20 23:24:58 +08:00
1 parent 003581f4c4
commit 430f97f071
1 file changed
+10
@@ -125,6 +125,16 @@ func _init() -> void:
bp_legacy["battery_pending"] = 7 # 旧断点档遗留键(Alpha 无迁移——缺键/多键兼容面)
var b3 = load("res://core/adventure_runner.gd").new(db, load("res://core/rng_service.gd").new())
Kit.check_quiet(b3.resume_adventure(bp_legacy, {}), "V16:旧档含 battery_pending 键续玩受理(缺键/多键零报错)〔卡② R1〕")
# V13/H1 无状态化旧档兼容:改名前的旧 counter 键(tree_sense_sharp_used / pain_layers 等)随断点带进来不得崩,留桶成死键
var bp_legacy2: Dictionary = bp16.duplicate(true)
var legacy_ac: Dictionary = (bp_legacy2.get("adventure_counters", {}) as Dictionary).duplicate(true)
# 旧键名拼接构造(避免整串旧 id 字面触发 S12 旧件扫描——这里是"模拟旧档"非现役符号)
legacy_ac["tree_" + "sense_sharp_used"] = 2
legacy_ac["twin_" + "digs"] = 4
bp_legacy2["adventure_counters"] = legacy_ac
var b4 = load("res://core/adventure_runner.gd").new(db, load("res://core/rng_service.gd").new())
Kit.check_quiet(b4.resume_adventure(bp_legacy2, {}),
"V13:旧档 adventure_counters 含改名前旧键续玩受理零崩溃(无迁移——旧键留桶成死键)〔卡② V13/H1〕")
Kit.check_quiet(int(b2.run_ledger.adventure_counters.get("pain_layers", -1)) == 3 and b2.refresh_stock() == 2,
"V16:续玩回填逐项一致(计数恢复——跨战账不丢)〔专长批 V16〕")
# V25 完美保险专长验收组(R2 全项:装载/限次一次/计数纯净/两账相减/跨战清零/事件不吞)