Dota 2 Wiki

你现在尚未登录,许多功能可能无法正常使用,若已有账号,请登录,若没有,请先注册Twitch账号
目前我们有非常多的待翻译条目,你也可以看一下目前我们需要优先处理的有哪些目前我们有非常多的待翻译条目,你也可以看一下目前我们需要优先处理的有哪些英雄页面的攻略、克制和物品页面的推荐英雄、小贴士等均为社区玩家编写的,你也可以把自己的心得写上去哦。英雄页面的攻略、克制和物品页面的推荐英雄、小贴士等均为社区玩家编写的,你也可以把自己的心得写上去哦。看不懂技能的buff/debuff是哪个跟哪个?鼠标移动到名称上就能看到游戏内显示的名字和描述了。看不懂技能的buff/debuff是哪个跟哪个?鼠标移动到名称上就能看到游戏内显示的名字和描述了。目前我們沒有善於製作其他中文變體的人員,如果您善於或擁有相關技術,請幫忙補充其他中文變體的空白。目前我們沒有善於製作其他中文變體的人員,如果您善於或擁有相關技術,請幫忙補充其他中文變體的空白。

了解更多

Dota 2 Wiki
Advertisement
Reality Rift icon
▶️ Planeshift.
该module的文档可以在Template:Ability找到。
You may be forwarded to another wiki language, in case a translation is not available.



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_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
  
  return table.concat( symbols, ' ' ) .. ' '
end

