local VitaHolder = Object:extend() function VitaHolder:new(key, datas) self.key = key self.datas = datas self.commands = {} end function VitaHolder:applyCommand(command, args) self.commands[command] = args end function VitaHolder:reduce(level, mode) local stat = (self.commands.base + (self.commands.add or 0)) stat = stat * (level+1) stat = stat + (self.commands.bonus or 0) return math.floor(stat) end return VitaHolder