diff --git a/classes/dataholders/statholder.lua b/classes/dataholders/statholder.lua index 62ad3f0..fa38979 100644 --- a/classes/dataholders/statholder.lua +++ b/classes/dataholders/statholder.lua @@ -11,7 +11,10 @@ function StatHolder:applyCommand(command, args) end function StatHolder:reduce(level) - return self.commands.base + ((self.commands.lvl or 0) * level) + (self.commands.add or 0) + (self.commands.bonus or 0) + local stat = self.commands.base + ((self.commands.lvl or 0) * level) + (self.commands.add or 0) + (self.commands.bonus or 0) + local modulo = commands.structs[self.key].modulo or 1 + stat = math.floor(stat / modulo) * modulo + return stat end return StatHolder \ No newline at end of file