[战斗]=======133 136 137效果修改

dev_chengFeng
wangzhenxing 2021-11-26 18:05:16 +08:00
parent 4a82bcc664
commit 587a5cfc2e
4 changed files with 39 additions and 8 deletions

View File

@ -2553,7 +2553,7 @@ local effectList = {
local hp=floor(damage*f2)
local arr = RoleManager.NoOrder(function (r) return r.camp == caster.camp end,false,true)
BattleUtil.SortByHpFactor(arr,sort)
BattleUtil.FinalTreat(caster, arr[1],hp,1,skill)
BattleUtil.CalTreatNoCrit(caster, arr[1],hp,1,skill)
end)
end,
@ -2633,7 +2633,7 @@ local effectList = {
local curNum = #skill:GetDirectTargets()
local lessNum = max(maxNum - curNum, 0)
local level = math.floor(lessNum/i1)
local extra = BattleUtil.ErrorCorrection(level * i1)
local extra = BattleUtil.ErrorCorrection(level * v1)
local damage=floor(value*pro*(1+extra))
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
end)
@ -2655,11 +2655,13 @@ local effectList = {
local damage=floor(value*pro)
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
if target.isDead then
local arr = RoleManager.Query(function (r) return r.camp == target.camp end)
for i = 1, i1 do
local count = Random.RangeInt(1,#arr)
BattleUtil.CalRage(caster,arr[count],v1,CountTypeName.Sub)
end
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime,function()
local arr = RoleManager.Query(function (r) return r.camp == target.camp end)
for i = 1, i1 do
local count = Random.RangeInt(1,#arr)
BattleUtil.CalRage(caster,arr[count],v1,CountTypeName.Sub)
end
end)
end
end)
end,

View File

@ -1052,6 +1052,34 @@ function BattleUtil.CalTreat(castRole, targetRole, value, baseFactor,skill)
targetRole.Event:DispatchEvent(BattleEventName.RoleBeHealed, castRole)
BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor,skill)
end
--没有暴击得治疗
function BattleUtil.CalTreatNoCrit(castRole, targetRole, value, baseFactor,skill)
-- 灵兽无效
if targetRole.type == BattleUnitType.Monster or targetRole.type == BattleUnitType.Player then
return
end
BattleLogic.Event:DispatchEvent(BattleEventName.DisposeRoleCtrl_noheal, castRole,targetRole)
if targetRole.ctrl_noheal or targetRole:IsDead() then --禁疗和死亡无法加血
--禁疗并且没有死亡的单位显示血量+0 不走后面代码,防止触发后面的被动 by:王振兴 2021/1/27
if targetRole.ctrl_noheal and not targetRole:IsDead() then
targetRole.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, 0, 0)
end
return
end
-- 计算暴伤害系数
local critDamageFactor = 1
-- 基础伤害增加系数
local addDamageFactor = 1 + castRole:GetRoleData(RoleDataName.DamageBocusFactor)
targetRole.Event:DispatchEvent(BattleEventName.RoleBeHealed, castRole)
BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamageFactor,addDamageFactor,skill)
end
function BattleUtil.FinalTreat(castRole, targetRole, value, baseFactor,skill)
-- 灵兽无效
if targetRole.type == BattleUnitType.Monster or targetRole.type == BattleUnitType.Player then

View File

@ -653,7 +653,7 @@ function EnemyView:onRoleRelive()
self.isDead = false
self.yujiaSlider.fillAmount = 0
self.hpSlider.fillAmount=self.role:GetRoleData(RoleDataName.Hp) / self.role:GetRoleData(RoleDataName.MaxHp)
local sortingOrder = self.GameObject.transform.parent:GetComponent("Canvas").sortingOrder + 21
local sortingOrder = self.GameObject.transform:GetComponent("Canvas").sortingOrder + 21
local go = BattleManager.LoadAsset(reliveEffect1,sortingOrder)
go.transform:SetParent(self.GameObject.transform)
go.transform.localScale = Vector3.one

View File

@ -72,6 +72,7 @@ function RoleItemView:OnShowHeroData(effectLayer)
end
SetHeroBg(this.spLoader, Util.GetGameObject(self.gameObject, "iconMask"),self.frame,star,self.heroData.heroConfig.Quality)
self.icon.sprite = this.spLoader:LoadSprite(self.heroData.painting)
SetHEeroLiveToward(self.icon.gameObject,self.heroData.heroConfig.Toward )
self.lv.text=self.heroData.lv
-- self.pos.sprite=this.spLoader:LoadSprite(self.heroData.professionIcon)
self.pro.sprite=this.spLoader:LoadSprite(GetProStrImageByProNum(self.heroData.heroConfig.PropertyName))