【战斗】免疫效果自定义类型添加,免疫效果文字显示恢复
parent
70e019f837
commit
1face65dbb
|
@ -924,4 +924,18 @@ function this.GetCombatIdBySkin(skillId, skinId)
|
|||
return eid
|
||||
end
|
||||
|
||||
--+++++++++++++++++++++++++++++++++++++++++++
|
||||
local _BattleArtFontConfig = {
|
||||
[BattleArtFontType.Immune] = {type = 2, content = Language[12391]}
|
||||
}
|
||||
|
||||
function this.GetArtFontConfig(_ArtFontType)
|
||||
if _BattleArtFontConfig[_ArtFontType] then
|
||||
return _BattleArtFontConfig[_ArtFontType]
|
||||
end
|
||||
end
|
||||
|
||||
--++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
return this
|
|
@ -13,11 +13,13 @@ end
|
|||
local immune3 = function(buff)
|
||||
return buff.type == BuffName.Shield and buff.shieldType == ShieldTypeName.AllReduce
|
||||
end
|
||||
--自定义免疫
|
||||
local immune4=nil
|
||||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function Immune:SetData(...)
|
||||
|
||||
self.immuneType = ...
|
||||
function Immune:SetData(type,func)
|
||||
self.immuneType =type
|
||||
immune4=func
|
||||
self.isBuff = true
|
||||
|
||||
-- 刷新排序等级
|
||||
|
@ -35,6 +37,13 @@ function Immune:OnStart()
|
|||
self.target.buffFilter:Add(immune2)
|
||||
elseif self.immuneType == 3 then --免疫无敌盾
|
||||
self.target.buffFilter:Add(immune3)
|
||||
elseif self.immuneType==4 then--自定义免疫
|
||||
if immune4 then
|
||||
self.target.buffFilter:Add(immune4)
|
||||
end
|
||||
end
|
||||
if condition then
|
||||
-- body
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -56,6 +65,9 @@ function Immune:OnEnd()
|
|||
immune = immune2
|
||||
elseif self.immuneType == 3 then --免疫无敌盾
|
||||
immune = immune3
|
||||
elseif self.immuneType == 3 then--自定义免疫
|
||||
mmune=immune4
|
||||
immune4=nil
|
||||
end
|
||||
for i = 1, self.target.buffFilter.size do
|
||||
if self.target.buffFilter.buffer[i] == immune then
|
||||
|
|
|
@ -230,6 +230,7 @@ skill1={1012051,1,0,1,{200000,{1,0.41,2}}},
|
|||
skill2={1132051,0.8,0,1,{200212,{1,0.89,2}}},
|
||||
skill3={1151111,0.05,0,1,{220000,{1,0.86,2}}},
|
||||
skill4={10000351,0.3,0.5,4,{400000,{1,1.75,1}}},
|
||||
skill5={12011001,0.3,0.5,4,{400000,{1,2.2,1}}},
|
||||
}
|
||||
|
||||
|
||||
|
@ -277,4 +278,8 @@ BattleRoleElementType = {
|
|||
FO = 2,
|
||||
YAO = 3,
|
||||
DAO = 4
|
||||
}
|
||||
|
||||
BattleArtFontType = {
|
||||
Immune = 1, -- 免疫文字
|
||||
}
|
|
@ -304,7 +304,7 @@ function BattleUtil.CheckIsBoss(role)
|
|||
end
|
||||
if role.data.enemyType==EnemyType.Boss then
|
||||
--弹免疫
|
||||
role.Event:DispatchEvent(BattleEventName.ShowHintText,2, 12391)
|
||||
role.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Immune)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
|
|
@ -299,6 +299,15 @@ function EnemyView:PlaySpineAnim(gog, time, name, isLoop)
|
|||
end
|
||||
|
||||
|
||||
--单纯显示提示文字
|
||||
function EnemyView:OnShowHintText(_ArtFontType)
|
||||
local config = BattleManager.GetArtFontConfig(_ArtFontType)
|
||||
if config then
|
||||
self.Floater:TextBuffFloating(config.type, config.content)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function EnemyView:OnSkillPlay()
|
||||
self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "attack", false)
|
||||
end
|
||||
|
|
|
@ -318,6 +318,15 @@ function PlayerView:PlaySpineAnim(gog, time, name, isLoop)
|
|||
end
|
||||
|
||||
|
||||
--单纯显示提示文字
|
||||
function PlayerView:OnShowHintText(_ArtFontType)
|
||||
local config = BattleManager.GetArtFontConfig(_ArtFontType)
|
||||
if config then
|
||||
self.Floater:TextBuffFloating(config.type, config.content)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function PlayerView:OnSkillPlay()
|
||||
|
||||
local battleSorting = BattleManager.GetBattleSorting()
|
||||
|
|
Loading…
Reference in New Issue