Module:Damage: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 253: Line 253:
                     -- Loop through damage numbers and multiply them with hits.
                     -- Loop through damage numbers and multiply them with hits.
                     for k, v in ipairs(damage_value.damage_numbers) do
                     for k, v in ipairs(damage_value.damage_numbers) do
                         output = output + (v * damage_value.hit_counts[i])
                        local hit_count = damage_value.hit_counts[i]
                        hit_count = type(hit_count) == 'string' and 1 or hit_count
                         output = output + (v * hit_count)
                         i = i + 1
                         i = i + 1
                     end
                     end