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('good and higher becomes perfect') then cat = cat .. newCat('Note Boost (M) & Score Boost 40%') elseif skill:find('450 life recovery') and skill:find('and') then cat = cat .. newCat('450 Life Recovery & 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 -- Score Boost 90% if skill:find('increased by 90%%') and skill:find('reduce to 0') or skill:find('decrease to 0') or skill:find('stays above 0') then cat = cat.. newCat('0 Life Guard ＆ Score Boost 90%') end -- Score Boost 100% if skill:find('increased by 100%%') then -- birthday skills start if skill:find('after great or lower') then cat = cat .. newCat('Score Boost 100% until GREAT or lower') .. newCat('Score Boost 40% after GREAT or lower') .. newCat('450 Life Recovery + No Loss') -- augmented score up elseif skill:find('for each perfect') or skill:find('for every perfect') then cat = cat .. newCat('Score Boost 100% & 0.5% UP Every PERFECT Notes') elseif skill:find('perfect notes score') then cat = cat .. newCat('PERFECT Only Score Boost 100%') else cat = cat .. newCat('Score Boost 100%') end 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%') .. newCat('Score Boost 55% when less than 900 Life') end if skill:find('increased by 90%%') then cat = cat .. newCat('900+ Life for Score Boost 110%') .. newCat('Score Boost 90% when less than 900 Life') 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%') .. newCat('450 Life Recovery when less than 600 Life') end if skill:find('increased by 80%%') then cat = cat .. newCat('600+ Life for Score Boost 80%') .. newCat('500 Life Recovery when less than 600 Life') 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') .. newCat('Score Boost 55% after GREAT or lower') end if skill:find('increased by 110%%') then cat = cat .. newCat('Score Boost 110% until GREAT or lower') .. newCat('Score Boost 90% after GREAT or lower') end if skill:find('powerful types') then cat = cat .. newCat('Powerful Type:Score Boost 115% until GREAT or lower') .. newCat('Score Boost 95% until GREAT or lower') .. newCat('Score Boost 80% after GREAT or lower') end if skill:find('cool types') then cat = cat .. newCat('Cool Type:Score Boost 115% until GREAT or lower') .. newCat('Score Boost 95% until GREAT or lower') .. newCat('Score Boost 80% after GREAT or lower') end if skill:find('pure types') then cat = cat .. newCat('Pure Type:Score Boost 115% until GREAT or lower') .. newCat('Score Boost 95% until GREAT or lower') .. newCat('Score Boost 80% after GREAT or lower') end if skill:find('happy types') then cat = cat .. newCat('Happy Type:Score Boost 115% until GREAT or lower') .. newCat('Score Boost 95% until GREAT or lower') .. newCat('Score Boost 80% after GREAT or lower') end end --PERFECT Only Score Boosts if skill:find('increased by 125%%') then if skill:find('poppin\'party') then cat = cat .. newCat('Poppin\'Party:PERFECT Only Score Boost 125%') .. newCat('PERFECT Only Score Boost 110%') elseif skill:find('afterglow') then cat = cat .. newCat('Afterglow:PERFECT Only Score Boost 125%') .. newCat('PERFECT Only Score Boost 110%') elseif skill:find('pastel＊palettes') then cat = cat .. newCat('Pastel＊Palettes:PERFECT Only Score Boost 125%') .. newCat('PERFECT Only Score Boost 110%') elseif skill:find('roselia') then cat = cat .. newCat('Roselia:PERFECT Only Score Boost 125%') .. newCat('PERFECT Only Score Boost 110%') elseif skill:find('hello, happy world!') then cat = cat .. newCat('Hello, Happy World!:PERFECT Only Score Boost 125%') .. newCat('PERFECT Only Score Boost 110%') elseif skill:find('morfonica') then cat = cat .. newCat('Morfonica:PERFECT Only Score Boost 125%') .. newCat('PERFECT Only Score Boost 110%') elseif skill:find('raise a suilen') then cat = cat .. newCat('RAISE A SUILEN:PERFECT Only Score Boost 125%') .. newCat('PERFECT Only Score Boost 110%') else cat = cat .. newCat('PERFECT Only Score Boost 125%') .. newCat('GREAT and Lower Score Halved') end end if skill:find('increased by 120%%') then cat = cat .. newCat('PERFECT Only Score Boost 120%') end

return cat end

return p