FANDOM


local vg_table = {}
----------------------------
-- Libraries of functions --
----------------------------
-- stands for High Frequency
local HF = require('Module:HF')
-- Parses invocation and template parameters, trims whitespace, and removes blanks.
--local getArgs = require('Dev:Arguments').getArgs
 
---------------------------------------------------------
-- Internal functions (used in this and other Modules) --
---------------------------------------------------------
function vg_table._table (args)
    -- Template parameters, passed from .
    local t = args
    -- SMW plaintext property-set output table
    local SO = {}
 
    vid = t['vid'] or ''
    image = t['image'] or ''
 
    local list_table = mw.html.create('table')
    :addClass('wikitable'):addClass('sortable')
    :css('width', '100%'):css('text-align', 'center'):css('font-size', 'smaller')
    :tag('tr')
    :tag('th'):attr('scope','col'):wikitext('Video game'):done()
    :tag('th'):attr('scope','col'):css('min-width','5.5em'):wikitext('Date'):done()
    :tag('th'):attr('scope','col'):wikitext('#'):done()
    :tag('th'):attr('scope','col'):wikitext('Name'):done()
    :tag('th'):attr('scope','col'):wikitext('[[Deck Cost|Cost]]'):done()
    :tag('th'):attr('scope','col'):wikitext('[[Alignment]]'):done()
    :tag('th'):attr('scope','col'):wikitext('[[ATK]]'):done()
    :tag('th'):attr('scope','col'):wikitext('[[DEF]]'):done()
    :tag('th'):attr('scope','col'):wikitext('[[Status]]'):done()
    :done()
 
    dm1_number = t['dm1_number']
    if dm1_number or vid:lower():match('duel monsters 1') or vid:lower():match('duel monsters (') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Monsters (video game)|Duel Monsters]]''"):done()
        :tag('td'):attr('title', 'December 16, 1998'):wikitext('1998-12-16'):done()
        :tag('td'):wikitext(
            HF.Link('List of Yu-Gi-Oh! Duel Monsters cards', dm1_number)
            ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done() 
        vg_dm1 = true
        mw.smw.set{
            'DM1 number='..dm1_number,
            'Medium=DM1'
        }
    end
 
    dm2_number = dm1_number or t['dm2_number']
    if dm2_number or vid:lower():match('duel monsters 2') or vid:lower():match('duel monsters ii:') or vg_dm1 then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Monsters II: Dark duel Stories|Duel Monsters II: Dark duel Stories]]''"):done()
        :tag('td'):attr('title', 'July 8, 1999'):wikitext('1999-07-08'):done()
        :tag('td'):wikitext(
            HF.Link('List of Yu-Gi-Oh! Duel Monsters II: Dark duel Stories cards', dm2_number)
            ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dm2 = true
        mw.smw.set{
            'DM2 number='..dm2_number,
            'Medium=DM2'
        }
    end
 
    if vid:lower():match('monster capsule gb') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Monster Capsule GB|Monster Capsule GB]]''"):done()
        :tag('td'):attr('title', 'April 13, 2000'):wikitext('2000-04-13'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_mcgb = true
        mw.smw.set{ 'Medium=MCGB' }
    end
 
    dds_number = dm2_number or t['ddsnumber']
    if dds_number or t['dds_lore'] or t['dds_name'] or t['dds_dc'] or t['dds_alignment'] or t['dds_atk'] or t['dds_def'] or vid:lower():match('yu-gi-oh! dark duel stories') or vid:lower():match('tri-holy god advent') or image:lower():match('DDS-EN-VG') then 
        dds_name = t['dds_name']
        dds_alignment = t['dds_alignment']
        dds_dc = t['dds_dc']
        dds_atk = t['dds_atk']
        dds_def = t['dds_def']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("[[Yu-Gi-Oh! Dark Duel Stories|''Duel Monsters III: Tri-Holy God Advent'' / ''Dark Duel Stories'']]"):done()
        :tag('td'):attr('title', 'July 13, 2000'):wikitext('2000-07-13'):done()
        :tag('td'):wikitext(
            HF.Link('List of Yu-Gi-Oh! Dark Duel Stories cards', (dds_number or '–'))
            ):done()
        :tag('td'):wikitext( dds_name or '' ):done()
        :tag('td'):wikitext( dds_dc or '???' ):done()
        :tag('td'):wikitext( 
                dds_alignment
                    and HF.Link(dds_alignment..' (Alignment)', dds_alignment)
                    or '???'
                ):done()
        :tag('td'):wikitext( dds_atk or '???' ):done()
        :tag('td'):wikitext( dds_def or '???' ):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dds = true
        mw.smw.set{
            'Medium=DM3', 'Medium=DDS',
        }
        if dds_number then mw.smw.set{
            'DM3 number='..dds_number, 'DDS number='..dds_number
        } end
        if dds_name then mw.smw.set{
            'English alternate names='..dds_name,
            'DDS name='..dds_name,
        } end
        if dds_dc then mw.smw.set{ 'DDS Deck Cost='..dds_dc } end
        if dds_alignment then mw.smw.set{ 'DDS Alignment='..dds_alignment } end
        if dds_atk then mw.smw.set{ 'DDS ATK='..dds_atk } end
        if dds_def then mw.smw.set{ 'DDS DEF='..dds_def } end
    end
 
    dm4_number = dds_number or t['dm4_number']
    if dm4_number or vid:lower():match('battle of great duelist') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Monsters 4: Battle of Great Duelist|Duel Monsters 4: Battle of Great Duelist]]''"):done()
        :tag('td'):attr('title', 'December 7, 2000'):wikitext('2000-12-07'):done()
        :tag('td'):wikitext(
            HF.Link('List of Yu-Gi-Oh! Duel Monsters 4: Battle of Great Duelist cards', dm4_number)
            ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dm4 = true
        mw.smw.set{
            'DM4 number='..dm4_number,
            'Medium=DM4'
        }
        end
 
    if vid:lower():match('expert 1') or vid:lower():match('ex 1') or vid:lower():match('expert 1%|') or vid:lower():match('ex 1%|') or vid:lower():match('expert 1%]%]') or vid:lower():match('ex 1%]%]') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Monsters 5 Expert 1|Duel Monsters 5 Expert 1]]''"):done()
        :tag('td'):attr('title', 'July 5, 2001'):wikitext('2001-07-05'):done()
        :tag('td'):wikitext('[[List of Yu-Gi-Oh! Duel Monsters 5 Expert 1 cards|–]]'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dm5 = true
        mw.smw.set{ 'Medium=DM5' }
    end
 
    if vid:lower():match('expert 2') or vid:lower():match('ex 2') or vid:lower():match('expert ii') or vid:lower():match('ex ii') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Monsters 6 Expert 2|Duel Monsters 6 Expert 2]]''"):done()
        :tag('td'):attr('title', 'December 20, 2001'):wikitext('2001-12-20'):done()
        :tag('td'):wikitext('[[List of Yu-Gi-Oh! Duel Monsters 6 Expert 2 cards|–]]'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dm6 = true
        mw.smw.set{ 'Medium=DM6' }
    end
 
    if t['tsc_lore'] or t['tsc_name'] or t['tsc_sets'] or t['tsc_status'] or t['tsc_dc'] or t['tsc_number'] or t['tsc_number2'] or t['tsc_card'] or t['tsc_alignment'] or t['tsc_atk'] or t['tsc_def'] or vid:lower():match('the sacred cards') or vid:lower():match('duelcity') or vid:lower():match('duel city') then 
        local tsc_number = t['tsc_number']
        local tsc_number2 = t['tsc_number2']
        local tsc_name = t['tsc_name']
        local tsc_alignment = t['tsc_alignment']
        local tsc_atk = t['tsc_atk']
        local tsc_def = t['tsc_def']
        local tsc_status = t['tsc_status']
        local tsc_dc = t['tsc_dc']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("[[Yu-Gi-Oh! The Sacred Cards|''Duel Monsters 7: The Duelcity Legend'' / ''The Sacred Cards'']]"):done()
        :tag('td'):attr('title', 'July 4, 2002'):wikitext('2002-07-04'):done()
        :tag('td'):wikitext(
            HF.Link('List of Yu-Gi-Oh! The Sacred Cards cards', tsc_number or '???' )..
            (tsc_number2 
                and '<br/> ' .. tsc_number2
                or '')
            ):done()
        :tag('td'):wikitext( tsc_name or '' ):done()
        :tag('td'):wikitext( tsc_dc or '???'  ):done()
        :tag('td'):wikitext(
            tsc_alignment 
                and HF.Link( tsc_alignment..' (Alignment)', tsc_alignment )
                or '???'
            ):done()
        :tag('td'):wikitext( tsc_atk and tsc_atk or '???' ):done()
        :tag('td'):wikitext( tsc_def and tsc_def or '???' ):done()
        :tag('td'):wikitext( HF.Link( tsc_status or 'Unlimited' ) ):done()
        :done()
        vg_tsc = true
        mw.smw.set{
            'Medium=DM7', 'Medium=TSC',
            'TSC Status='..(tsc_status or 'Unlimited')
        }
        if tsc_number then mw.smw.set{ 'TSC number='..tsc_number } end
        if tsc_number2 then mw.smw.set{ 'TSC number='..tsc_number } end
        if tsc_name then mw.smw.set{
            'English alternate names='..tsc_name,
            'TSC name='..tsc_name,
        } end
        if tsc_dc then mw.smw.set{ 'TSC Deck Cost='..tsc_dc } end
        if tsc_alignment then mw.smw.set{ 'TSC Alignment='..tsc_alignment } end
        if tsc_atk then mw.smw.set{ 'TSC ATK='..tsc_atk } end
        if tsc_def then mw.smw.set{ 'TSC DEF='..tsc_def } end
    end
 
    if t['eds_lore'] or t['eds_name'] or t['eds_sets'] or t['eds_status'] or vid:lower():match('eternal duelist soul') or vid:lower():match('eternal duelists soul') or vid:lower():match('eternal duelist\'s soul') then 
        local eds_name = t['eds_name']
        local eds_status = t['eds_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! The Eternal Duelist Soul|The Eternal Duelist Soul]]''"):done()
        :tag('td'):attr('title', 'October 15, 2002'):wikitext('2002-10-15'):done()
        :tag('td'):wikitext('[[List of Yu-Gi-Oh! The Eternal Duelist Soul cards|–]]'):done()
        :tag('td'):wikitext( eds_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( eds_status or 'Unlimited') ):done()
        :done()
        vg_eds = true
        mw.smw.set{ 
            'Medium=EDS',
            'EDS Status='..(eds_status or 'Unlimited')
        }
        if eds_name then mw.smw.set{
            'English alternate names='..eds_name,
            'EDS name='..eds_name,
        } end
    end
 
    if t['tfk_status'] or t['tfk_number'] or vid:lower():match('falsebound kingdom') then
        local tfk_number = t['tfk_number']
        local tfk_status = t['tfk_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! The Falsebound Kingdom|The Falsebound Kingdom]]''"):done()
        :tag('td'):attr('title', 'December 5, 2002'):wikitext('2002-12-05'):done()
        :tag('td'):wikitext( HF.Link('List of Yu-Gi-Oh! The Falsebound Kingdom cards', tfk_number or '???') ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link(tfk_status or 'Unlimited') ):done()
        :done()
        vg_tfk = true
        mw.smw.set{ 
            'Medium=TFK',
            'TFK Status='..(tfk_status or 'Unlimited')
        }
        if tfk_number then mw.smw.set{ 'TFK number='..tfk_number } end
    end
 
    if t['rod_lore'] or t['rod_name'] or t['rod_sets'] or t['rod_status'] or t['rod_dc'] or t['rod_number'] or t['rod_card'] or t['rod_alignment'] or t['rod_atk'] or t['rod_def'] or vid:lower():match('reshef') or image:lower():match('ROD-EN-VG') or image:lower():match('ROD-JP-VG') then 
        local rod_number = t['rod_number']
        local rod_name = t['rod_name']
        local rod_dc = t['rod_dc']
        local rod_alignment = t['rod_alignment']
        local rod_atk = t['rod_atk']
        local rod_def = t['rod_def']
        local rod_status = t['rod_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("[[Yu-Gi-Oh! Reshef of Destruction|''Duel Monsters 8: Reshef of Destruction'' / ''Reshef of Destruction'']]"):done()
        :tag('td'):attr('title', 'March 20, 2003'):wikitext('2003-03-20'):done()
        :tag('td'):wikitext(
            HF.Link('List of Yu-Gi-Oh! Reshef of Destruction cards', rod_number or '???')
            ):done()
        :tag('td'):wikitext( rod_name or '' ):done()
        :tag('td'):wikitext( rod_dc or '???' ):done()
        :tag('td'):wikitext(
            rod_alignment 
                and HF.Link(rod_alignment..' (Alignment)', rod_alignment)
                or '???'
            ):done()
        :tag('td'):wikitext( rod_atk or '???' ):done()
        :tag('td'):wikitext( rod_def or '???' ):done()
        :tag('td'):wikitext( HF.Link( rod_status or 'Unlimited' ) ):done()
        :done()
        vg_rod = true
		mw.smw.set{ 
		    'Medium=DM8', 'Medium=ROD',
	        'ROD Status='..(rod_status or 'Unlimited')
	    }
        if rod_number then mw.smw.set{
            'DM8 number='..rod_number,
            'ROD number='..rod_number
        } end
        if rod_name then mw.smw.set{
            'English alternate names='..rod_name,
            'ROD name='..rod_name,
        } end
        if rod_dc then mw.smw.set{ 'ROD Deck Cost='..rod_dc } end
        if rod_alignment then mw.smw.set{ 'ROD Alignment='..rod_alignment } end
        if rod_atk then mw.smw.set{ 'ROD ATK='..rod_atk } end
        if rod_def then mw.smw.set{ 'ROD DEF='..rod_def } end
    end
 
    if t['sdd_lore'] or t['sdd_name'] or t['sdd_sets'] or t['sdd_status'] or vid:lower():match('stairway to the destined duel') then 
        local sdd_name = t['sdd_name']
        local sdd_status = t['sdd_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Worldwide Edition: Stairway to the Destined Duel|Worldwide Edition: Stairway to the Destined Duel]]''"):done()
        :tag('td'):attr('title', 'April 15, 2003'):wikitext('2003-04-15'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( sdd_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( sdd_status or 'Unlimited' ) ):done()
        :done()
        vg_sdd = true
        mw.smw.set{ 
            'Medium=SDD',
	        'SDD Status='..(sdd_status or 'Unlimited')
        }
        if sdd_name then mw.smw.set{
            'English alternate names='..sdd_name,
            'SDD name='..sdd_name,
        } end
    end
 
    if t['pcy_status'] or vid:lower():match('yugi the destiny') then 
        local pcy_status = t['pcy_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Power of Chaos: Yugi the Destiny|Power of Chaos: Yugi the Destiny]]''"):done()
        :tag('td'):attr('title', 'November 18, 2003'):wikitext('2003-11-18'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext(
            pcy_status
                and HF.Link( pcy_status )
                or 'Present'
        ):done()
        :done()
        vg_pcy = true
        mw.smw.set{ 'Medium=PCY' }
        if pcy_status then mw.smw.set{ 'PCY Status='..pcy_status } end
    end
 
    if t['wc4_lore'] or t['wc4_name'] or t['wc4_sets'] or t['wc4_status'] or t['wc4_number'] or vid:lower():match('2004') then 
        local wc4_number = t['wc4_number']
        local wc4_name = t['wc4_name']
        local wc4_status = t['wc4_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! World Championship Tournament 2004|World Championship Tournament 2004]]''"):done()
        :tag('td'):attr('title', 'February 5, 2004'):wikitext('2004-02-05'):done()
        :tag('td'):wikitext( 
            HF.Link( 'List of Yu-Gi-Oh! World Championship Tournament 2004 cards', (wc4_number or '???') )
            ):done()
        :tag('td'):wikitext( wc4_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( wc4_status or 'Unlimited' ) ):done()
        :done()
        vg_wc4 = true
        mw.smw.set{ 
            'Medium=WC4',
	        'WC4 Status='..(wc4_status or 'Unlimited')
        }
        if wc4_number then mw.smw.set{ 'WC4 number='..wc4_number } end
        if wc4_name then mw.smw.set{
            'English alternate names='..wc4_name,
            'WC4 name='..wc4_name,
        } end
    end
 
    if t['dod_status'] or t['dod_number'] or vid:lower():match('dawn of destiny') then 
        local dod_number = t['dod_number']
        local dod_status = t['dod_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! The Dawn of Destiny|The Dawn of Destiny]]''"):done()
        :tag('td'):attr('title', 'March 23, 2004'):wikitext('2004-03-23'):done()
        :tag('td'):wikitext(
            HF.Link( 'List of Yu-Gi-Oh! The Dawn of Destiny cards' , (dod_number or '???') )
            ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( dod_status or 'Unlimited' ) ):done()
        :done()
        vg_dod = true
        mw.smw.set{ 
            'Medium=DOD',
            'DOD Status='..(dod_status or 'Unlimited')
        }
        if dod_number then mw.smw.set{ 'DOD number='..dod_number } end
    end
 
    if t['pck_status'] or vid:lower():match('kaiba the revenge') then 
        local pck_status = t['pck_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Power of Chaos: Kaiba the Revenge|Power of Chaos: Kaiba the Revenge]]''"):done()
        :tag('td'):attr('title', 'April 6, 2004'):wikitext('2004-04-06'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext(
            pck_status 
                and HF.Link(pck_status)
                or 'Present'
            ):done()
        :done()
        vg_pck = true
        mw.smw.set{ 'Medium=PCK' }
        if pck_status then mw.smw.set{ 'PCK Status='..pck_status } end
    end
 
    if t['pcj_status'] or vid:lower():match('joey the passion') then 
        local pcj_status = t['pcj_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Power of Chaos: Joey the Passion|Power of Chaos: Joey the Passion]]''"):done()
        :tag('td'):attr('title', 'July 2, 2004'):wikitext('2004-07-02'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext(
            pcj_status
                and HF.Link(pcj_status)
                or 'Present'
            ):done()
        :done()
        vg_pcj = true
        mw.smw.set{ 'Medium=PCJ' }
        if pcj_status then mw.smw.set{ 'PCJ Status='..pcj_status } end
    end
 
    if vid:lower():match('coliseum') or vid:lower():match('colosseum') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Capsule Monster Coliseum|Capsule Monster Coliseum]]''"):done()
        :tag('td'):attr('title', 'July 29, 2004'):wikitext('2004-07-29'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_cmc = true
        mw.smw.set{ 'Medium=CMC' }
    end
 
    if t['wc5_lore'] or t['wc5_name'] or t['wc5_sets'] or t['wc5_status'] or vid:lower():match('2005') then 
        local wc5_number = t['wc5_number']
        local wc5_name = t['wc5_name']
        local wc5_status = t['wc5_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 7 Trials to Glory: World Championship Tournament 2005|7 Trials to Glory: World Championship Tournament 2005]]''"):done()
        :tag('td'):attr('title', 'December 30, 2004'):wikitext('2004-12-30'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( wc5_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( wc5_status or 'Unlimited' ) ):done()
        :done()
        vg_wc5 = true
        mw.smw.set{ 
            'Medium=WC5',
            'WC5 Status='..(wc5_status or 'Unlimited')
        }
        if wc5_name then mw.smw.set{
            'English alternate names='..wc5_name,
            'WC5 name='..wc5_name,
        } end
    end
 
    if t['ntr_lore'] or t['ntr_name'] or t['ntr_sets'] or t['ntr_status'] or t['ntr_dp'] or vid:lower():match('nightmare troubadour') then 
        local ntr_dp = t['ntr_dp']
        local ntr_name = t['ntr_name']
        local ntr_status = t['ntr_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Nightmare Troubadour|Nightmare Troubadour]]''"):done()
        :tag('td'):attr('title', 'July 21, 2005'):wikitext('2005-07-21'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( ntr_name or '' ):done()
        :tag('td'):wikitext( ntr_dp  or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( ntr_status or 'Unlimited' ) ):done()
        :done()
        vg_ntr = true
        mw.smw.set{ 
            'Medium=NTR',
            'NTR Status='..(ntr_status or 'Unlimited')
        }
        if ntr_name then mw.smw.set{
            'English alternate names='..ntr_name,
            'NTR name='..ntr_name,
        } end
        if ntr_dp then mw.smw.set{ 'NTR DP Cost='..ntr_dp } end
    end
 
    if t['ygo_lore'] or t['ygo_name'] or t['ygo_sets'] or t['ygo_status'] or vid:lower():match('online') then 
        local ygo_name = t['ygo_name']
        local ygo_status = t['ygo_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Online|Online]]''"):done()
        :tag('td'):attr('title', 'November 4, 2005'):wikitext('2005-11-04'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( ygo_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( ygo_status or 'Unlimited') ):done()
        :done()
        vg_ygo = true
        mw.smw.set{ 
            'Medium=YGO',
            'YGOO Status='..(ygo_status or 'Unlimited')
        }
        if ygo_name then mw.smw.set{
            'English alternate names='..ygo_name,
            'YGOO name='..ygo_name,
        } end
    end
 
    if t['gx1_lore'] or t['gx1_name'] or t['gx1_sets'] or t['gx1_status'] or t['gx1_dp'] or t['gx1_number'] or vid:lower():match('duel academy') or image:lower():match('GX1-JP-VG') or image:lower():match('GX1-EN-VG') then 
        local gx1_dp = t['gx1_dp']
        local gx1_name = t['gx1_name']
        local gx1_number = t['gx1_number']
        local gx1_status = t['gx1_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! GX Duel Academy|GX Duel Academy]]''"):done()
        :tag('td'):attr('title', 'November 13, 2005'):wikitext('2005-11-13'):done()
        :tag('td'):wikitext(
            HF.Link( 'List of Yu-Gi-Oh! GX Duel Academy cards', gx1_number or '???' )
            ):done()
        :tag('td'):wikitext( gx1_name or '' ):done()
        :tag('td'):wikitext( gx1_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( gx1_status or 'Unlimited' ) ):done()
        :done()
        vg_gx1 = true
        mw.smw.set{ 
            'Medium=GX1',
            'GX1 Status='..(gx1_status or 'Unlimited')
        }
        if gx1_name then mw.smw.set{
            'English alternate names='..gx1_name,
            'GX1 name='..gx1_name,
        } end
        if gx1_number then mw.smw.set{ 'GX1 number='..gx1_number } end
        if gx1_dp then mw.smw.set{ 'GX1 DP Cost='..gx1_dp } end
    end
 
    if t['wc6_lore'] or t['wc6_name'] or t['wc6_sets'] or t['wc6_status'] or t['wc6_dp'] or vid:lower():match('2006') then 
        local wc6_dp = t['wc6_dp']
        local wc6_name = t['wc6_name']
        local wc6_status = t['wc6_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Ultimate Masters: World Championship Tournament 2006|Ultimate Masters: World Championship Tournament 2006]]''"):done()
        :tag('td'):attr('title', 'February 23, 2006'):wikitext('2006-02-23'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( wc6_name or '' ):done()
        :tag('td'):wikitext( wc6_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( wc6_status or 'Unlimited' ) ):done()
        :done()
        vg_wc6 = true
        mw.smw.set{ 
            'Medium=WC6',
            'WC6 Status='..(wc6_status or 'Unlimited')
        }
        if wc6_name then mw.smw.set{
            'English alternate names='..wc6_name,
            'WC6 name='..wc6_name,
        } end
        if wc6_dp then mw.smw.set{ 'WC6 DP Cost='..wc6_dp } end
    end
 
    if t['gx02_lore'] or t['gx02_name'] or t['gx02_sets'] or t['gx02_status'] or t['gx02_dp'] or vid:lower():match('tag force%]%]') or image:lower():match('GX02-JP-VG') or image:lower():match('GX02-EN-VG') or image:lower():match('TF01-JP-VG') or image:lower():match('TF01-EN-VG') then 
        local gx02_dp = t['gx02_dp']
        local gx02_name = t['gx02_name']
        local gx02_status = t['gx02_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! GX Tag Force|GX Tag Force]]''"):done()
        :tag('td'):attr('title', 'September 14, 2006'):wikitext('2006-09-14'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( gx02_name or '' ):done()
        :tag('td'):wikitext( gx02_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( gx02_status or 'Unlimited' ) ):done()
        :done()
        vg_gx02 = true
        mw.smw.set{ 
            'Medium=GX02',
            'GX02 Status='..(gx02_status or 'Unlimited')
        }
        if gx02_name then mw.smw.set{
            'English alternate names='..gx02_name,
            'GX02 name='..gx02_name,
        } end
        if gx02_dp then mw.smw.set{ 'GX02 DP Cost='..gx02_dp } end
    end
 
    if t['gx03_lore'] or t['gx03_name'] or t['gx03_sets'] or t['gx03_status'] or t['gx03_dp'] or vid:lower():match('spirit caller') or image:lower():match('GX03-JP-VG') or image:lower():match('GX03-EN-VG') then 
        local gx03_dp = t['gx03_dp']
        local gx03_name = t['gx03_name']
        local gx03_status = t['gx03_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! GX Spirit Caller|GX Spirit Caller]]''"):done()
        :tag('td'):attr('title', 'November 30, 2006'):wikitext('2006-11-30'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( gx03_name or '' ):done()
        :tag('td'):wikitext( gx03_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( gx03_status or 'Unlimited' ) ):done()
        :done()
        vg_gx03 = true
        mw.smw.set{ 
            'Medium=GX03',
            'GX03 Status='..(gx03_status or 'Unlimited')
        }
        if gx03_name then mw.smw.set{
            'English alternate names='..gx03_name,
            'GX03 name='..gx03_name,
        } end
        if gx03_dp then mw.smw.set{ 'GX03 DP Cost='..gx03_dp } end
    end
 
    if t['wc07_lore'] or t['wc07_name'] or t['wc07_sets'] or t['wc07_status'] or t['wc07_dp'] or vid:lower():match('2007') then 
        local wc07_dp = t['wc07_dp']
        local wc07_name = t['wc07_name']
        local wc07_status = t['wc07_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! World Championship 2007|World Championship 2007]]''"):done()
        :tag('td'):attr('title', 'March 15, 2007'):wikitext('2007-03-15'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( wc07_name or '' ):done()
        :tag('td'):wikitext( wc07_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( (wc07_status or 'Unlimited') ) ):done()
        :done()
        vg_wc07 = true
        mw.smw.set{ 
            'Medium=WC07',
            'WC07 Status='..(wc07_status or 'Unlimited')
        }
        if wc07_name then mw.smw.set{
            'English alternate names='..wc07_name,
            'WC07 name='..wc07_name,
        } end
        if wc07_dp then mw.smw.set{ 'WC07 DP Cost='..wc07_dp } end
    end
 
    if t['gx04_lore'] or t['gx04_name'] or t['gx04_sets'] or t['gx04_status'] or t['gx04_dp'] or vid:lower():match('tag force 2') or image:lower():match('GX04-JP-VG') or image:lower():match('GX04-EN-VG') or image:lower():match('TF02-JP-VG') or image:lower():match('TF02-EN-VG') then 
        local gx04_dp = t['gx04_dp']
        local gx04_name = t['gx04_name']
        local gx04_status = t['gx04_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! GX Tag Force 2|GX Tag Force 2]]''"):done()
        :tag('td'):attr('title', 'September 18, 2007'):wikitext('2007-09-18'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( gx04_name or '' ):done()
        :tag('td'):wikitext( gx04_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( gx04_status or 'Unlimited' ) ):done()
        :done()
        vg_gx04 = true
        mw.smw.set{ 
            'Medium=GX04',
            'GX04 Status='..(gx04_status or 'Unlimited')
        }
        if gx04_name then mw.smw.set{
            'English alternate names='..gx04_name,
            'GX04 name='..gx04_name,
        } end
        if gx04_dp then mw.smw.set{ 'GX04 DP Cost='..gx04_dp } end
    end
 
    if t['wc08_lore'] or t['wc08_name'] or t['wc08_sets'] or t['wc08_status'] or t['wc08_dp'] or vid:lower():match('2011') then 
        local wc08_dp = t['wc08_dp']
        local wc08_name = t['wc08_name']
        local wc08_status = t['wc08_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! World Championship 2008|World Championship 2008]]''"):done()
        :tag('td'):attr('title', 'November 29, 2007'):wikitext('2007-11-29'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( wc08_name or '' ):done()
        :tag('td'):wikitext( wc08_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( wc08_status or 'Unlimited' ) ):done()
        :done()
        vg_wc08 = true
        mw.smw.set{ 
            'Medium=WC08',
            'WC08 Status='..(wc08_status or 'Unlimited')
        }
        if wc08_name then mw.smw.set{
            'English alternate names='..wc08_name,
            'WC08 name='..wc08_name,
        } end
        if wc08_dp then mw.smw.set{ 'WC08 DP Cost='..wc08_dp } end
    end
 
    if t['gx05_lore'] or t['gx05_name'] or t['gx05_sets'] or t['gx05_status'] or t['gx05_dp'] or vid:lower():match('tag force evolution') or image:lower():match('GX05-JP-VG') or image:lower():match('GX05-EN-VG') then 
        local gx05_dp = t['gx05_dp']
        local gx05_name = t['gx05_name']
        local gx05_status = t['gx05_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! GX Tag Force Evolution|GX Tag Force Evolution]]''"):done()
        :tag('td'):attr('title', 'December 6, 2007'):wikitext('2007-12-06'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( gx05_name or '' ):done()
        :tag('td'):wikitext( gx05_dp or '???' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( gx05_status or 'Unlimited' ) ):done()
        :done()
        vg_gx05 = true
        mw.smw.set{ 
            'Medium=GX05',
            'GX05 Status='..(gx05_status or 'Unlimited')
        }
        if gx05_name then mw.smw.set{
            'English alternate names='..gx05_name,
            'GX05 name='..gx05_name,
        } end
        if gx05_dp then mw.smw.set{ 'GX05 DP Cost='..gx05_dp } end
    end
 
    if vid:lower():match('terminal') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Duel Terminal]]''"):done()
        :tag('td'):attr('title', 'April 12, 2008'):wikitext('2008-04-12'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dt = true
        mw.smw.set{ 'Medium=DT' }
    end
 
    if t['gx06_lore'] or t['gx06_name'] or t['gx06_sets'] or t['gx06_status'] or vid:lower():match('tag force 3') or image:lower():match('GX06-JP-VG') or image:lower():match('GX06-EN-VG') or image:lower():match('TF03-JP-VG') or image:lower():match('TF03-EN-VG') then 
        local gx06_name = t['gx06_name']
        local gx06_status = t['gx06_status']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! GX Tag Force 3|GX Tag Force 3]]''"):done()
        :tag('td'):attr('title', 'November 27, 2008'):wikitext('2008-11-27'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( gx06_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( HF.Link( (gx06_status or 'Unlimited') ) ):done()
        :done()
        vg_gx06 = true
        mw.smw.set{ 
            'Medium=GX06',
            'GX06 Status='..(gx06_status or 'Unlimited')
        }
        if gx06_name then mw.smw.set{
            'English alternate names='..gx06_name,
            'GX06 name='..gx06_name,
        } end
    end
 
    if t['wc09_lore'] or t['wc09_name'] or t['wc09_sets'] or vid:lower():match('2009') or vid:lower():match('stardust accelerator')or image:lower():match('WC09-JP-VG') or image:lower():match('WC09-EN-VG') then 
        local wc09_name = t['wc09_name']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's World Championship 2009: Stardust Accelerator|5D's World Championship 2009: Stardust Accelerator]]''"):done()
        :tag('td'):attr('title', 'March 26, 2009'):wikitext('2009-03-26'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( wc09_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_wc09 = true
        mw.smw.set{ 'Medium=WC09' }
        if wc09_name then mw.smw.set{
            'English alternate names='..wc09_name,
            'WC09 name='..wc09_name,
        } end
    end
 
    if vid:lower():match('wheelie') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's Wheelie Breakers|5D's Wheelie Breakers]]''"):done()
        :tag('td'):attr('title', 'March 26, 2009'):wikitext('2009-03-26'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_wb01 = true
        mw.smw.set{ 'Medium=WB01' }
    end
 
    if t['tf04_lore'] or t['tf04_name'] or t['tf04_sets'] or vid:lower():match('tag force 4') or image:lower():match('TF04-JP-VG') or image:lower():match('TF04-EN-VG') then 
        local tf04_name = t['tf04_name']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's Tag Force 4|5D's Tag Force 4]]''"):done()
        :tag('td'):attr('title', 'September 17, 2009'):wikitext('2009-09-17'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( tf04_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_tf04 = true
        mw.smw.set{ 'Medium=TF04' }
        if tf04_name then mw.smw.set{
            'English alternate names='..tf04_name,
            'TF04 name='..tf04_name,
        } end
    end
 
    if t['wc10_lore'] or t['wc10_name'] or t['wc10_sets'] or vid:lower():match('2010') or vid:lower():match('reverse of arcadia') or image:lower():match('WC10-JP-VG') or image:lower():match('WC10-EN-VG') then 
        local wc10_name = t['wc10_name']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's World Championship 2010: Reverse of Arcadia|5D's World Championship 2010: Reverse of Arcadia]]''"):done()
        :tag('td'):attr('title', 'February 18, 2010'):wikitext('2010-02-18'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( wc10_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_wc10 = true
        mw.smw.set{ 'Medium=WC10' }
        if wc10_name then mw.smw.set{
            'English alternate names='..wc10_name,
            'WC10 name='..wc10_name,
        } end
    end
 
    if t['tf05_lore'] or t['tf05_name'] or t['tf05_sets'] or vid:lower():match('tag force 5') or image:lower():match('TF05-JP-VG') or image:lower():match('TF05-EN-VG') then 
        local tf05_name = t['tf05_name']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's Tag Force 5|5D's Tag Force 5]]''"):done()
        :tag('td'):attr('title', 'September 16, 2010'):wikitext('2010-09-16'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( tf05_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_tf05 = true
        mw.smw.set{ 'Medium=TF05' }
        if tf05_name then mw.smw.set{
            'English alternate names='..tf05_name,
            'TF05 name='..tf05_name,
        } end
    end
 
    if vid:lower():match('decade duels') and (not vid:lower():match('decade duels plus')) then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's Decade Duels|5D's Decade Duels]]''"):done()
        :tag('td'):attr('title', 'November 3, 2010'):wikitext('2010-11-03'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dd01 = true
        mw.smw.set{ 'Medium=DD01' }
    end
 
    if vid:lower():match('duel transer') or vid:lower():match('master of the cards') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's Duel Transer|5D's Duel Transer]]''"):done()
        :tag('td'):attr('title', 'December 7, 2010'):wikitext('2010-12-07'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_ydt1 = true
        mw.smw.set{ 'Medium=YDT1' }
    end
 
    if t['wc11_lore'] or t['wc11_name'] or t['wc11_sets'] or vid:lower():match('2011') or vid:lower():match('over the nexus') or image:lower():match('WC11-JP-VG') or image:lower():match('WC11-EN-VG') then 
        local wc11_name = t['wc11_name']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's World Championship 2011: Over the Nexus|5D's World Championship 2011: Over the Nexus]]''"):done()
        :tag('td'):attr('title', 'February 24, 2011'):wikitext('2011-02-24'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( wc11_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_wc11 = true
        mw.smw.set{ 'Medium=WC11' }
        if wc11_name then mw.smw.set{
            'English alternate names='..wc11_name,
            'WC11 name='..wc11_name,
        } end
    end
 
    if t['tf06_lore'] or t['tf06_name'] or t['tf06_sets'] or vid:lower():match('tag force 6') or image:lower():match('TF06-JP-VG') or image:lower():match('TF06-EN-VG') then 
        local tf06_name = t['tf06_name']
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's Tag Force 6|5D's Tag Force 6]]''"):done()
        :tag('td'):attr('title', 'September 22, 2011'):wikitext('2011-09-22'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext( tf06_name or '' ):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_tf06 = true
        mw.smw.set{ 'Medium=TF06' }
        if tf06_name then mw.smw.set{
            'English alternate names='..tf06_name,
            'TF06 name='..tf06_name,
        } end
    end
 
    if vid:lower():match('decade duels plus') or vg_dd01 then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! 5D's Decade Duels Plus|5D's Decade Duels Plus]]''"):done()
        :tag('td'):attr('title', 'February 13, 2013'):wikitext('2013-02-13'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dd02 = true
        mw.smw.set{ 'Medium=DD02' }
    end
 
    if vid:lower():match('duel carnival') or image:lower():match('ZDC1-JP-VG') or image:lower():match('ZDC1-EN-VG') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! ZEXAL World Duel Carnival|ZEXAL World Duel Carnival]]''"):done()
        :tag('td'):attr('title', 'December 5, 2013'):wikitext('2013-12-05'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_zdc1 = true
        mw.smw.set{ 'Medium=ZDC1' }
    end
 
    if vid:lower():match('millennium') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Millennium Duels|Millennium Duels]]''"):done()
        :tag('td'):attr('title', 'March 26, 2014'):wikitext('2014-03-26'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_md = true
        mw.smw.set{ 'Medium=MD' }
    end
 
    if t['dar_lore'] or vid:lower():match('duel arena') or image:lower():match('DAR-EN-VG') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Arena|Duel Arena]]''"):done()
        :tag('td'):attr('title', 'June 26, 2014'):wikitext('2014-06-26'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dar = true
        mw.smw.set{ 'Medium=DAR' }
    end
 
    if vid:lower():match('duel generation') or image:lower():match('DG-EN-VG') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Generation|Duel Generation]]''"):done()
        :tag('td'):attr('title', 'October 30, 2014'):wikitext('2014-10-30'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_dg = true
        mw.smw.set{ 'Medium=DG' }
    end
 
    if vid:lower():match('special') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! ARC-V Tag Force Special|ARC-V Tag Force Special]]''"):done()
        :tag('td'):attr('title', 'January 22, 2015'):wikitext('2015-01-22'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_tfsp = true
        mw.smw.set{ 'Medium=TFSP' }
    end
 
    if vid:lower():match('legacy') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Legacy of the Duelist|Legacy of the Duelist]]''"):done()
        :tag('td'):attr('title', 'July 30, 2015'):wikitext('2015-07-30'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_lotd = true
        mw.smw.set{ 'Medium=LOTD' }
    end
 
    if vid:lower():match('saikyo') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Monsters Saikyo Card Battle|Saikyo Card Battle]]''"):done()
        :tag('td'):attr('title', 'July 6, 2016'):wikitext('2016-07-06'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_scb = true
        mw.smw.set{ 'Medium=SCB' }
    end
 
    if vid:lower():match('links') then 
        list_table:tag('tr')
        :tag('th'):attr('scope', 'row'):wikitext("''[[Yu-Gi-Oh! Duel Links|Duel Links]]''"):done()
        :tag('td'):attr('title', 'October 27, 2016'):wikitext('2016-10-27'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('–'):done()
        :tag('td'):wikitext('Present'):done()
        :done()
        vg_duli = true
        mw.smw.set{ 'Medium=DULI' }
    end
 
    list_table:allDone()
 
    if t['eds_sets'] or t['gx1_sets'] or t['gx02_sets'] or t['gx03_sets'] or t['gx04_sets'] or t['gx05_sets'] or t['gx06_sets'] or t['ntr_sets'] or t['rod_sets'] or t['sdd_sets'] or t['tf04_sets'] or t['tf05_sets'] or t['tf06_sets'] or t['tsc_sets'] or t['wc4_sets'] or t['wc5_sets'] or t['wc6_sets'] or t['wc07_sets'] or t['wc08_sets'] or t['wc09_sets'] or t['wc10_sets'] or t['wc11_sets'] or t['ygo_sets'] then vg_sets = true end
 
    if vg_cmc or vg_dar or vg_dd01 or vg_dd02 or vg_dds or vg_dg or vg_dod or vg_dm1 or vg_dm2 or vg_dm4 or vg_dm5 or vg_dm6 or vg_dt or vg_duli or vg_eds or vg_gx1 or vg_gx02 or vg_gx03 or vg_gx04 or vg_gx05 or vg_gx06 or vg_lotd or vg_mcgb or vg_md or vg_ntr or vg_pcj or vg_pck or vg_pcy or vg_rod or vg_scb or vg_sdd or vg_tf04 or vg_tf05 or vg_tf06 or vg_tfk or vg_tfsp or vg_tsc or vg_wb01 or vg_wc4 or vg_wc5 or vg_wc6 or vg_wc07 or vg_wc08 or vg_wc09 or vg_wc10 or vg_wc11 or vg_ydt1 or vg_ygo or vg_zdc1 or t['vid'] then 
            vg = true
            mw.smw.set{ 'Class 4=VG' }
            if vid ~= '' then
                table.insert(SO,
                    '<div class="sysop-show">'..vid..'[['..'Category:Card table parameter tracking (vid)]]</div>'
                )
            end
            if not (t['jp_sets'] or t['ja_sets'] or t['kr_sets'] or t['ko_sets'] or t['ae_sets'] or t['tc_sets'] or t['en_sets'] or t['na_sets'] or t['eu_sets'] or t['au_sets'] or t['fr_sets'] or t['fc_sets'] or t['de_sets'] or t['it_sets'] or t['pt_sets'] or t['sp_sets']) then mw.smw.set{ 'Class 1=VGEx' } end
            return tostring(list_table)..table.concat(SO)
        else
            return
    end
end
 
return vg_table

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.