【战斗】==========被动93 307 309 351修改

dev_chengFeng
wangzhenxing 2021-09-24 17:40:08 +08:00
parent 1505647241
commit d83cf97ae2
1 changed files with 28 additions and 17 deletions

View File

@ -1609,7 +1609,7 @@ local passivityList = {
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if skill.type == BattleSkillType.Special then
if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.DeadSkill then
role.Event:AddEvent(BattleEventName.PassiveTreating, passiveTreating,nil,nil,role)
end
end
@ -1617,7 +1617,7 @@ local passivityList = {
if skill and not skill.isTriggerJudge and judge==1 then
return
end
if skill.type == BattleSkillType.Special then
if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.DeadSkill then
role.Event:RemoveEvent(BattleEventName.PassiveTreating, passiveTreating)
end
end
@ -7023,21 +7023,19 @@ local passivityList = {
if role:IsDead() then
return
end
-- if skill and not skill.isTriggerJudge and judge==1 then
-- return
-- end
-- LogYellow("307 1")
if skill and (skill.type==BattleSkillType.Special or skill.type== BattleSkillType.Extra or skill.type== BattleSkillType.Monster) then --技能造成的直接伤害
if skill and (skill.type==BattleSkillType.Special or skill.type== BattleSkillType.Extra or skill.type== BattleSkillType.DeadSkill) then --技能造成的直接伤害
local list = RoleManager.NoOrder(function(v) return v.camp == role.camp end)
BattleUtil.SortByHpFactor(list, 1)
-- LogYellow("307 2")
if list[1] then
-- LogYellow("307 3")
local val = floor(BattleUtil.FP_Mul(f1, list[1]:GetRoleData(BattlePropList[pro])))
if pro==12 then
BattleUtil.FinalTreat(role, list[1], val)
else
BattleUtil.CalTreat(role, list[1], val)
end
end
end
end
role.Event:AddEvent(BattleEventName.RoleBeHit, onBeSkillHit,nil,nil,role)
end,
-- 普攻后目标附加1个免疫控制的效果[a][b][c](眩晕、沉默、麻痹)的护盾,持续[d]]回合
@ -7089,11 +7087,26 @@ local passivityList = {
local ctr2 = args[3]
local ctr3 = args[4]
local ctr4 = args[5]
local SkillCast = function(damagingFunc, defRole, damage, skill)
local ctrls={}
if ctrl then
table.insert(ctrls,ctrl)
end
if ctr2 then
table.insert(ctrls,ctr2)
end
if ctr3 then
table.insert(ctrls,ctr3)
end
local SkillCast = function(skill)
if not skill then
return
end
if skill.type ~= BattleSkillType.Special and skill.type ~= BattleSkillType.Extra and skill.type ~= BattleSkillType.DeadSkill then
return
end
local list = RoleManager.Query(function(v) return v.camp == role.camp end)
BattleUtil.SortByHpFactor(list, 1)
local target = nil
-- LogYellow("309 1: "..#list)
for i = 1, #list do
if not list[i]:IsRealDead() then
target = list[i]
@ -7101,10 +7114,8 @@ local passivityList = {
end
end
if target and target.roleData.element==ele then
-- LogYellow("309 2")
BattleLogic.BuffMgr:ClearBuff(target, function(buff)
-- LogYellow("309 3: "..buff.type.." "..buff.ctrlType)
return buff.type == BuffName.Control and (buff.ctrlType == ctrl or buff.immuneType == ctr2 or buff.immuneType == ctr3 or buff.immuneType == ctr4)
return buff.type == BuffName.Control and BattleUtil.ChecklistIsContainValue(ctrls,buff.ctrlType)
end)
end
end
@ -8287,7 +8298,7 @@ local passivityList = {
end,
--每回合开始,为自己添加[a][b]%的御甲
--自身行动回合开始前,为自己添加[a][b]%的御甲
--a[int],b[float]
[351] = function(role, args,id,judge)
local pro = args[1]
@ -8301,7 +8312,7 @@ local passivityList = {
role:AddBuff(Buff.Create(role, BuffName.Blood,0, val))
end
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundStart, onRoundChange,nil,nil,role)
role.Event:AddEvent(BattleEventName.RoleTurnStart, onRoundChange,nil,nil,role)
end,
-- 行动击杀目标,追加[a]次普攻
-- a[int]