introduce hits counter in physical damage and introduce poison strike spell

This commit is contained in:
ErikasKontenis
2020-10-16 11:05:13 +03:00
parent fd05f5ee15
commit 093ac51d31
3 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS)
function onGetFormulaValues(player, level, maglevel)
local base = 45
local variation = 10
local formula = 3 * maglevel + (2 * 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)
return combat:execute(creature, variant)
end