feat: ajout des pallier de competences
This commit is contained in:
parent
d916bbc15a
commit
9a6eb606c0
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue