Skip to content

Commit

Permalink
Try to mitigate lua error related to poison damage
Browse files Browse the repository at this point in the history
  • Loading branch information
coavins committed Nov 13, 2022
1 parent 4871f79 commit 0e37886
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/autorun/mhrise-coavins-dps/data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,22 @@ this.initializeBossMonster = function(bossEnemy)
if damageParam then
local blastParam = damageParam:get_field("_BlastParam")
if blastParam then
local activateCnt = blastParam:call("get_ActivateCount"):get_element(0):get_field("mValue")
if activateCnt > boss.ailment.count[5] then
boss.ailment.count[5] = activateCnt
local getCnt = blastParam:call("get_ActivateCount")
if getCnt then
local activateCnt = getCnt:get_element(0):get_field("mValue")
if activateCnt > boss.ailment.count[5] then
boss.ailment.count[5] = activateCnt
end
end
end
local poisonParam = damageParam:get_field("_PoisonParam")
if poisonParam then
local activateCnt = poisonParam:call("get_ActivateCount"):get_element(0):get_field("mValue")
if activateCnt > boss.ailment.count[4] then
boss.ailment.count[4] = activateCnt
local getCnt = poisonParam:call("get_ActivateCount")
if getCnt then
local activateCnt = getCnt:get_element(0):get_field("mValue")
if activateCnt > boss.ailment.count[4] then
boss.ailment.count[4] = activateCnt
end
end
end
end
Expand Down

0 comments on commit 0e37886

Please sign in to comment.