custom dual lands

This commit is contained in:
Kyle
2021-09-23 15:43:43 -07:00
parent cc58276aa4
commit d2b658882f
21 changed files with 64 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="1500" height="2100" viewBox="0 0 1500 2100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path id="type" d="M154.861,233L106,233L105.672,232.739C91.785,221.58 78.477,193.794 78,161C78.481,127.948 91.996,99.984 106,89L1394,89C1408,99.984 1421.52,127.948 1422,161C1421.52,194.052 1408,222.016 1394,233L1345.14,233C1357.62,258.149 1368.49,298.823 1377.04,350.693C1391.36,437.498 1399.46,556.015 1399,685L1399,1755.48C1413.12,1777.95 1421.29,1804.53 1421.29,1833C1421.29,1833.34 1421.29,1833.68 1421.28,1834.02C1421.29,1834.35 1421.29,1834.67 1421.29,1835C1421.29,1841.61 1420.79,1848.21 1419.66,1854.82C1409.12,1925.06 1348.45,1979 1275.29,1979C1221.71,1979 1174.83,1950.08 1149.43,1907L350.571,1907C325.167,1950.08 278.291,1979 224.714,1979C151.548,1979 90.879,1925.06 80.337,1854.82C79.212,1848.21 78.714,1841.61 78.714,1835C78.714,1834.67 78.715,1834.35 78.718,1834.02C78.715,1833.68 78.714,1833.34 78.714,1833C78.714,1804.53 86.88,1777.95 101,1755.48L101,685.022C100.834,631.157 102.057,577.282 105.115,523.501C107.582,480.105 111.19,436.744 116.71,393.624C118.839,376.995 121.26,360.4 124.104,343.877C126.766,328.416 129.794,313.012 133.411,297.744C136.215,285.912 139.366,274.15 143.131,262.585C146.411,252.509 150.154,242.557 154.839,233.044L154.861,233ZM1155.09,1778C1175.83,1732.59 1221.64,1701 1274.79,1701C1347.36,1701 1406.29,1759.92 1406.29,1832.5C1406.29,1832.93 1406.28,1833.36 1406.28,1833.78C1406.28,1834.19 1406.29,1834.59 1406.29,1835C1406.29,1841.55 1405.72,1848.1 1404.43,1854.64C1393.88,1916.7 1339.82,1964 1274.79,1964C1223.62,1964 1179.24,1934.71 1157.51,1892L342.494,1892C320.761,1934.71 276.38,1964 225.214,1964C160.185,1964 106.117,1916.7 95.574,1854.64C94.279,1848.1 93.714,1841.55 93.714,1835C93.714,1834.59 93.716,1834.19 93.721,1833.78C93.716,1833.36 93.714,1832.93 93.714,1832.5C93.714,1759.92 152.637,1701 225.214,1701C278.355,1701 324.175,1732.59 344.906,1778L1155.09,1778ZM1387,684.978L1387,1739.04C1360.2,1707.22 1320.09,1687 1275.29,1687C1220.07,1687 1171.96,1717.72 1147.15,1763L352.845,1763C328.037,1717.72 279.935,1687 224.714,1687C179.912,1687 139.796,1707.22 113,1739.04L113,685C112.972,669.139 113.015,653.28 113.221,637.42C113.904,584.784 116.006,532.148 120.071,479.661C122.077,453.754 124.567,427.881 127.74,402.09C130.64,378.516 134.099,355 138.493,331.655C141.187,317.344 144.23,303.089 147.887,288.99C150.89,277.417 154.29,265.921 158.513,254.73C160.628,249.124 162.955,243.589 165.641,238.23C166.335,236.845 167.054,235.473 167.803,234.116C167.906,233.929 168.01,233.742 168.114,233.555C168.218,233.369 168.215,233 168.427,233C556.142,232.815 943.858,232.815 1331.57,233C1331.79,233 1331.78,233.369 1331.89,233.555C1331.99,233.742 1332.09,233.929 1332.2,234.116C1332.95,235.473 1333.66,236.845 1334.36,238.23C1337.05,243.589 1339.37,249.124 1341.49,254.73C1345.71,265.921 1349.11,277.417 1352.11,288.99C1355.77,303.089 1358.81,317.344 1361.51,331.655C1366.04,355.751 1369.58,380.03 1372.54,404.367C1375.79,431.112 1378.31,457.944 1380.32,484.81C1385.31,551.401 1387.2,618.21 1387,684.978ZM112,100L1388,100C1389.29,100 1390.51,100.626 1391.26,101.68C1405.33,121.453 1410.29,141.227 1410.29,161C1410.29,180.773 1405.33,200.547 1391.26,220.32C1390.51,221.374 1389.29,222 1388,222L112,222C110.706,222 109.492,221.374 108.741,220.32C94.667,200.547 89.714,180.773 89.714,161C89.714,141.227 94.667,121.453 108.741,101.68C109.492,100.626 110.706,100 112,100Z" style="fill:rgb(0,123,67);"/>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="1500" height="2100" viewBox="0 0 1500 2100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path id="Twins" d="M1155.09,1778C1175.83,1732.59 1221.64,1701 1274.79,1701C1347.36,1701 1406.29,1759.92 1406.29,1832.5C1406.29,1832.93 1406.28,1833.36 1406.28,1833.78C1406.28,1834.19 1406.29,1834.59 1406.29,1835C1406.29,1841.55 1405.72,1848.1 1404.43,1854.64C1393.88,1916.7 1339.82,1964 1274.79,1964C1223.62,1964 1179.24,1934.71 1157.51,1892L342.494,1892C320.761,1934.71 276.38,1964 225.214,1964C160.185,1964 106.117,1916.7 95.574,1854.64C94.279,1848.1 93.714,1841.55 93.714,1835C93.714,1834.59 93.716,1834.19 93.721,1833.78C93.716,1833.36 93.714,1832.93 93.714,1832.5C93.714,1759.92 152.637,1701 225.214,1701C278.355,1701 324.175,1732.59 344.906,1778L1155.09,1778Z" style="fill:rgb(0,117,190);"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -947,7 +947,7 @@ function writeText(textObject, targetContext) {
currentX = savedTextXPosition; currentX = savedTextXPosition;
} }
} else if (possibleCode.includes('ptshift')) { } else if (possibleCode.includes('ptshift')) {
if (card.frames.findIndex(element => element.name.toLowerCase().includes('power/toughness')) >= 0 || card.version.includes('planeswalker') || ['commanderLegends', 'm21', 'mysticalArchive'].includes(card.version)) { if (card.frames.findIndex(element => element.name.toLowerCase().includes('power/toughness')) >= 0 || card.version.includes('planeswalker') || ['commanderLegends', 'm21', 'mysticalArchive', 'customDualLands'].includes(card.version)) {
ptShift[0] = scaleWidth(parseFloat(possibleCode.replace('ptshift', '').split(',')[0])); ptShift[0] = scaleWidth(parseFloat(possibleCode.replace('ptshift', '').split(',')[0]));
ptShift[1] = scaleHeight(parseFloat(possibleCode.split(',')[1])); ptShift[1] = scaleHeight(parseFloat(possibleCode.split(',')[1]));
} }

View File

@@ -6,6 +6,7 @@ loadFramePacks([
{name:'Ixalan - @feuer_ameise', value:'FeuerAmeiseIxalan'}, {name:'Ixalan - @feuer_ameise', value:'FeuerAmeiseIxalan'},
{name:'Tapped (Horizontal M15)', value:'Tapped'}, {name:'Tapped (Horizontal M15)', value:'Tapped'},
{name:'Simple Inventions', value:'SimpleInventions'}, {name:'Simple Inventions', value:'SimpleInventions'},
{name:'Textless Duals', value:'CustomDualLands'},
{name:'Custom Addons', value:'disabled'}, {name:'Custom Addons', value:'disabled'},
{name:'Brawl Legend Crowns', value:'Brawl'} {name:'Brawl Legend Crowns', value:'Brawl'}
]) ])

