[战斗]=======被动431 -434修改提交
parent
61ce0ea1bc
commit
a82de03880
|
@ -11090,12 +11090,14 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCast,nil,nil,role)
|
||||
end,
|
||||
--释放技能时,我方随机[a]个人,增加[b]%[c]属性的御甲
|
||||
--a[int],b[float],c[int 属性]
|
||||
--释放技能时,我方随机[a]个人,增加[b]%[c]属性的御甲,技能类型[d],目标选择系数[e]
|
||||
--a[int],b[float],c[int 属性],d[int 0:所有 1:仅技能],e[int 技能目标查找系数]
|
||||
[431]=function(role, args,id,judge)
|
||||
local v1 = args[1]
|
||||
local v2 = args[2]
|
||||
local pro = args[3]
|
||||
local type = args[4]
|
||||
local targets = args[5]
|
||||
local OnSkillCast = function(skill)
|
||||
if not skill then
|
||||
return
|
||||
|
@ -11103,19 +11105,130 @@ local passivityList = {
|
|||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
local list = RoleManager.QueryNoDead(function(v) return role.camp == v.camp end)
|
||||
if list then
|
||||
BattleUtil.RandomList(list)
|
||||
v1=min(v1,#list)
|
||||
for i = 1, v1 do
|
||||
local val = floor(BattleUtil.FP_Mul(v2, list[i]:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
BattleUtil.AddBlood(list[i],val)
|
||||
if type and type==1 and skill.type~=BattleSkillType.Special then
|
||||
return
|
||||
end
|
||||
if targets then
|
||||
local arr = BattleUtil.ChooseTarget(role,targets)
|
||||
for i=1, #arr do
|
||||
local val = floor(BattleUtil.FP_Mul(v2,arr[i]:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
BattleUtil.AddBlood(arr[i],val)
|
||||
end
|
||||
else
|
||||
local list = RoleManager.QueryNoDead(function(v) return role.camp == v.camp end)
|
||||
if list then
|
||||
BattleUtil.RandomList(list)
|
||||
v1=min(v1,#list)
|
||||
for i = 1, v1 do
|
||||
local val = floor(BattleUtil.FP_Mul(v2, list[i]:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
BattleUtil.AddBlood(list[i],val)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCast,nil,nil,role)
|
||||
end,
|
||||
--技能[a]额外造成目标[b][c]%的伤害。
|
||||
--a[int 1:仅主动技能] b[int 属性id],c[float]
|
||||
[432]=function(role,args,id,judge)
|
||||
local type=args[1]
|
||||
local f1 = args[2]
|
||||
local dt = args[3]
|
||||
-- 直接伤害后
|
||||
local onPassiveDamaging = function(func, defRole, damage,skill)
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if type then
|
||||
if type==1 and skill.type~=BattleSkillType.Special then
|
||||
return
|
||||
end
|
||||
if type==2 and (skill.type~=BattleSkillType.Special or skill.type~=BattleSkillType.Extra) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
--如果是boss 并且额外伤害是根据最大生命则返回
|
||||
if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(defRole) then
|
||||
return
|
||||
end
|
||||
local val = floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
|
||||
BattleUtil.FinalDamageCountShield(nil,role,defRole,val)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
|
||||
end,
|
||||
--释放技能治疗,给目标添加免疫负面效果的护盾[a],持续[b]回合
|
||||
--a[int],b[int]
|
||||
[433] = function(role, args,id,judge)
|
||||
local type = args[1]
|
||||
local round = args[2]
|
||||
local onRoleTreat=function(target,realTreat,treat)
|
||||
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
|
||||
return
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleTreat, onRoleTreat,nil,nil,role)
|
||||
|
||||
end
|
||||
local OnSkillCastEnd = 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
|
||||
return
|
||||
end
|
||||
role.Event:RemoveEvent(BattleEventName.RoleTreat,onRoleTreat,nil,nil,role)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
--释放技能时,有[a]%概率为目标增加[b]属性 改变[c][d]%的效果,持续[e]回合
|
||||
--a[float],b[int 属性],c[int],d[float],e[int]
|
||||
[434] = function(role, args,id,judge)
|
||||
local p1 = args[1]
|
||||
local pro = args[2]
|
||||
local ct = args[3]
|
||||
local v1 = args[4]
|
||||
local r1 = args[5]
|
||||
local onHit = function(target, damage, bCrit, finalDmg)
|
||||
BattleUtil.RandomAction(p1,function()
|
||||
target:AddBuff(Buff.Create(role, BuffName.PropertyChange,r1, BattlePropList[pro], v1, ct))
|
||||
end)
|
||||
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
|
||||
role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role)
|
||||
end
|
||||
end
|
||||
-- 技能后后
|
||||
local onSkillCastEnd = 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
|
||||
role.Event:RemoveEvent(BattleEventName.RoleHit, onHit)
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
|
||||
}
|
||||
return passivityList
|
|
@ -57,6 +57,8 @@ function Shield:OnStart()
|
|||
end)
|
||||
elseif self.shieldType == ShieldTypeName.ThornsReduce then
|
||||
self.target.Event:AddEvent(BattleEventName.RoleBeHit,self.onRoleBeHit,nil,nil,self.target)
|
||||
elseif self.shieldType == ShieldTypeName.ImmuneReduce then
|
||||
self.target.buffFilter:Add(self.immune0)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -198,7 +200,7 @@ function Shield:OnEnd()
|
|||
end
|
||||
end
|
||||
|
||||
elseif self.shieldType == ShieldTypeName.AllReduce then
|
||||
elseif self.shieldType == ShieldTypeName.AllReduce or self.shieldType==ShieldTypeName.ImmuneReduce then
|
||||
-- 移除免疫效果
|
||||
for i = 1, self.target.buffFilter.size do
|
||||
if self.target.buffFilter.buffer[i] == self.immune0 then
|
||||
|
|
|
@ -337,6 +337,7 @@ ShieldTypeName = {
|
|||
RateReduce = 2, -- 百分比减伤
|
||||
AllReduce = 3, -- 无敌护盾
|
||||
ThornsReduce = 5, --反伤盾
|
||||
ImmuneReduce = 6, --免疫负面效果
|
||||
}
|
||||
|
||||
--额外释放技能
|
||||
|
|
Loading…
Reference in New Issue