Module:AbilityTable: Difference between revisionsGive feedback
Remove CC_PROPS duplication; derive ordered prop list from debuff_prop_to_effect keys at load time (with help from vergir-bot LLM) |
Drop debuff_props_ordered; iterate debuff_prop_to_effect directly with pairs() (with help from vergir-bot LLM) |
||
| Line 282: | Line 282: | ||
-- Maps AbilityData property names to human-readable effect names for the debuff table. | -- Maps AbilityData property names to human-readable effect names for the debuff table. | ||
-- DebuffDuration is absent: it signals "(See notes)" on Duration rather than a named effect. | -- DebuffDuration is absent: it signals "(See notes)" on Duration rather than a named effect. | ||
local debuff_prop_to_effect = { | local debuff_prop_to_effect = { | ||
| Line 298: | Line 297: | ||
TimeSlowDuration = "Time Slow", | TimeSlowDuration = "Time Slow", | ||
LateCheckoutStun = "Stun", | LateCheckoutStun = "Stun", | ||
} | } | ||
| Line 327: | Line 318: | ||
local function collect_effects(obj, tier) | local function collect_effects(obj, tier) | ||
for | for prop, effect in pairs(debuff_prop_to_effect) do | ||
local val | local val = obj[prop] | ||
if val and val ~= 0 and not effects_set[effect] then | |||
if val and val ~= 0 | |||
table.insert(effects_seen, { name = effect, tier = tier }) | table.insert(effects_seen, { name = effect, tier = tier }) | ||
effects_set[effect] = true | effects_set[effect] = true | ||