diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index fdd1d5089f..46b87f2d69 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -8220,8 +8220,15 @@ local passivityList = { local onTurnEnd=function(role) role.Event:RemoveEvent(BattleEventName.RoleKill,onRoleKill,nil,nil,role) if isNoDie then - local damage=floor(BattleUtil.FP_Mul(role.curMainTarget:GetRoleData(BattlePropList[p1]),v1)) - BattleUtil.FinalDamage(nil,role,role.curMainTarget,damage) + if role.curMainTarget then + local isBoss=BattleUtil.CheckIsBoss(role.curMainTarget) + if isBoss then + return + end + local damage=floor(BattleUtil.FP_Mul(role.curMainTarget:GetRoleData(BattlePropList[p1]),v1)) + BattleUtil.FinalDamage(nil,role,role.curMainTarget,damage) + end + end isNoDie=true end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua index a6af7c7f8c..63ed5fcf26 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua @@ -422,14 +422,19 @@ function this.SetHeadShow() local enemy = MonsterManager.GetMonster(1, 100) -- 敌方主角 if enemy then this.enemy:SetActive(true) - this.enemy:GetComponent("Image").sprite = this.spLoader:LoadSprite(sexIcon[enemy.sex]) + if enemy.sex then + this.enemy:GetComponent("Image").sprite = this.spLoader:LoadSprite(sexIcon[enemy.sex]) + end else this.enemy:SetActive(false) end local player = MonsterManager.GetMonster(0, 100) -- 我方主角 if player then this.player:SetActive(true) - this.player:GetComponent("Image").sprite = this.spLoader:LoadSprite(sexIcon[player.sex]) + if player.sex then + this.player:GetComponent("Image").sprite = this.spLoader:LoadSprite(sexIcon[player.sex]) + end + else this.player:SetActive(false) end