chore: put stats constants together

This commit is contained in:
Kazhnuz 2021-05-15 22:50:06 +02:00
parent c10d58e604
commit e864e67717
2 changed files with 13 additions and 12 deletions

View file

@ -20,4 +20,16 @@ CONST.SIMPLENAME["mind"] = "MND"
CONST.SIMPLENAME["technic"] = "TEK" CONST.SIMPLENAME["technic"] = "TEK"
CONST.SIMPLENAME["speed"] = "SPD" CONST.SIMPLENAME["speed"] = "SPD"
CONST.EXP_MULTIPLICATOR = 4
CONST.EXP_RATIO = 5
CONST.BASE_STAT = 5
CONST.BASE_HP = 15
CONST.BASE_MP = 8
CONST.MULT_STAT = 2
CONST.MULT_HP = 7.5
CONST.SALT_HP = 35
CONST.MULT_MP = 1.5
return CONST return CONST

View file

@ -1,17 +1,6 @@
local CharUtils = {} local CharUtils = {}
local CONST = {} local CONST = require "datas.stats"
CONST.EXP_MULTIPLICATOR = 4
CONST.EXP_RATIO = 5
CONST.BASE_STAT = 5
CONST.BASE_HP = 15
CONST.BASE_MP = 8
CONST.MULT_STAT = 2
CONST.MULT_HP = 7.5
CONST.SALT_HP = 35
CONST.MULT_MP = 1.5
function CharUtils.getExpValue(level) function CharUtils.getExpValue(level)
return math.floor( ( CONST.EXP_MULTIPLICATOR * ( level ^ 3 ) ) / CONST.EXP_RATIO ) return math.floor( ( CONST.EXP_MULTIPLICATOR * ( level ^ 3 ) ) / CONST.EXP_RATIO )