feat: handle stat a bit differently

This commit is contained in:
Kazhnuz 2020-08-02 21:26:49 +02:00
parent 4bd178112f
commit 65cde3c42b
3 changed files with 25 additions and 12 deletions

View file

@ -1,12 +1,13 @@
return { local CONST = require "datas.stats"
hpmax = 200, --
ppmax = 50, --
attack = 50, -- return {
power = 50, -- hpmax = CONST.RANK_B, --
defense = 50, -- ppmax = CONST.RANK_C, --
technic = 50, -- How much items & wisps will be powerfull for this character.
mind = 50, -- Magic defense. attack = CONST.RANK_B, --
luck = 50, -- Critical hits and stuff like that. defense = CONST.RANK_B, --
speed = 50, -- Où le personnage se trouve dans le tour. technic = CONST.RANK_C, -- How much items & wisps will be powerfull for this character.
power = CONST.RANK_C, --
mind = CONST.RANK_D, -- Magic defense.
speed = CONST.RANK_S, -- Où le personnage se trouve dans le tour.
} }

View file

@ -0,0 +1,11 @@
local CONST = {}
CONST.RANK_E = 10
CONST.RANK_D = 15
CONST.RANK_C = 20
CONST.RANK_B = 30
CONST.RANK_A = 40
CONST.RANK_S = 50
CONST.MULT_HP = 4.5
return CONST

View file

@ -10,7 +10,8 @@ CONST.BASE_HP = 15
CONST.BASE_MP = 8 CONST.BASE_MP = 8
CONST.MULT_STAT = 2 CONST.MULT_STAT = 2
CONST.MULT_HP = 2.7 CONST.MULT_HP = 7.5
CONST.SALT_HP = 35
CONST.MULT_MP = 1.5 CONST.MULT_MP = 1.5
function CharUtils.getExpValue(level) function CharUtils.getExpValue(level)
@ -22,7 +23,7 @@ function CharUtils.getStatValue(level, base)
end end
function CharUtils.getHPValue(level, base) function CharUtils.getHPValue(level, base)
return math.floor( (((base * CONST.MULT_HP) * level)/100) ) + CONST.BASE_HP + level return math.floor( (((CONST.SALT_HP + base * CONST.MULT_HP) * level)/100) ) + CONST.BASE_HP + level
end end
function CharUtils.getPPValue(level, base) function CharUtils.getPPValue(level, base)