Skip to content

Instantly share code, notes, and snippets.

@Aerodos12
Created January 31, 2018 20:26
Show Gist options
  • Save Aerodos12/a81fb6fdd27b2c8687bc7c5b2dc62354 to your computer and use it in GitHub Desktop.
Save Aerodos12/a81fb6fdd27b2c8687bc7c5b2dc62354 to your computer and use it in GitHub Desktop.
RPG calc
local RPGCalculator = {}
RPGCalculator.MT = {}
RPGCalculator.MT.__index = function (self, k)
if self.Args[k] then
return self.Args[k]
end
end
RPGCalculator.new = function(...)
local rpgc = {}
rpgc.Args = {}
return setmetatable(rpgc,RPGCalculator.MT)
end
local calc = RPGCalculator.new()
calc.Args.h = 10
print(calc.h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment