Editing
Module
:
AbilityInteraction
Give feedback
Jump to navigation
Jump to search
Warning:
You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more
.
Log in
or
create an account
to continue receiving notifications after this account expires, and to access other features.
Anti-spam check. Do
not
fill this in!
-- To add an interaction, add a REGISTRY entry: -- aliases = other names resolving to this entry -- title = header text -- type = positive | negative | info -- iconfile = image file name, without the "File:" prefix -- link = wiki page name, or a full URL local REGISTRY = { ['ability duration'] = { aliases = { 'duration', 'duration extender' }, title = 'Ability Duration', type = 'positive', iconfile = 'Duration Extender.png', link = 'Ability Duration', }, ['ability range'] = { aliases = { 'range', 'greater expansion' }, title = 'Ability Range', type = 'positive', iconfile = 'Greater Expansion.png', link = 'Ability Range', }, ['cooldown'] = { aliases = {'ability cooldown', 'superior cooldown' }, title = 'Ability Cooldown Reduction', type = 'positive', iconfile = 'Superior Cooldown.png', link = 'Ability Cooldown', }, ['debuff resist'] = { aliases = { 'debuff reducer' }, title = 'Debuff Resist', type = 'negative', iconfile = 'Debuff Reducer.png', link = 'Debuff Resist', }, ['dispel'] = { aliases = { 'dispel magic', 'purge', 'cleanse' }, title = 'Dispel', type = 'negative', iconfile = 'Dispel Magic.png', link = 'Dispel Magic', }, ['echo shard'] = { aliases = {}, title = 'Echo Shard', type = 'positive', iconfile = 'Echo Shard.png', link = 'Echo Shard', }, ['heal'] = { aliases = {'healing', 'healing booster'}, title = 'Healing', type = 'positive', iconfile = 'Healing Booster.png', link = 'Healing', }, ['heroic aura'] = { aliases = {}, title = 'Heroic Aura', type = 'positive', iconfile = 'Heroic Aura.png', link = 'Heroic Aura', }, ['indomitable'] = { aliases = {}, title = 'Indomitable', type = 'negative', iconfile = 'Indomitable.png', link = 'Indomitable', }, ['interrupt'] = { aliases = { 'knockdown', 'stun' }, title = 'Interrupt', type = 'negative', iconfile = 'Knockdown.png', link = 'Knockdown', }, ['monster rounds'] = { aliases = {}, title = 'Monster Rounds', type = 'negative', iconfile = 'Monster Rounds.png', link = 'Monster Rounds', }, ['plated armor'] = { aliases = {}, title = 'Plated Armor', type = 'negative', iconfile = 'Plated Armor.png', link = 'Plated Armor', }, ['reactive barrier'] = { aliases = {}, title = 'Reactive Barrier', type = 'negative', iconfile = 'Reactive Barrier.png', link = 'Reactive Barrier', }, ['slowing hex'] = { aliases = {}, title = 'Slowing Hex', type = 'negative', iconfile = 'Slowing Hex.png', link = 'Slowing Hex', }, ['stealth'] = { aliases = {'Veil Walker'}, title = 'Stealth', type = 'positive', iconfile = 'Veil Walker.png', link = 'Stealth', }, ['unstoppable'] = { aliases = {}, title = 'Unstoppable', type = 'negative', iconfile = 'Unstoppable.png', link = 'Unstoppable', }, } local p = {} local getArgs = require('Module:Arguments').getArgs local index = {} for _, entry in pairs(REGISTRY) do for _, alias in ipairs(entry.aliases or {}) do index[mw.ustring.lower(mw.text.trim(alias))] = entry end end for key, entry in pairs(REGISTRY) do index[mw.ustring.lower(mw.text.trim(key))] = entry end local function err(msg) return '<strong class="error">AbilityInteraction: ' .. mw.text.nowiki(msg) .. '</strong>' end function p.box(frame) local args = getArgs(frame) local state = mw.ustring.lower(mw.text.trim(args.state or '')) local key = mw.ustring.lower(mw.text.trim(args.interaction or '')) if key == '' then return err('no interaction specified') end local entry = index[key] if entry == nil then return err('unknown interaction "' .. key .. '"') end -- A disabled box means the interaction does not apply, so it carries no -- valence; the neutral header overrides the registry type. local box_type = entry.type if state == 'disabled' then box_type = 'info' end return frame:expandTemplate{ title = 'IconBox', args = { title = entry.title, type = box_type, iconfile = entry.iconfile, link = entry.link, state = state, text = args.text or '', }, } end -- A function to be used on the Template Doc page to list all available Interactions function p.list(frame) local keys = {} for key in pairs(REGISTRY) do table.insert(keys, key) end table.sort(keys) local out = { '{| class="wikitable"', '! Interaction !! Example' } for _, key in ipairs(keys) do local entry = REGISTRY[key] local names = { '<code>' .. key .. '</code>' } for _, alias in ipairs(entry.aliases or {}) do table.insert(names, '<code>' .. alias .. '</code>') end table.insert(out, '|-') table.insert(out, '| ' .. table.concat(names, ' / ')) table.insert(out, '| ' .. frame:expandTemplate{ title = 'AbilityInteraction', args = { interaction = key, text = 'Example text.' }, }) end table.insert(out, '|}') return table.concat(out, '\n') end return p
Summary:
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Page included on this page:
Module:AbilityInteraction/doc
(
view source
)
Navigation menu
Personal tools
Create account
Log in
associated-pages
Module
Discussion
English
Views
Read
Edit source
History
Tools
Search
Discord
Discord
Navigation
Main page
About us
Random page
Special pages
Recent changes
Sandbox
1h ago
路
Gammaton32
Sandbox
1h ago
路
Gammaton32
Sandbox
1h ago
路
Gammaton32
Sandbox
1h ago
路
Gammaton32
Show more...
Interface Admin
Common CSS
Vector CSS
Minerva CSS
Citizen CSS
Brown theme CSS
Gadgets
Gadgets definition
Editing
How to edit
Style guide
All guides
New files
Unresolved feedback
Tools
What links here
Related changes
Page information