fixes/updates

This commit is contained in:
Kyle
2021-07-13 20:32:59 -07:00
parent d3a486d688
commit b5d2b8af4c
58 changed files with 169 additions and 51 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,8 @@
<?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;">
<rect id="Card" x="0" y="0" width="1500" height="2100" style="fill:none;"/>
<g id="Card1" serif:id="Card">
<path id="Textbox--Regular-" serif:id="Textbox (Regular)" d="M1400,1937L1400,1948L100,1948L100,1937L1400,1937ZM100,1314.9L100,1308.21C88.362,1294.83 78.412,1270.28 78,1242C78.412,1213.72 88.362,1189.17 100,1175.79L100,227.213C88.364,213.833 78.412,189.278 78,161C78.481,127.948 91.996,99.984 106,89L1394,89C1408,99.984 1421.52,127.948 1422,161C1421.59,189.276 1411.64,213.828 1400,227.213L1400,1175.79C1411.64,1189.17 1421.59,1213.72 1422,1242C1421.59,1270.28 1411.64,1294.83 1400,1308.21L1400,1314.66C1336.52,1323.29 1143.92,1318.29 982.948,1317.64C868.735,1317.18 772.795,1317.14 751.963,1339.27C734.415,1315.15 664.151,1318.1 562.835,1318.36C422.291,1318.71 218.202,1332.21 100,1314.9ZM1388.24,1181.01C1389.44,1181.08 1390.56,1181.69 1391.26,1182.68C1405.33,1202.45 1410.29,1222.23 1410.29,1242C1410.29,1261.77 1405.33,1281.55 1391.26,1301.32C1390.51,1302.37 1389.29,1303 1388,1303L112,1303C110.706,1303 109.492,1302.37 108.741,1301.32C94.667,1281.55 89.714,1261.77 89.714,1242C89.714,1222.23 94.667,1202.45 108.741,1182.68C109.492,1181.63 110.706,1181 112,1181L1388,1181L1388.24,1181.01ZM111,233L111,1170L1389,1170L1389,233L111,233ZM112,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);"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
img/frames/mh2/b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
img/frames/mh2/bThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/frames/mh2/bpt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
img/frames/mh2/bptThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
img/frames/mh2/g.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
img/frames/mh2/gThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
img/frames/mh2/gpt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
img/frames/mh2/gptThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/frames/mh2/r.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
img/frames/mh2/rThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/frames/mh2/rpt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
img/frames/mh2/rptThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
img/frames/mh2/u.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
img/frames/mh2/uThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/frames/mh2/upt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
img/frames/mh2/uptThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
img/frames/mh2/w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
img/frames/mh2/wThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
img/frames/mh2/wpt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
img/frames/mh2/wptThumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

After

Width:  |  Height:  |  Size: 339 KiB

View File

@@ -1649,11 +1649,6 @@ async function loadCard(selectedCardKey) {
card.frames.reverse();
if (card.onload) {
await loadScript(card.onload);
if (card.version.includes('planeswalker')) {
setTimeout(function(){
fixPlaneswalkerInputs(invertPlaneswalkerColors(true));
}, 1000);
}
}
card.manaSymbols.forEach(item => loadScript(item));
//canvases

View File

@@ -13,6 +13,7 @@ loadFramePacks([
{name:'Snow (Kaldheim)', value:'M15Snow'},
{name:'Mutate (Ikoria)', value:'M15Mutate'},
{name:'Nyx (Theros)', value:'M15Nyx'},
{name:'Adventures (Eldraine)', value:'Adventure'},
{name:'Devoid (Zendikar)', value:'M15Devoid'},
{name:'Aftermath (Amonkhet)', value:'Aftermath'},
{name:'Flip (Kamigawa)', value:'Flip'},

View File

@@ -0,0 +1,58 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/adventure/regular/pinline.svg', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}];
var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/adventure/regular/w.png'},
{name:'Blue Frame', src:'/img/frames/adventure/regular/u.png'},
{name:'Black Frame', src:'/img/frames/adventure/regular/b.png'},
{name:'Red Frame', src:'/img/frames/adventure/regular/r.png'},
{name:'Green Frame', src:'/img/frames/adventure/regular/g.png'},
{name:'Multicolored Frame', src:'/img/frames/adventure/regular/m.png'},
{name:'Artifact Frame', src:'/img/frames/adventure/regular/a.png'},
{name:'Land Frame', src:'/img/frames/adventure/regular/l.png'},
{name:'White Power/Toughness', src:'/img/frames/m15/regular/m15PTW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/m15/regular/m15PTU.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/m15/regular/m15PTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/m15/regular/m15PTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/m15/regular/m15PTG.png', bounds:bounds},
{name:'Multicolored Power/Toughness', src:'/img/frames/m15/regular/m15PTM.png', bounds:bounds},
{name:'Artifact Power/Toughness', src:'/img/frames/m15/regular/m15PTA.png', bounds:bounds},
{name:'Land Power/Toughness', src:'/img/frames/m15/regular/m15PTC.png', bounds:bounds}
];
//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 = 'adventure';
//art bounds
card.artBounds = {x:0.0767, y:0.1129, width:0.8476, height:0.4429};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.5910, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.72, y:0.7681, width:0.3867, height:0.2358};
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', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.0854, y:0.7358, width:0.3947, height:0.15, size:0.0353},
rules2: {name:'Rules Text (Right)', text:'', x:0.5267, y:0.65, width:0.3867, height:0.2358, size:0.0353},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'},
mana2: {name:'Adventure Mana Cost', text:'', x:0.0814, y:0.6391, width:0.4, height:60/2100, oneLine:true, size:60/1638, color:'white', shadowX:-0.001, shadowY:0.0029, align:'right', manaCost:true},
title2: {name:'Adventure Title', text:'', x:0.0814, y:0.6391, width:0.4, height:0.0296, size:0.0296, color:'white', oneLine:true, font:'belerenb'},
type2: {name:'Adventure Type', text:'', x:0.0814, y:0.6839, width:0.4, height:0.0296, size:0.0296, color:'white', oneLine:true, font:'belerenb'},
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}

