From 37550a301386a5d5fb01cd747d6fd0c72ecf8ce0 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Fri, 31 Oct 2025 14:47:51 +0800 Subject: [PATCH] fix bug --- lua/app/module/battle/helper/battle_formula.lua | 2 +- lua/app/ui/battle/battle_base_ui.lua | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/app/module/battle/helper/battle_formula.lua b/lua/app/module/battle/helper/battle_formula.lua index 86cdf63e..7f1199ad 100644 --- a/lua/app/module/battle/helper/battle_formula.lua +++ b/lua/app/module/battle/helper/battle_formula.lua @@ -75,7 +75,7 @@ BattleFormula.calculateFormula = { end if unitComp:checkMonsterDmgAdd() and unitComp:getSide() == BattleConst.SIDE_ATK then - if unitComp.unitEntity:getIsBoss() then + if targetUnit.unitEntity:getIsBoss() then monsterDmgPAdd = unitComp.unitEntity:getBossHurtP() else monsterDmgPAdd = unitComp.unitEntity:getMonsterHurtP() diff --git a/lua/app/ui/battle/battle_base_ui.lua b/lua/app/ui/battle/battle_base_ui.lua index 8c9f4ec2..7b4c09e2 100644 --- a/lua/app/ui/battle/battle_base_ui.lua +++ b/lua/app/ui/battle/battle_base_ui.lua @@ -320,6 +320,11 @@ function BattleBaseUI:initSpeedBtn() if not spdBtn then return end + if not DataManager.PrivilegeCardData:getIsOpen(GConst.ShopConst.PRIVILEGE_CARD_ID.CARD_AD) then + spdBtn:setActive(false) + return + end + spdBtn:setActive(true) local spdBtnImg = self.uiMap["battle_ui.top_node.speed_btn.img"] spdBtn:addClickListener(function() if not DataManager.PrivilegeCardData:getIsMonthlyCardActive() then