web/js/initbuild.js
// Update the ID list when the format is changed

Update the ID list when the format is changed
Update the ID list when the format is changed
function updateFormat(format) {
        $('.identity').each(function(id, i) {
            if (format === 'all') {
                $(this).removeClass('hidden-format');
                $(this).find('.legality-indicator').show ();
                return;
            } else {
                $(this).find('.legality-indicator').hide ();
            }
            let visible = true;
            if (format === 'startup') {
                visible = ['df', 'urbp', 'ur', 'sg', 'su21', 'msbp'].some(p => $(this).hasClass('pack-' + p));
            }
            else if (format === 'standard') {
                visible = !($(this).hasClass('banned') || $(this).hasClass('rotated'));
            }
            else if (format === 'eternal') {
                visible = true
            }
            if ($(this).hasClass('pack-draft')) {
                visible = format === 'draft';
            }
            else if (format === 'draft') {
                visible = false
            }
            if (['24001', '30076', '30077'].includes($(this).attr('data-code'))) {
                visible = format === 'other';
            }
            else if (format === 'other') {
                visible = false
            }
            if (visible)
                $(this).removeClass('hidden-format');
            else
                $(this).addClass('hidden-format');
        });
    }
function updateFormat ( format ) { $ ( '.identity' ) . each ( function ( id , i ) { if ( format === 'all' ) { $ ( this ) . removeClass ( 'hidden-format' ) ; $ ( this ) . find ( '.legality-indicator' ) . show ( ) ; return ; } else { $ ( this ) . find ( '.legality-indicator' ) . hide ( ) ; } let visible = true ; if ( format === 'startup' ) { visible = [ 'df' , 'urbp' , 'ur' , 'sg' , 'su21' , 'msbp' ] . some ( p => $ ( this ) . hasClass ( 'pack-' + p ) ) ; } else if ( format === 'standard' ) { visible = ! ( $ ( this ) . hasClass ( 'banned' ) || $ ( this ) . hasClass ( 'rotated' ) ) ; } else if ( format === 'eternal' ) { visible = true } if ( $ ( this ) . hasClass ( 'pack-draft' ) ) { visible = format === 'draft' ; } else if ( format === 'draft' ) { visible = false } if ( [ '24001' , '30076' , '30077' ] . includes ( $ ( this ) . attr ( 'data-code' ) ) ) { visible = format === 'other' ; } else if ( format === 'other' ) { visible = false } if ( visible ) $ ( this ) . removeClass ( 'hidden-format' ) ; else $ ( this ) . addClass ( 'hidden-format' ) ; } ) ; }
Update the ID list when the format is changed
Update the ID list when the format is changed
// All (only show legality indicators on all)
 // Other formats
 // Startup
 // Standard
 // Eternal
 // Draft
 // Other (neutral Gateway IDs and the multiplayer NAPD ID)
 // Apply effect