View File

@@ -7,7 +7,10 @@ availableFrames = [
{name:'Blue Frame', src:'/img/frames/levelers/regular/u.png', masks:masks},
{name:'Black Frame', src:'/img/frames/levelers/regular/b.png', masks:masks},
{name:'Red Frame', src:'/img/frames/levelers/regular/r.png', masks:masks},
{name:'Green Frame', src:'/img/frames/levelers/regular/g.png', masks:masks}
{name:'Green Frame', src:'/img/frames/levelers/regular/g.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/levelers/regular/m.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/levelers/regular/a.png', masks:masks},
{name:'Vehicle Frame', src:'/img/frames/levelers/regular/v.png', masks:masks}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;

52
js/frames/packMH2.js Normal file
View File

@@ -0,0 +1,52 @@
//Create objects for common properties across available frames
// var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
var bounds = {x:0.748, y:0.8796, width:0.204, height:0.072};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/mh2/w.png'},
{name:'Blue Frame', src:'/img/frames/mh2/u.png'},
{name:'Black Frame', src:'/img/frames/mh2/b.png'},
{name:'Red Frame', src:'/img/frames/mh2/r.png'},
{name:'Green Frame', src:'/img/frames/mh2/g.png'},
// {name:'Multicolored Frame', src:'/img/frames/mh2/m.png'},
// {name:'Artifact Frame', src:'/img/frames/mh2/a.png'},
// {name:'Vehicle Frame', src:'/img/frames/mh2/v.png'},
{name:'White Power/Toughness', src:'/img/frames/mh2/wpt.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/mh2/upt.png', bounds:bounds},
{name:'Black Power/Toughness', src:'/img/frames/mh2/bpt.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/mh2/rpt.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/mh2/gpt.png', bounds:bounds},
// {name:'Multicolored Power/Toughness', src:'/img/frames/mh2/mpt.png', bounds:bounds},
// {name:'Artifact Power/Toughness', src:'/img/frames/mh2/apt.png', bounds:bounds},
// {name:'Vehicle Power/Toughness', src:'/img/frames/mh2/vpt.png', bounds:bounds}
];
//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() {
// notifies
notify('Currently only monocolored frames are available. Due to the nature of the sketch frame, I\'m not sure if/when I\'ll be able to add the remaining frames.', 10);
//resets things so that every frame doesn't have to
await resetCardIrregularities();
//sets card version
card.version = 'mh2';
//art bounds
card.artBounds = {x:0.0767, y:0.1129, width:0.8476, height:0.4429};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.5910, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
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', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

View File

