[战斗]===================被动433修改 技能添加148

dev_chengFeng
wangzhenxing 2022-03-17 16:15:34 +08:00
parent 31b1721510
commit 0f2eebfe42
3 changed files with 37 additions and 4 deletions

View File

@ -2889,6 +2889,37 @@ local effectList = {
target.isRealDead=true
target:SetRelive(pro, caster)
end,
--造成[a]%的[b]伤害,造成伤害的[c]%用于医疗生命值最低的队友。(攻击目标为多人治疗不重复)
--a[float],b[伤害类型],c[float] ,d[int]
[148] = function(caster, target, args, interval, skill)
local f1 = args[1]
local dt = args[2]
local f2 = args[3]
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
BattleLogic.WaitForTrigger(interval, function ()
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
local arr = RoleManager.NoOrder(function (r) return r.camp == caster.camp end,false,true)
BattleUtil.SortByHpFactor(arr, 1)
-- 检测技能伤害治疗加成
-- 治疗血量最低队友实际伤害的f2%
--之前是finaldag 改成 damage
for i = 1, #arr do
if not BattleUtil.ChecklistIsContainValue(skill.targets,arr[i]) then
f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[i])
BattleUtil.ApplyTreat(caster, arr[i], floor(damage*f2))
table.insert(skill.targets,arr[i])
break
end
end
end
target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)
BattleUtil.CalDamage(skill, caster, target, dt, f1)
target.Event:RemoveEvent(BattleEventName.RoleBeHit, OnBeHit)
end)
end,
}

View File

@ -11090,7 +11090,7 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCast,nil,nil,role)
end,
--释放技能时,我方随机[a]个人,增加[b]%[c]属性的御甲,技能类型[d],目标选择系数[e]
--释放技能时,我方随机[a]个人,增加[b]%[c]属性的御甲,技能类型[d],目标选择系数[e]d,e可不填的;d不填默认所有技能e不填随机a人
--a[int],b[float],c[int 属性],d[int 0:所有 1:仅技能],e[int 技能目标查找系数]
[431]=function(role, args,id,judge)
local v1 = args[1]
@ -11173,10 +11173,11 @@ local passivityList = {
target:AddBuff(Buff.Create(role, BuffName.Shield, round,type, 0, 0))
end
local OnSkillCast = function(skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if skill.type ~= BattleSkillType.Special or skill.type~=BattleSkillType.Extra then
if skill.type ~= BattleSkillType.Special and skill.type~=BattleSkillType.Extra then
return
end
role.Event:AddEvent(BattleEventName.RoleTreat, onRoleTreat,nil,nil,role)
@ -11186,7 +11187,7 @@ local passivityList = {
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if skill.type ~= BattleSkillType.Special or skill.type~=BattleSkillType.Extra then
if skill.type ~= BattleSkillType.Special and skill.type~=BattleSkillType.Extra then
return
end
role.Event:RemoveEvent(BattleEventName.RoleTreat,onRoleTreat,nil,nil,role)

View File

@ -24,6 +24,7 @@ function Skill:Init(role, effectData, type, targets, isAdd, isRage,isTriggerJudg
self.isAdd = isAdd
self.isRage = isRage
self.isNotLoop= false
self.targets={}
if isTriggerJudge~=nil then
self.isTriggerJudge=isTriggerJudge
else
@ -150,7 +151,7 @@ function Skill:EndSkill()
self.isTriggePassivity=false
self.triggerPassivityId={}
if self.castDoneFunc then self.castDoneFunc() end
self.targets={}
end)
--
self.effectTargets = {}