Module:CalculatedStats: Difference between revisions

m
Renamed PSP variables for clearer capitalization
mNo edit summary
m (Renamed PSP variables for clearer capitalization)
Line 84: Line 84:
matk = math.floor(intelligence/2) + (magic*2),
matk = math.floor(intelligence/2) + (magic*2),
mdef = intelligence + math.floor(level/2) + math.floor(magic/4) + math.floor(endurance/2),
mdef = intelligence + math.floor(level/2) + math.floor(magic/4) + math.floor(endurance/2),
accpsp = math.floor((level * 1.5) + agility + (strength + luck)/4),
accPSP = math.floor((level * 1.5) + agility + (strength + luck)/4),
evapsp = math.floor((level * 1.5) + agility + (intelligence + luck)/4),
evaPSP = math.floor((level * 1.5) + agility + (intelligence + luck)/4),
matkpsp = math.floor((intelligence/2) + (magic*2)),
matkPSP = math.floor((intelligence/2) + (magic*2)),
mdefpsp = math.floor(intelligence + (level/2) + (magic/4) + (endurance/2))
mdefPSP = math.floor(intelligence + (level/2) + (magic/4) + (endurance/2))
}
}
local function bothPlatsValue(stat)
local function bothPlatsValue(stat)
if platform == "psp" then
if platform == "psp" then
return statTable[stat.."psp"]
return statTable[stat.."PSP"]
elseif platform == "sat" or statTable[stat] == statTable[stat.."psp"] then
elseif platform == "sat" or statTable[stat] == statTable[stat.."PSP"] then
return statTable[stat]
return statTable[stat]
else
else
return frame:expandTemplate{ title = "tt", args = { statTable[stat], "Sega Saturn" } } .. "/" .. frame:expandTemplate{ title = "tt", args = { statTable[stat.."psp"], "PlayStation Portable" } }
return frame:expandTemplate{ title = "tt", args = { statTable[stat], "Sega Saturn" } } .. "/" .. frame:expandTemplate{ title = "tt", args = { statTable[stat.."PSP"], "PlayStation Portable" } }
end
end
end
end