[战斗]======= 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
|
||||
return
|
||||
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
|
||||
if func then func(-floor(BattleUtil.ErrorCorrection(dd))) end
|
||||
end
|
||||
|
@ -2184,7 +2184,7 @@ local passivityList = {
|
|||
af = af + f1
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCast)
|
||||
|
||||
-- 如果是技能的伤害则判断加成
|
||||
local onPassiveDamaging = function(func, target, damage, skill)
|
||||
|
@ -2456,26 +2456,27 @@ local passivityList = {
|
|||
deadNum = deadNum + 1
|
||||
if deadNum >= i1 then
|
||||
deadNum = 0
|
||||
extra = extra + f1
|
||||
-- local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro], f1, ct2)
|
||||
-- role:AddBuff(buff)
|
||||
--extra = extra + f1
|
||||
--处理混乱后普攻不触发任何特性问题改成加buff 王振兴 2021/02/25
|
||||
local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[5], f1, ct2)
|
||||
role:AddBuff(buff)
|
||||
end
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead)
|
||||
|
||||
local passivityDamaging = function(func, caster, damage, skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill then
|
||||
if func then
|
||||
local dd = BattleUtil.CountValue(damage, extra, ct2) - damage
|
||||
func(-floor(BattleUtil.ErrorCorrection(dd)))
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||
-- local passivityDamaging = function(func, caster, damage, skill)
|
||||
-- if skill and not skill.isTriggerJudge and judge==1 then
|
||||
-- return
|
||||
-- end
|
||||
-- if skill then
|
||||
-- if func then
|
||||
-- local dd = BattleUtil.CountValue(damage, extra, ct2) - damage
|
||||
-- func(-floor(BattleUtil.ErrorCorrection(dd)))
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||
end,
|
||||
|
||||
-- 直接伤害每次击杀目标增加自身伤害[a]%,[b]改变,可叠加持续至战斗结束
|
||||
|
@ -2493,37 +2494,39 @@ local passivityList = {
|
|||
return
|
||||
end
|
||||
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
|
||||
role.Event:AddEvent(BattleEventName.RoleHit, OnRoleHit)
|
||||
|
||||
|
||||
-- 释放技能时计算额外伤害
|
||||
local OnSkillCast = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill then
|
||||
extra = f1 * killNum
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast)
|
||||
-- local OnSkillCast = function(skill)
|
||||
-- if skill and not skill.isTriggerJudge and judge==1 then
|
||||
-- return
|
||||
-- end
|
||||
-- if skill then
|
||||
-- extra = f1 * killNum
|
||||
-- end
|
||||
-- end
|
||||
-- role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast)
|
||||
|
||||
|
||||
-- 造成伤害时判断额外伤害
|
||||
local passivityDamaging = function(func, caster, damage, skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill then
|
||||
if func then
|
||||
local dd = BattleUtil.CountValue(damage, extra, ct) - damage
|
||||
func(-floor(BattleUtil.ErrorCorrection(dd)))
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||
-- -- 造成伤害时判断额外伤害
|
||||
-- local passivityDamaging = function(func, caster, damage, skill)
|
||||
-- if skill and not skill.isTriggerJudge and judge==1 then
|
||||
-- return
|
||||
-- end
|
||||
-- if skill then
|
||||
-- if func then
|
||||
-- local dd = BattleUtil.CountValue(damage, extra, ct) - damage
|
||||
-- func(-floor(BattleUtil.ErrorCorrection(dd)))
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- role.Event:AddEvent(BattleEventName.PassiveDamaging, passivityDamaging)
|
||||
|
||||
|
||||
end,
|
||||
|
@ -3093,6 +3096,9 @@ local passivityList = {
|
|||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
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
|
||||
return
|
||||
|
@ -4129,9 +4135,9 @@ local passivityList = {
|
|||
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
|
||||
end
|
||||
--
|
||||
|
@ -5202,6 +5208,7 @@ local passivityList = {
|
|||
-- a[float]
|
||||
[249] = function(role, args,id,judge)
|
||||
local f1 = args[1]
|
||||
local round = 0
|
||||
-- 释放技能后
|
||||
local onRoleHit = function(target,damage, bCrit, finalDmg, damageType, skill)
|
||||
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
|
||||
return
|
||||
end
|
||||
local curRound=BattleLogic.GetCurRound()
|
||||
--每个回合只会生效一次
|
||||
if curRound>round then
|
||||
round=curRound
|
||||
else
|
||||
return
|
||||
end
|
||||
if target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||
local buff = Buff.Create(role, BuffName.PropertyChange, 1, RoleDataName.Crit, f1, CountTypeName.Add)
|
||||
role:AddBuff(buff)
|
||||
|
|
|
@ -563,7 +563,7 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy
|
|||
end
|
||||
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.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)
|
||||
|
||||
--
|
||||
|
|
|
@ -126,6 +126,19 @@ function RoleLogic:CanCastSkill()
|
|||
return self.sp >= self.spPass and not self.IsDebug
|
||||
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()
|
||||
return max(self.spPass - self.sp, 0)
|
||||
|
|
Loading…
Reference in New Issue