80,736
edits
(Module:Luacard2) |
(Module:Luacard2) |
||
Line 275: | Line 275: | ||
end | end | ||
function get_related_cards(related_row) | function get_related_cards(cardname, related_row) | ||
local cards = {} | local cards = {} | ||
local card_names = related_row['Cards'] | local card_names = related_row['Cards'] | ||
Line 284: | Line 284: | ||
'Name,Image,Artist,Text,FlavorText,Type,Rarity,House,Traits,Power,Armor,Amber', | 'Name,Image,Artist,Text,FlavorText,Type,Rarity,House,Traits,Power,Armor,Amber', | ||
{ | { | ||
where='CardData.Name="'. | where='CardData.Name="'..cardname..'"' | ||
}) | }) | ||
return card_results[1]['Name'] | return card_results[1]['Name'] | ||
Line 306: | Line 306: | ||
map(related_set, function(item) | map(related_set, function(item) | ||
item['Text'] = item['Text']:gsub('this card', "'''"..vars.cardname_e.."'''") | item['Text'] = item['Text']:gsub('this card', "'''"..vars.cardname_e.."'''") | ||
item['Cards'] = get_related_cards(item) | item['Cards'] = get_related_cards(frame.args.cardname, item) | ||
return item | return item | ||
end) | end) |