Skip to content

使用拼装牌出现异画时会无法拼装 #334

Closed

Description

@Holto

Please check before submitting an issue/提交问题前请检查

  • I have searched the issues and haven't found anything relevant/我搜索了这些问题,没有找到任何相关信息
  • I have read the README and haven't found anything relevant/我认真阅读了README,没有找到任何相关信息
  • I have tried repairing Hearthstone and reinstalling HsMod according to the ReadMe, but the problem persists/我尝试过修复炉石,并按照ReadMe重新安装HsMod,但是问题依然存在。
  • I will upload LogOutput.log, HsMod.cfg, HsSkins.cfg /我将上传LogOutput.log, HsMod.cfg, HsSkins.cfg
  • I know how to reproduce the issue which may not be specific to my device/ 我知道如何重现该问题,但该问题可能并非特定于我的设备

Describe the bug/描述你的问题。

使用拼装牌出现异画时会无法拼装

To Reproduce/如何复现

打开异化优先功能,并且打出拼装牌

Image

Expected behavior/期望结果

No response

Screenshots/截图

Logs/日志

No response

Additional context/其他信息

No response

Activity

  1. heee000 commented on Oct 16, 2026

    @heee000

    遇到同样问题

  2. ZQY-Joker commented on Oct 18, 2026

    @ZQY-Joker

    补充一份完整的日志证据(同一问题,环境 Windows / 直连战网)

    环境

    项目 版本
    炉石传说 37.0.0.0(build 37001),2026-10-14 补丁
    HsMod 12.1.0.3(HsMod.dll 564,224 字节,2026-10-05)
    BepInEx 5.4.23.3
    系统 Windows 10/11 x64

    复现条件(可稳定复现,已做对照实验)

    触发只需要两项同时成立,不需要开「异画优先」:

    • 卡牌最高特效 = OnlyMy(或 All)
    • 异画特效 = true

    然后用任意带「拼装」词条的随从上场,只要拼装的三个选项里出现任意一张有异画的随从,进入「选择一项替换」界面就必定卡死。

    对照实验结论

    配置 结果
    卡牌最高特效=OnlyMy + 异画特效=true(原始默认) 每次拼装都卡死
    卡牌最高特效=Disabled(异画特效仍为 true) 多局正常,未复现
    卡牌最高特效=OnlyMy + 异画特效=false 多局正常,未复现

    → 问题精确定位在**「强制最高特效时套用异画」**这条路径上,最高特效(金卡/钻石)本身没问题。

    卡死时的具体表现

    不是闪退,是界面完全无响应,只能强杀进程。界面停在「选择一项替换」,左右两张牌的卡面文字变成:

    ERROR: Card text cannot be parsed for Assemble.
    

    中间那张显示暴雪的占位调试文案:

    Testing this thing so that it can fit within three sentences
    

    日志证据

    %USERPROFILE%\AppData\LocalLow\Blizzard Entertainment\Hearthstone\Player.log,崩溃瞬间:

    GetPortraitTexture Null asset path for CardDef: HiddenCard (Clone), premium level: GOLDEN, fallbackToLowerClass: True, usedPremium: NORMAL
    ...(重复 18 行,premium level 在 GOLDEN / NORMAL 之间交替)
    ASSEMBLEFX_Assembled_Intro_NEW (Spell).BuildFsmStateMap() - SpellStateType DEATH is missing a SpellStateAction.
    NullReferenceException: Object reference not set to an instance of an object
      at AssembleUIManager.OnShowChoices (ChoiceCardMgr+ChoiceState choiceState, Entity sourceEntity) [0x001ac] in <f6cd9545200d4f21ba2f2cb33bcf575d>:0
      at AssembleUIManager+<>c__DisplayClass57_0.<ShowChoices>b__0 (Spell spell, SpellStateType prevStateType, System.Object userData) [0x0001a] in <f6cd9545200d4f21ba2f2cb33bcf575d>:0
      at PlayMakerFSM.Update ()
      at Fsm.UpdateState ()
    

    猜测的成因

    拼装选项使用的是 HiddenCard 占位 CardDef,本身没有任何卡图/异画资源(日志里 GetPortraitTexture Null asset path 就是在说这件事)。强制最高特效的代码把它当成「有异画的卡」去套异画贴图,拿到的 Texture 是 null;AssembleUIManager.OnShowChoices 里没有做判空,于是抛 NPE。

    因为异常发生在 ShowChoices 的 PlayMaker 回调内部,Spell 的 FSM 状态推进被打断(SpellStateType DEATH is missing a SpellStateAction),UI 就永远卡在「等待选择」状态,而不是报错退出。

    建议的修法

    套用异画贴图前加判空,或者干脆跳过拼装/隐藏卡:

    1. 在给 Actor 设置异画贴图前判断取到的 Texture != null,为 null 就 return true 走原逻辑(和 Patches/PatchActorMod.cs 里 PatchSetPortraitTexture 的处理方式一致,那条路径有 try/catch,所以卡牌MOD没这个问题);
    2. 或者判断该 CardDef 是否存在异画变体(GetPortraitTexture 返回 null 说明没有),没有就不强制;
    3. 更省事一点:AssembleUIManager.OnShowChoices 执行期间(可用 Harmony Prefix/Postfix 加个标志位)临时关闭异画强制。

    第 1 条改动最小,也最符合「异画特效」的语义——没有异画的卡本来就不该被套异画。

  3. 1213822 commented on Oct 19, 2026

    @1213822

    写的太详细,厉害了,希望早点修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions