22,848
edits
No edit summary |
m (Fix) |
||
Line 6: | Line 6: | ||
local getArgs = require('Module:Arguments').getArgs | local getArgs = require('Module:Arguments').getArgs | ||
local p = {} | local p = {} | ||
local function round(number) | |||
return math.floor(number + 0.5) | |||
end | |||
function p.smt1(frame) | function p.smt1(frame) | ||
Line 22: | Line 26: | ||
end | end | ||
local statTable = { | local statTable = { | ||
atk = levelMinus19 + (strength * 3) + | atk = levelMinus19 + (strength * 3) + round(vitality/4), | ||
acc = | acc = round(strength/4) + agility, | ||
def = | def = round(levelMinus19/2) + round(strength/4) + (vitality * 2), | ||
eva = | eva = round(intelligence/8) + agility, | ||
matk = | matk = round(intelligence/8) + magic, | ||
mefc = intelligence + | mefc = intelligence + round(magic/8) | ||
} | } | ||
if statTable[stat] then | if statTable[stat] then |