8.0 spells from nostalrius

This commit is contained in:
ErikasKontenis
2022-09-10 11:05:02 +03:00
parent 68959e51b4
commit b18c0517c5
37 changed files with 320 additions and 165 deletions

View File

@@ -1,37 +1,21 @@
function healingFormula(level, maglevel, base, variation, value_min, value_max)
local value = 3 * maglevel + (2 * level)
if value_min ~= nil and value <= value_min then
value = value_min
end
if value_max ~= nil and value >= value_max then
value = value_max
end
local min = value * (base - variation) / 100
local max = value * (base + variation) / 100
function healingFormula(level, maglevel, base, variation)
local value = 2 * level + (3 * maglevel)
local min = value - math.random(variation) + base / 100
local max = value + math.random(variation) + base / 100
return min, max
end
function damageFormula(level, maglevel, base, variation)
local value = 3 * maglevel + (2 * level)
local min = value * (base - variation) / 100
local max = value * (base + variation) / 100
return min, max
local value = 2 * level + (3 * maglevel)
local min = value - math.random(variation) + base / 100
local max = value + math.random(variation) + base / 100
return -min, -max
end
function computeFormula(level, maglevel, base, variation)
local damage = base
if variation > 0 then
damage = math.random(-variation, variation) + damage
end
local level_formula = 2 * level
local magic_formula = 3 * maglevel + level_formula
return magic_formula * damage / 100
local value = 2 * level + (3 * maglevel)
value = value + math.random(-variation, variation) + base / 100
return value
end
---------------------------------------------------------------------------------------