feat: handle stat a bit differently
This commit is contained in:
parent
4bd178112f
commit
65cde3c42b
3 changed files with 25 additions and 12 deletions
|
@ -1,12 +1,13 @@
|
|||
return {
|
||||
hpmax = 200, --
|
||||
ppmax = 50, --
|
||||
local CONST = require "datas.stats"
|
||||
|
||||
attack = 50, --
|
||||
power = 50, --
|
||||
defense = 50, --
|
||||
technic = 50, -- How much items & wisps will be powerfull for this character.
|
||||
mind = 50, -- Magic defense.
|
||||
luck = 50, -- Critical hits and stuff like that.
|
||||
speed = 50, -- Où le personnage se trouve dans le tour.
|
||||
return {
|
||||
hpmax = CONST.RANK_B, --
|
||||
ppmax = CONST.RANK_C, --
|
||||
|
||||
attack = CONST.RANK_B, --
|
||||
defense = CONST.RANK_B, --
|
||||
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.
|
||||
}
|
||||
|
|
11
sonic-radiance.love/datas/stats.lua
Normal file
11
sonic-radiance.love/datas/stats.lua
Normal 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
|
|
@ -10,7 +10,8 @@ CONST.BASE_HP = 15
|
|||
CONST.BASE_MP = 8
|
||||
|
||||
CONST.MULT_STAT = 2
|
||||
CONST.MULT_HP = 2.7
|
||||
CONST.MULT_HP = 7.5
|
||||
CONST.SALT_HP = 35
|
||||
CONST.MULT_MP = 1.5
|
||||
|
||||
function CharUtils.getExpValue(level)
|
||||
|
@ -22,7 +23,7 @@ function CharUtils.getStatValue(level, base)
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
function CharUtils.getPPValue(level, base)
|
||||
|
|
Loading…
Reference in a new issue