Module:Skills: Difference between revisions

getMasteryCheckpointTable: Definitely actually fix it this time
(getMasteryCheckpointTable: Actually fix it this time)
(getMasteryCheckpointTable: Definitely actually fix it this time)
Line 262: Line 262:


local totalPoolXP = SkillData[localSkillID].baseMasteryPoolCap
local totalPoolXP = SkillData[localSkillID].baseMasteryPoolCap
local checkpointPct = GameData.rawData.masteryCheckpoints
local result = '{|class="wikitable"\r\n!Pool %!!style="width:100px"|Pool XP!!Bonus'
local result = '{|class="wikitable"\r\n!Pool %!!style="width:100px"|Pool XP!!Bonus'
for i, checkpointDesc in ipairs(checkpoints) do
for i, checkpointDesc in ipairs(checkpoints) do
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|'..GameData.masteryCheckpoints[i]..'%||'
result = result..'\r\n|'..checkpointPct[i]..'%||'
result = result..Shared.formatnum(math.floor(totalPoolXP * GameData.masteryCheckpoints[i] / 100))..' xp||'..checkpointDesc
result = result..Shared.formatnum(math.floor(totalPoolXP * checkpointPct[i] / 100))..' xp||'..checkpointDesc
end
end
result = result..'\r\n|-\r\n!colspan="2"|Total Mastery Pool XP'
result = result..'\r\n|-\r\n!colspan="2"|Total Mastery Pool XP'