fix(缺陷修批): Y断点随存——attune_refresh_y 入断点快照+续玩优先读断点(堵「用完 Y 退菜单再续玩满血复活」可利用漏洞;旧断点缺键回退参数面=旧档行为零变化)——06「天赋树实装批登记欠账三条」③,2026-10-13 用户令提前单独开修(按正常流程走)

代码两处(adventure_runner.gd):①_snapshot_breakpoint 断点字典扩列 "attune_refresh_y"(refresh_stock/battery_pending 同款六先例,扩列向后兼容);②resume_adventure Y 注入行改 bp.get("attune_refresh_y", params 回退)——花掉不回血,续玩保持已消耗态。

单测:curio_refresh_paid_test 新增⑥段两断言(断点有键=余量随断点还原花1剩2/旧断点缺键=回退参数面整额注入旧档零变化)。

文档三件随批(机械面同步):①存档序列化.md v1.8——断点随件键 attune_refresh_y 登记,v7 域后扩列不升版(v1.6 vision_used 先例同款,SAVE_FORMAT_VERSION 仍 7 无迁移分支);②冒险结构.md v0.21——「冒险断点」节附随件清单扩 Y 刷新池余量(断点字段口径 owner);③06-待办清单——欠账三条专条③✅销号注记+状态行换代(①②维持归 M4,本条转记账条无待裁点)。

批末闸:冒烟 938/0+单测 24 套全绿(含新⑥段)+doc 三闸对基线零新增(死链 3/term 旗与 gdd_lint 3 件 FAIL 均存量——迭代 23 并入后基线,本批三文档零新增旗);零数值零表值改动。
This commit is contained in:
DKChan committed 2026-10-13 02:05:17 +08:00
1 parent 663c0bf4b5
commit 8e04807d4a
5 files changed
+16 -4

No files matched your search

@@ -52,6 +52,15 @@ func _init() -> void:
Kit.check_quiet(lr.spend_gp(31) == false and int(lr.gp) == 30, "余额不足拒绝零副作用")
Kit.check_quiet(lr.spend_gp(20) == true and int(lr.gp) == 10, "足额支出扣账(30→10)")
# ---- ⑥ Y 断点随存(2026-10-13 缺陷修批——旧缺陷:续玩自参数面整额重注入=用完 Y 退菜单再续玩满血复活)----
var bp_y := {"level_index": 1, "hero_hp": 10, "attune_refresh_y": 2}
var adr_r = load("res://core/adventure_runner.gd").new(db, load("res://core/rng_service.gd").new())
Kit.check_quiet(adr_r.resume_adventure(bp_y, {"hero_override": {}, "attune_refresh_y": 3}), "续玩受理(最小断点+参数面)")
Kit.check_quiet(adr_r._attune_refresh_y == 2, "断点有键=Y 余量随断点还原(花 1 剩 2——不再整额重注入=满血复活堵死)")
var adr_o = load("res://core/adventure_runner.gd").new(db, load("res://core/rng_service.gd").new())
Kit.check_quiet(adr_o.resume_adventure({"level_index": 1, "hero_hp": 10}, {"hero_override": {}, "attune_refresh_y": 3}), "旧断点续玩受理(快照缺键)")
Kit.check_quiet(adr_o._attune_refresh_y == 3, "旧断点缺键=回退参数面整额注入(旧档行为零变化)")
quit(Kit.finish("curio_refresh_paid"))