Module:AbilityInteraction: Difference between revisionsGive feedback
Use American spelling in comments per the style guide (with help from vergir-bot LLM) |
m Add several interactions. Update comments |
||
| Line 1: | Line 1: | ||
-- To add an interaction, add a REGISTRY entry: | -- To add an interaction, add a REGISTRY entry: | ||
-- aliases = other names resolving to this entry; assumed not to overlap | -- aliases = other names resolving to this entry; assumed not to overlap | ||
| Line 12: | Line 5: | ||
-- iconfile = image file name, without the File: prefix | -- iconfile = image file name, without the File: prefix | ||
-- link = wiki page name, or a full URL | -- link = wiki page name, or a full URL | ||
local REGISTRY = { | 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', | |||
}, | |||
['debuff resist'] = { | ['debuff resist'] = { | ||
aliases = { 'debuff reducer' }, | aliases = { 'debuff reducer' }, | ||
| Line 32: | Line 36: | ||
link = 'Dispel Magic', | link = 'Dispel Magic', | ||
}, | }, | ||
[' | ['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 = {}, | aliases = {}, | ||
title = ' | title = 'Monster Rounds', | ||
type = 'negative', | type = 'negative', | ||
iconfile = ' | iconfile = 'Monster Rounds.png', | ||
link = ' | link = 'Monster Rounds', | ||
}, | }, | ||
['slowing hex'] = { | ['slowing hex'] = { | ||
| Line 46: | Line 71: | ||
link = 'Slowing Hex', | link = 'Slowing Hex', | ||
}, | }, | ||
[' | ['unstoppable'] = { | ||
aliases = {}, | aliases = {}, | ||
title = ' | title = 'Unstoppable', | ||
type = 'negative', | type = 'negative', | ||
iconfile = ' | iconfile = 'Unstoppable.png', | ||
link = ' | link = 'Unstoppable', | ||
}, | }, | ||
} | } | ||
local p = {} | |||
local getArgs = require('Module:Arguments').getArgs | |||
local index = {} | local index = {} | ||
for _, entry in pairs(REGISTRY) do | for _, entry in pairs(REGISTRY) do | ||
| Line 106: | Line 132: | ||
end | end | ||
-- | -- A function to be used on the Template Doc page to list all available Interactions | ||
function p.list(frame) | function p.list(frame) | ||
local keys = {} | local keys = {} | ||