Module:Abilities/card: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m created write_ability_card_from_ability_key for use from an ability page (not a hero page)
Sur (talk | contribs)
m notes_source_page_name passed to get_ability_card_from_key
Line 56: Line 56:


--from hero key*
--from hero key*
function p.get_ability_card_from_key(hero_key, ability_num, add_link, notes)
--notes parameter will eventually be removed, as notes_source_page would be sufficient or could even be determined from within this function
function p.get_ability_card_from_key(hero_key, ability_num, add_link, notes, notes_source_page)
if type(hero_key) == 'table' and hero_key.args then
if type(hero_key) == 'table' and hero_key.args then
local frame = hero_key
local frame = hero_key
Line 63: Line 64:
add_link = frame.args[3]
add_link = frame.args[3]
notes = frame.args[4]
notes = frame.args[4]
notes_source_page = frame.args[5]
end
end
Line 92: Line 94:
charge_cooldown = ability.AbilityCooldownBetweenCharge and ability.AbilityCooldownBetweenCharge.Value,
charge_cooldown = ability.AbilityCooldownBetweenCharge and ability.AbilityCooldownBetweenCharge.Value,
num_of_charges = ability.AbilityCharges and ability.AbilityCharges.Value,
num_of_charges = ability.AbilityCharges and ability.AbilityCharges.Value,
notes = notes
notes = notes,
notes_source_page = notes_source_page
}
}
}
}
Line 126: Line 129:
-- Create the ability card
-- Create the ability card
return p.get_ability_card_from_key(found_hero_key, found_ability_num, true, notes_str)
return p.get_ability_card_from_key(found_hero_key, found_ability_num, true, notes_str, notes_source_page_name)
end
end