[战斗]=============新增352被动

dev_chengFeng
wangzhenxing 2021-09-24 14:59:54 +08:00
parent c862eac46e
commit 19f7984f01
3 changed files with 48 additions and 3 deletions

View File

@ -8276,6 +8276,45 @@ local passivityList = {
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange)
end,
-- 行动击杀目标,追加[a]次普攻
-- a[int 目标选择系数] b[flaot] c[int 伤害类型]
[352] = function(role, args,id,judge)
local i1 = args[1]
local isTurn=false
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
if not skill then
return
end
--改为一次行动只触发一次,不管这次行动追加多少次技能,击杀多少次,都只触发一次 by:wangzhenxing dengdan 2021/7/16
if not isTurn then
return
end
if skill.isNotLoop then
return
end
--如果是技能并且这个被动已经被触发过 return
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
return
end
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
for i = 1, i1 do
role:AddSkill(BattleSkillType.Normal, false, true, nil,true,true)
end
isTurn=false
if skill then
table.insert(skill.triggerPassivityId,id)
end
end
end
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role)
local onRoleTurnStart=function()
isTurn=true
end
role.Event:AddEvent(BattleEventName.RoleTurnStart,onRoleTurnStart,nil,nil,role)
end,
}
return passivityList

View File

@ -440,18 +440,21 @@ end
-- targets 指定目标
-- isAdd 是否是追加技能
-- isRage 是否正常操作怒气值
function RoleLogic:AddSkill(type, isRage, isAdd, targets)
function RoleLogic:AddSkill(type, isRage, isAdd, targets,isTrigger,isLoop)
if not self.IsCanAddSkill and isAdd then return end
local effectData = type == BattleSkillType.Normal and self.skill or self.superSkill
--角色被混乱后
local isTriggerJudge=true
if isTrigger~=nil then
isTriggerJudge=isTrigger
end
if self.ctrl_chaos then
type=BattleSkillType.ChaosNormal
--混乱普攻使用普攻特效
effectData={self.skill[1],self.skill[2],self.skill[3],self.skill[4],{100001,{1,1,1}}}
isTriggerJudge=false
end
SkillManager.AddSkill(self, effectData, type, targets, isAdd, isRage,isTriggerJudge)
SkillManager.AddSkill(self, effectData, type, targets, isAdd, isRage,isTriggerJudge,isLoop)
--
end

View File

@ -44,7 +44,7 @@ end
-- 向技能列表中追加技能
function this.AddSkill(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge)
function this.AddSkill(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge,isloop)
-- 如果超出最大限制则不再追加技能
if not this.CheckMaxCount() then
return
@ -61,6 +61,9 @@ function this.AddSkill(caster, effectData, type, targets, isAdd, isRage,isTrigge
)
local skill = skillPool:Get()
skill:Init(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge)
if isloop then
skill.isNotLoop=isloop
end
if type == BattleSkillType.DeadSkill then -- 死亡技能加入单独的对列
table.insert(this.DeadSkillList, skill)
else