Module:Skill

local p = {}

local function newCat(catName) return  .. 'Category:' .. catName ..  end

-- actually parse the skill name here and generate categories function p.categories(frame) if not frame or not frame.args then return '' end local args = frame.args -- force skill text to lowercase to ensure easier comparisons local skill = string.lower(args[1]) -- if the skill is empty or not a string just return if not skill or skill == '' or type(skill) ~= 'string' then return '' end local cat = '' -- Score Boost 10% (with 10% or pure) if skill:find('increased by 10%%') then if skill:find('great becomes perfect') then cat = cat .. newCat('Note Boost (S) & Score Boost 10%') elseif skill:find('300 life recovery') then cat = cat .. newCat('300 Life Recovery & Score Boost 10%') elseif skill:find('will not decrease life') then cat = cat .. newCat('Damage Guard & Score Boost 10%') else cat = cat .. newCat('Score Boost 10%') end end

-- Score Boost 20% if skill:find('increased by 20%%') then if skill:find('good and higher becomes perfect') then cat = cat .. newCat('Note Boost (M) & Score Boost 20%') elseif skill:find('450 life recovery') then cat = cat .. newCat('450 Life Recovery & Score Boost 20%') end end

-- Score Boost 30% (with 30% or pure) if skill:find('increased by 30%%') then if skill:find('great becomes perfect') then cat = cat .. newCat('Note Boost (S) & Score Boost 30%') elseif skill:find('300 life recovery') then cat = cat .. newCat('300 Life Recovery & Score Boost 30%') elseif skill:find('will not decrease life') then cat = cat .. newCat('Damage Guard & Score Boost 30%') else cat = cat .. newCat('Score Boost 30%') end end

-- Score Boost 40% if skill:find('increased by 40%%') then if skill:find('bad and higher becomes perfect') then cat = cat .. newCat('Note Boost (L) & Score Boost 40%') elseif skill:find('750 life recovery') then cat = cat .. newCat('750 Life Recovery & Score Boost 40%') end end

-- Score Boost 60% (with 60% or pure) if skill:find('increased by 60%%') then if skill:find('good and higher becomes perfect') then cat = cat .. newCat('Note Boost (M) & Score Boost 60%') elseif skill:find('450 life recovery') then cat = cat .. newCat('450 Life Recovery & Score Boost 60%') else cat = cat .. newCat('Score Boost 60%') end end

if skill:find('increased by 100%%') then cat = cat .. newCat('Score Boost 100%') end

-- Conditional Score Boosts if skill:find('life is over 900') then if skill:find('increased by 55%%') then cat = cat .. newCat('900+ Life for Score Boost 65%') end if skill:find('increased by 90%%') then cat = cat .. newCat('900+ Life for Score Boost 110%') end end if skill:find('life is over 600') then if skill:find('increased by 40%%') then cat = cat .. newCat('600+ Life for Score Boost 40%') end if skill:find('increased by 80%%') then cat = cat .. newCat('600+ Life for Score Boost 80%') end end if skill:find('after great or lower') then if skill:find('increased by 65%%') then cat = cat .. newCat('Score Boost 65% until GREAT or lower') end if skill:find('increased by 110%%') then cat = cat .. newCat('Score Boost 110% until GREAT or lower') end if skill:find('same attribute') or skill:find('same type') then cat = cat .. newCat('Score Boost 115% until GREAT or lower') end end --PERFECT Only Score Boosts if skill:find('perfect notes score') then if skill:find('same band') then cat = cat .. newCat('PERFECT Only Score Boost 125%') else cat = cat .. newCat('PERFECT Only Score Boost 115%') end end

return cat end

return p