Module:AbilityTable: Difference between revisionsGive feedback
Jump to navigation
Jump to search
update props for debuff_resist (still wip, don't use) |
Replace manual_entries with exclude_list; seed debuff_resist exclusions; clean up DELETE notes (with help from vergir-bot LLM) |
||
| Line 29: | Line 29: | ||
}, | }, | ||
["debuff_resist"] = { | ["debuff_resist"] = { | ||
["Aura of Suffering"] = "T1 slow, T3 extra damage. The effect is negligible.", | |||
["Lightning Ball"] = "T2 Slow. The effect is negligible.", | |||
["Static Charge"] = "Stun duration. Delay before stun is not affected.", | |||
["Enchanter's Satchel"] = "T3 Slow.", | |||
["Scorn"] = "T3 extra damage from Mo & Krill.", | |||
["Hotel Guest"] = "Only T2 late check-out stun can be reduced.", | |||
["Jar of Dead"] = "T2 slow.", | |||
["Grapple Arm"] = "T1 extra damage from Bebop", | |||
["Binding Word"] = "Immobilize Duration. Escape time is not affected.", | |||
["Power Slash"] = "T1 slow", | |||
["Kinetic Pulse"] = "T2 bullet resist reduction and slow.", | |||
["Pain Battery"] = "T1 slow.", | |||
["Binding Word"] = "Immobilize Duration. Escape time is not affected.", | ["Power Surge"] = "T3 Spirit Resist reduction.", | ||
["Power Slash"] = "T1 slow", | ["Rain of Arrows"] = "T2 slow.", | ||
["Kinetic Pulse"] = "T2 bullet resist reduction and slow.", | ["Soul Exchange"] = "T2 silence.", | ||
["Pain Battery"] = "T1 slow.", | ["Ground Strike"] = "T2 slow.", | ||
["Power Surge"] = "T3 Spirit Resist reduction.", | ["Flog"] = "T2 Fire rate slow.", | ||
["Rain of Arrows"] = "T2 slow.", | |||
["Soul Exchange"] = "T2 silence.", | |||
["Ground Strike"] = "T2 slow.", | |||
["Flog"] = "T2 Fire rate slow." | |||
}, | }, | ||
} | } | ||
-- | -- Abilities incorrectly matched by props that should not appear in the table. | ||
-- Listed by ability name | -- Listed by ability name. | ||
local | local exclude_list = { | ||
["debuff_resist"] = { | |||
"Itani Lo Sahn", | |||
"Bookwyrm", | |||
"Slam Fire", | |||
"Splatter", | |||
}, | |||
} | |||
-- Unit strings appended to cell values by column name. | -- Unit strings appended to cell values by column name. | ||
| Line 310: | Line 313: | ||
-- _name_to_key : ability name -> ability key | -- _name_to_key : ability name -> ability key | ||
-- Both built together from HeroData + AbilityCards. | -- Both built together from HeroData + AbilityCards. | ||
-- ============================================================ | -- ============================================================ | ||
| Line 376: | Line 378: | ||
local key_lookup, name_to_key = build_lookup() | local key_lookup, name_to_key = build_lookup() | ||
local spec | local spec = extra_columns[stat] | ||
local headers | local headers = spec and spec.headers or {} | ||
local get_cells | local get_cells = spec and spec.get_cells or function() return {} end | ||
local stat_notes | local stat_notes = human_notes[stat] | ||
local | |||
-- Build excluded-name set for this stat | |||
local excluded = {} | |||
if exclude_list[stat] then | |||
for _, name in ipairs(exclude_list[stat]) do | |||
excluded[name] = true | |||
end | |||
end | |||
local abilities = GameData.get_entities(GameData.Dataset.ABILITIES, internal_keys) | local abilities = GameData.get_entities(GameData.Dataset.ABILITIES, internal_keys) | ||
-- Keep only abilities belonging to active, released heroes | -- Keep only abilities belonging to active, released heroes and not excluded | ||
local filtered = {} | local filtered = {} | ||
for _, ability in ipairs(abilities) do | for _, ability in ipairs(abilities) do | ||
local key = ability["Key"] | local key = ability["Key"] | ||
if key and key_lookup[key] then | if key and key_lookup[key] and not excluded[ability["Name"]] then | ||
table.insert(filtered, ability) | table.insert(filtered, ability) | ||
end | end | ||
end | end | ||