feat: ajout des pallier de competences

This commit is contained in:
Kazhnuz 2024-08-07 19:57:02 +02:00
parent d916bbc15a
commit 9a6eb606c0

View file

@ -10,9 +10,11 @@ function Competence:new(name)
end end
function Competence:reduce(level) function Competence:reduce(level)
local baseValue = self.base + (self.lvl * level) + self.bonus + self.add
return { return {
name = self.name, name = self.name,
value = self.base + (self.lvl * level) + self.bonus + self.add value = math.floor(baseValue / 5) * 5
} }
end end