拆件批v1.3-B1(主角账领域拆分): hero_ledger.gd 整件退役→三新件按领域各归各账——hero_stats.gd(生命/特性/类型轴/生效公式与回血封顶单点/续玩钳制收口 clamp_hp_to_resume_cap/断点片段 hero_hp+relics 两键,构造注入 GainJournal 只读引用消费加算汇总)、gp_wallet.gd(gp 单写原语+片段 gp 键)、gain_journal.gd(获得记录三层+三通道 gain_bonus 单写原语+购买档数/钥石/真视+reset_adventure_accounts+片段六键,record_gain 转私有,_record_gain 词表不变);断点拼盘改三片段并集(BREAKPOINT_FIELDS 28 键序不变,_resume_ledger 三还原各取各键,日记缺键汇总直载/在档推导比对拒载逐字承现);消费方改址——adventure_runner(建件三引用+件出口 hero()→stats()/wallet()/journal()/deck(),start/restart 三件先日记后钱包再置满同序,_resume_params 钳制改 clamp_hp_to_resume_cap,载荷_base 随附钱包读数——停点件零钱包依赖)、level_runner(ctx hero→stats/wallet/journal 三键,私有三件同源成对自建,gp/hero_hp 属性改指三件,effective_ap_bonus→journal,hero()→stats()+journal() 出口,_bind_shop refs 换代)、shop_session(refs wallet+journal,BONUS_AXES 归 GainJournal)、battle_orchestrator(encounter "hero"→"journal" 键+_hero 类型 GainJournal)、curio_stop(构造参 stats+journal,兑付落账 split 指针,头注换代清 HeroLedger 表述)、呈现/探针/模拟六文件 12 处读面改址、测试六文件改址(hero_ledger_test 重写为三件测试——文件名与 manifest 行不变,新增 hs1 零引用源码断言)。验收:全量套件除 round_flow EV 锚 goblin 已知预期红外全绿;bp 对拍 292dumps×28 键 mismatch=0;冒烟 17 项 0 失败〔领域拆分批 V1〕

This commit is contained in:
DKChan committed 2026-10-27 08:10:08 +08:00
1 parent e40aa6f8c1
commit fde14f1c1c
28 files changed
+679 -532

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ static func refresh(stage: BattleStageView, info: HeroInfoPanelView, ap_bar: ApB
# 共账本〔level_runner bonus{atk,max_hp,armor_class}〕;空加算=整节隐藏〔视图内空态纪律〕。
# 呈现只读投影零核心触碰;行文格式=白名单项)
if runner != null and level_active:
var b: Dictionary[Variant, Variant] = runner.hero().bonus_snapshot() # 加算区住主角账
var b: Dictionary[Variant, Variant] = runner.journal().bonus_snapshot() # 加算区住加算日记
var lines: Array[String] = []
if int(b.get("atk", 0)) != 0:
lines.append("攻击 %+d" % int(b.get("atk", 0)))
@@ -310,7 +310,7 @@ static func gp_summary_text(payload: Dictionary, runner: Variant, save_manager:
static func bonus_summary_text(runner: Variant) -> String:
if runner == null:
return ""
var b: Dictionary[Variant, Variant] = runner.hero().bonus_snapshot() # 加算区住主角账
var b: Dictionary[Variant, Variant] = runner.journal().bonus_snapshot() # 加算区住加算日记
var parts: Array[String] = []
if int(b.get("atk", 0)) != 0:
parts.append("攻 %+d" % int(b.get("atk", 0)))
+5 -5
View File
@@ -31,8 +31,8 @@ static func _on_adventure_level_started(root: Variant, level_index: int, display
var ov: Dictionary[Variant, Variant] = root.meta.hero_override()
var boosted: bool = int(ov.get("atk", 0)) > 0 or int(ov.get("max_hp", 0)) > 0 \
or root.debug_overlay.atk_pct() > 0 or root.debug_overlay.hp_pct() > 0 \
or root.run_scope.runner.hero().bonus_total("atk") > 0 \
or root.run_scope.runner.hero().bonus_total("max_hp") > 0
or root.run_scope.runner.journal().bonus_total("atk") > 0 \
or root.run_scope.runner.journal().bonus_total("max_hp") > 0
root.log_view.append_bb(root.Narrator.level_open_line(display_name, int(root.run_scope.adventure.master_seed),
root.run_scope.runner.effective_atk(), root.run_scope.runner.effective_max_hp(), boosted))
@@ -217,9 +217,9 @@ static func _exit_level_screen(root: Variant) -> void:
# 选路屏状态栏装配(视图零核心态拼装——architecture §1.3:读核心态→拼展示文案集中于装配器)。
# 打开本屏/兑付确认回执后由组合根取成品喂入 apply_status(刷新时点与原视图内自刷一致)。
static func level_map_status_payload(runner: LevelRunner) -> Dictionary:
var atk_bonus := runner.hero().bonus_total("atk") # 加算区住主角账(读面经 hero() 出口承接)
var ac_bonus := runner.hero().bonus_total("armor_class")
var hp_bonus := runner.hero().bonus_total("max_hp")
var atk_bonus := runner.journal().bonus_total("atk") # 加算区住加算日记(读面经 journal() 出口承接)
var ac_bonus := runner.journal().bonus_total("armor_class")
var hp_bonus := runner.journal().bonus_total("max_hp")
var atk_txt := "%d" % runner.effective_atk()
if atk_bonus > 0:
atk_txt += " +%d" % atk_bonus # 加成角标(ASCII 加号——防像素字体缺 ⁺ 字形出豆腐块)
+1 -1
View File
@@ -58,7 +58,7 @@ static func _debug_run_data(root: Variant) -> Dictionary:
if r == null:
return {"seed": seed_txt, "level": "—", "node": "—", "hp": "—", "gp": "—", "keystone": "—"}
return {"seed": seed_txt, "level": int(root.run_scope.adventure.level_index), "node": int(r.node_index),
"hp": "%d/%d" % [int(r.hero_hp), int(r.effective_max_hp())], "gp": int(r.gp), "keystone": root.run_scope.adventure.hero().keystone_gained()}
"hp": "%d/%d" % [int(r.hero_hp), int(r.effective_max_hp())], "gp": int(r.gp), "keystone": root.run_scope.adventure.journal().keystone_gained()}