From f1a351f3bc9101475096c2a92d1d73ea9318c8b8 Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Sun, 4 Oct 2026 04:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E6=B4=BE=E4=BB=B6=E6=8C=81=E6=9C=89?= =?UTF-8?q?=E5=91=88=E7=8E=B0v2=EF=BC=88=E7=94=A8=E6=88=B7=E4=BA=8C?= =?UTF-8?q?=E8=BF=9E=E5=8F=8D=E9=A6=88=E3=80=8C=E6=88=98=E6=96=97=E7=95=8C?= =?UTF-8?q?=E9=9D=A2/=E5=85=B3=E5=8D=A1=E9=80=89=E6=8B=A9=E9=A1=B5?= =?UTF-8?q?=E9=83=BD=E7=9C=8B=E4=B8=8D=E5=88=B0=E5=B1=80=E5=86=85=E5=A5=96?= =?UTF-8?q?=E5=8A=B1=E3=80=8D=EF=BC=89=EF=BC=9A=E2=91=A0=E5=85=B3=E5=8D=A1?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=A1=B5=E8=A1=A5=E9=BD=90=E2=80=94=E2=80=94?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E7=8A=B6=E6=80=81=E6=A0=8F=E6=9C=AC=E5=85=B3?= =?UTF-8?q?=E5=8A=A0=E6=88=90=E6=A1=86=E5=86=85=E8=BF=BD=E5=8A=A0=E6=B5=81?= =?UTF-8?q?=E6=B4=BE=E4=BB=B6=E6=8C=81=E6=9C=89=E8=A1=8C=EF=BC=88set=5Frel?= =?UTF-8?q?ic=5Fholdings=20=E7=BB=84=E5=90=88=E6=A0=B9=E6=8A=95=E5=96=82+?= =?UTF-8?q?=E4=B8=8E=E5=8A=A0=E6=88=90=E8=A1=8C=E5=B9=B6=E6=A1=86=E4=BB=BB?= =?UTF-8?q?=E4=B8=80=E9=9D=9E=E7=A9=BA=E6=95=B4=E6=A1=86=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=EF=BC=89=EF=BC=9B=E2=91=A1=E6=88=98=E6=96=97C=E5=8C=BA?= =?UTF-8?q?=E6=B5=81=E6=B4=BE=E4=BB=B6=E6=AE=B5=E4=B8=8A=E7=A7=BB=E8=87=B3?= =?UTF-8?q?=E6=9C=AC=E5=85=B3=E5=BC=BA=E5=8C=96=E5=89=8D=EF=BC=88=E6=9E=84?= =?UTF-8?q?=E7=AD=91=E6=A0=B8=E5=BF=83=E4=BC=98=E5=85=88+=E9=98=B2clip=5Fc?= =?UTF-8?q?ontents=E4=B8=8B=E9=83=A8=E8=A3=81=E5=88=87=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E8=A7=81=E2=80=94=E2=80=94=E7=94=A8=E6=88=B7=E5=AE=9E=E6=B5=8B?= =?UTF-8?q?=E3=80=8C=E6=88=98=E6=96=97=E7=95=8C=E9=9D=A2=E6=B2=A1=E7=9C=8B?= =?UTF-8?q?=E5=88=B0=E3=80=8D=E7=9A=84=E4=B8=BB=E5=9B=A0=E5=80=99=E9=80=89?= =?UTF-8?q?=EF=BC=89=EF=BC=9B=E2=91=A2=E6=8A=95=E5=BD=B1=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E6=8A=BD=20HudPresenter.relic=5Fholdings=5Flines=20=E9=9D=99?= =?UTF-8?q?=E6=80=81=E5=85=B1=E7=94=A8=EF=BC=88=E6=88=98=E6=96=97C?= =?UTF-8?q?=E5=8C=BA/=E5=85=B3=E5=8D=A1=E9=A1=B5=E4=B8=A4=E5=A4=84?= =?UTF-8?q?=E5=90=8C=E6=BA=90=E9=98=B2=E6=BC=82=E7=A7=BB=EF=BC=89+main=20?= =?UTF-8?q?=E4=B8=A4=E5=A4=84=20open=5Fchoices=20=E6=8A=95=E5=96=82?= =?UTF-8?q?=EF=BC=9B=E5=86=92=E7=83=9F718/0=E4=B8=89=E9=97=B8=EF=BC=88?= =?UTF-8?q?=E5=9F=BA=E5=BA=956c20740=E2=80=94=E2=80=94=E5=B9=B6=E8=A1=8C?= =?UTF-8?q?=E6=8C=96=E6=8E=98=E9=A3=8E=E9=99=A9=E8=B0=83=E7=A0=94=E6=89=B9?= =?UTF-8?q?=E7=BA=AF=E6=96=87=E6=A1=A3=E6=97=A0=E5=86=B2=E7=AA=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/presentation/hud_presenter.gd | 39 +++++++++++-------- game/presentation/main.gd | 2 + .../views/hero_info_panel_view.gd | 21 +++++----- game/presentation/views/level_map_screen.gd | 13 ++++++- 4 files changed, 47 insertions(+), 28 deletions(-) diff --git a/game/presentation/hud_presenter.gd b/game/presentation/hud_presenter.gd index ea0604a0..30a89efa 100644 --- a/game/presentation/hud_presenter.gd +++ b/game/presentation/hud_presenter.gd @@ -36,23 +36,8 @@ static func refresh(stage: BattleStageView, info: HeroInfoPanelView, ap_bar: ApB info.set_level_bonuses([]) # 流派件持有投影(迭代 12 呈现补齐 2026-10-04——用户反馈「局内奖励选了什么看不到」: # 逐流派聚合行+成型档位;常驻可读+空态隐藏。档位求值=RelicsEngine 纯函数直调) - if runner != null and level_active and db != null and db.relics != null and not (db.relics.rows as Array).is_empty(): - var held: Array = runner.relics_held() - var rlines: Array[String] = [] - if not held.is_empty(): - var arch_names := {"magic": "魔法", "pierce": "穿刺", "normal": "普攻", "dig": "开格", - "flag": "标旗", "charge": "蓄力", "devour": "吞噬"} - var counts := {} - for rid in held: - var rrow: Dictionary = db.relic_row(String(rid)) - var arch := String(rrow.get("archetype", "")) - counts[arch] = int(counts.get(arch, 0)) + 1 - var tiers: Dictionary = RelicsEngine.tiers_for(held, db.relics) - for arch in counts.keys(): - var tier := int(tiers.get(arch, 0)) - var tier_text := "档二" if tier >= 2 else ("档一" if tier == 1 else "散件") - rlines.append("%s ×%d · %s" % [String(arch_names.get(String(arch), String(arch))), int(counts[arch]), tier_text]) - info.set_relic_holdings(rlines) + if runner != null and level_active: + info.set_relic_holdings(relic_holdings_lines(db, runner.relics_held())) else: info.set_relic_holdings([]) if settlement == null: @@ -104,6 +89,26 @@ static func _refresh_economy(ap_bar: ApBarView, s: Dictionary, db, refresh_remai ap_bar.set_stop_enabled(bool(s.hero.get("alive", false)) and digging) +# 流派件持有聚合文案(迭代 12 呈现补齐——战斗 C 区与关卡选择页两处共用;空持有=空数组) +static func relic_holdings_lines(db, held: Array) -> Array[String]: + var rlines: Array[String] = [] + if db == null or db.relics == null or (db.relics.rows as Array).is_empty() or held.is_empty(): + return rlines + var arch_names := {"magic": "魔法", "pierce": "穿刺", "normal": "普攻", "dig": "开格", + "flag": "标旗", "charge": "蓄力", "devour": "吞噬"} + var counts := {} + for rid in held: + var rrow: Dictionary = db.relic_row(String(rid)) + var arch := String(rrow.get("archetype", "")) + counts[arch] = int(counts.get(arch, 0)) + 1 + var tiers: Dictionary = RelicsEngine.tiers_for(held, db.relics) + for arch in counts.keys(): + var tier := int(tiers.get(arch, 0)) + var tier_text := "档二" if tier >= 2 else ("档一" if tier == 1 else "散件") + rlines.append("%s ×%d · %s" % [String(arch_names.get(String(arch), String(arch))), int(counts[arch]), tier_text]) + return rlines + + # ---- 战斗收尾反馈与结算视觉同步(T3 HUD 单通道批 2026-10-02——组合根直改视图收敛入此) ---- # battle_over 收尾反馈:死亡兜底灰化 → 主角态回 idle → RAP 清零脉冲(调试收尾路)→ 状态全清可见反馈。 diff --git a/game/presentation/main.gd b/game/presentation/main.gd index ceac2e99..724ac29e 100644 --- a/game/presentation/main.gd +++ b/game/presentation/main.gd @@ -707,6 +707,7 @@ func _on_battle_end_continue() -> void: if _settlement_stop_pending: _settlement_stop_pending = false _enter_level_screen() + level_screen.set_relic_holdings(" · ".join(HudPresenter.relic_holdings_lines(db, runner.relics_held()))) level_screen.open_choices(_pending_candidates, runner) _pending_candidates = [] _refresh_presentations() @@ -973,6 +974,7 @@ func _on_choices_presented(candidates: Array) -> void: _refresh_presentations() return _enter_level_screen() + level_screen.set_relic_holdings(" · ".join(HudPresenter.relic_holdings_lines(db, runner.relics_held()))) level_screen.open_choices(candidates, runner) _refresh_presentations() diff --git a/game/presentation/views/hero_info_panel_view.gd b/game/presentation/views/hero_info_panel_view.gd index d39d90b9..4254e04e 100644 --- a/game/presentation/views/hero_info_panel_view.gd +++ b/game/presentation/views/hero_info_panel_view.gd @@ -68,6 +68,17 @@ func _init() -> void: item_slots.add_child(slot) _slot_panels.append(slot) + # 流派件持有段(迭代 12 呈现补齐 2026-10-04——三选一流派件兑付后常驻可读:逐流派聚合行+成型档位; + # 空态整节隐藏。用户试玩反馈「局内奖励选了什么看不到」缺口承载;2026-10-04 二次反馈上移—— + # 构筑核心信息优先级高于临时强化,且防 C 区下部裁切不可见) + _relic_section = VBoxContainer.new() + _relic_section.add_theme_constant_override("separation", 4) + _relic_section.visible = false + col.add_child(_relic_section) + _relic_section.add_child(UiKit.label("流派件", 16, true)) + _relic_list = VBoxContainer.new() + _relic_list.add_theme_constant_override("separation", 2) + _relic_section.add_child(_relic_list) # 本关强化(预留):锻造/大奖励/关卡奖励节点的属性提升——中循环数据因改变战斗数学准入; # 与战斗内状态效果(B 区站桩,随战斗消散)分区,防「战斗结束被清」误读;空态整节隐藏 _bonus_section = VBoxContainer.new() @@ -78,16 +89,6 @@ func _init() -> void: _bonus_list = VBoxContainer.new() _bonus_list.add_theme_constant_override("separation", 2) _bonus_section.add_child(_bonus_list) - # 流派件持有段(迭代 12 呈现补齐 2026-10-04——三选一流派件兑付后常驻可读:逐流派聚合行+成型档位; - # 空态整节隐藏。用户试玩反馈「局内奖励选了什么看不到」缺口承载) - _relic_section = VBoxContainer.new() - _relic_section.add_theme_constant_override("separation", 4) - _relic_section.visible = false - col.add_child(_relic_section) - _relic_section.add_child(UiKit.label("流派件", 16, true)) - _relic_list = VBoxContainer.new() - _relic_list.add_theme_constant_override("separation", 2) - _relic_section.add_child(_relic_list) func set_attack(atk: int, mod_text: String) -> void: diff --git a/game/presentation/views/level_map_screen.gd b/game/presentation/views/level_map_screen.gd index cfd20c38..d919e31b 100644 --- a/game/presentation/views/level_map_screen.gd +++ b/game/presentation/views/level_map_screen.gd @@ -56,6 +56,7 @@ var _hp_bar: Control var _attr_value: Label var _bonus_row: HBoxContainer var _bonus_value: Label +var _relic_value: Label # 流派件持有行(迭代 12 呈现补齐——组合根投喂聚合文案) var _cand_ids: Array[int] = [] # 本停点候选 id 集(图上命中合法集) var _content_size := Vector2(620, 240) # 图内容包络(open_choices 按图拟合——画布 min 尺寸随它) var _hover_id := -1 # 悬停预承诺候选(-1 = 无) @@ -135,6 +136,10 @@ func _init() -> void: bonus_inner.add_child(bonus_cap) _bonus_value = UiKit.label("", 15, true, UiKit.WARM) bonus_inner.add_child(_bonus_value) + # 流派件持有行(迭代 12 呈现补齐 2026-10-04——用户反馈关卡选择页看不到局内奖励;组合根投喂) + _relic_value = UiKit.label("", 13, false, UiKit.WARM_SOFT) + _relic_value.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART + bonus_inner.add_child(_relic_value) bottom.add_child(_bonus_row) var spacer := Control.new() spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL @@ -184,6 +189,11 @@ func _draw_hp_bar(bar: Control) -> void: # 放弃入口可见性(组合根在冒险启动时开、默认关——语义对象 = 整局冒险) +# 流派件持有投影(迭代 12 呈现补齐——组合根投喂聚合文案;空文案=行隐藏) +func set_relic_holdings(text: String) -> void: + _relic_value.text = text + + func set_abandon_available(v: bool) -> void: abandon_btn.visible = v @@ -315,7 +325,8 @@ func _refresh_status() -> void: if ac_bonus > 0: parts.append("AC +%d" % ac_bonus) _bonus_value.text = " · ".join(parts) - _bonus_row.visible = not parts.is_empty() + # 流派件持有行可见性(与加成行并框——任一非空整框显示;文案归组合根 set_relic_holdings) + _bonus_row.visible = not parts.is_empty() or _relic_value.text != "" # ---- 图上命中(布局决策 2——唯一提交通道;探针 press_candidate 同路径) ----