diff --git a/creator/index.php b/creator/index.php index 166e3223..60e36f79 100644 --- a/creator/index.php +++ b/creator/index.php @@ -453,5 +453,5 @@ include('../globalHTML/header-1.php'); - + \ No newline at end of file diff --git a/css/style-8.css b/css/style-8.css index 417fd9f6..194ba38c 100644 --- a/css/style-8.css +++ b/css/style-8.css @@ -59,6 +59,14 @@ font-family: fritz-quadrata; src: url("/fonts/fritz-quadrata.ttf"); } +@font-face { + font-family: japanese-title; + src: url("/fonts/NfMotoyaAporoStd-W1.otf"); +} +@font-face { + font-family: japanese; + src: url('/fonts/2012c863631ba71f874aba70590795a1.otf'); +} /*Variables*/ :root { --site-background: url('/img/lowpolyBackground.svg'); diff --git a/fonts/2012c863631ba71f874aba70590795a1.otf b/fonts/2012c863631ba71f874aba70590795a1.otf new file mode 100644 index 00000000..6bc034f8 Binary files /dev/null and b/fonts/2012c863631ba71f874aba70590795a1.otf differ diff --git a/fonts/NfMotoyaAporoStd-W1.otf b/fonts/NfMotoyaAporoStd-W1.otf new file mode 100644 index 00000000..ff4554d0 Binary files /dev/null and b/fonts/NfMotoyaAporoStd-W1.otf differ diff --git a/img/frames/m15/boxTopper/c.png b/img/frames/m15/boxTopper/c.png new file mode 100644 index 00000000..d09e9413 Binary files /dev/null and b/img/frames/m15/boxTopper/c.png differ diff --git a/img/frames/m15/boxTopper/cThumb.png b/img/frames/m15/boxTopper/cThumb.png new file mode 100644 index 00000000..fc13d3b8 Binary files /dev/null and b/img/frames/m15/boxTopper/cThumb.png differ diff --git a/img/frames/mysticalArchive/jp/a.svg b/img/frames/mysticalArchive/jp/a.svg new file mode 100644 index 00000000..9826e3d6 --- /dev/null +++ b/img/frames/mysticalArchive/jp/a.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/aThumb.png b/img/frames/mysticalArchive/jp/aThumb.png new file mode 100644 index 00000000..670f024f Binary files /dev/null and b/img/frames/mysticalArchive/jp/aThumb.png differ diff --git a/img/frames/mysticalArchive/jp/b.svg b/img/frames/mysticalArchive/jp/b.svg new file mode 100644 index 00000000..6a344202 --- /dev/null +++ b/img/frames/mysticalArchive/jp/b.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/bThumb.png b/img/frames/mysticalArchive/jp/bThumb.png new file mode 100644 index 00000000..ec0d653f Binary files /dev/null and b/img/frames/mysticalArchive/jp/bThumb.png differ diff --git a/img/frames/mysticalArchive/jp/g.svg b/img/frames/mysticalArchive/jp/g.svg new file mode 100644 index 00000000..1f25143f --- /dev/null +++ b/img/frames/mysticalArchive/jp/g.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/gThumb.png b/img/frames/mysticalArchive/jp/gThumb.png new file mode 100644 index 00000000..198d510c Binary files /dev/null and b/img/frames/mysticalArchive/jp/gThumb.png differ diff --git a/img/frames/mysticalArchive/jp/l.svg b/img/frames/mysticalArchive/jp/l.svg new file mode 100644 index 00000000..fead0a06 --- /dev/null +++ b/img/frames/mysticalArchive/jp/l.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/lThumb.png b/img/frames/mysticalArchive/jp/lThumb.png new file mode 100644 index 00000000..69d34327 Binary files /dev/null and b/img/frames/mysticalArchive/jp/lThumb.png differ diff --git a/img/frames/mysticalArchive/jp/m.svg b/img/frames/mysticalArchive/jp/m.svg new file mode 100644 index 00000000..e938a5d6 --- /dev/null +++ b/img/frames/mysticalArchive/jp/m.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/mThumb.png b/img/frames/mysticalArchive/jp/mThumb.png new file mode 100644 index 00000000..f4ec70f1 Binary files /dev/null and b/img/frames/mysticalArchive/jp/mThumb.png differ diff --git a/img/frames/mysticalArchive/jp/mythic.png b/img/frames/mysticalArchive/jp/mythic.png new file mode 100644 index 00000000..2c351016 Binary files /dev/null and b/img/frames/mysticalArchive/jp/mythic.png differ diff --git a/img/frames/mysticalArchive/jp/mythicThumb.png b/img/frames/mysticalArchive/jp/mythicThumb.png new file mode 100644 index 00000000..ce25c6bb Binary files /dev/null and b/img/frames/mysticalArchive/jp/mythicThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pinline.svg b/img/frames/mysticalArchive/jp/pinline.svg new file mode 100644 index 00000000..fcac9e24 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pinline.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/frames/mysticalArchive/jp/pinlineThumb.png b/img/frames/mysticalArchive/jp/pinlineThumb.png new file mode 100644 index 00000000..d494a7ea Binary files /dev/null and b/img/frames/mysticalArchive/jp/pinlineThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/a.svg b/img/frames/mysticalArchive/jp/pt/a.svg new file mode 100644 index 00000000..4cd2f082 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/a.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/aThumb.png b/img/frames/mysticalArchive/jp/pt/aThumb.png new file mode 100644 index 00000000..2f3a1d41 Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/aThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/b.svg b/img/frames/mysticalArchive/jp/pt/b.svg new file mode 100644 index 00000000..fad40490 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/b.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/bThumb.png b/img/frames/mysticalArchive/jp/pt/bThumb.png new file mode 100644 index 00000000..dc9af80d Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/bThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/cutout.svg b/img/frames/mysticalArchive/jp/pt/cutout.svg new file mode 100644 index 00000000..9b3aa86f --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/cutout.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/cutoutThumb.png b/img/frames/mysticalArchive/jp/pt/cutoutThumb.png new file mode 100644 index 00000000..ffe79d15 Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/cutoutThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/g.svg b/img/frames/mysticalArchive/jp/pt/g.svg new file mode 100644 index 00000000..b2c4d0a2 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/g.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/gThumb.png b/img/frames/mysticalArchive/jp/pt/gThumb.png new file mode 100644 index 00000000..7b20d3c1 Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/gThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/l.svg b/img/frames/mysticalArchive/jp/pt/l.svg new file mode 100644 index 00000000..eb6dc9d2 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/l.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/lThumb.png b/img/frames/mysticalArchive/jp/pt/lThumb.png new file mode 100644 index 00000000..7d165158 Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/lThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/m.svg b/img/frames/mysticalArchive/jp/pt/m.svg new file mode 100644 index 00000000..4b996b59 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/m.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/mThumb.png b/img/frames/mysticalArchive/jp/pt/mThumb.png new file mode 100644 index 00000000..5760bdf2 Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/mThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/r.svg b/img/frames/mysticalArchive/jp/pt/r.svg new file mode 100644 index 00000000..26706057 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/r.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/rThumb.png b/img/frames/mysticalArchive/jp/pt/rThumb.png new file mode 100644 index 00000000..c3bc9a59 Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/rThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/u.svg b/img/frames/mysticalArchive/jp/pt/u.svg new file mode 100644 index 00000000..1467e162 --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/u.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/uThumb.png b/img/frames/mysticalArchive/jp/pt/uThumb.png new file mode 100644 index 00000000..dea1d2d9 Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/uThumb.png differ diff --git a/img/frames/mysticalArchive/jp/pt/w.svg b/img/frames/mysticalArchive/jp/pt/w.svg new file mode 100644 index 00000000..9a0c2cbd --- /dev/null +++ b/img/frames/mysticalArchive/jp/pt/w.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/pt/wThumb.png b/img/frames/mysticalArchive/jp/pt/wThumb.png new file mode 100644 index 00000000..f1e8bc3d Binary files /dev/null and b/img/frames/mysticalArchive/jp/pt/wThumb.png differ diff --git a/img/frames/mysticalArchive/jp/r.svg b/img/frames/mysticalArchive/jp/r.svg new file mode 100644 index 00000000..816dd26b --- /dev/null +++ b/img/frames/mysticalArchive/jp/r.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/rThumb.png b/img/frames/mysticalArchive/jp/rThumb.png new file mode 100644 index 00000000..0d65a41b Binary files /dev/null and b/img/frames/mysticalArchive/jp/rThumb.png differ diff --git a/img/frames/mysticalArchive/jp/rare.png b/img/frames/mysticalArchive/jp/rare.png new file mode 100644 index 00000000..1b84244a Binary files /dev/null and b/img/frames/mysticalArchive/jp/rare.png differ diff --git a/img/frames/mysticalArchive/jp/rareThumb.png b/img/frames/mysticalArchive/jp/rareThumb.png new file mode 100644 index 00000000..00579606 Binary files /dev/null and b/img/frames/mysticalArchive/jp/rareThumb.png differ diff --git a/img/frames/mysticalArchive/jp/u.svg b/img/frames/mysticalArchive/jp/u.svg new file mode 100644 index 00000000..c06f8833 --- /dev/null +++ b/img/frames/mysticalArchive/jp/u.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/uThumb.png b/img/frames/mysticalArchive/jp/uThumb.png new file mode 100644 index 00000000..cc3bae46 Binary files /dev/null and b/img/frames/mysticalArchive/jp/uThumb.png differ diff --git a/img/frames/mysticalArchive/jp/uncommon.png b/img/frames/mysticalArchive/jp/uncommon.png new file mode 100644 index 00000000..12d4dff7 Binary files /dev/null and b/img/frames/mysticalArchive/jp/uncommon.png differ diff --git a/img/frames/mysticalArchive/jp/uncommonThumb.png b/img/frames/mysticalArchive/jp/uncommonThumb.png new file mode 100644 index 00000000..cc46b623 Binary files /dev/null and b/img/frames/mysticalArchive/jp/uncommonThumb.png differ diff --git a/img/frames/mysticalArchive/jp/w.svg b/img/frames/mysticalArchive/jp/w.svg new file mode 100644 index 00000000..6a7319db --- /dev/null +++ b/img/frames/mysticalArchive/jp/w.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/wThumb.png b/img/frames/mysticalArchive/jp/wThumb.png new file mode 100644 index 00000000..1580bf0e Binary files /dev/null and b/img/frames/mysticalArchive/jp/wThumb.png differ diff --git a/img/manaSymbols/majp/majp0.svg b/img/manaSymbols/majp/majp0.svg new file mode 100644 index 00000000..3057d6d5 --- /dev/null +++ b/img/manaSymbols/majp/majp0.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp1.svg b/img/manaSymbols/majp/majp1.svg new file mode 100644 index 00000000..d80a794c --- /dev/null +++ b/img/manaSymbols/majp/majp1.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp2.svg b/img/manaSymbols/majp/majp2.svg new file mode 100644 index 00000000..e8b13c10 --- /dev/null +++ b/img/manaSymbols/majp/majp2.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp3.svg b/img/manaSymbols/majp/majp3.svg new file mode 100644 index 00000000..4fb5f49f --- /dev/null +++ b/img/manaSymbols/majp/majp3.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp4.svg b/img/manaSymbols/majp/majp4.svg new file mode 100644 index 00000000..52823609 --- /dev/null +++ b/img/manaSymbols/majp/majp4.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp5.svg b/img/manaSymbols/majp/majp5.svg new file mode 100644 index 00000000..894b5f6f --- /dev/null +++ b/img/manaSymbols/majp/majp5.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp6.svg b/img/manaSymbols/majp/majp6.svg new file mode 100644 index 00000000..420fa4ff --- /dev/null +++ b/img/manaSymbols/majp/majp6.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp7.svg b/img/manaSymbols/majp/majp7.svg new file mode 100644 index 00000000..2d378999 --- /dev/null +++ b/img/manaSymbols/majp/majp7.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp8.svg b/img/manaSymbols/majp/majp8.svg new file mode 100644 index 00000000..1641119b --- /dev/null +++ b/img/manaSymbols/majp/majp8.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majp9.svg b/img/manaSymbols/majp/majp9.svg new file mode 100644 index 00000000..d6457d78 --- /dev/null +++ b/img/manaSymbols/majp/majp9.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majpb.svg b/img/manaSymbols/majp/majpb.svg new file mode 100644 index 00000000..988e8613 --- /dev/null +++ b/img/manaSymbols/majp/majpb.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majpc.svg b/img/manaSymbols/majp/majpc.svg new file mode 100644 index 00000000..74a8d1dd --- /dev/null +++ b/img/manaSymbols/majp/majpc.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majpg.svg b/img/manaSymbols/majp/majpg.svg new file mode 100644 index 00000000..fdc510d2 --- /dev/null +++ b/img/manaSymbols/majp/majpg.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majpr.svg b/img/manaSymbols/majp/majpr.svg new file mode 100644 index 00000000..9080d616 --- /dev/null +++ b/img/manaSymbols/majp/majpr.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majpu.svg b/img/manaSymbols/majp/majpu.svg new file mode 100644 index 00000000..867b45b4 --- /dev/null +++ b/img/manaSymbols/majp/majpu.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majpw.svg b/img/manaSymbols/majp/majpw.svg new file mode 100644 index 00000000..72ddbb8e --- /dev/null +++ b/img/manaSymbols/majp/majpw.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/manaSymbols/majp/majpx.svg b/img/manaSymbols/majp/majpx.svg new file mode 100644 index 00000000..398ac83b --- /dev/null +++ b/img/manaSymbols/majp/majpx.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/img/setSymbols/cc-sta.svg b/img/setSymbols/cc-sta.svg new file mode 100644 index 00000000..6365ab3f --- /dev/null +++ b/img/setSymbols/cc-sta.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/js/creator-12.js b/js/creator-13.js similarity index 97% rename from js/creator-12.js rename to js/creator-13.js index 5dd7d1b7..de034e61 100644 --- a/js/creator-12.js +++ b/js/creator-13.js @@ -399,7 +399,11 @@ function addFrame(additionalMasks = [], loadingFrame = false) { frameToAdd.image.crossOrigin = 'anonymous' frameToAdd.image.src = blank.src; frameToAdd.image.onload = drawFrames; - frameToAdd.image.src = fixUri(frameToAdd.src); + if ('stretch' in frameToAdd) { + stretchSVG(frameToAdd); + } else { + frameToAdd.image.src = fixUri(frameToAdd.src); + } if (!loadingFrame) { card.frames.unshift(frameToAdd); } @@ -557,6 +561,22 @@ function writeText(textObject, targetContext) { } var splitText = rawText.replace(/\n/g, '{line}').replace(/{flavor}/g, '{lns}{bar}{lns}{fixtextalign}{i}').replace(/{/g, splitString + '{').replace(/}/g, '}' + splitString).replace(/ /g, splitString + ' ' + splitString).split(splitString); splitText = splitText.filter(item => item); + if (textObject.vertical) { + newSplitText = []; + splitText.forEach(item => { + if (item.includes('{') && item.includes('}')) { + newSplitText.push(item); + } else if (item == ' ') { + newSplitText.push(`{down${scaleHeight(0.01)}}`); + } else { + item.split('').forEach(char => { + newSplitText.push(char, '{lns}'); + }); + // newSplitText = newSplitText.concat(item.split('')); + } + }); + splitText = newSplitText; + } // if (textManaCost && textObject.arcStart > 0) { // splitText.reverse(); // } @@ -1430,6 +1450,47 @@ function loadScript(scriptPath) { document.querySelectorAll('head')[0].appendChild(script); } } +// Stretchable SVGs +function stretchSVG(frameObject) { + xhr = new XMLHttpRequest(); + xhr.open('GET', fixUri(frameObject.src), true); + xhr.overrideMimeType('image/svg+xml'); + xhr.onload = function(e) { + frameObject.image.src = 'data:image/svg+xml;charset=utf-8,' + stretchSVGReal((new XMLSerializer).serializeToString(xhr.responseXML.documentElement), frameObject); + } + xhr.send(); +} +function stretchSVGReal(data, frameObject) { + var returnData = data; + frameObject.stretch.forEach(stretch => { + const change = stretch.change; + const targets = stretch.targets; + const name = stretch.name; + const oldData = returnData.split(name + '" d="')[1].split('" style=')[0]; + var newData = ''; + const listData = oldData.replace(/L/g, '|L').replace(/C/g, '|C').replace(/M/g, '|M').replace(/Z/g, '|Z').replace('|', '').split('|'); + for (i = 0; i < listData.length; i ++) { + const item = listData[i] + if (targets.includes(i)) { + if (item[0] == 'C') { + newCoords = []; + item.slice(1).split(' ').forEach(pair => { + coords = pair.split(','); + newCoords.push((scaleWidth(change[0]) + parseFloat(coords[0])) + ',' + (scaleHeight(change[1]) + parseFloat(coords[1]))); + }); + newData += 'C' + newCoords.join(' '); + } else { + const coords = item.slice(1).split(','); + newData += item[0] + (scaleWidth(change[0]) + parseFloat(coords[0])) + ',' + (scaleHeight(change[1]) + parseFloat(coords[1])) + } + } else { + newData += item; + } + } + returnData = returnData.replace(oldData, newData); + }); + return returnData; +} //SCRYFALL STUFF MAY BE CHANGED IN THE FUTURE function fetchScryfallData(cardName, callback = console.log) { var xhttp = new XMLHttpRequest(); diff --git a/js/frames/groupShowcase-5.js b/js/frames/groupShowcase-5.js index 833ba270..bc1518fb 100644 --- a/js/frames/groupShowcase-5.js +++ b/js/frames/groupShowcase-5.js @@ -1,4 +1,5 @@ loadFramePacks([ + {name:'Mystical Archive (Japanese)', value:'MysticalArchiveJP'}, {name:'Mystical Archive', value:'MysticalArchive'}, {name:'Praetors', value:'Praetors'}, {name:'Kaldheim', value:'Kaldheim-2'}, diff --git a/js/frames/manaSymbolsMysticalArchiveJP.js b/js/frames/manaSymbolsMysticalArchiveJP.js new file mode 100644 index 00000000..ac3312a7 --- /dev/null +++ b/js/frames/manaSymbolsMysticalArchiveJP.js @@ -0,0 +1,12 @@ +//checks to see if it needs to run +if (!card.manaSymbols.includes('/js/frames/manaSymbolsOutline.js')) { + card.manaSymbols.push('/js/frames/manaSymbolsOutline.js'); +} +if (findManaSymbolIndex('majpw') == -1) { + loadManaSymbols([ + 'majp/majpw', 'majp/majpu', 'majp/majpb', 'majp/majpr', 'majp/majpg', + 'majp/majpc', 'majp/majpx', 'majp/majp0', 'majp/majp1', + 'majp/majp2', 'majp/majp3', 'majp/majp4', 'majp/majp5', 'majp/majp6', + 'majp/majp7', 'majp/majp8', 'majp/majp9' + ]); +} \ No newline at end of file diff --git a/js/frames/manaSymbolsOutline.js b/js/frames/manaSymbolsOutline.js index 61db5f2c..1d9780e5 100644 --- a/js/frames/manaSymbolsOutline.js +++ b/js/frames/manaSymbolsOutline.js @@ -2,7 +2,7 @@ if (!card.manaSymbols.includes('/js/frames/manaSymbolsOutline.js')) { card.manaSymbols.push('/js/frames/manaSymbolsOutline.js'); } -if (findManaSymbolIndex('cw') == -1) { +if (findManaSymbolIndex('outlinew') == -1) { loadManaSymbols([ 'outline/outlinew', 'outline/outlineu', 'outline/outlineb', 'outline/outliner', 'outline/outlineg', 'outline/outlinec', 'outline/outlines', 'outline/outlinex', 'outline/outline0', 'outline/outline1', diff --git a/js/frames/packM15BoxTopper.js b/js/frames/packM15BoxTopper.js index aa50345a..a25ffc11 100644 --- a/js/frames/packM15BoxTopper.js +++ b/js/frames/packM15BoxTopper.js @@ -12,6 +12,7 @@ availableFrames = [ {name:'Artifact Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameA.png', masks:masks}, {name:'Land Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameL.png', masks:masks}, {name:'Vehicle Frame', src:'/img/frames/m15/boxTopper/m15BoxTopperFrameV.png', masks:masks}, + {name:'Colorless Frame', src:'/img/frames/m15/boxTopper/c.png', masks:masks}, {name:'Bevel Cutout for Nickname', src:'/img/black.png', bounds:{x:0.058, y:0.111, width:0.884, height:0.0381}, erase:true}, {name:'Nickname Bevel', src:'/img/frames/m15/boxTopper/m15BoxTopperNicknameBevel.png', bounds:{x:0.058, y:0.111, width:0.884, height:0.0381}} ]; diff --git a/js/frames/packMysticalArchiveJP.js b/js/frames/packMysticalArchiveJP.js new file mode 100644 index 00000000..158c6d76 --- /dev/null +++ b/js/frames/packMysticalArchiveJP.js @@ -0,0 +1,66 @@ +//Create objects for common properties across available frames +var masks = [{src:'/img/frames/mysticalArchive/jp/pinline.svg', name:'Pinline'}]; +var stretch = [ + {name:'adjustable', targets: [0, 1, 6, 7, 8, 10, 11, 16, 17, 18, 20, 21, 22, 27, 28], change:[0, 0]}, + {name:'typePinline', targets: [0, 1, 2, 3, 4, 5, 6, 12, 14, 18, 19, 20, 21, 22, 23], change:[0, 0]}, + {name:'type', targets: [0, 1, 2], change:[0, 0]} +]; +var bounds = {x:0.8027, y:0.5381, width:0.116, height:0.0829} +var bounds2 = {x:0.7767, y:0.8881, width:0.1687, height:0.0591} +// Notification +notify('When you load the Japanese Mystical Archive frame version, a "Mystical Archive" tab will appear. This tab allows you to control the height of the title bar.', 15); +//defines available frames +availableFrames = [ + {name:'White Frame', src:'/img/frames/mysticalArchive/jp/w.svg', stretch:stretch, masks:masks}, + {name:'Blue Frame', src:'/img/frames/mysticalArchive/jp/u.svg', stretch:stretch, masks:masks}, + {name:'Black Frame', src:'/img/frames/mysticalArchive/jp/b.svg', stretch:stretch, masks:masks}, + {name:'Red Frame', src:'/img/frames/mysticalArchive/jp/r.svg', stretch:stretch, masks:masks}, + {name:'Green Frame', src:'/img/frames/mysticalArchive/jp/g.svg', stretch:stretch, masks:masks}, + {name:'Multicolored Frame', src:'/img/frames/mysticalArchive/jp/m.svg', stretch:stretch, masks:masks}, + {name:'Artifact Frame', src:'/img/frames/mysticalArchive/jp/a.svg', stretch:stretch, masks:masks}, + {name:'Land Frame', src:'/img/frames/mysticalArchive/jp/l.svg', stretch:stretch, masks:masks}, + {name:'Uncommon', src:'/img/frames/mysticalArchive/jp/uncommon.png', bounds:bounds}, + {name:'Rare', src:'/img/frames/mysticalArchive/jp/rare.png', bounds:bounds}, + {name:'Mythic', src:'/img/frames/mysticalArchive/jp/mythic.png', bounds:bounds}, + {name:'Power/Toughness Cutout', src:'/img/frames/mysticalArchive/jp/pt/cutout.svg', bounds:bounds2, erase:true}, + {name:'White Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/w.svg', bounds:bounds2}, + {name:'Blue Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/u.svg', bounds:bounds2}, + {name:'Black Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/b.svg', bounds:bounds2}, + {name:'Red Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/r.svg', bounds:bounds2}, + {name:'Green Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/g.svg', bounds:bounds2}, + {name:'Multicolored Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/m.svg', bounds:bounds2}, + {name:'Artifact Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/a.svg', bounds:bounds2}, + {name:'Land Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/l.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(); + // Notification + notify('For a better Japanese font, use {fontjapanese-title} or {fontjapanese}.', 15) + //sets card version + card.version = 'MAJP'; + card.onload = '/js/frames/versionMysticalArchiveJP.js'; + loadScript('/js/frames/versionMysticalArchiveJP.js'); + //art bounds + card.artBounds = {x:0, y:0, width:1, height:0.9286}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.8607, y:0.5796, width:0.116, height:0.0829, vertical:'center', horizontal: 'center'}; + resetSetSymbol(); + //watermark bounds + card.watermarkBounds = {x:0.5, y:0.7705, width:0.75, height:0.2362}; + resetWatermark(); + //text + loadTextOptions({ + mana: {name:'Mana Cost', text:'', y:0.0505, width:0.9414, height:100/2100, oneLine:true, size:100/1638, align:'right', manaCost:true, manaSpacing:-0.0015, manaPrefix:'majp'}, + title: {name:'Title', text:'', x:0.09, y:0.0715, width:0.1194, height:0.1286, font:'belerenb', size:0.0305, align:'center', vertical:true, color:'white'}, + type: {name:'Type', text:'', x:0.08, y:0.5548, width:0.2867, height:0.0543, oneLine:true, font:'belerenb', size:0.0324, align:'center'}, + rules: {name:'Rules Text', text:'', x:0.0934, y:0.6248, width:0.8134, height:0.2934, 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(); \ No newline at end of file diff --git a/js/frames/versionMysticalArchiveJP.js b/js/frames/versionMysticalArchiveJP.js new file mode 100644 index 00000000..cfd9e4ff --- /dev/null +++ b/js/frames/versionMysticalArchiveJP.js @@ -0,0 +1,41 @@ +//checks to see if it needs to run +if (!loadedVersions.includes('/js/frames/versionMysticalArchiveJP.js')) { + loadedVersions.push('/js/frames/versionMysticalArchiveJP.js'); + document.querySelector('#creator-menu-tabs').innerHTML += '

Mystical Archive

'; + var newHTML = document.createElement('div'); + newHTML.id = 'creator-menu-mysticalArchive'; + newHTML.classList.add('hidden'); + newHTML.innerHTML = ` +
+
Adjust the title bar's height:
+ +
+
+
Adjust the type bar's width:
+ +
+ `; + document.querySelector('#creator-menu-sections').appendChild(newHTML); + loadScript('/js/frames/manaSymbolsMysticalArchiveJP.js'); +} + +function stretchMysticalArchive() { + const change1 = [0, (parseInt(document.querySelector('#ma-change1').value) - 270) / 2100]; + const change2 = [(parseInt(document.querySelector('#ma-change2').value) - 430) / 1260, 0]; + // var targets = [] + // document.querySelector('#ma-targets').value.split(' ').forEach(item => targets.push(parseInt(item))); + card.frames.forEach(frame => { + if (frame.src.includes('Archive/jp') && 'stretch' in frame) { + frame.stretch[0].change = change1; + card.text.title.height = change1[1] + 270 / 2100; + frame.stretch[1].change = change2; + frame.stretch[2].change = change2; + card.text.type.width = change2[0] + 430 / 1500; + drawTextBuffer(); + stretchSVG(frame); + } + }); +}