Module:Ability clickpic

-- -- -- Implements Template:Ability clickpic --

local p = {}

local abilities = { ['slice'] = {image='Slice',link='Slice'}, ['havoc'] = {image='Havoc',link='Havoc'}, ['backhand'] = {image='Backhand',link='Backhand'}, ['smash'] = {image='Smash',link='Smash'}, ['barge'] = {image='Barge',link='Barge'}, ['sever'] = {image='Sever',link='Sever'}, ['slaughter'] = {image='Slaughter',link='Slaughter'}, ['flurry'] = {image='Flurry',link='Flurry'}, ['hurricane'] = {image='Hurricane',link='Hurricane'}, ['overpower'] = {image='Overpower',link='Overpower'}, ['massacre'] = {image='Massacre',link='Massacre'}, ['meteor strike'] = {image='Meteor Strike',link='Meteor Strike'}, ['balanced strike'] = {image='Balanced Strike',link='Balanced Strike'}, ['kick'] = {image='Kick',link='Kick'}, ['punish'] = {image='Punish',link='Punish'}, ['dismember'] = {image='Dismember',link='Dismember'}, ['fury'] = {image='Fury',link='Fury (ability)'}, ['cleave'] = {image='Cleave',link='Cleave'}, ['decimate'] = {image='Decimate',link='Decimate'}, ['destroy'] = {image='Destroy (ability)',link='Destroy'}, ['quake'] = {image='Quake',link='Quake'}, ['assault'] = {image='Assault',link='Assault'}, ['berserk'] = {image='Berserk',link='Berserk'}, ['pulverise'] = {image='Pulverise',link='Pulverise'}, ['frenzy'] = {image='Frenzy',link='Frenzy'}, ['anticipation'] = {image='Anticipation',link='Anticipation'}, ['bash'] = {image='Bash',link='Bash'}, ['provoke'] = {image='Provoke',link='Provoke'}, ['freedom'] = {image='Freedom',link='Freedom'}, ['resonance'] = {image='Resonance',link='Resonance'}, ['preparation'] = {image='Preparation',link='Preparation'}, ['revenge'] = {image='Revenge',link='Revenge'}, ['reflect'] = {image='Reflect',link='Reflect'}, ['debilitate'] = {image='Debilitate',link='Debilitate'}, ['immortality'] = {image='Immortality',link='Immortality'}, ['rejuvenate'] = {image='Rejuvenate',link='Rejuvenate'}, ['barricade'] = {image='Barricade',link='Barricade (ability)'}, ['natural instinct'] = {image='Natural Instinct',link='Natural Instinct'}, ['regenerate'] = {image='Regenerate (ability)',link='Regenerate'}, ['momentum'] = {image='Momentum',link='Momentum'}, ['incite'] = {image='Incite',link='Incite'}, ['single-way wilderness'] = {image='Single-Way Wilderness',link='Single-Way Wilderness'}, ['guthix\'s blessing'] = {image='Guthix\'s Blessing',link='Guthix\'s Blessing'}, ['balanced stance'] = {image='Balanced Stance',link='Balanced Stance'}, ['defensive stance'] = {image='Defensive Stance',link='Defensive Stance'}, ['aggressive stance'] = {image='Aggressive Stance',link='Aggressive Stance'}, ['reckless stance'] = {image='Reckless Stance',link='Reckless Stance'}, ['piercing shot'] = {image='Piercing Shot',link='Piercing Shot'}, ['snipe'] = {image='Snipe',link='Snipe'}, ['dazing shot'] = {image='Dazing Shot',link='Dazing Shot'}, ['needle strike'] = {image='Needle Strike',link='Needle Strike'}, ['binding shot'] = {image='Binding Shot',link='Binding Shot'}, ['fragmentation shot'] = {image='Fragmentation Shot',link='Fragmentation Shot'}, ['escape'] = {image='Escape',link='Escape'}, ['ricochet'] = {image='Ricochet',link='Ricochet'}, ['snap shot'] = {image='Snap Shot',link='Snap Shot'}, ['rapid fire'] = {image='Rapid Fire',link='Rapid Fire'}, ['bombardment'] = {image='Bombardment',link='Bombardment'}, ['deadshot'] = {image='Deadshot',link='Deadshot'}, ['incendiary shot'] = {image='Incendiary Shot',link='Incendiary Shot'}, ['unload'] = {image='Unload',link='Unload'}, ['death\'s swiftness'] = {image='Death\'s Swiftness',link='Death\'s Swiftness'}, ['wrack'] = {image='Wrack',link='Wrack'}, ['dragon breath'] = {image='Dragon Breath',link='Dragon Breath'}, ['sonic wave'] = {image='Sonic Wave',link='Sonic Wave'}, ['concentrated blast'] = {image='Concentrated Blast',link='Concentrated Blast'}, ['impact'] = {image='Impact',link='Impact'}, ['combust'] = {image='Combust',link='Combust'}, ['surge'] = {image='Surge',link='Surge'}, ['chain'] = {image='Chain',link='Chain'}, ['asphyxiate'] = {image='Asphyxiate',link='Asphyxiate'}, ['detonate'] = {image='Detonate',link='Detonate'}, ['wild magic'] = {image='Wild Magic',link='Wild Magic'}, ['omnipower'] = {image='Omnipower',link='Omnipower'}, ['metamorphosis'] = {image='Metamorphosis',link='Metamorphosis'}, ['tsunami'] = {image='Tsunami',link='Tsunami'}, ['sunshine'] = {image='Sunshine',link='Sunshine'}, ['shatter'] = {image='Shatter',link='Shatter'}, ['storm shards'] = {image='Storm Shards',link='Storm Shards'}, ['corruption blast'] = {image='Corruption Blast',link='Corruption Blast'}, ['onslaught'] = {image='Onslaught',link='Onslaught'}, ['demoralise'] = {image='Demoralise',link='Demoralise'} }

function p.main(frame) local args = frame:getParent.args local params = {} for i, q in ipairs(args) do		if abilities[q:lower] then table.insert(params,abilities[q:lower]) end end

return p._main(params) end

function p._main(params) local ret = mw.html.create('span') :addClass('clickpic') :done local spantext = '' for i, v in ipairs(params) do spantext = spantext .. ''		if i < #params then spantext = spantext..' ' end end

ret:wikitext(spantext) return ret end

return p