Module:Ability

local symbol = require( 'Module:Symbol' )._main local symbol_aghs = symbol({ 'Aghanim' }) local symbol_shard = symbol({ 'Aghshard' }) local symbol_tal = symbol({ 'Talent' }) local symbol_runes = symbol({ 'Runes' }) local symbol_enchantedtree = symbol({ 'enchantedtree' }) local color = require( 'Module:Color' )._main local color_aghs = color({ 'aghanims' }) local color_shard = color({ 'aghshard' }) local color_tal = color({ 'talent' }) local getArgs = require( 'Module:Arguments' ).getArgs local p = {}

-- Implements the mechanics symbols in the header. function p.symbols(frame) local args = getArgs(frame, {   wrappers = {      'Template:Ability'    }  }) local default_size = '20px' local symbols = {} if args['oncastproc'] then table.insert( symbols, symbol({ 'on cast proc', size=default_size }) ) end if args['rootdisables'] then table.insert( symbols, symbol({ 'root', args['rootdisables'], size=default_size }) ) end if args['illusionuse'] then table.insert( symbols, symbol({ 'illusion', args['illusionuse'], size=default_size }) ) end if args['disjointable'] then table.insert( symbols, symbol({ 'disjoint', args['disjointable'], size=default_size }) ) end if args['breakable'] then table.insert( symbols, symbol({ 'break', args['breakable'], size=default_size }) ) end if args['linkenblock'] then table.insert( symbols, symbol({ 'linken', args['linkenblock'], size=default_size }) ) end if args['bkbblock'] then table.insert( symbols, symbol({ 'bkb', args['bkbblock'], size=default_size }) ) end if args['piercesdbi'] then table.insert( symbols, symbol({ 'dbi', args['piercesdbi'], size=default_size }) ) end return table.concat( symbols, ' ' ) .. ' ' end

