[战斗]========被动154修改 新增300被动 Hot 添加修改治疗量的接口,复活接口添加界面显示
parent
1d65116a84
commit
b9479d8326
|
@ -2955,15 +2955,17 @@ local passivityList = {
|
||||||
if deadRole==role then
|
if deadRole==role then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if deadRole.camp == role.camp then
|
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延时一帧做处理,我方场上所有单位都结算死亡以后,再处理299被动回血
|
||||||
if ele and v1 and deadRole.element==ele then
|
if deadRole.camp == role.camp and not role:IsDead() then
|
||||||
f1=v1
|
if ele and v1 and deadRole.element==ele then
|
||||||
|
f1=v1
|
||||||
|
end
|
||||||
|
counter = counter + 1
|
||||||
|
if counter == i1 then
|
||||||
|
deadRole:SetRelive(f1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
counter = counter + 1
|
end)
|
||||||
if counter == i1 then
|
|
||||||
deadRole:SetRelive(f1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead)
|
BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead)
|
||||||
end,
|
end,
|
||||||
|
@ -6176,7 +6178,6 @@ local passivityList = {
|
||||||
end
|
end
|
||||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||||
local list = skill:GetDirectTargetsNoMiss()
|
local list = skill:GetDirectTargetsNoMiss()
|
||||||
LogError(LengthOfTable(list))
|
|
||||||
if list then
|
if list then
|
||||||
local isHave=false
|
local isHave=false
|
||||||
for key, value in pairs(list) do
|
for key, value in pairs(list) do
|
||||||
|
@ -6246,6 +6247,37 @@ local passivityList = {
|
||||||
role.Event:AddEvent(BattleEventName.RoleDead, OnDead)
|
role.Event:AddEvent(BattleEventName.RoleDead, OnDead)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
--修改持续效果的治疗值为[a] [b]属性的[c]%
|
||||||
|
--a[int] b[float]
|
||||||
|
[300]=function(role,args,id,judge)
|
||||||
|
local pro=args[1]
|
||||||
|
local v1=args[2]
|
||||||
|
|
||||||
|
local onSkillCastEnd = function(skill)
|
||||||
|
if not skill or skill.type~= BattleSkillType.Special then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if skill and judge==1 and not skill.isTriggerJudge then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function () --延迟一帧移除事件,才能抓到添加效果字典里面的效果
|
||||||
|
local tv = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro]) * v1))
|
||||||
|
if tv and tv<=0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local list=skill:GetDirectTargetsNoMiss()
|
||||||
|
for _, role1 in ipairs(list) do
|
||||||
|
BattleLogic.BuffMgr:QueryBuff(role1, function(buff)
|
||||||
|
if buff.type == BuffName.HOT and buff.caster == role and buff.roundDuration>1 and buff.startRound==BattleLogic.GetCurRound() then
|
||||||
|
buff:ChangeHealValue(tv)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd)
|
||||||
|
end,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return passivityList
|
return passivityList
|
|
@ -10,12 +10,20 @@ function HOT:SetData(...)
|
||||||
self.sort = 1 -- 最先计算回血
|
self.sort = 1 -- 最先计算回血
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--初始化后调用一次
|
--初始化后调用一次
|
||||||
function HOT:OnStart()
|
function HOT:OnStart()
|
||||||
|
|
||||||
self.target.Event:DispatchEvent(BattleEventName.RoleBeHealed, self.caster)
|
self.target.Event:DispatchEvent(BattleEventName.RoleBeHealed, self.caster)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--修改持续加血效果的加血值
|
||||||
|
function HOT:ChangeHealValue(newValue)
|
||||||
|
if newValue then
|
||||||
|
self.healValue=newValue
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||||
function HOT:OnTrigger()
|
function HOT:OnTrigger()
|
||||||
|
|
||||||
|
|
|
@ -557,6 +557,15 @@ function RoleLogic:SetRelive(hpf, caster)
|
||||||
self.reliveHPF = hpf or 1
|
self.reliveHPF = hpf or 1
|
||||||
self.reliveCaster = caster
|
self.reliveCaster = caster
|
||||||
RoleManager.AddReliveRole(self)
|
RoleManager.AddReliveRole(self)
|
||||||
|
local maxHp = self.data:GetData(RoleDataName.MaxHp)
|
||||||
|
local reHp = floor(self.reliveHPF * maxHp)
|
||||||
|
self.data:SetValue(RoleDataName.Hp, reHp)
|
||||||
|
-- 发送复活事件
|
||||||
|
--self.Event:DispatchEvent(BattleEventName.RoleRelive, self)
|
||||||
|
--BattleLogic.Event:DispatchEvent(BattleEventName.RoleRelive, self)
|
||||||
|
-- 复活的血量算做加血
|
||||||
|
BattleLogic.Event:DispatchEvent(BattleEventName.RecordTreat, self.reliveCaster or self, self, reHp)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue