Merge branch 'china/dev_bt' into china/dev_bt_develop

dev_chengFeng
wangzhenxing 2023-02-16 17:48:43 +08:00
commit d902496f69
7 changed files with 90 additions and 2 deletions

View File

@ -22,6 +22,7 @@ local BuffRegister = {
[BuffName.BreakArmor] = "BreakArmor",
[BuffName.AddAttack] = "AddAttack",
[BuffName.Suppress] = "Suppress",
[BuffName.BuDongSign] = "BuDongSign",
}

View File

@ -11735,7 +11735,7 @@ local passivityList = {
if arr==nil or len==0 then
return
end
if num<len then
if num>len then
num=len
end
BattleUtil.SortByHpFactor(arr, 1)

View File

@ -0,0 +1,75 @@
--不动明王印记
BuDongSign = Buff:New() --压制
--初始化Buff通过传入一些自定义参数控制成长相关的数值
function BuDongSign:SetData(...)
-- self.atkType, --1 物理 2.魔法
-- self.ct,
-- self.value1=...
self.f1=...
self.maxPro=0
-- 刷新排序等级
self.curDamage=0
self.sort = 4
end
--初始化后调用一次
function BuDongSign:OnStart()
self.curDamage = 0
--本回合最多能扣到多少比例的血条
self.maxPro=(self.target:GetRoleData(RoleDataName.Hp)/self.target:GetRoleData(RoleDataName.MaxHp))-self.f1
if self.maxPro<0 then
self.maxPro=0
end
local function onFinalBeDamage(damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType,isDirect)
-- 非直接伤害不免除
if not skill and not isDirect then
return
end
--判断伤害是否能超出能扣除的最大伤害
local maxDamage =math.floor(self.target:GetRoleData(RoleDataName.Hp)-(self.target:GetRoleData(RoleDataName.MaxHp) * self.maxPro))
self.curDamage=damage
if self.curDamage > maxDamage then
-- 计算免除的伤害值
local md = self.curDamage - maxDamage
if md > damage then
md = damage
end
if damagingFunc then damagingFunc(md) end
end
end
self.target.Event:AddEvent(BattleEventName.CheckLiZhanZhiQu, onFinalBeDamage,nil,nil,self.target)
local function onRoundChange()
self.curDamage = 0
--本回合最多能扣到多少比例的血条
self.maxPro=(self.target:GetRoleData(RoleDataName.Hp)/self.target:GetRoleData(RoleDataName.MaxHp))-self.f1
if self.maxPro<0 then
self.maxPro=0
end
--LogError("本回合最多能扣到的比例=="..maxPro)
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onRoundChange,nil,nil,self.target)
end
--间隔N帧触发返回true时表示继续触发返回false立刻触发OnEnd
function BuDongSign:OnTrigger()
return true
end
--效果结束时调用一次
function BuDongSign:OnEnd()
end
--只有当cover字段为true时触发返回true则被新效果覆盖
function BuDongSign:OnCover(newBuff)
return true
end
return BuDongSign

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8756085ac5b303d4b8efeb775f208bf9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -287,6 +287,7 @@ BuffName = {
BreakArmor = 17,
AddAttack = 18,
Suppress = 19,
BuDongSign = 20,
}
DotType = {

View File

@ -434,7 +434,8 @@ function RoleLogic:IsAvailable(skill)
return false
end
--角色没有真正死亡 在 被眩晕/沉默的 情况下 任然能释放死亡技能
if (self.ctrl_dizzy or self.ctrl_slient) and self:IsDead() and skill and skill.type==BattleSkillType.DeadSkill then
--(self.ctrl_dizzy or self.ctrl_slient) and
if self:IsDead() and skill and skill.type==BattleSkillType.DeadSkill then
return true
end
-- 眩晕 -- 死亡

View File

@ -17,6 +17,7 @@ local BuffTypeToConfigType = {
[BuffName.BreakArmor] = 14,
[BuffName.AddAttack] = 15,
[BuffName.Suppress] = 16,
[BuffName.BuDongSign] = 17,
}
local function _GetPropChangeBuffCType(pName)
for cType, pn in ipairs(BattlePropList) do
@ -58,6 +59,8 @@ local function _GetBuffEffectConfig(buff)
elseif bType==BuffName.BanBlood then
cType = 1
elseif bType==BuffName.SigilSign then
cType = 1
elseif bType==BuffName.BuDongSign then
cType = 1
elseif bType==BuffName.CommonSign then
cType = 1