【战斗】=====御甲初始化数值修改
parent
7d3e8fd73d
commit
4af86c7e7f
|
@ -4,8 +4,8 @@ Blood = Buff:New()
|
||||||
function Blood:SetData(...)
|
function Blood:SetData(...)
|
||||||
|
|
||||||
-- 刷新排序等级
|
-- 刷新排序等级
|
||||||
self.bloodValue=...
|
--self.bloodValue=...
|
||||||
|
self.bloodValue=0
|
||||||
self.sort = 4
|
self.sort = 4
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -23,12 +23,12 @@ end
|
||||||
|
|
||||||
--初始化后调用一次
|
--初始化后调用一次
|
||||||
function Blood:OnStart()
|
function Blood:OnStart()
|
||||||
self.target.bloodShield = self
|
--self.target.bloodShield = self
|
||||||
local passiveChange=function(addValue)
|
-- local passiveChange=function(addValue)
|
||||||
self.bloodValue=self.bloodValue+addValue
|
-- self.bloodValue=self.bloodValue+addValue
|
||||||
end
|
-- end
|
||||||
BattleLogic.Event:DispatchEvent(BattleEventName.BloodValuePassiveChange,passiveChange,self.target,self.caster,self.bloodValue)
|
-- BattleLogic.Event:DispatchEvent(BattleEventName.BloodValuePassiveChange,passiveChange,self.target,self.caster,self.bloodValue)
|
||||||
self.target.Event:DispatchEvent(BattleEventName.BloodValueChange,self.bloodValue/self.target:GetRoleData(RoleDataName.MaxHp),1,self.bloodValue)
|
-- self.target.Event:DispatchEvent(BattleEventName.BloodValueChange,self.bloodValue/self.target:GetRoleData(RoleDataName.MaxHp),1,self.bloodValue)
|
||||||
end
|
end
|
||||||
function Blood:GetCurValue()
|
function Blood:GetCurValue()
|
||||||
return self.bloodValue
|
return self.bloodValue
|
||||||
|
|
|
@ -1307,13 +1307,15 @@ end
|
||||||
function BattleUtil.AddBlood(target,value)
|
function BattleUtil.AddBlood(target,value)
|
||||||
if not target.isBanBlood then
|
if not target.isBanBlood then
|
||||||
if target.bloodShield then
|
if target.bloodShield then
|
||||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime*2,function()
|
--BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime*2,function()
|
||||||
target.bloodShield:AddValue(value)
|
target.bloodShield:AddValue(value)
|
||||||
end)
|
--end)
|
||||||
else
|
else
|
||||||
local buff=Buff.Create(target, BuffName.Blood,0,value)
|
local buff=Buff.Create(target, BuffName.Blood,0,value)
|
||||||
target:AddBuff(buff)
|
target:AddBuff(buff)
|
||||||
target.bloodShield=buff
|
target.bloodShield=buff
|
||||||
|
target.bloodShield:AddValue(value)
|
||||||
|
--target.bloodShield:star
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Blood)
|
target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.Blood)
|
||||||
|
|
Loading…
Reference in New Issue