【战斗】效果:103修改添加1个参数 被动 147 206修改 被动添加271-284
							parent
							
								
									26519a2158
								
							
						
					
					
						commit
						febcd00a5f
					
				| 
						 | 
				
			
			@ -1966,12 +1966,13 @@ local effectList = {
 | 
			
		|||
        caster:AddPassive(167, {i1, i2}, false) -- 不可叠加
 | 
			
		||||
    end,
 | 
			
		||||
    
 | 
			
		||||
    --造成[a]%的[b]伤害,造成伤害的[c]%用于医疗生命值最低队友。
 | 
			
		||||
    --a[float],b[伤害类型],c[float]
 | 
			
		||||
    --造成[a]%的[b]伤害,造成伤害的[c]%用于医疗生命值最低[d]名队友。
 | 
			
		||||
    --a[float],b[伤害类型],c[float] ,d[int]
 | 
			
		||||
    [103] = function(caster, target, args, interval, skill)
 | 
			
		||||
        local f1 = args[1]
 | 
			
		||||
        local dt = args[2]
 | 
			
		||||
        local f2 = args[3]
 | 
			
		||||
        local num = args[4]
 | 
			
		||||
        caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
 | 
			
		||||
        BattleLogic.WaitForTrigger(interval, function ()
 | 
			
		||||
            local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
 | 
			
		||||
| 
						 | 
				
			
			@ -1981,7 +1982,11 @@ local effectList = {
 | 
			
		|||
                f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[1])
 | 
			
		||||
                -- 治疗血量最低队友实际伤害的f2%
 | 
			
		||||
                --之前是finaldag 改成 damage
 | 
			
		||||
                BattleUtil.ApplyTreat(caster, arr[1], floor(damage*f2))
 | 
			
		||||
                for i = 1, LengthOfTable(arr) do
 | 
			
		||||
                    if i<=num then
 | 
			
		||||
                        BattleUtil.ApplyTreat(caster, arr[i], floor(damage*f2))
 | 
			
		||||
                    end
 | 
			
		||||
                end               
 | 
			
		||||
            end
 | 
			
		||||
            target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)
 | 
			
		||||
            BattleUtil.CalDamage(skill, caster, target, dt, f1)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2749,16 +2749,23 @@ local passivityList = {
 | 
			
		|||
        role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd)
 | 
			
		||||
    end,
 | 
			
		||||
 | 
			
		||||
  -- 受到攻击有[a]%概率使攻击者[b](每回合造成被击者自身20%攻击力的伤害)持续[c]回合
 | 
			
		||||
    -- a[float]b[持续伤害状态]c[int]
 | 
			
		||||
  -- 受到[a]攻击有[b]%概率使攻击者[c](每回合造成被击者自身20%攻击力的伤害)持续[d]回合
 | 
			
		||||
    -- a[int 攻击类型] b[float]c[持续伤害状态]d[int]   a:0 所有攻击  1:只限制技能伤害
 | 
			
		||||
    [147] = function(role, args)
 | 
			
		||||
        local f1 = args[1]
 | 
			
		||||
        local dot = args[2]
 | 
			
		||||
        local i1 = args[3]
 | 
			
		||||
 | 
			
		||||
        local type=args[1]
 | 
			
		||||
        local f1 = args[2]
 | 
			
		||||
        local dot = args[3]
 | 
			
		||||
        local i1 = args[4]       
 | 
			
		||||
        -- 技能后后
 | 
			
		||||
        local onRoleBeHit = function(caster)
 | 
			
		||||
            
 | 
			
		||||
        local onRoleBeHit = function(caster,damage, bCrit, finalDmg, damageType, skill)
 | 
			
		||||
            --屏蔽相同阵营
 | 
			
		||||
            if caster.camp==role.camp then
 | 
			
		||||
                return
 | 
			
		||||
            end
 | 
			
		||||
            --检测技能
 | 
			
		||||
            if type==1 and (not skill or skill.type==BattleSkillType.Normal)then
 | 
			
		||||
               return
 | 
			
		||||
            end
 | 
			
		||||
            local attack = role:GetRoleData(RoleDataName.Attack)
 | 
			
		||||
            local damage = floor(BattleUtil.ErrorCorrection(attack * 0.2))
 | 
			
		||||
            BattleUtil.RandomDot(f1, dot, role, caster, i1, 1, damage)
 | 
			
		||||
| 
						 | 
				
			
			@ -4050,17 +4057,21 @@ local passivityList = {
 | 
			
		|||
        role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
 | 
			
		||||
    end,
 | 
			
		||||
    
 | 
			
		||||
 --技能治疗系数[a]改变[b]%(作用于主动技能效果103)
 | 
			
		||||
    --a[改变类型]b[float]
 | 
			
		||||
    --技能治疗系数[a]改变[b]% ,技能目标改变[c] [d]名(作用于主动技能效果103)
 | 
			
		||||
    --a[改变类型]b[float] c[改变类型] d[int]
 | 
			
		||||
    [206] = function(role, args)
 | 
			
		||||
        local ct = args[1]
 | 
			
		||||
        local f1 = args[2]
 | 
			
		||||
 | 
			
		||||
        local ct2 = args[3]
 | 
			
		||||
        local f2 = args[4]
 | 
			
		||||
        local onSkillEffectBefore = function(skill, e, func)
 | 
			
		||||
            if skill.type == BattleSkillType.Special then
 | 
			
		||||
                if e.type == 103 then -- 当前只对技能效果103生效
 | 
			
		||||
                    local factor = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[3], f1, ct))
 | 
			
		||||
                    e.args[3] = factor
 | 
			
		||||
                    if ct2 and f2 then
 | 
			
		||||
                        e.args[4] = BattleUtil.ErrorCorrection(BattleUtil.CountValue(e.args[4], f2, ct2))
 | 
			
		||||
                    end
 | 
			
		||||
                    if func then func(e) end
 | 
			
		||||
                end
 | 
			
		||||
            end
 | 
			
		||||
