buff显示修改
This commit is contained in:
parent
b951d8d2b7
commit
4cce3bb36b
@ -1487,7 +1487,7 @@ function BattleUnitComp:takeEffect(buff, target, conditionResult)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.unitEntity:getIsFrozen() and buff:getDecr() == BattleConst.BUFF_DECR_TYPE.INCREASE_GAIN then -- 冻结状态,缓存增益buff
|
if self.unitEntity:getIsFrozen() and buff:isIncreaseGain() then -- 冻结状态,缓存增益buff
|
||||||
if buff:getRound() > 0 then
|
if buff:getRound() > 0 then
|
||||||
local buffEffect = BattleHelper:getBuffEffect()
|
local buffEffect = BattleHelper:getBuffEffect()
|
||||||
buffEffect.buff = buff
|
buffEffect.buff = buff
|
||||||
|
|||||||
@ -90,6 +90,10 @@ function BattleBuffEntity:getDecr()
|
|||||||
return self.buffInfo.decr
|
return self.buffInfo.decr
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleBuffEntity:isIncreaseGain()
|
||||||
|
return self:getDecr() == BattleConst.BUFF_DECR_TYPE.INCREASE_GAIN
|
||||||
|
end
|
||||||
|
|
||||||
function BattleBuffEntity:getIcon()
|
function BattleBuffEntity:getIcon()
|
||||||
return self.buffInfo.icon
|
return self.buffInfo.icon
|
||||||
end
|
end
|
||||||
@ -115,7 +119,11 @@ function BattleBuffEntity:getShowName(needRedColor)
|
|||||||
self.showNameStr = I18N:getTextWithOtherKey("buff", "name", self:getName(), "show_name")
|
self.showNameStr = I18N:getTextWithOtherKey("buff", "name", self:getName(), "show_name")
|
||||||
end
|
end
|
||||||
if not self.showNameRedColor and self.showNameStr then
|
if not self.showNameRedColor and self.showNameStr then
|
||||||
self.showNameRedColor = "<color=#E35F6A>" .. self.showNameStr .. "</color>"
|
if self:isIncreaseGain() then
|
||||||
|
self.showNameRedColor = "<color=#4bff33>" .. self.showNameStr .. "</color>"
|
||||||
|
else
|
||||||
|
self.showNameRedColor = "<color=#ff5dfd>" .. self.showNameStr .. "</color>"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if needRedColor then
|
if needRedColor then
|
||||||
return self.showNameRedColor
|
return self.showNameRedColor
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user