You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Modules/CalcDefence.lua
+23-7Lines changed: 23 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ local ipairs = ipairs
10
10
localt_insert=table.insert
11
11
localm_min=math.min
12
12
localm_max=math.max
13
+
localm_abs=math.abs
13
14
localm_floor=math.floor
14
15
localm_ceil=math.ceil
15
16
localm_sqrt=math.sqrt
@@ -3112,7 +3113,10 @@ function calcs.buildDefenceEstimations(env, actor)
3112
3113
ifpoolTable.Life>=0anddamageTotal>=maxDamagethen-- If still living and the amount of damage exceeds maximum threshold we survived infinite number of hits.
3113
3114
returnm_huge
3114
3115
end
3115
-
returnnumHits
3116
+
ifnumHits~=numHitsthen
3117
+
return0
3118
+
end
3119
+
returnm_max(numHits, 0)
3116
3120
end
3117
3121
3118
3122
ifdamageCategoryConfig~="DamageOverTime" then
@@ -3578,9 +3582,12 @@ function calcs.buildDefenceEstimations(env, actor)
0 commit comments