View File

@@ -0,0 +1,52 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/custom/dualLands/pinline.svg', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/custom/dualLands/type.svg', name:'Type'}];
var bounds = {x:0.07, y:0.8153, width:0.16, height:0.1143};
var bounds2 = {x:0.77, y:0.8153, width:0.16, height:0.1143};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/custom/dualLands/w.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/custom/dualLands/u.png', masks:masks},
{name:'Black Frame', src:'/img/frames/custom/dualLands/b.png', masks:masks},
{name:'Red Frame', src:'/img/frames/custom/dualLands/r.png', masks:masks},
{name:'Green Frame', src:'/img/frames/custom/dualLands/g.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/custom/dualLands/m.png', masks:masks},
{name:'Colorless Frame', src:'/img/frames/custom/dualLands/l.png', masks:masks},
{name:'White Mana Symbol (Left)', src:'/img/frames/textless/zendikar/sw.svg', bounds:bounds},
{name:'Blue Mana Symbol (Left)', src:'/img/frames/textless/zendikar/su.svg', bounds:bounds},
{name:'Black Mana Symbol (Left)', src:'/img/frames/textless/zendikar/sb.svg', bounds:bounds},
{name:'Red Mana Symbol (Left)', src:'/img/frames/textless/zendikar/sr.svg', bounds:bounds},
{name:'Green Mana Symbol (Left)', src:'/img/frames/textless/zendikar/sg.svg', bounds:bounds},
{name:'Colorless Mana Symbol (Left)', src:'/img/frames/textless/zendikar/sc.svg', bounds:bounds},
{name:'White Mana Symbol (Right)', src:'/img/frames/textless/zendikar/sw.svg', bounds:bounds2},
{name:'Blue Mana Symbol (Right)', src:'/img/frames/textless/zendikar/su.svg', bounds:bounds2},
{name:'Black Mana Symbol (Right)', src:'/img/frames/textless/zendikar/sb.svg', bounds:bounds2},
{name:'Red Mana Symbol (Right)', src:'/img/frames/textless/zendikar/sr.svg', bounds:bounds2},
{name:'Green Mana Symbol (Right)', src:'/img/frames/textless/zendikar/sg.svg', bounds:bounds2},
{name:'Colorless Mana Symbol (Right)', src:'/img/frames/textless/zendikar/sc.svg', bounds:bounds2}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = async function() {
//resets things so that every frame doesn't have to
await resetCardIrregularities();
//sets card version
card.version = 'customDualLands';
//art bounds
card.artBounds = {x:0, y:0, width:1, height:0.9224};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.5, y:0.9524, width:0.12, height:0.0410, vertical:'center', horizontal: 'center'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:-1, y:-1, width:0.0007, height:0.0005};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', y:0.0613, width:0.9292, height:71/2100, oneLine:true, size:71/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0},
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0381},
type: {name:'Type (Left)', text:'', x:0.25, y:0.8481, width:0.5, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, align:'center'},
});
}
//loads available frames
loadFramePack();