Editing Module:AbilityHintsGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 2: | Line 2: | ||
-- Used by Template:AbilitySection. Styles are there too. | -- Used by Template:AbilitySection. Styles are there too. | ||
local CONFIG = { | local CONFIG = { | ||
{ list = "melee", file = "Melee Lifesteal.png", | { list = "melee", file = "Melee Lifesteal.png", tip = "Benefits from melee items (e.g. [[Melee Lifesteal]])" }, | ||
{ list = "dontbreakstealth", file = "Veil Walker.png", | { list = "dontbreakstealth", file = "Veil Walker.png", tip = "Casting does not break stealth from [[Veil Walker]] or [[Shadow Weave]]" }, | ||
{ list = "movementbased", file = "Slowing Hex.png", | { list = "movementbased", file = "Slowing Hex.png", tip = "Disabled by [[Slowing Hex]]" }, | ||
{ list = "debuffresist", file = "Debuff Reducer.png", | { list = "debuffresist", file = "Debuff Reducer.png", tip = "Debuff duration reduced by [[Debuff Resist]]" }, | ||
{ list = "heal", file = "Healing Booster.png", | { list = "heal", file = "Healing Booster.png", tip = "Healing amplified by [[Healing Booster]] and affected by healing reduction" }, | ||
{ list = "healingtempo", file = "Healing Tempo.png", | { list = "healingtempo", file = "Healing Tempo.png", tip = "Healing triggers [[Healing Tempo]]'s unique effect" }, | ||
{ list = "reactivebarrier", file = "Reactive Barrier.png", | { list = "reactivebarrier", file = "Reactive Barrier.png", tip = "Triggers [[Reactive Barrier]]" }, | ||
{ list = "dispelmagic", file = "Dispel Magic.png", | { list = "dispelmagic", file = "Dispel Magic.png", tip = "Effect can be [[Dispel Magic|dispelled]]" }, | ||
{ list = "indomitable", file = "Indomitable.png", | { list = "indomitable", file = "Indomitable.png", tip = "Disable prevented by [[Indomitable]]" }, | ||
{ list = "unstoppable", file = "Unstoppable.png", | { list = "unstoppable", file = "Unstoppable.png", tip = "Negative status effects suppressed by [[Unstoppable]]" }, | ||
{ list = "platedarmor", file = "Plated Armor.png", | { list = "platedarmor", file = "Plated Armor.png", tip = "On-shot effect prevented by [[Plated Armor]]" }, | ||
{ list = "summons", file = "Monster Rounds.png", | { list = "summons", file = "Monster Rounds.png", tip = "Summons affected by [[Monster Rounds]] and [[Heroic Aura]]" }, | ||
} | } | ||
local AbilityTable = require("Module:AbilityTable") | local AbilityTable = require("Module:AbilityTable") | ||
local resource_lookup = mw.loadJsonData("Data:ResourceLookup.json") | local resource_lookup = mw.loadJsonData("Data:ResourceLookup.json") | ||
local item_data = mw.loadJsonData("Data:ItemData.json") | local item_data = mw.loadJsonData("Data:ItemData.json") | ||
| Line 76: | Line 62: | ||
local function hint_icon(def) | local function hint_icon(def) | ||
return '<span class="ability-hint">' .. icon_img(def.file) | return '<span class="ability-hint">' .. icon_img(def.file) | ||
.. '<span class="ability-hint-tip">' .. | .. '<span class="ability-hint-tip">' .. def.tip .. '</span></span>' | ||
end | end | ||
local function manual_icon(m) | local function manual_icon(m) | ||
local cls = 'ability-hint' | local cls = 'ability-hint' | ||
local | local verb = 'Interacts with' | ||
local partial = false | local partial = false | ||
if m.state == 'disabled' then | if m.state == 'disabled' then | ||
cls = cls .. ' ability-hint--disabled' | cls = cls .. ' ability-hint--disabled' | ||
verb = 'Does not interact with' | |||
elseif m.state == 'partial' then | elseif m.state == 'partial' then | ||
verb = 'Interacts partially with' | |||
partial = true | partial = true | ||
end | end | ||
return '<span class="' .. cls .. '">' .. icon_img(m.file, '#' .. m.anchor, partial) | return '<span class="' .. cls .. '">' .. icon_img(m.file, '#' .. m.anchor, partial) | ||
.. '<span class="ability-hint-tip">' .. | .. '<span class="ability-hint-tip">' .. verb .. ' ' .. m.title .. '.<br>Click to reveal more info.</span></span>' | ||
end | end | ||