Module:Abilities/card: Difference between revisions

Jump to navigation Jump to search
Ignore Vindicta Assassinate's upgrade 3 description in localization files
Added support for creating abillity card with a key directly
Line 32: Line 32:


function get_hero_key(hero_name)
function get_hero_key(hero_name)
if hero_name == nil then return nil end
-- if name starts with "hero_", use it directly as the key
if string.sub(hero_name, 1, 5) == "hero_" then return hero_name end
for i, hero in pairs(data) do
for i, hero in pairs(data) do
if hero["Name"] == hero_name then
if hero["Name"] == hero_name then