【战斗】======323 258 112 被动修改

dev_chengFeng
wangzhenxing 2021-11-19 10:00:04 +08:00
parent 45bc2139a6
commit fc82b7bbc7
1 changed files with 23 additions and 13 deletions

View File

@ -2030,24 +2030,27 @@ local passivityList = {
target.isFlagCrit = false
role.Event:RemoveEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter)
end
local function onRoleDamageBefore(target, factorFunc, damageType, skill)
role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter,nil,nil,role)
local function onRoleDamageBefore(critFunc,atkRole,defRole,skill)
if atkRole~=role then
return
end
if not skill then
return
end
if skill and not skill.isTriggerJudge and judge==1 then
return
end
--处理伏虎觉醒十星附加的额外技能,额外技能不触发这个特性 2020/11/17 wangzhenxing
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 and judge==1 then
return
end
local curRound=BattleLogic.GetCurRound()
LogError("currround=="..curRound.." il=="..i1.." type=="..type)
if (curRound== i1 and type==0) or (curRound<=i1 and type==1) then
target.isFlagCrit = true
role.Event:AddEvent(BattleEventName.RoleDamageAfter, onRoleDamageAfter,nil,nil,role)
LogError("1111111111")
defRole.isFlagCrit = true
end
end
role.Event:AddEvent(BattleEventName.RoleDamageBefore, onRoleDamageBefore,nil,nil,role)
BattleLogic.Event:AddEvent(BattleEventName.TemporaryChangeCrit, onRoleDamageBefore,nil,nil,role)
end,
@ -5666,9 +5669,9 @@ local passivityList = {
if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(defRole) then
return
end
if (f1==12 or f1==13) and p1 and p2 then
local levelDamage = floor(role:GetRoleData(RoleDataName.MaxHp)*p1)
local lostDamage = role:GetRoleData(RoleDataName.MaxHp) - role:GetRoleData(RoleDataName.Hp)
if (f1==12 or f1==13) and p1 and p2 and p1~=0 and p2~=0 then
local levelDamage = floor(defRole:GetRoleData(RoleDataName.MaxHp)*p1)
local lostDamage = defRole:GetRoleData(RoleDataName.MaxHp) - defRole:GetRoleData(RoleDataName.Hp)
local level = floor(lostDamage/levelDamage)
dt=dt+(level*p2)
end
@ -5680,6 +5683,7 @@ local passivityList = {
func(val)
end
end
dt=args[2]
end
end
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
@ -7586,6 +7590,7 @@ local passivityList = {
if not type then
type=0
end
local ctrs={}
local onRoleBeDamage=function (defRole, atkRole, damage, bCrit, finalDmg, damageType, dotType, skill)
if atkRole and atkRole~=role then
return
@ -7605,11 +7610,16 @@ local passivityList = {
isTrigger=true
end
if isTrigger then
if isTrigger and not ctrs[defRole.position] then
BattleUtil.RandomControl(p1,ct,role,defRole,round)
ctrs[defRole.position]=1
end
end
BattleLogic.Event:AddEvent(BattleEventName.RoleBeDamaged,onRoleBeDamage,nil,nil,role)
local onSkillCastEnd=function()
ctrs={}
end
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role)
end,
--释放技能怒气不足时,损失自身([a]-我方活着的[b]系神将数)%生命*不足怒气数 后释放技能
--a[int],b[int]
@ -9651,7 +9661,7 @@ local passivityList = {
role.Event:AddEvent(BattleEventName.PassiveAddCritDamageFactor,addCritDamageFa,nil,nil,role)
end,
--释放技能时[a]%概率 改变[b]无视目标的[c]buff免疫
--释放技能时[a]%概率 改变[b]自身无视目标的[c]类型buff免疫概率
--a[float],b[int],c[int]
[390]=function(role,args,id,judge)
local pro=args[1]