@@ -31,7 +31,7 @@ if (!loadedVersions.includes('/js/frames/versionClass.js')) {
}
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var classHeader = new Image();
classHeader.src = '/img/frames/class/header.png';
classHeader.src = fixUri('/img/frames/class/header.png');
classHeader.onload = classEdited;
fixClassInputs(classEdited);
} else {

View File

@@ -27,34 +27,34 @@ if (!loadedVersions.includes('/js/frames/versionDungeon.js')) {
card.dungeon = {abilities:[1, 1, 1, 0], count:3, x:0.1, width:0.3947};
}
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var dungeonFXtop = new Image(); dungeonFXtop.src = '/img/frames/dungeon/walls/fx/top.png';
var dungeonFXleft = new Image(); dungeonFXleft.src = '/img/frames/dungeon/walls/fx/left.png';
var dungeonFXbottom = new Image(); dungeonFXbottom.src = '/img/frames/dungeon/walls/fx/bottom.png';
var dungeonFXright = new Image(); dungeonFXright.src = '/img/frames/dungeon/walls/fx/right.png';
var dungeonFXtopright = new Image(); dungeonFXtopright.src = '/img/frames/dungeon/walls/fx/topright.png';
var dungeonFXtopleft = new Image(); dungeonFXtopleft.src = '/img/frames/dungeon/walls/fx/topleft.png';
var dungeonFXbottomright = new Image(); dungeonFXbottomright.src = '/img/frames/dungeon/walls/fx/bottomright.png';
var dungeonFXbottomleft = new Image(); dungeonFXbottomleft.src = '/img/frames/dungeon/walls/fx/bottomleft.png';
var dungeonShapetop = new Image(); dungeonShapetop.src = '/img/frames/dungeon/walls/shape/top.png';
var dungeonShapeleft = new Image(); dungeonShapeleft.src = '/img/frames/dungeon/walls/shape/left.png';
var dungeonShapebottom = new Image(); dungeonShapebottom.src = '/img/frames/dungeon/walls/shape/bottom.png';
var dungeonShaperight = new Image(); dungeonShaperight.src = '/img/frames/dungeon/walls/shape/right.png';
var dungeonShapetopright = new Image(); dungeonShapetopright.src = '/img/frames/dungeon/walls/shape/topright.png';
var dungeonShapetopleft = new Image(); dungeonShapetopleft.src = '/img/frames/dungeon/walls/shape/topleft.png';
var dungeonShapebottomright = new Image(); dungeonShapebottomright.src = '/img/frames/dungeon/walls/shape/bottomright.png';
var dungeonShapebottomleft = new Image(); dungeonShapebottomleft.src = '/img/frames/dungeon/walls/shape/bottomleft.png';
var dungeonDoorwayShape = new Image(); dungeonDoorwayShape.src = '/img/frames/dungeon/walls/shape/doorway.png';
var dungeonDoorwayFX = new Image(); dungeonDoorwayFX.src = '/img/frames/dungeon/walls/fx/doorway.png';
var dungeonDoorwayArrow = new Image(); dungeonDoorwayArrow.src = '/img/frames/dungeon/walls/arrow.png';
var dungeonDoorwayCutout = new Image(); dungeonDoorwayCutout.src = '/img/frames/dungeon/walls/doorway.png';
var dungeonOuterShape = new Image(); dungeonOuterShape.src = '/img/frames/dungeon/walls/shape/outer.png';
var dungeonOuterFX = new Image(); dungeonOuterFX.src = '/img/frames/dungeon/walls/fx/outer.png';
var dungeonTextureW = new Image(); dungeonTextureW.src = '/img/frames/dungeon/walls/textures/w.png';
var dungeonTextureU = new Image(); dungeonTextureU.src = '/img/frames/dungeon/walls/textures/u.png';
var dungeonTextureB = new Image(); dungeonTextureB.src = '/img/frames/dungeon/walls/textures/b.png';
var dungeonTextureR = new Image(); dungeonTextureR.src = '/img/frames/dungeon/walls/textures/r.png';
var dungeonTextureG = new Image(); dungeonTextureG.src = '/img/frames/dungeon/walls/textures/g.png';
var dungeonTextureC = new Image(); dungeonTextureC.src = '/img/frames/dungeon/walls/textures/c.png';
var dungeonFXtop = new Image(); dungeonFXtop.src = fixUri('/img/frames/dungeon/walls/fx/top.png');
var dungeonFXleft = new Image(); dungeonFXleft.src = fixUri('/img/frames/dungeon/walls/fx/left.png');
var dungeonFXbottom = new Image(); dungeonFXbottom.src = fixUri('/img/frames/dungeon/walls/fx/bottom.png');
var dungeonFXright = new Image(); dungeonFXright.src = fixUri('/img/frames/dungeon/walls/fx/right.png');
var dungeonFXtopright = new Image(); dungeonFXtopright.src = fixUri('/img/frames/dungeon/walls/fx/topright.png');
var dungeonFXtopleft = new Image(); dungeonFXtopleft.src = fixUri('/img/frames/dungeon/walls/fx/topleft.png');
var dungeonFXbottomright = new Image(); dungeonFXbottomright.src = fixUri('/img/frames/dungeon/walls/fx/bottomright.png');
var dungeonFXbottomleft = new Image(); dungeonFXbottomleft.src = fixUri('/img/frames/dungeon/walls/fx/bottomleft.png');
var dungeonShapetop = new Image(); dungeonShapetop.src = fixUri('/img/frames/dungeon/walls/shape/top.png');
var dungeonShapeleft = new Image(); dungeonShapeleft.src = fixUri('/img/frames/dungeon/walls/shape/left.png');
var dungeonShapebottom = new Image(); dungeonShapebottom.src = fixUri('/img/frames/dungeon/walls/shape/bottom.png');
var dungeonShaperight = new Image(); dungeonShaperight.src = fixUri('/img/frames/dungeon/walls/shape/right.png');
var dungeonShapetopright = new Image(); dungeonShapetopright.src = fixUri('/img/frames/dungeon/walls/shape/topright.png');
var dungeonShapetopleft = new Image(); dungeonShapetopleft.src = fixUri('/img/frames/dungeon/walls/shape/topleft.png');
var dungeonShapebottomright = new Image(); dungeonShapebottomright.src = fixUri('/img/frames/dungeon/walls/shape/bottomright.png');
var dungeonShapebottomleft = new Image(); dungeonShapebottomleft.src = fixUri('/img/frames/dungeon/walls/shape/bottomleft.png');
var dungeonDoorwayShape = new Image(); dungeonDoorwayShape.src = fixUri('/img/frames/dungeon/walls/shape/doorway.png');
var dungeonDoorwayFX = new Image(); dungeonDoorwayFX.src = fixUri('/img/frames/dungeon/walls/fx/doorway.png');
var dungeonDoorwayArrow = new Image(); dungeonDoorwayArrow.src = fixUri('/img/frames/dungeon/walls/arrow.png');
var dungeonDoorwayCutout = new Image(); dungeonDoorwayCutout.src = fixUri('/img/frames/dungeon/walls/doorway.png');
var dungeonOuterShape = new Image(); dungeonOuterShape.src = fixUri('/img/frames/dungeon/walls/shape/outer.png');
var dungeonOuterFX = new Image(); dungeonOuterFX.src = fixUri('/img/frames/dungeon/walls/fx/outer.png');
var dungeonTextureW = new Image(); dungeonTextureW.src = fixUri('/img/frames/dungeon/walls/textures/w.png');
var dungeonTextureU = new Image(); dungeonTextureU.src = fixUri('/img/frames/dungeon/walls/textures/u.png');
var dungeonTextureB = new Image(); dungeonTextureB.src = fixUri('/img/frames/dungeon/walls/textures/b.png');
var dungeonTextureR = new Image(); dungeonTextureR.src = fixUri('/img/frames/dungeon/walls/textures/r.png');
var dungeonTextureG = new Image(); dungeonTextureG.src = fixUri('/img/frames/dungeon/walls/textures/g.png');
var dungeonTextureC = new Image(); dungeonTextureC.src = fixUri('/img/frames/dungeon/walls/textures/c.png');
dungeonTextureC.onload = dungeonEditedBuffer;
}