| 
						 | 
				
			
			@ -5473,6 +5484,9 @@ local passivityList = {
 | 
			
		|||
        local ct = args[2]
 | 
			
		||||
        local f1 = args[3]
 | 
			
		||||
        local onPassiveBeDamaging = function(func, caster, damage)
 | 
			
		||||
            if caster and caster.camp==role.camp then
 | 
			
		||||
                return
 | 
			
		||||
            end
 | 
			
		||||
            if BattleLogic.BuffMgr:HasBuff(caster, BuffName.DOT, function(buff) return buff.damageType == dot end) then
 | 
			
		||||
                role:AddRage(f1,ct)
 | 
			
		||||
            end
 | 
			
		||||
| 
						 | 
				
			
			@ -5489,7 +5503,6 @@ local passivityList = {
 | 
			
		|||
            local pro=0
 | 
			
		||||
            if curRound>0 then
 | 
			
		||||
                pro=i1^(curRound-1)
 | 
			
		||||
                LogError("cur round pro "..pro)
 | 
			
		||||
            end
 | 
			
		||||
            if isTrigger then
 | 
			
		||||
                local isAdd=BattleUtil.RandomAction(pro, function ()
 | 
			
		||||
| 
						 | 
				
			
			@ -5501,11 +5514,12 @@ local passivityList = {
 | 
			
		|||
            end           
 | 
			
		||||
        end)
 | 
			
		||||
    end,
 | 
			
		||||
 -- 释放技能时如目标处于[a]状态,解除周围人系神将的异常状态
 | 
			
		||||
    -- a[持续伤害状态]b[float]
 | 
			
		||||
    -- 释放技能时如目标处于[a]状态,解除周围[c]系神将的控制状态
 | 
			
		||||
    -- a[持续伤害状态]b[float] c[int]
 | 
			
		||||
    [273] = function(role, args)
 | 
			
		||||
        local dot = args[1]
 | 
			
		||||
        local f1 = args[2]
 | 
			
		||||
        local ele =args[3]
 | 
			
		||||
        local onHit = function(target, damage, bCrit, finalDmg)
 | 
			
		||||
            --屏蔽相同阵应
 | 
			
		||||
            if target and target.camp==role.camp then
 | 
			
		||||
| 
						 | 
				
			
			@ -5515,10 +5529,10 @@ local passivityList = {
 | 
			
		|||
                local list = RoleManager.GetNeighbor(role, 1)
 | 
			
		||||
                if list then
 | 
			
		||||
                    for key, value in pairs(list) do
 | 
			
		||||
                        if value and value~=role and value.element==role.element then
 | 
			
		||||
                        if value and value~=role and value.element==ele then
 | 
			
		||||
                            -- 清除所有负面buff
 | 
			
		||||
                         BattleLogic.BuffMgr:ClearBuff(self.target, function (buff)
 | 
			
		||||
                         return buff.type == BuffName.Control or buff.type == BuffName.DOT
 | 
			
		||||
                         BattleLogic.BuffMgr:ClearBuff(value, function (buff)
 | 
			
		||||
                         return buff.type == BuffName.Control
 | 
			
		||||
                         end)
 | 
			
		||||
                        end
 | 
			
		||||
                    end
 | 
			
		||||
| 
						 | 
				
			
			@ -5659,16 +5673,17 @@ local passivityList = {
 | 
			
		|||
        role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore)
 | 
			
		||||
    end,
 | 
			
		||||
    --为己方神将附加的护盾消失后,回复被保护的神将[a][b]%的血量
 | 
			
		||||
    --a[int 属性id] b[flaot]
 | 
			
		||||
    [278]=function(role,args)
 | 
			
		||||
        local pro=args[1]
 | 
			
		||||
        local v1=args[2]
 | 
			
		||||
        local OnBuffEnd=function(buff)
 | 
			
		||||
            if buff and buff.caster==role and buff.type==BuffName.Shield then
 | 
			
		||||
            if buff and not buff.target:IsDead() and buff.caster==role and buff.type==BuffName.Shield then
 | 
			
		||||
                local val = floor(BattleUtil.FP_Mul(v1, role:GetRoleData(BattlePropList[pro])))
 | 
			
		||||
                BattleUtil.CalTreat(role,buff.target, val)
 | 
			
		||||
            end
 | 
			
		||||
        end
 | 
			
		||||
        role.Event:AddEvent(BattleEventName.BuffEnd, OnBuffEnd)
 | 
			
		||||
        BattleLogic.Event:AddEvent(BattleEventName.ShieldBuffEnd, OnBuffEnd)
 | 
			
		||||
    end,
 | 
			
		||||
     --发动技能后,[a]概率给我方[b]最高[c]名[d]阵营 [e]属性[f]改变[g],持续[h]回合
 | 
			
		||||
    --a[float],b[int 属性],c[int], d[int],e[int 属性],f[int 改变类型],g[float] h[int]
 | 
			
		||||
| 
						 | 
				
			
			@ -5685,17 +5700,15 @@ local passivityList = {
 | 
			
		|||
        local OnSkillCastEnd = function(skill)
 | 
			
		||||
            if skill and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra) then
 | 
			
		||||
            BattleUtil.RandomAction(p1, function ()
 | 
			
		||||
            local  list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele end)
 | 
			
		||||
            local  list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele and not v:IsDead() end)
 | 
			
		||||
            if not list or LengthOfTable(list)==0 then
 | 
			
		||||
                return
 | 
			
		||||
            end
 | 
			
		||||
            list =BattleUtil.SortByProp(list,BattlePropList[p2],0)
 | 
			
		||||
            for i = 1,LengthOfTable(list) do
 | 
			
		||||
                if i<=num then
 | 
			
		||||
                    if not list[i]:IsDead() then
 | 
			
		||||
                        local buff=Buff.Create(role, BuffName.PropertyChange,r1,BattlePropList[p3],v1,ct )
 | 
			
		||||
                        list[i]:AddBuff(buff)
 | 
			
		||||
                     end
 | 
			
		||||
                if i<=num then                    
 | 
			
		||||
                    local buff=Buff.Create(role, BuffName.PropertyChange,r1,BattlePropList[p3],v1,ct )
 | 
			
		||||
                    list[i]:AddBuff(buff)                   
 | 
			
		||||
                end                   
 | 
			
		||||
            end                                   
 | 
			
		||||
            end)
 | 
			
		||||
| 
						 | 
				
			
			@ -5706,8 +5719,113 @@ local passivityList = {
 | 
			
		|||
    --免疫减怒
 | 
			
		||||
    [280]=function(role,args)
 | 
			
		||||
        role.isImmuneReduceRage=true
 | 
			
		||||
        LogError("角色免疫减怒")
 | 
			
		||||
    end,
 | 
			
		||||
   
 | 
			
		||||
    --当己方[a]阵营神将释放技能怒气不足时,将从精卫身上额外转移怒气释放技能(转移的怒气首先可以保证精卫释放技能)
 | 
			
		||||
    --a[int 阵营id]
 | 
			
		||||
   [281]=function(role,args)
 | 
			
		||||
    local ele=args[1]
 | 
			
		||||
    local onRoleCastSkillBrfore=function(caster)       
 | 
			
		||||
    -- 施法者不是自身/自身不足已释放技能/不是己方英雄/不是a 阵营
 | 
			
		||||
      if caster==role or role.Rage <= role.SuperSkillRage or caster.camp~=role.camp or caster.element~=role.element then
 | 
			
		||||
          return
 | 
			
		||||
      end
 | 
			
		||||
      --释放者死亡或释放着被沉默
 | 
			
		||||
      if caster:IsDead() or caster.ctrl_slient then
 | 
			
		||||
        return
 | 
			
		||||
      end
 | 
			
		||||
      local moreRage=role.Rage-role.SuperSkillRage
 | 
			
		||||
      local lessRage=caster.SuperSkillRage-caster.Rage
 | 
			
		||||
      local num=moreRage-lessRage
 | 
			
		||||
      if num>=0 then
 | 
			
		||||
        --精卫转移怒气不算减怒
 | 
			
		||||
        role.Rage=role.Rage-lessRage
 | 
			
		||||
        caster:AddRage(lessRage, CountTypeName.Add)
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    BattleLogic.Event:AddEvent(BattleEventName.RoleCastSkillBefore, onRoleCastSkillBrfore)
 | 
			
		||||
   end,
 | 
			
		||||
   --上阵[a]方[b]阵营神将[c] [d]改变[e] 持续[f]回合
 | 
			
		||||
   --a[int 0:己方 1:敌方], b[int 阵营id], c[int 属性id], d[int 改变类型] e[float] f[int]
 | 
			
		||||
   [282]=function(role,args)
 | 
			
		||||
    local camp=args[1]
 | 
			
		||||
    local ele=args[2]
 | 
			
		||||
    local pro=args[3]
 | 
			
		||||
    local ct=args[4]
 | 
			
		||||
    local v1=args[5]
 | 
			
		||||
    --回合数默认为0,永久生效
 | 
			
		||||
    local r1=0
 | 
			
		||||
    if args[6] then
 | 
			
		||||
        r1=args[6]
 | 
			
		||||
    end
 | 
			
		||||
    local OnRoundChange=function(round)
 | 
			
		||||
      if round==1 then
 | 
			
		||||
        local list=nil
 | 
			
		||||
        if camp==0 then
 | 
			
		||||
           list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele end)
 | 
			
		||||
        elseif camp==1 then
 | 
			
		||||
        list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end)
 | 
			
		||||
        end
 | 
			
		||||
        if not list or LengthOfTable(list)==0 then
 | 
			
		||||
            return
 | 
			
		||||
        end
 | 
			
		||||
        for key, value in pairs(list) do
 | 
			
		||||
           -- value.data:CountValue(BattlePropList[pro], v1, ct)
 | 
			
		||||
            local buff=Buff.Create(role, BuffName.PropertyChange,r1,BattlePropList[pro],v1,ct )
 | 
			
		||||
            value:AddBuff(buff) 
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, OnRoundChange)
 | 
			
		||||
   end,
 | 
			
		||||
   --释放技能后,额外[a]改变[b]方怒气最少的[c]阵营目标[d]点怒气
 | 
			
		||||
   --a[int 改变类型],b[int 0:己方 1:敌方],c[int],d[int] 
 | 
			
		||||
   [283]=function(role,args)
 | 
			
		||||
    local ct=args[1]
 | 
			
		||||
    local camp=args[2]
 | 
			
		||||
    local ele=args[3]
 | 
			
		||||
    local v1=args[4]
 | 
			
		||||
    local onSkillCastEnd=function(skill)
 | 
			
		||||
        if skill and skill.type== BattleSkillType.Special then
 | 
			
		||||
            local list=nil
 | 
			
		||||
            if camp==0 then
 | 
			
		||||
               list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele end)
 | 
			
		||||
            elseif camp==1 then
 | 
			
		||||
            list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end)
 | 
			
		||||
            end
 | 
			
		||||
            if not list or LengthOfTable(list)==0 then
 | 
			
		||||
                return
 | 
			
		||||
            end
 | 
			
		||||
            list=BattleUtil.SortByRage(list,0)
 | 
			
		||||
            list[1]:AddRage(v1,ct)
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
    role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd)
 | 
			
		||||
   end,
 | 
			
		||||
   --受到[a]类型伤害的[b]%转化为血量,治疗自己
 | 
			
		||||
   -- a[int 1:普攻 2:技能 ] b[flaot]
 | 
			
		||||
   [284]=function(role,args)
 | 
			
		||||
    local type=args[1]
 | 
			
		||||
    local v1=args[2]
 | 
			
		||||
    local onRoleBeHit=function(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
 | 
			
		||||
        if type==1 then--普攻
 | 
			
		||||
            if not skill or skill.type~= BattleSkillType.Normal then
 | 
			
		||||
                return
 | 
			
		||||
            end
 | 
			
		||||
        elseif  type==2 then--技能
 | 
			
		||||
            if skill then
 | 
			
		||||
                if  skill.type==BattleSkillType.Normal and skill.type==BattleSkillType.Monster  then
 | 
			
		||||
                    return
 | 
			
		||||
                end
 | 
			
		||||
             else
 | 
			
		||||
                if not isDirect then
 | 
			
		||||
                    return
 | 
			
		||||
                end
 | 
			
		||||
             end
 | 
			
		||||
        end
 | 
			
		||||
        BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * v1)))
 | 
			
		||||
    end
 | 
			
		||||
    role.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit)
 | 
			
		||||
   end,
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
return passivityList
 | 
			
		||||
