From 9a6eb606c019ed296a4d51e1a785da74578957ea Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Wed, 7 Aug 2024 19:57:02 +0200 Subject: [PATCH] feat: ajout des pallier de competences --- classes/dataholders/competenceholder.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/dataholders/competenceholder.lua b/classes/dataholders/competenceholder.lua index bb95ee7..d6c7797 100644 --- a/classes/dataholders/competenceholder.lua +++ b/classes/dataholders/competenceholder.lua @@ -10,9 +10,11 @@ function Competence:new(name) end function Competence:reduce(level) + local baseValue = self.base + (self.lvl * level) + self.bonus + self.add + return { name = self.name, - value = self.base + (self.lvl * level) + self.bonus + self.add + value = math.floor(baseValue / 5) * 5 } end