This commit is contained in:
puxuan 2025-10-21 18:22:59 +08:00
parent 1394f8630d
commit 6e0ba88406
2 changed files with 5 additions and 2 deletions

View File

@ -660,6 +660,7 @@ BattleConst.SKILL_ELEMENT_BG = {
} }
BattleConst.SKILL_ELEMENT_BG_2 = { BattleConst.SKILL_ELEMENT_BG_2 = {
universal = "battle_skill_colorful_2",
skill = "battle_skill_colorful", skill = "battle_skill_colorful",
[BattleConst.ELEMENT_TYPE.RED] = "battle_skill_bg_red_2", [BattleConst.ELEMENT_TYPE.RED] = "battle_skill_bg_red_2",
[BattleConst.ELEMENT_TYPE.YELLOW] = "battle_skill_bg_yellow_2", [BattleConst.ELEMENT_TYPE.YELLOW] = "battle_skill_bg_yellow_2",

View File

@ -169,11 +169,12 @@ function GridCell:showHighLight(show, mainElementType)
local isUniversal = self.gridEntity:getIsUniversal() local isUniversal = self.gridEntity:getIsUniversal()
if skillId then if skillId then
downBg:setVisible(true) downBg:setVisible(true)
show = true -- 有技能,强制显示特效
local skillEntity = self:getSkillEntity() local skillEntity = self:getSkillEntity()
local ignoreElementType = skillEntity:getIgnoreElementType() local ignoreElementType = skillEntity:getIgnoreElementType()
local skillBg 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 skillBg = GConst.BattleConst.SKILL_ELEMENT_BG_2.skill
else else
mainElementType = mainElementType or skillEntity:getPosition() mainElementType = mainElementType or skillEntity:getPosition()
@ -183,6 +184,7 @@ function GridCell:showHighLight(show, mainElementType)
self.lastSkillBg = skillBg self.lastSkillBg = skillBg
downBg:setSprite(GConst.ATLAS_PATH.BATTLE, self.lastSkillBg) downBg:setSprite(GConst.ATLAS_PATH.BATTLE, self.lastSkillBg)
end end
show = true -- 有技能,强制显示特效
elseif isUniversal then elseif isUniversal then
downBg:setVisible(true) downBg:setVisible(true)
downBg:setSprite(GConst.ATLAS_PATH.BATTLE, "battle_bg_lv") downBg:setSprite(GConst.ATLAS_PATH.BATTLE, "battle_bg_lv")