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 = '' --- Pure Scorers --- 1*   if skill:find('increased by 10%%') and not skill:find('will not decrease life') and not skill:find('becomes perfect') and not skill:find('life recovery') then cat = cat .. newCat('Score Boost 10%') end ---2*   if skill:find('increased by 30%%') and not skill:find('will not decrease life') and not skill:find('becomes perfect') and not skill:find('life recovery') then cat = cat .. newCat('Score Boost 30%') end ---3*   if skill:find('increased by 60%%') and not skill:find('will not decrease life') and not skill:find('becomes perfect') and not skill:find('life recovery') then cat = cat .. newCat('Score Boost 60%') end ---4*   if skill:find('increased by 100%%') and not skill:find('will not decrease life') and not skill:find('becomes perfect') and not skill:find('life recovery') then cat = cat .. newCat('Score Boost 100%') end ---Energy Guard + Score Boost if skill:find('will not decrease life') then if skill:find('increased by 10') then cat = cat .. newCat('Damage Guard & Score Boost 10%') end if skill:find('increased by 30') then cat = cat .. newCat('Damage Guard & Score Boost 30%') end end

---Life Reduction Voided (keeping until done editing skill effect) if skill:find('do not reduce stamina') then if skill:find('increased by 10') then cat = cat .. newCat('Life Reduction Voided & Score Boost 10%') end if skill:find('increased by 30') then cat = cat .. newCat('Life Reduction Voided & Score Boost 30%') end end ---Score Boost + Condition 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('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('increased by 115%%') then cat = cat .. newCat('PERFECT Only Score Boost 115%') end ---Note Boost + Score Boost if skill:find('great becomes perfect') then if skill:find('increased by 10') then cat = cat .. newCat('Note Boost (S) & Score Boost 10%') end if skill:find('increased by 30') then cat = cat .. newCat('Note Boost (S) & Score Boost 30%') end end if skill:find('good and higher becomes perfect') then if skill:find('increased by 20') then cat = cat .. newCat('Note Boost (M) & Score Boost 20%') end if skill:find('increased by 60') then cat = cat .. newCat('Note Boost (M) & Score Boost 60%') end end if skill:find('bad and higher becomes perfect') then cat = cat .. newCat('Note Boost (L) & Score Boost 40%') end

---Energy Recovery + Score Boost if skill:find('300 life recovery') then if skill:find('increased by 10') then cat = cat .. newCat('300 Life Recovery & Score Boost 10%') end if skill:find('increased by 30') then cat = cat .. newCat('300 Life Recovery & Score Boost 30%') end end if skill:find('450 life recovery') then if skill:find('increased by 20') then cat = cat .. newCat('450 Life Recovery & Score Boost 20%') end if skill:find('increased by 60') then cat = cat .. newCat('450 Life Recovery & Score Boost 60%') end end if skill:find('750 life recovery') then cat = cat .. newCat('750 Life Recovery & Score Boost 40%') end ---Energy Recovery + Score Boost ---none yet

return cat end

return p