| 
						 | 
				
			
			@ -147,6 +147,7 @@ function Shield:OnEnd()
 | 
			
		|||
            end
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
    BattleLogic.Event:DispatchEvent(BattleEventName.ShieldBuffEnd, self)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -127,6 +127,10 @@ BattleEventName = {
 | 
			
		|||
    DebugStop = indexAdd(),
 | 
			
		||||
    --显示提示文字
 | 
			
		||||
    ShowHintText = indexAdd(),
 | 
			
		||||
    --角色释放技能之前
 | 
			
		||||
    RoleCastSkillBefore = indexAdd(),
 | 
			
		||||
    --护盾buff消失以后
 | 
			
		||||
    ShieldBuffEnd=indexAdd(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BattleMaxFrame = 1000000
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,6 +87,27 @@ function BattleUtil.SortByHpFactor(arr, sort)
 | 
			
		|||
    end)
 | 
			
		||||
    return arr
 | 
			
		||||
end
 | 
			
		||||
--按怒气排序
 | 
			
		||||
function BattleUtil.SortByRage(arr, sort)
 | 
			
		||||
    BattleUtil.Sort(arr, function(a, b)
 | 
			
		||||
        local r1 = a.Rage
 | 
			
		||||
        local r2 = b.Rage
 | 
			
		||||
        if sort == 1 then 
 | 
			
		||||
            if r1==r2 then
 | 
			
		||||
                return a.position>b.position
 | 
			
		||||
            else
 | 
			
		||||
                return r1 < r2 
 | 
			
		||||
            end            
 | 
			
		||||
        else 
 | 
			
		||||
            if r1==r2 then
 | 
			
		||||
                return a.position>b.position
 | 
			
		||||
            else
 | 
			
		||||
                return r1 > r2 
 | 
			
		||||
            end           
 | 
			
		||||
        end
 | 
			
		||||
    end)   
 | 
			
		||||
    return arr
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- 获取技能最大目标数
 | 
			
		||||
function BattleUtil.GetMaxTargetNum(chooseId)
 | 
			
		||||
| 
						 | 
				
			
			@ -447,12 +468,13 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy
 | 
			
		|||
        end
 | 
			
		||||
        if skill then
 | 
			
		||||
            atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole, damage, bCrit, finalDmg, damageType, skill)
 | 
			
		||||
            defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole, damage, bCrit, finalDmg, damageType, skill)
 | 
			
		||||
            defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
 | 
			
		||||
        end
 | 
			
		||||
        --如果不是技能带的伤害,并且是直接伤害就,,,,,
 | 
			
		||||
        --用于处理不触发特性并且是直接伤害的伤害  isDirect 暂时先为bool值,后期可根据需求做修改扩展  by:王振兴 2020/10/12 16:18
 | 
			
		||||
        if isDirect and not skill then
 | 
			
		||||
            atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole, damage, bCrit, finalDmg, damageType, skill)
 | 
			
		||||
            defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -160,7 +160,6 @@ end
 | 
			
		|||