View File

@@ -1,5 +1,6 @@
//checks to see if it needs to run
if (!loadedVersions.includes('/js/frames/versionPlaneswalker.js')) {
console.log('LOADING PLANESWALKER VERSION SCRIPT')
loadedVersions.push('/js/frames/versionPlaneswalker.js');
sizeCanvas('planeswalker');
document.querySelector('#creator-menu-tabs').innerHTML += '<h3 class="selectable readable-background" onclick="toggleCreatorTabs(event, `planeswalker`)">Planeswalker</h3>';
@@ -42,22 +43,22 @@ if (!loadedVersions.includes('/js/frames/versionPlaneswalker.js')) {
window.planeswalkerAbilityLayout = [[[0.7467], [0.6953, 0.822], [0.6639, 0.7467, 0.8362], [0.6505, 0.72, 0.7905, 0.861]],[[0.72], [0.6391, 0.801], [0.5986, 0.72, 0.8415], [0.5986, 0.6796, 0.7605, 0.8415]]];
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var plusIcon = new Image();
plusIcon.src = '/img/frames/planeswalker/planeswalkerPlus.png';
plusIcon.src = fixUri('/img/frames/planeswalker/planeswalkerPlus.png');
var minusIcon = new Image();
minusIcon.src = '/img/frames/planeswalker/planeswalkerMinus.png';
minusIcon.src = fixUri('/img/frames/planeswalker/planeswalkerMinus.png');
var neutralIcon = new Image();
neutralIcon.src = '/img/frames/planeswalker/planeswalkerNeutral.png';
neutralIcon.src = fixUri('/img/frames/planeswalker/planeswalkerNeutral.png');
var lightToDark = new Image();
lightToDark.src = '/img/frames/planeswalker/abilityLineOdd.png';
lightToDark.src = fixUri('/img/frames/planeswalker/abilityLineOdd.png');
var darkToLight = new Image();
darkToLight.src = '/img/frames/planeswalker/abilityLineEven.png';
darkToLight.src = fixUri('/img/frames/planeswalker/abilityLineEven.png');
var planeswalkerTextMask = new Image();
planeswalkerTextMask.onload = function(){fixPlaneswalkerInputs(planeswalkerEdited);}
planeswalkerTextMask.src = '/img/frames/planeswalker/planeswalkerMaskText.png';
planeswalkerTextMask.src = fixUri('/img/frames/planeswalker/planeswalkerMaskText.png');
var lightColor = 'white';
var darkColor = '#a4a4a4';
} else {
planeswalkerEdited();
fixPlaneswalkerInputs(planeswalkerEdited);
}
function planeswalkerEdited() {
@@ -65,15 +66,15 @@ function planeswalkerEdited() {
if (card.version == 'planeswalkerTall') {
planeswalkerTall = 1;
if (!planeswalkerTextMask.src.includes('tall')) {
planeswalkerTextMask.src = '/img/frames/planeswalker/tall/planeswalkerTallMaskRules.png';
planeswalkerTextMask.src = fixUri('/img/frames/planeswalker/tall/planeswalkerTallMaskRules.png');
}
} else if (card.version == 'planeswalkerMDFC') {
if (!planeswalkerTextMask.src.includes('mdfc')) {
planeswalkerTextMask.src = '/img/frames/planeswalker/mdfc/text.svg';
planeswalkerTextMask.src = fixUri('/img/frames/planeswalker/mdfc/text.svg');
}
} else {
if (planeswalkerTextMask.src.includes('tall') || planeswalkerTextMask.src.includes('mdfc')) {
planeswalkerTextMask.src = '/img/frames/planeswalker/planeswalkerMaskText.png';
planeswalkerTextMask.src = fixUri('/img/frames/planeswalker/planeswalkerMaskText.png');
}
}
card.planeswalker.abilities[0] = document.querySelector('#planeswalker-cost-0').value;
@@ -190,12 +191,12 @@ function invertPlaneswalkerColors(reverse = false) {
if (card.planeswalker.invert) {
darkColor = '#5b5b5b';
lightColor = 'black';
lightToDark.src = '/img/frames/planeswalker/abilityLineOddDarkened.png';
darkToLight.src = '/img/frames/planeswalker/abilityLineEvenDarkened.png';
lightToDark.src = fixUri('/img/frames/planeswalker/abilityLineOddDarkened.png');
darkToLight.src = fixUri('/img/frames/planeswalker/abilityLineEvenDarkened.png');
} else {
darkColor = '#a4a4a4';
lightColor = 'white';
lightToDark.src = '/img/frames/planeswalker/abilityLineOdd.png';
darkToLight.src = '/img/frames/planeswalker/abilityLineEven.png';
lightToDark.src = fixUri('/img/frames/planeswalker/abilityLineOdd.png');
darkToLight.src = fixUri('/img/frames/planeswalker/abilityLineEven.png');
}
}

View File

@@ -35,9 +35,9 @@ if (!loadedVersions.includes('/js/frames/versionSaga.js')) {
}
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var sagaChapter = new Image();
sagaChapter.src = '/img/frames/saga/sagaChapter.png';
sagaChapter.src = fixUri('/img/frames/saga/sagaChapter.png');
var sagaDivider = new Image();
sagaDivider.src = '/img/frames/saga/sagaDivider.png';
sagaDivider.src = fixUri('/img/frames/saga/sagaDivider.png');
sagaChapter.onload = sagaDivider.onload = sagaEdited;
fixSagaInputs(sagaEdited);
}