新将观音提交

dev_chengFeng
wangzhenxing 2021-01-20 16:08:44 +09:00
parent aae550e685
commit bf040e7544
4 changed files with 125 additions and 39 deletions

View File

@ -5202,6 +5202,9 @@ local passivityList = {
if skill and skill.type== BattleSkillType.ChaosNormal and judge==1 then
return
end
if not skill and judge==1 then
return
end
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
-- local target = RoleManager.GetAliveAggro(role)
--BattleUtil.CalDamage(nil, role, target, 1, f1)
@ -5326,7 +5329,7 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit)
end,
-- 每释放[a]次技能,[b]增加[c]%,可叠加[d]次
-- 每释放[a]次技能,[b]增加[c]%,可叠加[d]次(d 填0为可叠加无数次)
-- a[int] b[int] c[float] d[int]
[262] = function(role, args)
local num = args[1]
@ -5340,7 +5343,7 @@ local passivityList = {
if skill and skill.owner==role and (skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra ) then
releaseNum=releaseNum+1
--如果能被限制次数整除 and 小于最大叠加次数
if releaseNum>0 and releaseNum%num==0 and addNum<time then
if releaseNum>0 and releaseNum%num==0 and (addNum<time or time==0 )then
role.data:AddValue(BattlePropList[pro],val)
addNum=addNum+1
end
@ -5898,34 +5901,7 @@ local passivityList = {
end
role.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit)
end,
-- 直接伤害击杀目标释放对[a][b]%[c]技能伤害 神女庇佑魂印效果 播放佩戴者的技能动作和特效
-- a[int 目标选择系数] b[flaot] c[int 伤害类型]
[292] = function(role, args,id,judge)
local targets = args[1]
local f1 = args[2]
local f2=args[3]
local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill)
--如果是技能并且这个被动已经被触发过 return
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) 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
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) and not role:IsDead() then
--role:InsertExtraSkill(f1,f2)
local effectData={role.superSkill[1],role.superSkill[2],role.superSkill[3],role.superSkill[4],{targets,{1,f1,f2}}}
SkillManager.InsertSkill(role, effectData,BattleSkillType.Extra, nil, true, false)
if skill then
table.insert(skill.triggerPassivityId,id)
end
end
end
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit)
end,
--技能追加的普攻额外造成目标[a][b]%的伤害。技能每成功[c]1个目标额外造成[d]%生命上限的伤害
--a[int 属性id] b[float] c[控制状态] d[flaot]
[285]=function(role,args)
@ -6278,6 +6254,32 @@ local passivityList = {
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd)
end,
--
--技能追加的额外技能额外造成目标[a][b]%的伤害。
--a[int 属性id] b[float]
[301]=function(role,args,id,judge)
local f1 = args[1]
local dt = args[2]
-- 直接伤害后
local onPassiveDamaging = function(func, defRole, damage,skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
--如果是boss 并且额外伤害是根据最大生命则返回
local isBoss=BattleUtil.CheckIsBoss(defRole)
if isBoss and (f1==12 or f1==13) then
return
end
if skill and skill.type == BattleSkillType.Extra then
local val = -floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
if func then
func(val)
end
end
end
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging)
end,
}
return passivityList

View File

@ -275,6 +275,7 @@ skill2={1132051,0.8,0,1,{200212,{1,0.89,2}}},
skill3={1151111,0.05,0,1,{220000,{1,0.86,2}}},
skill4={10000351,0.3,0.5,4,{400000,{1,1.75,1}}},
skill5={12011001,0.3,0.5,4,{400000,{1,2.2,1}}},
skill6={12011001,0.3,0.5,4,{400000,{1,2.2,1}}},
}

View File

@ -69,6 +69,95 @@ function BattleUtil.ChooseCol(arr, col)
end)
return tempArr
end
-- 选择两列
function BattleUtil.ChooseTowCol(arr)
local teamArr={}
--第一列
local oneArr = {}
for _, role in ipairs(arr) do
if role.position % 3 == 1 then
table.insert(oneArr, role)
end
end
local one=#oneArr
--第二列
local twoArr = {}
for _, role in ipairs(arr) do
if role.position % 3 == 2 then
table.insert(twoArr, role)
end
end
local two=#twoArr
--第三列
local threeArr = {}
for _, role in ipairs(arr) do
if role.position % 3 == 0 then
table.insert(threeArr, role)
end
end
local three=#threeArr
--如果每列人数相同,就选前两列
if one==two and two==three then
for key, value in pairs(oneArr) do
table.insert(teamArr,value)
end
for key, value in pairs(twoArr) do
table.insert(teamArr,value)
end
end
--如果第一列数量>第二列数量就把第一列选入
if one>two then
if one>0 then
for key, value in pairs(oneArr) do
table.insert(teamArr,value)
end
end
--如果第二列数量>第三列数量就把第二列选入
if two>three then
if two>0 then
for key, value in pairs(twoArr) do
table.insert(teamArr,value)
end
end
else
--如果第三列数量>第二列数量就把第三列选入
if three>0 then
for key, value in pairs(threeArr) do
table.insert(teamArr,value)
end
end
end
else
--如果第二列数量>第一列数量就把第二列选入
if two>0 then
for key, value in pairs(twoArr) do
table.insert(teamArr,value)
end
end
--如果第一列数量>第三列数量就把第一列选入
if one>three then
if one>0 then
for key, value in pairs(oneArr) do
table.insert(teamArr,value)
end
end
else
--如果第三列数量>第一列数量就把第三列选入
if three>0 then
for key, value in pairs(threeArr) do
table.insert(teamArr,value)
end
end
end
end
table.sort(teamArr, function(a, b)
return a.position < b.position
end)
return teamArr
end
-- 根据属性排序
function BattleUtil.SortByProp(arr, prop, sort)
BattleUtil.Sort(arr, function(a, b)
@ -247,6 +336,9 @@ function BattleUtil.ChooseTarget(role, chooseId)
end
end
arr = tempArr
elseif chooseLimit == 6 then --两纵排单位
local tempArr=BattleUtil.ChooseTowCol(arr)
arr=tempArr
end
-- 选择条件

View File

@ -557,15 +557,6 @@ function RoleLogic:SetRelive(hpf, caster)
self.reliveHPF = hpf or 1
self.reliveCaster = caster
RoleManager.AddReliveRole(self)
-- local maxHp = self.data:GetData(RoleDataName.MaxHp)
-- local reHp = floor(self.reliveHPF * maxHp)
-- self.data:SetValue(RoleDataName.Hp, reHp)
-- -- 发送复活事件
-- --self.Event:DispatchEvent(BattleEventName.RoleRelive, self)
-- --BattleLogic.Event:DispatchEvent(BattleEventName.RoleRelive, self)
-- -- 复活的血量算做加血
-- BattleLogic.Event:DispatchEvent(BattleEventName.RecordTreat, self.reliveCaster or self, self, reHp)
-- return true
end
return false
end