function RoleLogic:AddRage(value, type)
 | 
			
		||||
    -- 角色身上有无敌盾,不扣除怒气 by:wangzhenxing 2020/08/10 14:56
 | 
			
		||||
    if (type==3 or type==4) and (self.isImmuneReduceRage or BattleLogic.BuffMgr:HasBuff(self, BuffName.Shield, function (buff) return buff.shieldType and buff.shieldType == ShieldTypeName.AllReduce end)) then
 | 
			
		||||
        LogBattle("角色身上有无敌盾,不扣除怒气")
 | 
			
		||||
        return
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -174,7 +173,6 @@ function RoleLogic:AddRage(value, type)
 | 
			
		|||
    elseif type == 4 then --乘减算(百分比属性减算)
 | 
			
		||||
        delta = -floor(value * self.SuperSkillRage)
 | 
			
		||||
    end
 | 
			
		||||
    -- 
 | 
			
		||||
    self.Event:DispatchEvent(BattleEventName.RoleRageChange, delta)
 | 
			
		||||
    --怒气值不可为负值
 | 
			
		||||
    self.Rage = max(self.Rage + delta, 0)
 | 
			
		||||
| 
						 | 
				
			
			@ -362,7 +360,9 @@ end
 | 
			
		|||
-- isRage   是否正常操作怒气值
 | 
			
		||||
