Right, I think it should work You can also make the formula more automatic by using the floor method :
It's the same principle than my shield divider. This way, you can use set 9-12, 13-16 etc. without modify your code
Code Select
local damage_divider = math.floor(hero:get_tunic_sprite_id() / 4)
if damage_divider == 0 then
damage_divider = 1
end
damage = damage / damage_divider
It's the same principle than my shield divider. This way, you can use set 9-12, 13-16 etc. without modify your code