chore: use constant for stat names

This commit is contained in:
Kazhnuz 2021-07-03 08:56:57 +02:00
parent e7921a5acb
commit b1e1ef614f

View file

@ -1,5 +1,14 @@
local CONST = {}
CONST.HPMAX = "hpmax"
CONST.PPMAX = "ppmax"
CONST.ATTACK = "attack"
CONST.POWER = "power"
CONST.DEFENSE = "defense"
CONST.MIND = "mind"
CONST.TECHNIC = "technic"
CONST.SPEED = "speed"
CONST.RANK_E = 10
CONST.RANK_D = 25
CONST.RANK_C = 40
@ -8,17 +17,17 @@ CONST.RANK_A = 80
CONST.RANK_S = 100
CONST.MULT_HP = 4.5
CONST.LIST = {"hpmax", "ppmax", "attack", "power", "defense", "mind", "technic", "speed"}
CONST.LIST = {CONST.HPMAX, CONST.PPMAX, CONST.ATTACK, CONST.POWER, CONST.DEFENSE, CONST.MIND, CONST.TECHNIC, CONST.SPEED}
CONST.SIMPLENAME = {}
CONST.SIMPLENAME["hpmax"] = "HP"
CONST.SIMPLENAME["ppmax"] = "PP"
CONST.SIMPLENAME["attack"] = "ATK"
CONST.SIMPLENAME["power"] = "POW"
CONST.SIMPLENAME["defense"] = "DEF"
CONST.SIMPLENAME["mind"] = "MND"
CONST.SIMPLENAME["technic"] = "TEK"
CONST.SIMPLENAME["speed"] = "SPD"
CONST.SIMPLENAME[CONST.HPMAX] = "HP"
CONST.SIMPLENAME[CONST.PPMAX] = "PP"
CONST.SIMPLENAME[CONST.ATTACK] = "ATK"
CONST.SIMPLENAME[CONST.POWER] = "POW"
CONST.SIMPLENAME[CONST.DEFENSE] = "DEF"
CONST.SIMPLENAME[CONST.MIND] = "MND"
CONST.SIMPLENAME[CONST.TECHNIC] = "TEK"
CONST.SIMPLENAME[CONST.SPEED] = "SPD"
CONST.EXP_MULTIPLICATOR = 4
CONST.EXP_RATIO = 5