[战斗]======= 2021-0303发布计划 战斗修改
parent
da1aa31b3d
commit
0e23ca3cf8
|
@ -2089,7 +2089,7 @@ local passivityList = {
|
||||||
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 and judge==1 then
|
if skill and skill.type== BattleSkillType.Extra and skill.owner.roleId==10015 and judge==1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if skill and skill.type==BattleSkillType.Special then
|
if skill and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Normal) then
|
||||||
local dd = BattleUtil.CountValue(damage, f1, ct) - damage
|
local dd = BattleUtil.CountValue(damage, f1, ct) - damage
|
||||||
if func then func(-floor(BattleUtil.ErrorCorrection(dd))) end
|
if func then func(-floor(BattleUtil.ErrorCorrection(dd))) end
|
||||||
end
|
end
|
||||||
|
@ -2184,7 +2184,7 @@ local passivityList = {
|
||||||
af = af + f1
|
af = af + f1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast)
|
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCast)
|
||||||
|
|
||||||
-- 如果是技能的伤害则判断加成
|
-- 如果是技能的伤害则判断加成
|
||||||
local onPassiveDamaging = function(func, target, damage, skill)
|
local onPassiveDamaging = function(func, target, damage, skill)
|
||||||
|
@ -2456,26 +2456,27 @@ local passivityList = {
|
||||||
deadNum = deadNum + 1
|
deadNum = deadNum + 1
|
||||||
if deadNum >= i1 then
|
if deadNum >= i1 then
|
||||||
deadNum = 0
|
deadNum = 0
|
||||||
extra = extra + f1
|
--extra = extra + f1
|
||||||
-- local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro], f1, ct2)
|
--处理混乱后普攻不触发任何特性问题改成加buff 王振兴 2021/02/25
|
||||||
-- role:AddBuff(buff)
|
local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[5], f1, ct2)
|
||||||
|
role:AddBuff(buff)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead)
|
BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead)
|
||||||
|
|
||||||
local passivityDamaging = function(func, caster, damage, skill)
|
-- local passivityDamaging = function(func, caster, damage, skill)
|
||||||
if skill and not skill.isTriggerJudge and judge==1 then
|
-- if skill and not skill.isTriggerJudge and judge==1 then
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
if skill then
|
-- if skill then
|
||||||
if func then
|
-- if func then
|
||||||
local dd = BattleUtil.CountValue(damage, extra, ct2) - damage
|
-- local dd = BattleUtil.CountValue(damage, extra, ct2) - damage
|
||||||
func(-floor(BattleUtil.ErrorCorrection(dd)))
|
-- func(-floor(BattleUtil.ErrorCorrection(dd)))
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
-- role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- 直接伤害每次击杀目标增加自身伤害[a]%,[b]改变,可叠加持续至战斗结束
|
-- 直接伤害每次击杀目标增加自身伤害[a]%,[b]改变,可叠加持续至战斗结束
|
||||||
|
@ -2493,37 +2494,39 @@ local passivityList = {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if skill and defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
if skill and defRole:IsDead() and not BattleUtil.CheckIsNoDead(defRole) then
|
||||||
killNum = killNum + 1
|
-- killNum = killNum + 1
|
||||||
|
local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[5], f1, ct)
|
||||||
|
role:AddBuff(buff)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit)
|
role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit)
|
||||||
|
|
||||||
|
|
||||||
-- 释放技能时计算额外伤害
|
-- 释放技能时计算额外伤害
|
||||||
local OnSkillCast = function(skill)
|
-- local OnSkillCast = function(skill)
|
||||||
if skill and not skill.isTriggerJudge and judge==1 then
|
-- if skill and not skill.isTriggerJudge and judge==1 then
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
if skill then
|
-- if skill then
|
||||||
extra = f1 * killNum
|
-- extra = f1 * killNum
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast)
|
-- role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast)
|
||||||
|
|
||||||
|
|
||||||
-- 造成伤害时判断额外伤害
|
-- -- 造成伤害时判断额外伤害
|
||||||
local passivityDamaging = function(func, caster, damage, skill)
|
-- local passivityDamaging = function(func, caster, damage, skill)
|
||||||
if skill and not skill.isTriggerJudge and judge==1 then
|
-- if skill and not skill.isTriggerJudge and judge==1 then
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
if skill then
|
-- if skill then
|
||||||
if func then
|
-- if func then
|
||||||
local dd = BattleUtil.CountValue(damage, extra, ct) - damage
|
-- local dd = BattleUtil.CountValue(damage, extra, ct) - damage
|
||||||
func(-floor(BattleUtil.ErrorCorrection(dd)))
|
-- func(-floor(BattleUtil.ErrorCorrection(dd)))
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
-- role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||||
|
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
@ -3093,6 +3096,9 @@ local passivityList = {
|
||||||
if skill and not skill.isTriggerJudge and judge==1 then
|
if skill and not skill.isTriggerJudge and judge==1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if target:CheckHavePassive(144) then
|
||||||
|
return
|
||||||
|
end
|
||||||
--白骨精追加普攻不触发特性
|
--白骨精追加普攻不触发特性
|
||||||
if skill and judge==1 and skill.type== BattleSkillType.Normal and skill.isAdd and skill.owner.roleId==10091 then
|
if skill and judge==1 and skill.type== BattleSkillType.Normal and skill.isAdd and skill.owner.roleId==10091 then
|
||||||
return
|
return
|
||||||
|
@ -4129,9 +4135,9 @@ local passivityList = {
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange)
|
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange)
|
||||||
|
|
||||||
|
|
||||||
local function onFinalBeDamage(damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType)
|
local function onFinalBeDamage(damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType,isDirect)
|
||||||
-- 非直接伤害不免除
|
-- 非直接伤害不免除
|
||||||
if not skill then
|
if not skill and not isDirect then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
--
|
--
|
||||||
|
@ -5202,6 +5208,7 @@ local passivityList = {
|
||||||
-- a[float]
|
-- a[float]
|
||||||
[249] = function(role, args,id,judge)
|
[249] = function(role, args,id,judge)
|
||||||
local f1 = args[1]
|
local f1 = args[1]
|
||||||
|
local round = 0
|
||||||
-- 释放技能后
|
-- 释放技能后
|
||||||
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
||||||
if skill and not skill.isTriggerJudge and judge==1 then
|
if skill and not skill.isTriggerJudge and judge==1 then
|
||||||
|
@ -5211,6 +5218,13 @@ local passivityList = {
|
||||||
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
if skill and BattleUtil.ChecklistIsContainValue(skill.triggerPassivityId,id) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local curRound=BattleLogic.GetCurRound()
|
||||||
|
--每个回合只会生效一次
|
||||||
|
if curRound>round then
|
||||||
|
round=curRound
|
||||||
|
else
|
||||||
|
return
|
||||||
|
end
|
||||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
local buff = Buff.Create(role, BuffName.PropertyChange, 1, RoleDataName.Crit, f1, CountTypeName.Add)
|
local buff = Buff.Create(role, BuffName.PropertyChange, 1, RoleDataName.Crit, f1, CountTypeName.Add)
|
||||||
role:AddBuff(buff)
|
role:AddBuff(buff)
|
||||||
|
|
|
@ -563,7 +563,7 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy
|
||||||
end
|
end
|
||||||
atkRole.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, defRole, damage, skill, dotType, bCrit, damageType)
|
atkRole.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, defRole, damage, skill, dotType, bCrit, damageType)
|
||||||
defRole.Event:DispatchEvent(BattleEventName.FinalBeDamage, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType)
|
defRole.Event:DispatchEvent(BattleEventName.FinalBeDamage, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType)
|
||||||
defRole.Event:DispatchEvent(BattleEventName.FinalBeDamageEnd, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType)
|
defRole.Event:DispatchEvent(BattleEventName.FinalBeDamageEnd, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType,isDirect)
|
||||||
BattleLogic.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType)
|
BattleLogic.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType)
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
@ -126,6 +126,19 @@ function RoleLogic:CanCastSkill()
|
||||||
return self.sp >= self.spPass and not self.IsDebug
|
return self.sp >= self.spPass and not self.IsDebug
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--检测是否有某被动
|
||||||
|
function RoleLogic:CheckHavePassive(id)
|
||||||
|
if self.passiveList then
|
||||||
|
for index, value in ipairs(self.passiveList) do
|
||||||
|
if value and value[1] and value[1]==id then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-- 废弃的方法
|
-- 废弃的方法
|
||||||
function RoleLogic:GetSkillCD()
|
function RoleLogic:GetSkillCD()
|
||||||
return max(self.spPass - self.sp, 0)
|
return max(self.spPass - self.sp, 0)
|
||||||
|
|
Loading…
Reference in New Issue