Module:AbilityHints: Difference between revisionsGive feedback
Replace the reactive/indomitable split icon with a grouped single icon whose image and tooltip depend on which of the two lists match (with help from vergir-bot LLM) |
Revert groups/combinations: reactivebarrier and indomitable are plain separate icons again (with help from vergir-bot LLM) |
||
| Line 10: | Line 10: | ||
local p = {} | local p = {} | ||
-- Display order. Each entry | -- Display order. Each entry: { list = "...", item = "...", tip = "..." } | ||
-- The icon is shown when the ability is a member of `list`. | |||
local CONFIG = { | local CONFIG = { | ||
{ list = "melee", item = "Melee Lifesteal", tip = "Benefits from melee items" }, | { list = "melee", item = "Melee Lifesteal", tip = "Benefits from melee items" }, | ||
| Line 18: | Line 17: | ||
{ list = "debuffresist", item = "Debuff Reducer", tip = "Duration reduced by Debuff Resist" }, | { list = "debuffresist", item = "Debuff Reducer", tip = "Duration reduced by Debuff Resist" }, | ||
{ list = "heal", item = "Healing Booster", tip = "Healing amplified by Healing Booster and affected by healing reduction" }, | { list = "heal", item = "Healing Booster", tip = "Healing amplified by Healing Booster and affected by healing reduction" }, | ||
{ | { list = "reactivebarrier", item = "Reactive Barrier", tip = "Triggers Reactive Barrier" }, | ||
{ list = "dispelmagic", item = "Dispel Magic", tip = "Effect can be dispelled" }, | { list = "dispelmagic", item = "Dispel Magic", tip = "Effect can be dispelled" }, | ||
{ list = "indomitable", item = "Indomitable", tip = "Effect blocked by Indomitable" }, | |||
{ list = "unstoppable", item = "Unstoppable", tip = "Disable prevented by Unstoppable" }, | { list = "unstoppable", item = "Unstoppable", tip = "Disable prevented by Unstoppable" }, | ||
{ list = "platedarmor", item = "Plated Armor", tip = "On-shot effect prevented by Plated Armor" }, | { list = "platedarmor", item = "Plated Armor", tip = "On-shot effect prevented by Plated Armor" }, | ||
} | } | ||
| Line 57: | Line 45: | ||
if record == nil then return '' end | if record == nil then return '' end | ||
local num = tonumber(ability_num) | local num = tonumber(ability_num) | ||
local icons = {} | local icons = {} | ||
for _, def in ipairs(CONFIG) do | for _, def in ipairs(CONFIG) do | ||
if | if AbilityTable.is_member(def.list, record, num) then | ||
table.insert(icons, hint_icon(def.item, def.tip)) | table.insert(icons, hint_icon(def.item, def.tip)) | ||
end | end | ||