diff --git a/lua/app/module/battle/helper/battle_snapshot_helper.lua b/lua/app/module/battle/helper/battle_snapshot_helper.lua index f846cf4f..ad0f028b 100644 --- a/lua/app/module/battle/helper/battle_snapshot_helper.lua +++ b/lua/app/module/battle/helper/battle_snapshot_helper.lua @@ -69,7 +69,11 @@ function BattleSnapshotHelper:snapshotBattleInfo(battleBaseController) battleBaseController.snapShotInfo.gridEdge = gridEdge -- 血量 - battleBaseController.snapShotInfo.hpPercent = battleBaseController.battleData.atkTeam:getHpPercent() + if battleBaseController.battleData.atkTeam:getMaxHp() <= 0 then + battleBaseController.snapShotInfo.hpPercent = 0 -- 容错 + else + battleBaseController.snapShotInfo.hpPercent = battleBaseController.battleData.atkTeam:getHpPercent() + end -- 技能 battleBaseController.snapShotInfo.atkSkillMap = table.clearOrCreate(battleBaseController.snapShotInfo.atkSkillMap)