function p.target(frame) local args = getArgs(frame, {   wrappers = {      'Template:Ability'    }  }) local target_dict = { ["Hidden"] = 'Hidden', ["Innate"] = 'Innate', ["No Target"] = 'No Target', ["No Target aghs"] = ''.. symbol_aghs .. ' No Target ', ["No Target shard"] = ''.. symbol_shard .. ' No Target ', ["No Target tal"] = ''.. symbol_tal .. ' No Target ', ["Target Unit"] = 'Target Unit', ["Target Unit aghs"] = ''.. symbol_aghs .. ' Target Unit ', ["Target Unit shard"] = ''.. symbol_shard .. ' Target Unit ', ["Target Unit tal"] = ''.. symbol_tal .. ' Target Unit ', ["Target Point"] = 'Target Point', ["Target Point or Unit"] = 'Target Point / Target Unit', --Specifically for Boulder Smash ["Target Point aghs"] = ''.. symbol_aghs .. ' Target Point ', ["Target Point shard"] = ''.. symbol_shard .. ' Target Point ', ["Target Point tal"] = ''.. symbol_tal .. ' Target Point ', ["Target Area"] = 'Target Area', ["Target Area aghs"] = ''.. symbol_aghs .. ' Target Area ', ["Target Area shard"] = ''.. symbol_shard .. ' Target Area ', ["Target Area tal"] = ''.. symbol_tal .. ' Target Area ', ["Passive"] = 'Passive', ["Passive aghs"] = ''.. symbol_aghs .. ' Passive ', ["Passive shard"] = ''.. symbol_shard .. ' Passive ', ["Passive tal"] = ''.. symbol_tal .. ' Passive ', ["Aura"] = 'Aura', ["Aura aghs"] = ''.. symbol_aghs .. ' Aura ', ["Aura shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Aura ', ["Aura tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Aura ', ["Toggle"] = 'Toggle', ["Toggle aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Toggle ', ["Toggle shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Toggle ', ["Toggle tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Toggle ', ["Active Attack Modifier"] = 'Active Attack Modifier', ["Active Attack Modifier aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Active Attack Modifier ', ["Active Attack Modifier shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Active Attack Modifier ', ["Active Attack Modifier tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Active Attack Modifier ', } local target2_dict = { ["No Target"] = ' / No Target', ["No Target aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">No Target )', ["No Target shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">No Target )', ["No Target tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">No Target )', ["Target Unit"] = ' / Target Unit', ["Target Unit aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Target Unit )', ["Target Unit shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Target Unit )', ["Target Unit tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Target Unit )', ["Target Point"] = ' / Target Point', ["Target Point aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Target Point )', ["Target Point shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Target Point )', ["Target Point tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Target Point )', ["Target Area"] = ' / Target Area', ["Target Area aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Target Area )', ["Target Area shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Target Area )', ["Target Area tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Target Area )', ["Passive"] = ' / Passive', ["Passive aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Passive )', ["Passive shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Passive )', ["Passive tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Passive )', ["Aura"] = ' / Aura', ["Aura aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Aura )', ["Aura shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Aura )', ["Aura tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Aura )', ["Channeled"] = ' / Channeled', -- Should always be 2nd. ["Channeled aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Channeled )', ["Channeled shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Channeled )', ["Channeled tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Channeled )', ["Channeled / Passive shard"] = ' / Channeled (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Passive )', -- Puck Phase Shift ["Autocast"] = ' / Autocast', --Should always be 2nd. ["Autocast aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Autocast )', ["Autocast shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Autocast )', ["Autocast shard / Target Area tal"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Autocast / ' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Target Area )', --Specifically for Surge ["Autocast tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Autocast )', ["Toggle"] = ' / Toggle', ["Toggle aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Toggle )', ["Toggle shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Toggle )', ["Toggle tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Toggle )', ["Target Unit / Channeled"] = ' / Target Unit / Channeled', --Specifically for travel boots/tp scrolls. ["Target Unit / Autocast"] = ' / Target Unit / Autocast', --Meepo Poof ["Target Unit / No Target aghs"] = ' / Target Unit (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">No Target )', --Self Boulder Smash when Enchanted. ["Target Unit aghs / Channeled"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Target Unit ) / Channeled', --Specifically for Tricks of the Trade. ["Target Area aghs / Channeled"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Target Area ) / Channeled', --Specifically for Sinister Gaze. ["No Target shard / Channeled shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">No Target / <span style="color:' .. color_shard .. '; font-weight:bold">Channeled )', --Specifically for Essence Flux. ["Target Unit aghs / Target Area aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Target Unit / <span style="color:' .. color_aghs .. '; font-weight:bold">Target Area )', --Specifically for Eclipse. ["Target Unit / Target Area tal"] = ' / Target Unit (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Target Area )', --Specifically for Living Armor and Lightning Bolt. ["Channeled / Autocast shard"] = ' / Channeled (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Autocast )', --Specifically for Elder Titan Shard. ["Target Unit shard / Autocast shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Target Unit / <span style="color:' .. color_shard .. '; font-weight:bold">Autocast )', --Specifically for Necromastery and Call of the Wild Hawk ["Autocast / Passive tal"] = ' / Autocast (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Passive )', --Specifically for Walrus Punch ["Passive / Target Area tal"] = '/ Passive (' .. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Target Area )', --Specifically for Press the Attack ["Vector"] = ' / Vector Targeting', ["Vector aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Vector Targeting )', ["Vector shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Vector Targeting )', ["Vector shard / Autocast shard"] = ' / (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Vector Targeting / <span style="color:' .. color_shard .. '; font-weight:bold">Autocast )', -- Mirana Leap shard ["Vector tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Vector Targeting )', ["Active Attack Modifier"] = ' / Active Attack Modifier', ["Active Attack Modifier aghs"] = ' ('.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Active Attack Modifier )', ["Active Attack Modifier shard"] = ' ('.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Active Attack Modifier )', ["Active Attack Modifier tal"] = ' ('.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Active Attack Modifier )', } local target = target_dict[args['target']] or 'N/A' if args['target'] and args['target2'] then local target2 = target2_dict[args['target2']] or 'N/A' target = target .. ' ' .. target2 end return target end

function p.affects(frame) local args = getArgs(frame, {   wrappers = {      'Template:Ability'    }  }) -- Implements the Arc Warden easteregg. zet_easteregg = function if mw.title.getCurrentTitle.text == 'Arc Warden' then return 'The Self' else return 'Self' end end local affects_dict = { ["Heroes"] = 'Heroes', ["Heroes aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Heroes ', ["Heroes shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Heroes ', ["Heroes tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Heroes ', ["Enemy Heroes"] = 'Enemy Heroes', ["Enemy Heroes aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Enemy Heroes ', ["Enemy Heroes shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Enemy Heroes ', ["Enemy Heroes tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Enemy Heroes ', ["Allied Heroes"] = 'Allied Heroes', ["Allied Heroes aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Allied Heroes ', ["Allied Heroes shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allied Heroes ', ["Allied Heroes tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Allied Heroes ', ["Neutral"] = 'Neutral Units', ["Lane"] = 'Lane Creeps', ["Units"] = 'Units', ["Units aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Units ', ["Units shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Units ', ["Units tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Units ', ["Enemy Units"] = 'Enemy Units', ["Enemy Units aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Enemy Units ', ["Enemy Units shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Enemy Units ', ["Enemy Units tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Enemy Units ', ["Allied Units"] = 'Allied Units', ["Allied Units aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Allied Units ', ["Allied Units shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allied Units ', ["Allied Units tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Allied Units ', ["Self"] = zet_easteregg, ["Self aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">' .. zet_easteregg .. ' ',   ["Self shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">' .. zet_easteregg .. ' ',   ["Self tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">' .. zet_easteregg .. ' ',   ["Self / Allies shard"] = 'Self (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allies )', -- Rebound shard ["Enemies"] = 'Enemies', ["Enemies aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Enemies ', ["Enemies shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Enemies ', ["Enemies tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Enemies ', ["Allies"] = 'Allies', ["Allies aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Allies ', ["Allies shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allies ', ["Allies tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Allies ', ["Pumpkin Basket"] = 'Pumpkin Basket', ["Familiars"] = 'Familiars', -- For Stone Form self cast only ["Astral Spirit"] = 'Astral Spirit', -- For Astral Spirit sub-abilities ["Proximity Mine"] = 'Proximity Mine', -- For Minefield Sign only. ["Psionic Trap"] = 'Psionic Trap', --Use affects2 for Trees unless it only affects Trees specifically. ["Trees"] = 'Trees', ["Trees aghs"] = ''.. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Trees ', ["Trees shard"] = ''.. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Trees ', ["Trees tal"] = ''.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Trees ', } local affects2_dict = { ["Heroes"] = ' / Heroes', ["Heroes aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Heroes )', ["Heroes shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Heroes )', ["Heroes tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Heroes )', ["Enemy Heroes"] = ' / Enemy Heroes', ["Enemy Heroes aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Enemy Heroes )', ["Enemy Heroes shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Enemy Heroes )', ["Enemy Heroes tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Enemy Heroes )', ["Allied Heroes"] = ' / Allied Heroes', ["Allied Heroes aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Allied Heroes )', ["Allied Heroes shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allied Heroes )', ["Allied Heroes shard / Self tal"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allied Heroes / '.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">' .. zet_easteregg .. ' )', -- Overload shardtal ["Allied Heroes tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Allied Heroes )', ["Units"] = ' / Units', ["Units aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Units )', ["Units shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Units )', ["Units tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Units )', ["Enemy Units"] = ' / Enemy Units', ["Enemy Units aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Enemy Units )', ["Enemy Units shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Enemy Units )', ["Enemy Units tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Enemy Units )', ["Allied Units"] = ' / Allied Units', ["Allied Units aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Allied Units )', ["Allied Units shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allied Units )', ["Allied Units tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Allied Units )', ["Self"] = ' / Self', ["Self aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Self )', ["Self shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Self )', ["Self shard / Enemies shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Self / <span style="color:' .. color_shard .. '; font-weight:bold">Enemies )',-- Bloodrage shard ["Self tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Self )', ["Self / Allies aghs"] = ' / Self (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Allies )', -- Reactive Tazer aghs ["Self / Allies shard"] = ' / Self (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allies )', -- Reactive Tazer shard ["Self / Allied Heroes tal"] = '/ Self ('.. symbol_tal .. ' <span style="color:' .. color_tal .. '; font-weight:bold">Allied Heroes )', -- Atrophy Aura tal ["Self / Allied Heroes shard"] = ' / Self (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allied Heroes )', -- Dismember shard ["Clones aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Clones )', -- Jingu Mastery ["Enemies"] = ' / Enemies', ["Enemies / Allied Heroes shard"] = ' / Enemies (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allied Heroes )', -- Shadow Walk shard ["Enemies aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Enemies )', ["Enemies shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Enemies )', ["Enemies tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Enemies )', ["Enemies / Familiars"] = '/ Enemies (Familiars)', ["Enemies / Trees"] = ' / Enemies (Trees)', -- Timber Chain ["Allies / Enemies"] = ' / Allies / Enemies', -- Rebound, Mist Coil ["Allies"] = ' / Allies', ["Allies / Runes"] = ' / Allies ('.. symbol_runes ..' Runes)', -- Meat Hook and Toss ["Allies / Nether Ward"] = ' / Allies (Nether Ward)', -- For abilities affecting Nether Ward ["Allies / Nether Ward shard"] = ' / Allies (' .. symbol_shard .. ' Nether Ward)', -- For abilities affecting Nether Ward ["Allies / Tombstone"] = ' / Allies (Tombstone)', -- For abilities affecting Tombstone ["Allies aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Allies )', ["Allies shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Allies )', ["Allies tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Allies )', ["Trees"] = ' (Trees)', ["Enchanted Trees"] = ' (' .. symbol_aghs .. '' .. symbol_enchantedtree .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Trees )', ["Trees aghs"] = ' (' .. symbol_aghs .. ' <span style="color:' .. color_aghs .. '; font-weight:bold">Trees )', ["Trees shard"] = ' (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Trees )', ["Trees tal"] = ' (' .. symbol_tal .. ' <span style="color:' .. color_tal.. '; font-weight:bold">Trees )', --Summons ["Spiders"] = ' (Spiders)', --For Broodmother's Spiders ["Skeleton Archer"] = ' (Skeleton Archer)', --For Skeleton Archer ["Self / Skeleton Archer"] = ' / Self (Skeleton Archer)', ["Ice Spire"] = ' (Ice Spire)', --For Lich's Spire ["Allies / Ice Spire"] = ' / Allies (Ice Spire)', --For Lich's Spire ["Spirit Bear"] = ' (Spirit Bear)', -- For abilities affecting Spirit Bear ["Familiars"] = ' (Familiars)', -- For abilities affecting Familiars ["Familiars tal"] = ' (' .. symbol_tal .. ' Familiars)', ["Familiars / Enemies shard"] = ' (Familiars) (' .. symbol_shard .. ' <span style="color:' .. color_shard .. '; font-weight:bold">Enemies )', ["Psionic Trap"] = ' (Psionic Trap)', ["Enemies / Psionic Trap"] = '/ Enemies (Psionic Trap)', ["Wraith King Skeleton"] = ' (Wraith King Skeleton)', } if args['affects'] then local affects = affects_dict[args['affects']] if args['affects2'] then affects = affects .. ' ' .. affects2_dict[args['affects2']] end return "Affects " .. affects end end

-- Implements the damagetypes. function p.damagetype(frame) local args = getArgs(frame, {   wrappers = {      'Template:Ability'    }  }) local damagetype_dict = { ["Physical"] = ' Physical ', ["Physical aghs"] = ''.. symbol_aghs .. ' Physical ', ["Physical shard"] = ''.. symbol_shard .. ' Physical ', ["Physical tal"] = ''.. symbol_tal .. ' Physical ', ["Magical"] = ' Magical ', ["Magical aghs"] = ''.. symbol_aghs .. ' Magical ', ["Magical shard"] = ''.. symbol_shard .. ' Magical ', ["Magical tal"] = ''.. symbol_tal .. ' Magical ', ["Pure"] = ' Pure ', ["Pure aghs"] = ''.. symbol_aghs .. ' Pure ', ["Pure shard"] = ''.. symbol_shard .. ' Pure ', ["Pure tal"] = ''.. symbol_tal .. ' Pure ', ["Pure / HP Removal"] = ' Pure (HP Removal)', -- Blood Mist ["Instant Attack"] = ' Instant Attack ', ["Instant Attack aghs"] = ''.. symbol_aghs .. ' Instant Attack ', ["Instant Attack shard"] = '' .. symbol_shard .. ' Instant Attack ', ["Instant Attack tal"] = '' .. symbol_tal .. ' Instant Attack ', ["Instant Kill"] = ' Instant Kill ', ["Instant Kill aghs"] = ''.. symbol_aghs .. ' Instant Kill ', ["Instant Kill shard"] = ''.. symbol_shard .. ' Instant Kill ', ["Instant Kill tal"] = ''.. symbol_tal .. ' Instant Kill ', ["Composite"] = ' Composite ', -- Use only for old abilities. ["Universal"] = ' Universal ', -- Use only for old abilities. ["HP Removal"] = 'HP Removal', -- Use only for old abilities. ["Source"] = ' Source Type (No-reflection)', -- Use only for abilities that reflect damage. } local damagetype2_dict = { ["Physical"] = ' / Physical ', ["Physical aghs"] = ' (' .. symbol_aghs .. ' Physical )', ["Physical shard"] = ' (' .. symbol_shard .. ' Physical )', ["Physical tal"] = ' (' .. symbol_tal .. ' Physical )', ["Magical"] = ' / Magical ', ["Magical aghs"] = ' (' .. symbol_aghs .. ' Magical )', ["Magical shard"] = ' (' .. symbol_shard .. ' Magical )', ["Magical tal"] = ' (' .. symbol_tal .. ' Magical )', ["Pure"] = ' / Pure ', ["Pure / Instant Attack shard"] = ' / Pure  (' .. symbol_shard .. '  Instant Attack )', -- Mist Coil Shard ["Pure aghs"] = ' (' .. symbol_aghs .. ' Pure )', ["Pure shard"] = ' (' .. symbol_shard .. ' Pure )', ["Pure tal"] = ' (' .. symbol_tal .. ' Pure )', ["Pure tal / Instant Attack tal"] = ' (' .. symbol_tal .. ' Pure  / ' .. symbol_tal .. '  Instant Attack )', --Dream Coil Tal ["Instant Attack"] = ' / Instant Attack ', ["Instant Attack aghs"] = ' (' .. symbol_aghs .. ' Instant Attack )', ["Instant Attack shard"] = ' (' .. symbol_shard .. ' Instant Attack )', ["Instant Attack tal"] = ' (' .. symbol_tal .. ' Instant Attack )', ["Instant Kill"] = ' / Instant Kill ', ["Instant Kill aghs"] = ' (' .. symbol_aghs .. ' Instant Kill )', ["Instant Kill shard"] = ' (' .. symbol_shard .. ' Instant Kill )', ["Instant Kill tal"] = ' (' .. symbol_tal .. ' Instant Kill )', ["HP Removal"] = ' (HP Removal)', -- Not an actual damage type, so should always be used as 2nd. ["HP Removal / Magical shard"] = ' (HP Removal / ' .. symbol_shard .. ' Magical )', --Dispersion shard ["No-reflection"] = ' (No-reflection)', -- Not an actual damage type, used as 2nd when reflected damage is not based on source damage. } if args['damagetype'] then local damagetype = damagetype_dict[args['damagetype']] if args['damagetype2'] then damagetype = damagetype .. ' ' .. damagetype2_dict[args['damagetype2']] end return "Damage " .. damagetype end end

return p