From 6e0ba884062b6d5ecffba0ca7bf9cbda5b53d932 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Tue, 21 Oct 2025 18:22:59 +0800 Subject: [PATCH] fix bug --- lua/app/module/battle/battle_const.lua | 1 + lua/app/ui/battle/cell/grid_cell.lua | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 940703db..485a19b9 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -660,6 +660,7 @@ BattleConst.SKILL_ELEMENT_BG = { } BattleConst.SKILL_ELEMENT_BG_2 = { + universal = "battle_skill_colorful_2", skill = "battle_skill_colorful", [BattleConst.ELEMENT_TYPE.RED] = "battle_skill_bg_red_2", [BattleConst.ELEMENT_TYPE.YELLOW] = "battle_skill_bg_yellow_2", diff --git a/lua/app/ui/battle/cell/grid_cell.lua b/lua/app/ui/battle/cell/grid_cell.lua index 4b6cd564..736495d3 100644 --- a/lua/app/ui/battle/cell/grid_cell.lua +++ b/lua/app/ui/battle/cell/grid_cell.lua @@ -169,11 +169,12 @@ function GridCell:showHighLight(show, mainElementType) local isUniversal = self.gridEntity:getIsUniversal() if skillId then downBg:setVisible(true) - show = true -- 有技能,强制显示特效 local skillEntity = self:getSkillEntity() local ignoreElementType = skillEntity:getIgnoreElementType() local skillBg - if ignoreElementType and not mainElementType then + if show and not mainElementType then + skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2.universal + elseif ignoreElementType and not mainElementType then skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2.skill else mainElementType = mainElementType or skillEntity:getPosition() @@ -183,6 +184,7 @@ function GridCell:showHighLight(show, mainElementType) self.lastSkillBg = skillBg downBg:setSprite(GConst.ATLAS_PATH.BATTLE, self.lastSkillBg) end + show = true -- 有技能,强制显示特效 elseif isUniversal then downBg:setVisible(true) downBg:setSprite(GConst.ATLAS_PATH.BATTLE, "battle_bg_lv")