Piifafa
Member
- Joined
- Apr 16, 2023
- Messages
- 67
- Reaction score
- 16
I really need to increase the damage of the rune, by the player's ml, but the way I did it little changes, if the person has 120 ml and when using items goes to 145 ml, the increase is very insignificant.
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
function onGetFormulaValues(player, level, maglevel)
local base = 150
local variation = 20
local formula = 4.6 * maglevel + (3 * level)
local min = (formula * (base - variation)) / 100
local max = (formula * (base + variation)) / 100
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end