Code:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
primaryDamage = primaryDamage * 10
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
I have this code, whenever I attack with a spell or a wand the damage will always be 10x. However when I attack with a melee weapon or paladin weapons, the damage can be super low. I think it has something to do with the minimum attack damage done by normal weapons in the source code. For example a level 400 knight would always hit 200-400 with normal attacks, but after it has been modified by primaryDamage = primaryDamage * 10, it will sometimes even do less than 200 (and NORMAL attacks can never hit below that) and still all spells and wands will modify the damage correctly.
How can I fix this issue=?