function p.target(frame)
  local args = getArgs(frame, {
    wrappers = {
      'Template:Ability'
    }
  })
  local target_dict = {
    ["Hidden"] = '隐藏',
    ["No Target"] = '[[技能#无目标|-{zh-hans:无目标;zh-hant:沒有目標}-]]',
    ["No Target aghs"] = ''.. symbol_aghs .. '&nbsp;[[技能#无目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]]',
    ["No Target shard"] = ''.. symbol_shard .. '&nbsp;[[技能#无目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]]',
    ["No Target tal"] = ''.. symbol_tal .. '&nbsp;[[技能#无目标|<span style="color:' .. color_tal .. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]]',
    ["Target Unit"] = '[[技能#单位目标|-{zh-hans:单位目标;zh-hant:目標單位}-]]',
    ["Target Unit aghs"] = ''.. symbol_aghs .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]]',
    ["Target Unit shard"] = ''.. symbol_shard .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]]',
    ["Target Unit tal"] = ''.. symbol_tal .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_tal .. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]]',
    ["Target Point"] = '[[技能#点目标|-{zh-hans:点目标;zh-hant:目標地點}-]]',
    ["Target Point or Unit"] = '[[技能#点目标|-{zh-hans:点目标;zh-hant:目標地點}-]] / [[技能#单位目标|-{zh-hans:单位目标;zh-hant:目標單位}-]]', --Specifically for Boulder Smash
    ["Target Point aghs"] = ''.. symbol_aghs .. '&nbsp;[[技能#点目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:点目标;zh-hant:目標地點}-</span>]]',
    ["Target Point shard"] = ''.. symbol_shard .. '&nbsp;[[技能#点目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:点目标;zh-hant:目標地點}-</span>]]',
    ["Target Point tal"] = ''.. symbol_tal .. '&nbsp;[[技能#点目标|<span style="color:' .. color_tal .. '; font-weight:bold">-{zh-hans:点目标;zh-hant:目標地點}-</span>]]',
    ["Target Area"] = '[[技能#区域目标|-{zh-hans:区域目标;zh-hant:目標範圍}-]]',
    ["Target Area aghs"] = ''.. symbol_aghs .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]]',
    ["Target Area shard"] = ''.. symbol_shard .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]]',
    ["Target Area tal"] = ''.. symbol_tal .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_tal .. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]]',
    ["Passive"] = '[[被动]]',
    ["Passive aghs"] = ''.. symbol_aghs .. '&nbsp;[[被动|<span style="color:' .. color_aghs .. '; font-weight:bold">被动</span>]]',
    ["Passive shard"] = ''.. symbol_shard .. '&nbsp;[[被动|<span style="color:' .. color_shard .. '; font-weight:bold">被动</span>]]',
    ["Passive tal"] = ''.. symbol_tal .. '&nbsp;[[被动|<span style="color:' .. color_tal .. '; font-weight:bold">被动</span>]]',
    ["Aura"] = '[[光环|-{zh-hans:光环;zh-hant:靈氣}-]]',
    ["Aura aghs"] = ''.. symbol_aghs .. '&nbsp;[[光环|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:光环;zh-hant:靈氣}-</span>]]',
    ["Aura shard"] = ''.. symbol_shard .. '&nbsp;[[光环|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:光环;zh-hant:靈氣}-</span>]]',
    ["Aura tal"] = ''.. symbol_tal .. '&nbsp;[[光环|<span style="color:' .. color_tal .. '; font-weight:bold">-{zh-hans:光环;zh-hant:靈氣}-</span>]]',
    ["Toggle"] = '[[切换]]',
    ["Toggle aghs"] = ''.. symbol_aghs .. '&nbsp;[[切换|<span style="color:' .. color_aghs .. '; font-weight:bold">切换</span>]]',
    ["Toggle shard"] = ''.. symbol_shard .. '&nbsp;[[切换|<span style="color:' .. color_shard .. '; font-weight:bold">切换</span>]]',
    ["Toggle tal"] = ''.. symbol_tal .. '&nbsp;[[切换|<span style="color:' .. color_tal .. '; font-weight:bold">切换</span>]]',
    ["Active Attack Modifier"] = '[[主动攻击特效]]',
    ["Active Attack Modifier aghs"] = ''.. symbol_aghs .. '&nbsp;[[主动攻击特效|<span style="color:' .. color_aghs .. '; font-weight:bold">主动攻击特效</span>]]',
    ["Active Attack Modifier shard"] = ''.. symbol_shard .. '&nbsp;[[主动攻击特效|<span style="color:' .. color_shard .. '; font-weight:bold">主动攻击特效</span>]]',
    ["Active Attack Modifier tal"] = ''.. symbol_tal .. '&nbsp;[[主动攻击特效|<span style="color:' .. color_tal .. '; font-weight:bold">主动攻击特效</span>]]',
  }
  target_dict["隐藏"] = target_dict["Hidden"]
  target_dict["无目标"] = target_dict["No Target"]
  target_dict["无目标A杖"] = target_dict["No Target aghs"]
  target_dict["无目标魔晶"] = target_dict["No Target shard"]
  target_dict["无目标天赋"] = target_dict["No Target tal"]
  target_dict["单位目标"] = target_dict["Target Unit"]
  target_dict["单位目标A杖"] = target_dict["Target Unit aghs"]
  target_dict["单位目标魔晶"] = target_dict["Target Unit shard"]
  target_dict["单位目标天赋"] = target_dict["Target Unit tal"]
  target_dict["点目标"] = target_dict["Target Point"]
  target_dict["点目标或单位目标"] = target_dict["Target Point or Unit"]
  target_dict["点目标A杖"] = target_dict["Target Point aghs"]
  target_dict["点目标魔晶"] = target_dict["Target Point shard"]
  target_dict["点目标天赋"] = target_dict["Target Point tal"]
  target_dict["区域目标"] = target_dict["Target Area"]
  target_dict["区域目标A杖"] = target_dict["Target Area aghs"]
  target_dict["区域目标魔晶"] = target_dict["Target Area shard"]
  target_dict["区域目标天赋"] = target_dict["Target Area tal"]
  target_dict["被动"] = target_dict["Passive"]
  target_dict["被动A杖"] = target_dict["Passive aghs"]
  target_dict["被动魔晶"] = target_dict["Passive shard"]
  target_dict["被动天赋"] = target_dict["Passive tal"]
  target_dict["光环"] = target_dict["Aura"]
  target_dict["光环A杖"] = target_dict["Aura aghs"]
  target_dict["光环魔晶"] = target_dict["Aura shard"]
  target_dict["光环天赋"] = target_dict["Aura tal"]
  target_dict["切换"] = target_dict["Toggle"]
  target_dict["切换A杖"] = target_dict["Toggle aghs"]
  target_dict["切换魔晶"] = target_dict["Toggle shard"]
  target_dict["切换天赋"] = target_dict["Toggle tal"]
  target_dict["主动攻击特效"] = target_dict["Active Attack Modifier"]
  target_dict["主动攻击特效A杖"] = target_dict["Active Attack Modifier aghs"]
  target_dict["主动攻击特效魔晶"] = target_dict["Active Attack Modifier shard"]
  target_dict["主动攻击特效天赋"] = target_dict["Active Attack Modifier tal"]
  local target2_dict = {
    ["No Target"] = ' / [[技能#无目标|-{zh-hans:无目标;zh-hant:沒有目標}-]]',
    ["No Target aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[技能#无目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]])',
    ["No Target shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[技能#无目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]])',
    ["No Target tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[技能#无目标|<span style="color:' .. color_tal.. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]])',
    ["Target Unit"] = ' / [[技能#单位目标|-{zh-hans:单位目标;zh-hant:目標單位}-]]',
    ["Target Unit aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]])',
    ["Target Unit shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]])',
    ["Target Unit tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_tal.. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]])',
    ["Target Point"] = ' / [[技能#点目标|-{zh-hans:点目标;zh-hant:目標地點}-]]',
    ["Target Point aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[技能#点目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:点目标;zh-hant:目標地點}-</span>]])',
    ["Target Point shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[技能#点目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:点目标;zh-hant:目標地點}-</span>]])',
    ["Target Point tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[技能#点目标|<span style="color:' .. color_tal.. '; font-weight:bold">-{zh-hans:点目标;zh-hant:目標地點}-</span>]])',
    ["Target Area"] = ' / [[技能#区域目标|-{zh-hans:区域目标;zh-hant:目標範圍}-]]',
    ["Target Area aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]])',
    ["Target Area shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]])',
    ["Target Area tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_tal.. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]])',
    ["Passive"] = ' / [[被动]]',
    ["Passive aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[被动|<span style="color:' .. color_aghs .. '; font-weight:bold">被动</span>]])',
    ["Passive shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[被动|<span style="color:' .. color_shard .. '; font-weight:bold">被动</span>]])',
    ["Passive tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[被动|<span style="color:' .. color_tal.. '; font-weight:bold">被动</span>]])',
    ["Aura"] = ' / [[光环|-{zh-hans:光环;zh-hant:靈氣}-]]',
    ["Aura aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[光环|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:光环;zh-hant:靈氣}-</span>]])',
    ["Aura shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[光环|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:光环;zh-hant:靈氣}-</span>]])',
    ["Aura tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[光环|<span style="color:' .. color_tal.. '; font-weight:bold">-{zh-hans:光环;zh-hant:靈氣}-</span>]])',
    ["Channeled"] = ' / [[持续施法]]', -- Should always be 2nd.
    ["Channeled aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[持续施法|<span style="color:' .. color_aghs .. '; font-weight:bold">持续施法</span>]])',
    ["Channeled shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[持续施法|<span style="color:' .. color_shard .. '; font-weight:bold">持续施法</span>]])',
    ["Channeled tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[持续施法|<span style="color:' .. color_tal.. '; font-weight:bold">持续施法</span>]])',
    ["Autocast"] = ' / [[自动施放]]', --Should always be 2nd.
    ["Autocast aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[自动施放|<span style="color:' .. color_aghs .. '; font-weight:bold">自动施放</span>]])',
    ["Autocast shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[自动施放|<span style="color:' .. color_shard .. '; font-weight:bold">自动施放</span>]])',
    ["Autocast shard / Target Area tal"] = '<br>(' .. symbol_shard .. '&nbsp;[[自动施放|<span style="color:' .. color_shard .. '; font-weight:bold">自动施放</span>]] / ' .. symbol_tal .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_tal.. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]])', --Specifically for Surge
    ["Autocast tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[自动施放|<span style="color:' .. color_tal.. '; font-weight:bold">自动施放</span>]])',
    ["Toggle"] = ' / [[切换]]',
    ["Toggle aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[切换|<span style="color:' .. color_aghs .. '; font-weight:bold">切换</span>]])',
    ["Toggle shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[切换|<span style="color:' .. color_shard .. '; font-weight:bold">切换</span>]])',
    ["Toggle tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[切换|<span style="color:' .. color_tal.. '; font-weight:bold">切换</span>]])',
    ["Target Unit / Channeled"] = ' / [[技能#单位目标|-{zh-hans:单位目标;zh-hant:目標單位}-]] / [[持续施法]]', --Specifically for travel boots/tp scrolls.
    ["Target Unit / No Target aghs"] = ' / [[技能#单位目标|-{zh-hans:单位目标;zh-hant:目標單位}-]]<br>(' .. symbol_aghs .. '&nbsp;[[技能#无目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]])', --Self Boulder Smash when Enchanted.
    ["Target Unit aghs / Channeled"] = '<br>(' .. symbol_aghs .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]]) / [[持续施法]]', --Specifically for Tricks of the Trade.
    ["Target Area aghs / Channeled"] = '<br>(' .. symbol_aghs .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]]) / [[持续施法]]', --Specifically for Sinister Gaze.
    ["No Target shard / Channeled shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[技能#无目标|<span style="color:' .. color_shard .. '; font-weight:bold">-{zh-hans:无目标;zh-hant:沒有目標}-</span>]] / [[持续施法|<span style="color:' .. color_shard .. '; font-weight:bold">持续施法</span>]])', --Specifically for Essence Flux.
    ["Target Unit aghs / Target Area aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:单位目标;zh-hant:目標單位}-</span>]] / [[技能#区域目标|<span style="color:' .. color_aghs .. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]])', --Specifically for Eclipse.
    ["Target Unit / Target Area tal"] = ' / [[技能#单位目标|单位目标]]<br>(' .. symbol_tal .. '&nbsp;[[技能#区域目标|<span style="color:' .. color_tal.. '; font-weight:bold">-{zh-hans:区域目标;zh-hant:目標範圍}-</span>]])', --Specifically for Living Armor and Lightning Bolt.
    ["Channeled / Autocast shard"] = ' / [[持续施法]]<br>(' .. symbol_shard .. '&nbsp;[[自动施放|<span style="color:' .. color_shard .. '; font-weight:bold">自动施放</span>]])', --Specifically for Elder Titan Shard.
    ["Target Unit shard / Autocast shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[技能#单位目标|<span style="color:' .. color_shard .. '; font-weight:bold">单位目标</span>]] / [[Autocast|<span style="color:' .. color_shard .. '; font-weight:bold">自动施放</span>]])', --Specifically for Necromastery and Call of the Wild Hawk
    ["Autocast / Passive tal"] = ' / [[自动施放]]<br>(' .. symbol_tal .. '&nbsp;[[被动|<span style="color:' .. color_tal.. '; font-weight:bold">被动</span>]])', --Specifically for Walrus Punch
    ["Vector"] = ' / [[矢量目标]]',
    ["Vector / Autocast shard"] = ' / [[矢量目标]]<br>(' .. symbol_shard .. '&nbsp;[[自动施放|<span style="color:' .. color_shard .. '; font-weight:bold">自动施放</span>]])', --Specifically for Rebound
    ["Vector aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[矢量目标|<span style="color:' .. color_aghs .. '; font-weight:bold">矢量目标</span>]])',
    ["Vector shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[矢量目标|<span style="color:' .. color_shard .. '; font-weight:bold">矢量目标</span>]])',
    ["Vector tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[矢量目标|<span style="color:' .. color_tal.. '; font-weight:bold">矢量目标</span>]])',
    ["Active Attack Modifier"] = ' / [[主动攻击特效]]',
    ["Active Attack Modifier aghs"] = '<br>('.. symbol_aghs .. '&nbsp;[[主动攻击特效|<span style="color:' .. color_aghs .. '; font-weight:bold">主动攻击特效</span>]])',
    ["Active Attack Modifier shard"] = '<br>('.. symbol_shard .. '&nbsp;[[主动攻击特效|<span style="color:' .. color_shard .. '; font-weight:bold">主动攻击特效</span>]])',
    ["Active Attack Modifier tal"] = '<br>('.. symbol_tal .. '&nbsp;[[主动攻击特效|<span style="color:' .. color_tal .. '; font-weight:bold">主动攻击特效</span>]])',
  }
  target2_dict["无目标"] = target2_dict["No Target"]
  target2_dict["无目标A杖"] = target2_dict["No Target aghs"]
  target2_dict["无目标魔晶"] = target2_dict["No Target shard"]
  target2_dict["无目标天赋"] = target2_dict["No Target tal"]
  target2_dict["单位目标"] = target2_dict["Target Unit"]
  target2_dict["单位目标A杖"] = target2_dict["Target Unit aghs"]
  target2_dict["单位目标魔晶"] = target2_dict["Target Unit shard"]
  target2_dict["单位目标天赋"] = target2_dict["Target Unit tal"]
  target2_dict["点目标"] = target2_dict["Target Point"]
  target2_dict["点目标A杖"] = target2_dict["Target Point aghs"]
  target2_dict["点目标魔晶"] = target2_dict["Target Point shard"]
  target2_dict["点目标天赋"] = target2_dict["Target Point tal"]
  target2_dict["区域目标"] = target2_dict["Target Area"]
  target2_dict["区域目标A杖"] = target2_dict["Target Area aghs"]
  target2_dict["区域目标魔晶"] = target2_dict["Target Area shard"]
  target2_dict["区域目标天赋"] = target2_dict["Target Area tal"]
  target2_dict["被动"] = target2_dict["Passive"]
  target2_dict["被动A杖"] = target2_dict["Passive aghs"]
  target2_dict["被动魔晶"] = target2_dict["Passive shard"]
  target2_dict["被动天赋"] = target2_dict["Passive tal"]
  target2_dict["光环"] = target2_dict["Aura"]
  target2_dict["光环A杖"] = target2_dict["Aura aghs"]
  target2_dict["光环魔晶"] = target2_dict["Aura shard"]
  target2_dict["光环天赋"] = target2_dict["Aura tal"]
  target2_dict["持续施法"] = target2_dict["Channeled"]
  target2_dict["持续施法A杖"] = target2_dict["Channeled aghs"]
  target2_dict["持续施法魔晶"] = target2_dict["Channeled shard"]
  target2_dict["持续施法天赋"] = target2_dict["Channeled tal"]
  target2_dict["自动施法"] = target2_dict["Autocast"]
  target2_dict["自动施放"] = target2_dict["Autocast"]
  target2_dict["自动施法A杖"] = target2_dict["Autocast aghs"]
  target2_dict["自动施放A杖"] = target2_dict["Autocast aghs"]
  target2_dict["自动施法魔晶"] = target2_dict["Autocast shard"]
  target2_dict["自动施放魔晶"] = target2_dict["Autocast shard"]
  target2_dict["自动施法魔晶 / 区域目标天赋"] = target2_dict["Autocast shard / Target Area tal"]
  target2_dict["自动施放魔晶 / 区域目标天赋"] = target2_dict["Autocast shard / Target Area tal"]
  target2_dict["自动施法天赋"] = target2_dict["Autocast tal"]
  target2_dict["自动施放天赋"] = target2_dict["Autocast tal"]
  target2_dict["切换"] = target2_dict["Toggle"]
  target2_dict["切换A杖"] = target2_dict["Toggle aghs"]
  target2_dict["切换魔晶"] = target2_dict["Toggle shard"]
  target2_dict["切换天赋"] = target2_dict["Toggle tal"]
  target2_dict["单位目标 / 持续施法"] = target2_dict["Target Unit / Channeled"]
  target2_dict["单位目标 / 无目标A杖"] = target2_dict["Target Unit / No Target aghs"]
  target2_dict["单位目标A杖 / 持续施法"] = target2_dict["Target Unit aghs / Channeled"]
  target2_dict["区域目标A杖 / 持续施法"] = target2_dict["Target Area aghs / Channeled"]
  target2_dict["无目标魔晶 / 持续施法魔晶"] = target2_dict["No Target shard / Channeled shard"]
  target2_dict["单位目标A杖 / 区域目标A杖"] = target2_dict["Target Unit aghs / Target Area aghs"]
  target2_dict["单位目标 / 区域目标天赋"] = target2_dict["Target Unit / Target Area tal"]
  target2_dict["持续施法 / 自动施法魔晶"] = target2_dict["Channeled / Autocast shard"]
  target2_dict["持续施法 / 自动施放魔晶"] = target2_dict["Channeled / Autocast shard"]
  target2_dict["单位目标魔晶 / 自动施法魔晶"] = target2_dict["Target Unit shard / Autocast shard"]
  target2_dict["单位目标魔晶 / 自动施放魔晶"] = target2_dict["Target Unit shard / Autocast shard"]
  target2_dict["自动施法 / 被动天赋"] = target2_dict["Autocast / Passive tal"]
  target2_dict["自动施放 / 被动天赋"] = target2_dict["Autocast / Passive tal"]
  target2_dict["矢量"] = target2_dict["Vector"]
  target2_dict["矢量 / 自动施法魔晶"] = target2_dict["Vector / Autocast shard"]
  target2_dict["矢量 / 自动施放魔晶"] = target2_dict["Vector / Autocast shard"]
  target2_dict["矢量A杖"] = target2_dict["Vector aghs"]
  target2_dict["矢量魔晶"] = target2_dict["Vector shard"]
  target2_dict["矢量天赋"] = target2_dict["Vector tal"]
  target2_dict["主动攻击特效"] = target2_dict["Active Attack Modifier"]
  target2_dict["主动攻击特效A杖"] = target2_dict["Active Attack Modifier aghs"]
  target2_dict["主动攻击特效魔晶"] = target2_dict["Active Attack Modifier shard"]
  target2_dict["主动攻击特效天赋"] = target2_dict["Active Attack Modifier tal"]
  
  local target = target_dict[args['target']] or '无'
  if args['target'] and args['target2'] then
    local target2 = target2_dict[args['target2']] or '无'
    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 == '天穹守望者' then
      return '本尊'
    else
      return '自身'
    end
  end
  
  local affects_dict = {
    ["Heroes"] = '[[英雄]]',
    ["Heroes aghs"] = ''.. symbol_aghs .. '&nbsp;[[英雄|<span style="color:' .. color_aghs .. '; font-weight:bold">英雄</span>]]',
    ["Heroes shard"] = ''.. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">英雄</span>]]',
    ["Heroes tal"] = ''.. symbol_tal .. '&nbsp;[[英雄|<span style="color:' .. color_tal .. '; font-weight:bold">英雄</span>]]',
    ["Enemy Heroes"] = '[[英雄|敌方英雄]]',
    ["Enemy Heroes aghs"] = ''.. symbol_aghs .. '&nbsp;[[英雄|<span style="color:' .. color_aghs .. '; font-weight:bold">敌方英雄</span>]]',
    ["Enemy Heroes shard"] = ''.. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">敌方英雄</span>]]',
    ["Enemy Heroes tal"] = ''.. symbol_tal .. '&nbsp;[[英雄|<span style="color:' .. color_tal .. '; font-weight:bold">敌方英雄</span>]]',
    ["Allied Heroes"] = '[[英雄|友方英雄]]',
    ["Allied Heroes aghs"] = ''.. symbol_aghs .. '&nbsp;[[英雄|<span style="color:' .. color_aghs .. '; font-weight:bold">友方英雄</span>]]',
    ["Allied Heroes shard"] = ''.. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">友方英雄</span>]]',
    ["Allied Heroes tal"] = ''.. symbol_tal .. '&nbsp;[[英雄|<span style="color:' .. color_tal .. '; font-weight:bold">友方英雄</span>]]',
    ["Neutral"] = '[[中立生物|中立单位]]',
    ["Units"] = '单位',
    ["Units aghs"] = ''.. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">单位</span>',
    ["Units shard"] = ''.. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">单位</span>',
    ["Units tal"] = ''.. symbol_tal .. '&nbsp;<span style="color:' .. color_tal .. '; font-weight:bold">单位</span>',
    ["Enemy Units"] = '敌方单位',
    ["Enemy Units aghs"] = ''.. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">敌方单位</span>',
    ["Enemy Units shard"] = ''.. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">敌方单位</span>',
    ["Enemy Units tal"] = ''.. symbol_tal .. '&nbsp;<span style="color:' .. color_tal .. '; font-weight:bold">敌方单位</span>',
    ["Allied Units"] = '友方单位',
    ["Allied Units aghs"] = ''.. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">友方单位</span>',
    ["Allied Units shard"] = ''.. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">友方单位</span>',
    ["Allied Units tal"] = ''.. symbol_tal .. '&nbsp;<span style="color:' .. color_tal .. '; font-weight:bold">友方单位</span>',
    ["Self"] = zet_easteregg(),
    ["Self aghs"] = ''.. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">' .. zet_easteregg() .. '</span>',
    ["Self shard"] = ''.. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">' .. zet_easteregg() .. '</span>',
    ["Self tal"] = ''.. symbol_tal .. '&nbsp;<span style="color:' .. color_tal .. '; font-weight:bold">' .. zet_easteregg() .. '</span>',
    ["Self / Allies shard"] = '自身(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">友军</span>)', -- Rebound shard
    ["Enemies"] = '敌人',
    ["Enemies / Allied Heroes shard"] = ' / 敌人<br>(' .. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">友方英雄</span>]])', -- Shadow Walk shard
    ["Enemies aghs"] = ''.. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">敌人</span>',
    ["Enemies shard"] = ''.. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">敌人</span>',
    ["Enemies tal"] = ''.. symbol_tal .. '&nbsp;<span style="color:' .. color_tal .. '; font-weight:bold">敌人</span>',
    ["Allies"] = '友军',
    ["Allies / Runes"] = ' / 友军<br>('.. symbol_runes ..'&nbsp;[[神符]])', -- Meat Hook and Toss
    ["Allies / Nether Ward"] = ' / 友军<br>([[幽冥守卫]])', -- For abilities affecting Nether Ward
    ["Allies / Nether Ward shard"] = ' / 友军<br>(' .. symbol_shard .. '&nbsp;[[幽冥守卫]])', -- For abilities affecting Nether Ward
    ["Allies / Tombstone"] = ' / 友军<br>([[墓碑]])', -- For abilities affecting Tombstone
    ["Allies aghs"] = ''.. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">友军</span>',
    ["Allies shard"] = ''.. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">友军</span>',
    ["Allies tal"] = ''.. symbol_tal .. '&nbsp;<span style="color:' .. color_tal .. '; font-weight:bold">友军</span>',
    ["Pumpkin Basket"] = '南瓜篮',
    ["Familiars"] = '[[佣兽]]', -- For Stone Form self cast only
    ["Astral Spirit"] = '[[灵体游魂]]', -- For Astral Spirit sub-abilities
    ["Proximity Mines"] = '[[工程师#感应地雷|感应地雷]]', -- For Minefield Sign only.
    ["Psionic Trap"] = '[[圣堂刺客#灵能陷阱|灵能陷阱]]',
    --Use affects2 for Trees unless it only affects Trees specifically.
    ["Trees"] = '[[树木]]',
    ["Trees aghs"] = ''.. symbol_aghs .. '&nbsp;[[树木|<span style="color:' .. color_aghs .. '; font-weight:bold">树木</span>]]',
    ["Trees shard"] = ''.. symbol_shard .. '&nbsp;[[树木|<span style="color:' .. color_shard .. '; font-weight:bold">树木</span>]]',
    ["Trees tal"] = ''.. symbol_tal .. '&nbsp;[[树木|<span style="color:' .. color_tal .. '; font-weight:bold">树木</span>]]',
  }
  affects_dict["英雄"] = affects_dict["Heroes"]
  affects_dict["英雄A杖"] = affects_dict["Heroes aghs"]
  affects_dict["英雄魔晶"] = affects_dict["Heroes shard"]
  affects_dict["英雄天赋"] = affects_dict["Heroes tal"]
  affects_dict["敌方英雄"] = affects_dict["Enemy Heroes"]
  affects_dict["敌方英雄A杖"] = affects_dict["Enemy Heroes aghs"]
  affects_dict["敌方英雄魔晶"] = affects_dict["Enemy Heroes shard"]
  affects_dict["敌方英雄天赋"] = affects_dict["Enemy Heroes tal"]
  affects_dict["友方英雄"] = affects_dict["Allied Heroes"]
  affects_dict["友方英雄A杖"] = affects_dict["Allied Heroes aghs"]
  affects_dict["友方英雄魔晶"] = affects_dict["Allied Heroes shard"]
  affects_dict["友方英雄天赋"] = affects_dict["Allied Heroes tal"]
  affects_dict["中立"] = affects_dict["Neutral"]
  affects_dict["单位"] = affects_dict["Units"]
  affects_dict["单位A杖"] = affects_dict["Units aghs"]
  affects_dict["单位魔晶"] = affects_dict["Units shard"]
  affects_dict["单位天赋"] = affects_dict["Units tal"]
  affects_dict["敌方单位"] = affects_dict["Enemy Units"]
  affects_dict["敌方单位A杖"] = affects_dict["Enemy Units aghs"]
  affects_dict["敌方单位魔晶"] = affects_dict["Enemy Units shard"]
  affects_dict["敌方单位天赋"] = affects_dict["Enemy Units tal"]
  affects_dict["友方单位"] = affects_dict["Allied Units"]
  affects_dict["友方单位A杖"] = affects_dict["Allied Units aghs"]
  affects_dict["友方单位魔晶"] = affects_dict["Allied Units shard"]
  affects_dict["友方单位天赋"] = affects_dict["Allied Units tal"]
  affects_dict["自身"] = affects_dict["Self"]
  affects_dict["自身A杖"] = affects_dict["Self aghs"]
  affects_dict["自身魔晶"] = affects_dict["Self shard"]
  affects_dict["自身天赋"] = affects_dict["Self tal"]
  affects_dict["自身 / 友军魔晶"] = affects_dict["Self / Allies shard"]
  affects_dict["敌人"] = affects_dict["Enemies"]
  affects_dict["敌人 / 友方英雄魔晶"] = affects_dict["Enemies / Allied Heroes shard"]
  affects_dict["敌人A杖"] = affects_dict["Enemies aghs"]
  affects_dict["敌人魔晶"] = affects_dict["Enemies shard"]
  affects_dict["敌人天赋"] = affects_dict["Enemies tal"]
  affects_dict["友军"] = affects_dict["Allies"]
  affects_dict["友军 / 神符"] = affects_dict["Allies / Runes"]
  affects_dict["友军 / 幽冥守卫"] = affects_dict["Allies / Nether Ward"]
  affects_dict["友军 / 幽冥守卫魔晶"] = affects_dict["Allies / Nether Ward shard"]
  affects_dict["友军 / 墓碑"] = affects_dict["Allies / Tombstone"]
  affects_dict["友军A杖"] = affects_dict["Allies aghs"]
  affects_dict["友军魔晶"] = affects_dict["Allies shard"]
  affects_dict["友军天赋"] = affects_dict["Allies tal"]
  affects_dict["南瓜篮"] = affects_dict["Pumpkin Basket"]
  affects_dict["佣兽"] = affects_dict["Familiars"]
  affects_dict["灵体游魂"] = affects_dict["Astral Spirit"]
  affects_dict["感应地雷"] = affects_dict["Proximity Mines"]
  affects_dict["灵能陷阱"] = affects_dict["Psionic Trap"]
  affects_dict["树木"] = affects_dict["Trees"]
  affects_dict["树木A杖"] = affects_dict["Trees aghs"]
  affects_dict["树木魔晶"] = affects_dict["Trees shard"]
  affects_dict["树木天赋"] = affects_dict["Trees tal"]
  local affects2_dict = {
    ["Heroes"] = ' / [[英雄]]',
    ["Heroes aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[英雄|<span style="color:' .. color_aghs .. '; font-weight:bold">英雄</span>]])',
    ["Heroes shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">英雄</span>]])',
    ["Heroes tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[英雄|<span style="color:' .. color_tal.. '; font-weight:bold">英雄</span>]])',
    ["Enemy Heroes"] = ' / [[英雄|敌方英雄]]',
    ["Enemy Heroes aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[英雄|<span style="color:' .. color_aghs .. '; font-weight:bold">敌方英雄</span>]])',
    ["Enemy Heroes shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">敌方英雄</span>]])',
    ["Enemy Heroes tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[英雄|<span style="color:' .. color_tal.. '; font-weight:bold">敌方英雄</span>]])',
    ["Allied Heroes"] = ' / [[英雄|友方英雄]]',
    ["Allied Heroes aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[英雄|<span style="color:' .. color_aghs .. '; font-weight:bold">友方英雄</span>]])',
    ["Allied Heroes shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">友方英雄</span>]])',
    ["Allied Heroes shard / Self tal"] = '<br>(' .. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">友方英雄</span>]]<br>/ '.. symbol_tal .. '&nbsp;<span style="color:' .. color_tal .. '; font-weight:bold">' .. zet_easteregg() .. '</span>)', -- Overload shardtal
    ["Allied Heroes tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[英雄|<span style="color:' .. color_tal.. '; font-weight:bold">友方英雄</span>]])',
    ["Units"] = ' / 单位',
    ["Units aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">单位</span>)',
    ["Units shard"] = '<br>(<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">单位</span>)',
    ["Units tal"] = '<br>(' .. symbol_tal .. '&nbsp;<span style="color:' .. color_tal.. '; font-weight:bold">单位</span>)',
    ["Enemy Units"] = ' / 敌方单位',
    ["Enemy Units aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">敌方单位</span>)',
    ["Enemy Units shard"] = '<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">敌方单位</span>)',
    ["Enemy Units tal"] = '<br>(' .. symbol_tal .. '&nbsp;<span style="color:' .. color_tal.. '; font-weight:bold">敌方单位</span>)',
    ["Allied Units"] = ' / 友方单位',
    ["Allied Units aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">友方单位</span>)',
    ["Allied Units shard"] = '<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">友方单位</span>)',
    ["Allied Units tal"] = '<br>(' .. symbol_tal .. '&nbsp;<span style="color:' .. color_tal.. '; font-weight:bold">友方单位</span>)',
    ["Self"] = ' / 自身',
    ["Self aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">自身</span>)',
    ["Self shard"] = '<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">自身</span>)',
    ["Self shard / Enemies shard"] = '<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">自身</span> / <span style="color:' .. color_shard .. '; font-weight:bold">敌人</span>)',-- Bloodrage shard
    ["Self tal"] = '<br>(' .. symbol_tal .. '&nbsp;<span style="color:' .. color_tal.. '; font-weight:bold">自身</span>)',
    ["Self / Allies aghs"] = ' / 自身<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">友军</span>)', -- Reactive Tazer aghs
    ["Self / Allied Heroes tal"] = '/ 自身<br>('.. symbol_tal .. '&nbsp;[[英雄|<span style="color:' .. color_tal .. '; font-weight:bold">友方英雄</span>]])', -- Atrophy Aura tal
    ["Self / Allied Heroes shard"] = ' / 自身<br>(' .. symbol_shard .. '&nbsp;[[英雄|<span style="color:' .. color_shard .. '; font-weight:bold">友方英雄</span>]])', -- Dismember shard
    ["Self / Clones aghs"] = ' / 自身<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">复制体</span>)', -- Jingu Mastery
    ["Enemies"] = ' / 敌人',
    ["Enemies aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">敌人</span>)',
    ["Enemies shard"] = '<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">敌人</span>)',
    ["Enemies tal"] = '<br>(' .. symbol_tal .. '&nbsp;<span style="color:' .. color_tal.. '; font-weight:bold">敌人</span>)',
    ["Enemies / Familiars"] = '/ 敌人<br>([[佣兽]])',
    ["Enemies / Trees"] = ' / 敌人<br>([[树木]])', -- Timber Chain
    ["Allies / Enemies"] = ' / 友军 / 敌人', -- Rebound, Mist Coil
    ["Allies"] = ' / 友军',
    ["Allies aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;<span style="color:' .. color_aghs .. '; font-weight:bold">友军</span>)',
    ["Allies shard"] = '<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">友军</span>)',
    ["Allies tal"] = '<br>(' .. symbol_tal .. '&nbsp;<span style="color:' .. color_tal.. '; font-weight:bold">友军</span>)',
    ["Trees"] = ' <br>([[树木]])',
    ["Enchanted Trees"] = '<br>(' .. symbol_aghs .. '' .. symbol_enchantedtree .. '&nbsp;[[树精卫士#丛林之眼|<span style="color:' .. color_aghs .. '; font-weight:bold">树木</span>]])',
    ["Trees aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[树木|<span style="color:' .. color_aghs .. '; font-weight:bold">树木</span>]])',
    ["Trees shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[树木|<span style="color:' .. color_shard .. '; font-weight:bold">树木</span>]])',
    ["Trees tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[树木|<span style="color:' .. color_tal.. '; font-weight:bold">树木</span>]])',
    --Summons
    ["Spiders"] = '<br>([[育母蜘蛛#孵化蜘蛛|蜘蛛]])', --For Broodmother's Spiders
    ["Skeleton Archer"] = '<br>([[克林克兹#燃烧之军|骷髅弓手]])', --For Skeleton Archer
    ["Self / Skeleton Archer"] = ' / 自身<br>([[克林克兹#燃烧之军|骷髅弓手]])',
    ["Ice Spire"] = '<br>([[巫妖#寒冰尖柱|寒冰尖柱]])', --For Lich's Spire
    ["Allies / Ice Spire"] = ' / 友军<br>([[巫妖#寒冰尖柱|寒冰尖柱]])', --For Lich's Spire
    ["Spirit Bear"] = '<br>([[熊灵]])', -- For abilities affecting Spirit Bear
    ["Familiars"] = '<br>([[佣兽]])', -- For abilities affecting Familiars
    ["Familiars tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[佣兽]])',
    ["Familiars / Enemies shard"] = '<br>([[佣兽]])<br>(' .. symbol_shard .. '&nbsp;<span style="color:' .. color_shard .. '; font-weight:bold">敌人</span>)',
    ["Psionic Trap"] = '<br>([[圣堂刺客#灵能陷阱|灵能陷阱]])',
    ["Enemies / Psionic Trap"] = '/ 敌人<br>([[圣堂刺客#灵能陷阱|灵能陷阱]])',
    ["Wraith King Skeleton"] = '<br>([[冥魂大帝骷髅兵]])',
  }
  affects2_dict["英雄"] = affects2_dict["Heroes"]
  affects2_dict["英雄A杖"] = affects2_dict["Heroes aghs"]
  affects2_dict["英雄魔晶"] = affects2_dict["Heroes shard"]
  affects2_dict["英雄天赋"] = affects2_dict["Heroes tal"]
  affects2_dict["敌方英雄"] = affects2_dict["Enemy Heroes"]
  affects2_dict["敌方英雄A杖"] = affects2_dict["Enemy Heroes aghs"]
  affects2_dict["敌方英雄魔晶"] = affects2_dict["Enemy Heroes shard"]
  affects2_dict["敌方英雄天赋"] = affects2_dict["Enemy Heroes tal"]
  affects2_dict["友方英雄"] = affects2_dict["Allied Heroes"]
  affects2_dict["友方英雄A杖"] = affects2_dict["Allied Heroes aghs"]
  affects2_dict["友方英雄魔晶"] = affects2_dict["Allied Heroes shard"]
  affects2_dict["友方英雄魔晶 / 自身天赋"] = affects2_dict["Allied Heroes shard / Self tal"]
  affects2_dict["友方英雄天赋"] = affects2_dict["Allied Heroes tal"]
  affects2_dict["单位"] = affects2_dict["Units"]
  affects2_dict["单位A杖"] = affects2_dict["Units aghs"]
  affects2_dict["单位魔晶"] = affects2_dict["Units shard"]
  affects2_dict["单位天赋"] = affects2_dict["Units tal"]
  affects2_dict["敌方单位"] = affects2_dict["Enemy Units"]
  affects2_dict["敌方单位A杖"] = affects2_dict["Enemy Units aghs"]
  affects2_dict["敌方单位魔晶"] = affects2_dict["Enemy Units shard"]
  affects2_dict["敌方单位天赋"] = affects2_dict["Enemy Units tal"]
  affects2_dict["友方单位"] = affects2_dict["Allied Units"]
  affects2_dict["友方单位A杖"] = affects2_dict["Allied Units aghs"]
  affects2_dict["友方单位魔晶"] = affects2_dict["Allied Units shard"]
  affects2_dict["友方单位天赋"] = affects2_dict["Allied Units tal"]
  affects2_dict["自身"] = affects2_dict["Self"]
  affects2_dict["自身A杖"] = affects2_dict["Self aghs"]
  affects2_dict["自身魔晶"] = affects2_dict["Self shard"]
  affects2_dict["自身魔晶 / 敌人魔晶"] = affects2_dict["Self shard / Enemies shard"]
  affects2_dict["自身天赋"] = affects2_dict["Self tal"]
  affects2_dict["自身 / 友军A杖"] = affects2_dict["Self / Allies aghs"]
  affects2_dict["自身 / 友方英雄天赋"] = affects2_dict["Self / Allied Heroes tal"]
  affects2_dict["自身 / 友方英雄魔晶"] = affects2_dict["Self / Allied Heroes shard"]
  affects2_dict["自身 / 复制体A杖"] = affects2_dict["Self / Clones aghs"]
  affects2_dict["敌人"] = affects2_dict["Enemies"]
  affects2_dict["敌人A杖"] = affects2_dict["Enemies aghs"]
  affects2_dict["敌人魔晶"] = affects2_dict["Enemies shard"]
  affects2_dict["敌人天赋"] = affects2_dict["Enemies tal"]
  affects2_dict["敌人 / 佣兽"] = affects2_dict["Enemies / Familiars"]
  affects2_dict["敌人 / 树木"] = affects2_dict["Enemies / Trees"]
  affects2_dict["友军 / 敌人"] = affects2_dict["Allies / Enemies"]
  affects2_dict["友军"] = affects2_dict["Allies"]
  affects2_dict["友军A杖"] = affects2_dict["Allies aghs"]
  affects2_dict["友军魔晶"] = affects2_dict["Allies shard"]
  affects2_dict["友军天赋"] = affects2_dict["Allies tal"]
  affects2_dict["树木"] = affects2_dict["Trees"]
  affects2_dict["注魔树木"] = affects2_dict["Enchanted Trees"]
  affects2_dict["树木A杖"] = affects2_dict["Trees aghs"]
  affects2_dict["树木魔晶"] = affects2_dict["Trees shard"]
  affects2_dict["树木天赋"] = affects2_dict["Trees tal"]
  affects2_dict["蜘蛛"] = affects2_dict["Spiders"]
  affects2_dict["骷髅弓手"] = affects2_dict["Skeleton Archer"]
  affects2_dict["自身 / 骷髅弓手"] = affects2_dict["Self / Skeleton Archer"]
  affects2_dict["寒冰尖柱"] = affects2_dict["Ice Spire"]
  affects2_dict["友军 / 寒冰尖柱"] = affects2_dict["Allies / Ice Spire"]
  affects2_dict["熊灵"] = affects2_dict["Spirit Bear"]
  affects2_dict["佣兽"] = affects2_dict["Familiars"]
  affects2_dict["佣兽天赋"] = affects2_dict["Familiars tal"]
  affects2_dict["佣兽 / 敌人魔晶"] = affects2_dict["Familiars / Enemies shard"]
  affects2_dict["灵能陷阱"] = affects2_dict["Psionic Trap"]
  affects2_dict["敌人 / 灵能陷阱"] = affects2_dict["Enemies / Psionic Trap"]
  affects2_dict["冥魂大帝骷髅兵"] = affects2_dict["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 "'''影响目标'''<br>" .. affects
  end
end

-- Implements the damagetypes.
function p.damagetype(frame)
  local args = getArgs(frame, {
    wrappers = {
      'Template:Ability'
    }
  })
  local damagetype_dict = {
    ["Physical"] = '[[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]]',
    ["Physical aghs"] = ''.. symbol_aghs .. '&nbsp;[[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]]',
    ["Physical shard"] = ''.. symbol_shard .. '&nbsp;[[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]]',
    ["Physical tal"] = ''.. symbol_tal .. '&nbsp;[[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]]',
    ["Magical"] = '[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]]',
    ["Magical aghs"] = ''.. symbol_aghs .. '&nbsp;[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]]',
    ["Magical shard"] = ''.. symbol_shard .. '&nbsp;[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]]',
    ["Magical tal"] = ''.. symbol_tal .. '&nbsp;[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]]',
    ["Pure"] = '[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]]',
    ["Pure aghs"] = ''.. symbol_aghs .. '&nbsp;[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]]',
    ["Pure shard"] = ''.. symbol_shard .. '&nbsp;[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]]',
    ["Pure tal"] = ''.. symbol_tal .. '&nbsp;[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]]',
    ["Pure / HP Removal"] = '[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]]<br>([[生命移除]])', -- Blood Mist
    ["Instant Attack"] = '[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]]',
    ["Instant Attack aghs"] = ''.. symbol_aghs .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]]',
    ["Instant Attack shard"] = '' .. symbol_shard .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]]',
    ["Instant Attack tal"] = '' .. symbol_tal .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]]',
    ["Instant Kill"] = '[[立即击杀|<span style="color:#5B388F; font-weight:bold">立即击杀</span>]]',
    ["Instant Kill aghs"] = ''.. symbol_aghs .. '&nbsp;[[立即击杀|<span style="color:#5B388F; font-weight:bold">立即击杀</span>]]',
    ["Instant Kill shard"] = ''.. symbol_shard .. '&nbsp;[[立即击杀|<span style="color:#5B388F; font-weight:bold">立即击杀</span>]]',
    ["Instant Kill tal"] = ''.. symbol_tal .. '&nbsp;[[立即击杀|<span style="color:#5B388F; font-weight:bold">立即击杀</span>]]',
    ["Composite"] = '[[混合|<span style="color:#5BD199; font-weight:bold">-{zh-hans:混合;zh-hant:綜合}-</span>]]', -- Use only for old abilities.
    ["Universal"] = '[[通用|<span style="color:#8650AC; font-weight:bold">-{zh-hans:通用;zh-hant:普遍}-</span>]]', -- Use only for old abilities.
    ["HP Removal"] = '[[生命移除]]', -- Use only for old abilities.
    ["Source"] = '[[伤害类型|<span style="color:#444; font-weight:bold; text-shadow:0.5px 0.5px 0.5px #000;">来源类型</span>]]<br>([[不反弹]])', -- Use only for abilities that reflect damage.
  }
  damagetype_dict["物理"] = damagetype_dict["Physical"]
  damagetype_dict["物理A杖"] = damagetype_dict["Physical aghs"]
  damagetype_dict["物理魔晶"] = damagetype_dict["Physical shard"]
  damagetype_dict["物理天赋"] = damagetype_dict["Physical tal"]
  damagetype_dict["魔法"] = damagetype_dict["Magical"]
  damagetype_dict["魔法A杖"] = damagetype_dict["Magical aghs"]
  damagetype_dict["魔法魔晶"] = damagetype_dict["Magical shard"]
  damagetype_dict["魔法天赋"] = damagetype_dict["Magical tal"]
  damagetype_dict["纯粹"] = damagetype_dict["Pure"]
  damagetype_dict["纯粹A杖"] = damagetype_dict["Pure aghs"]
  damagetype_dict["纯粹魔晶"] = damagetype_dict["Pure shard"]
  damagetype_dict["纯粹天赋"] = damagetype_dict["Pure tal"]
  damagetype_dict["纯粹 / 生命移除"] = damagetype_dict["Pure / HP Removal"]
  damagetype_dict["即时攻击"] = damagetype_dict["Instant Attack"]
  damagetype_dict["即时攻击A杖"] = damagetype_dict["Instant Attack aghs"]
  damagetype_dict["即时攻击魔晶"] = damagetype_dict["Instant Attack shard"]
  damagetype_dict["即时攻击天赋"] = damagetype_dict["Instant Attack tal"]
  damagetype_dict["立即击杀"] = damagetype_dict["Instant Kill"]
  damagetype_dict["立即击杀A杖"] = damagetype_dict["Instant Kill aghs"]
  damagetype_dict["立即击杀魔晶"] = damagetype_dict["Instant Kill shard"]
  damagetype_dict["立即击杀天赋"] = damagetype_dict["Instant Kill tal"]
  damagetype_dict["混合"] = damagetype_dict["Composite"]
  damagetype_dict["通用"] = damagetype_dict["Universal"]
  damagetype_dict["生命移除"] = damagetype_dict["HP Removal"]
  damagetype_dict["来源"] = damagetype_dict["Source"]
  local damagetype2_dict = {
    ["Physical"] = ' / [[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]]',
    ["Physical aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]])',
    ["Physical shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]])',
    ["Physical tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[物理|<span style="color:#AE2F28; font-weight:bold">物理</span>]])',
    ["Magical"] = ' / [[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]]',
    ["Magical aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]])',
    ["Magical shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]])',
    ["Magical tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]])',
    ["Pure"] = ' / [[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]]',
    ["Pure / Instant Attack shard"] = ' / [[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]]<br>(' .. symbol_shard .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]])', -- Mist Coil Shard
    ["Pure aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]])',
    ["Pure shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]])',
    ["Pure tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]])',
    ["Pure tal / Instant Attack tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[纯粹|<span style="color:#C29C4A; font-weight:bold">纯粹</span>]] / <br>' .. symbol_tal .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]])', --Dream Coil Tal
    ["Instant Attack"] = ' / [[即时攻击| <span style="color:#598307; font-weight:bold">即时攻击</span>]]',
    ["Instant Attack aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]])',
    ["Instant Attack shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]])',
    ["Instant Attack tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[即时攻击|<span style="color:#598307; font-weight:bold">即时攻击</span>]])',
    ["Instant Kill"] = ' / [[立即击杀| <span style="color:#5B388F; font-weight:bold">立即击杀</span>]]',
    ["Instant Kill aghs"] = '<br>(' .. symbol_aghs .. '&nbsp;[[立即击杀|<span style="color:#5B388F; font-weight:bold">立即击杀</span>]])',
    ["Instant Kill shard"] = '<br>(' .. symbol_shard .. '&nbsp;[[立即击杀|<span style="color:#5B388F; font-weight:bold">立即击杀</span>]])',
    ["Instant Kill tal"] = '<br>(' .. symbol_tal .. '&nbsp;[[立即击杀|<span style="color:#5B388F; font-weight:bold">立即击杀</span>]])',
    ["HP Removal"] = '<br>([[生命移除]])', -- Not an actual damage type, so should always be used as 2nd.
    ["HP Removal / Magical shard"] = '<br>([[生命移除]] / ' .. symbol_shard .. '&nbsp;[[魔法|<span style="color:#5B93D1; font-weight:bold">魔法</span>]])', --Dispersion shard
    ["No-reflection"] = '<br>([[不反弹]])', -- Not an actual damage type, used as 2nd when reflected damage is not based on source damage.
  }
  damagetype2_dict["物理"] = damagetype2_dict["Physical"]
  damagetype2_dict["物理A杖"] = damagetype2_dict["Physical aghs"]
  damagetype2_dict["物理魔晶"] = damagetype2_dict["Physical shard"]
  damagetype2_dict["物理天赋"] = damagetype2_dict["Physical tal"]
  damagetype2_dict["魔法"] = damagetype2_dict["Magical"]
  damagetype2_dict["魔法A杖"] = damagetype2_dict["Magical aghs"]
  damagetype2_dict["魔法魔晶"] = damagetype2_dict["Magical shard"]
  damagetype2_dict["魔法天赋"] = damagetype2_dict["Magical tal"]
  damagetype2_dict["纯粹"] = damagetype2_dict["Pure"]
  damagetype2_dict["纯粹 / 即时攻击魔晶"] = damagetype2_dict["Pure / Instant Attack shard"]
  damagetype2_dict["纯粹A杖"] = damagetype2_dict["Pure aghs"]
  damagetype2_dict["纯粹魔晶"] = damagetype2_dict["Pure shard"]
  damagetype2_dict["纯粹天赋"] = damagetype2_dict["Pure tal"]
  damagetype2_dict["纯粹天赋 / 即时攻击天赋"] = damagetype2_dict["Pure tal / Instant Attack tal"]
  damagetype2_dict["即时攻击"] = damagetype2_dict["Instant Attack"]
  damagetype2_dict["即时攻击A杖"] = damagetype2_dict["Instant Attack aghs"]
  damagetype2_dict["即时攻击魔晶"] = damagetype2_dict["Instant Attack shard"]
  damagetype2_dict["即时攻击天赋"] = damagetype2_dict["Instant Attack tal"]
  damagetype2_dict["立即击杀"] = damagetype2_dict["Instant Kill"]
  damagetype2_dict["立即击杀A杖"] = damagetype2_dict["Instant Kill aghs"]
  damagetype2_dict["立即击杀魔晶"] = damagetype2_dict["Instant Kill shard"]
  damagetype2_dict["立即击杀天赋"] = damagetype2_dict["Instant Kill tal"]
  damagetype2_dict["生命移除"] = damagetype2_dict["HP Removal"]
  damagetype2_dict["不反弹"] = damagetype2_dict["No-reflection"]
  if args['damagetype'] then
    local damagetype = damagetype_dict[args['damagetype']]
    if args['damagetype2'] then
      damagetype = damagetype .. ' ' .. damagetype2_dict[args['damagetype2']]
    end
    
    return "'''伤害类型'''<br>" .. damagetype
  end
end


return p
Advertisement