function RoleLogic:AddSkill(type, isRage, isAdd, targets)
 | 
			
		||||
    if not self.IsCanAddSkill and isAdd then return end
 | 
			
		||||
 | 
			
		||||
    local effectData = type == BattleSkillType.Normal and self.skill or self.superSkill
 | 
			
		||||
    
 | 
			
		||||
    SkillManager.AddSkill(self, effectData, type, targets, isAdd, isRage)
 | 
			
		||||
    -- 
 | 
			
		||||
    BattleLogManager.Log(
 | 
			
		||||
| 
						 | 
				
			
			@ -429,6 +429,10 @@ function RoleLogic:CastSkill(func)
 | 
			
		|||
    if not self:IsAvailable() then
 | 
			
		||||
        return 
 | 
			
		||||
    end
 | 
			
		||||
    --如果当前怒气不足以释放绝技
 | 
			
		||||
    if self.Rage<self.SuperSkillRage then
 | 
			
		||||
            BattleLogic.Event:DispatchEvent(BattleEventName.RoleCastSkillBefore,self)       
 | 
			
		||||
    end   
 | 
			
		||||
    -- 没有沉默
 | 
			
		||||
    if not self.ctrl_slient and self.Rage >= self.SuperSkillRage then
 | 
			
		||||
        -- 释放大技能
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue