diff --git a/img/frames/mysticalArchive/crowns/a.svg b/img/frames/mysticalArchive/crowns/a.svg new file mode 100644 index 00000000..c2113d7d --- /dev/null +++ b/img/frames/mysticalArchive/crowns/a.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/aThumb.png b/img/frames/mysticalArchive/crowns/aThumb.png new file mode 100644 index 00000000..527a5859 Binary files /dev/null and b/img/frames/mysticalArchive/crowns/aThumb.png differ diff --git a/img/frames/mysticalArchive/crowns/b.svg b/img/frames/mysticalArchive/crowns/b.svg new file mode 100644 index 00000000..e65c8fe4 --- /dev/null +++ b/img/frames/mysticalArchive/crowns/b.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/bThumb.png b/img/frames/mysticalArchive/crowns/bThumb.png new file mode 100644 index 00000000..000cf0ae Binary files /dev/null and b/img/frames/mysticalArchive/crowns/bThumb.png differ diff --git a/img/frames/mysticalArchive/crowns/g.svg b/img/frames/mysticalArchive/crowns/g.svg new file mode 100644 index 00000000..2c972520 --- /dev/null +++ b/img/frames/mysticalArchive/crowns/g.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/gThumb.png b/img/frames/mysticalArchive/crowns/gThumb.png new file mode 100644 index 00000000..14ce21c0 Binary files /dev/null and b/img/frames/mysticalArchive/crowns/gThumb.png differ diff --git a/img/frames/mysticalArchive/crowns/l.svg b/img/frames/mysticalArchive/crowns/l.svg new file mode 100644 index 00000000..eca71970 --- /dev/null +++ b/img/frames/mysticalArchive/crowns/l.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/lThumb.png b/img/frames/mysticalArchive/crowns/lThumb.png new file mode 100644 index 00000000..5da2274b Binary files /dev/null and b/img/frames/mysticalArchive/crowns/lThumb.png differ diff --git a/img/frames/mysticalArchive/crowns/m.svg b/img/frames/mysticalArchive/crowns/m.svg new file mode 100644 index 00000000..72b270b6 --- /dev/null +++ b/img/frames/mysticalArchive/crowns/m.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/mThumb.png b/img/frames/mysticalArchive/crowns/mThumb.png new file mode 100644 index 00000000..3004d875 Binary files /dev/null and b/img/frames/mysticalArchive/crowns/mThumb.png differ diff --git a/img/frames/mysticalArchive/crowns/r.svg b/img/frames/mysticalArchive/crowns/r.svg new file mode 100644 index 00000000..bcc44ce9 --- /dev/null +++ b/img/frames/mysticalArchive/crowns/r.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/rThumb.png b/img/frames/mysticalArchive/crowns/rThumb.png new file mode 100644 index 00000000..f8fc866d Binary files /dev/null and b/img/frames/mysticalArchive/crowns/rThumb.png differ diff --git a/img/frames/mysticalArchive/crowns/u.svg b/img/frames/mysticalArchive/crowns/u.svg new file mode 100644 index 00000000..585871c1 --- /dev/null +++ b/img/frames/mysticalArchive/crowns/u.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/uThumb.png b/img/frames/mysticalArchive/crowns/uThumb.png new file mode 100644 index 00000000..2cf8ad3c Binary files /dev/null and b/img/frames/mysticalArchive/crowns/uThumb.png differ diff --git a/img/frames/mysticalArchive/crowns/w.svg b/img/frames/mysticalArchive/crowns/w.svg new file mode 100644 index 00000000..00131c59 --- /dev/null +++ b/img/frames/mysticalArchive/crowns/w.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/frames/mysticalArchive/crowns/wThumb.png b/img/frames/mysticalArchive/crowns/wThumb.png new file mode 100644 index 00000000..95257ae0 Binary files /dev/null and b/img/frames/mysticalArchive/crowns/wThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/a.svg b/img/frames/mysticalArchive/jp/crowns/a.svg new file mode 100644 index 00000000..ad30f173 --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/a.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/aThumb.png b/img/frames/mysticalArchive/jp/crowns/aThumb.png new file mode 100644 index 00000000..45852de5 Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/aThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/b.svg b/img/frames/mysticalArchive/jp/crowns/b.svg new file mode 100644 index 00000000..69e543b8 --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/b.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/bThumb.png b/img/frames/mysticalArchive/jp/crowns/bThumb.png new file mode 100644 index 00000000..e7ca566e Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/bThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/g.svg b/img/frames/mysticalArchive/jp/crowns/g.svg new file mode 100644 index 00000000..7408aeb2 --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/g.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/gThumb.png b/img/frames/mysticalArchive/jp/crowns/gThumb.png new file mode 100644 index 00000000..60f9d7e0 Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/gThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/l.svg b/img/frames/mysticalArchive/jp/crowns/l.svg new file mode 100644 index 00000000..078d8d8b --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/l.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/lThumb.png b/img/frames/mysticalArchive/jp/crowns/lThumb.png new file mode 100644 index 00000000..87aa010d Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/lThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/m.svg b/img/frames/mysticalArchive/jp/crowns/m.svg new file mode 100644 index 00000000..96dba45a --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/m.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/mThumb.png b/img/frames/mysticalArchive/jp/crowns/mThumb.png new file mode 100644 index 00000000..ba738998 Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/mThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/r.svg b/img/frames/mysticalArchive/jp/crowns/r.svg new file mode 100644 index 00000000..5c421845 --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/r.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/rThumb.png b/img/frames/mysticalArchive/jp/crowns/rThumb.png new file mode 100644 index 00000000..7502e4db Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/rThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/u.svg b/img/frames/mysticalArchive/jp/crowns/u.svg new file mode 100644 index 00000000..584dedaa --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/u.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/uThumb.png b/img/frames/mysticalArchive/jp/crowns/uThumb.png new file mode 100644 index 00000000..fd3de5a1 Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/uThumb.png differ diff --git a/img/frames/mysticalArchive/jp/crowns/w.svg b/img/frames/mysticalArchive/jp/crowns/w.svg new file mode 100644 index 00000000..edca5eaa --- /dev/null +++ b/img/frames/mysticalArchive/jp/crowns/w.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/frames/mysticalArchive/jp/crowns/wThumb.png b/img/frames/mysticalArchive/jp/crowns/wThumb.png new file mode 100644 index 00000000..fa0ae044 Binary files /dev/null and b/img/frames/mysticalArchive/jp/crowns/wThumb.png differ diff --git a/js/creator-22.js b/js/creator-22.js index 6584dd35..d77e57c7 100644 --- a/js/creator-22.js +++ b/js/creator-22.js @@ -138,6 +138,7 @@ sizeCanvas('line'); sizeCanvas('watermark'); sizeCanvas('bottomInfo'); sizeCanvas('guidelines'); +sizeCanvas('prePT'); //Scaling function scaleX(input) { return Math.round((input + card.marginX) * card.width); @@ -295,7 +296,7 @@ function drawFrames() { haveDrawnPrePTCanvas = true; frameContext.globalCompositeOperation = 'source-over'; frameContext.globalAlpha = 1; - frameContext.drawImage(textCanvas, 0, 0, frameCanvas.width, frameCanvas.height); + frameContext.drawImage(prePTCanvas, 0, 0, frameCanvas.width, frameCanvas.height); } frameContext.globalCompositeOperation = item.mode || 'source-over'; frameContext.globalAlpha = item.opacity / 100 || 1; @@ -333,7 +334,7 @@ function drawFrames() { haveDrawnPrePTCanvas = true; frameContext.globalCompositeOperation = 'source-over'; frameContext.globalAlpha = 1; - frameContext.drawImage(textCanvas, 0, 0, frameCanvas.width, frameCanvas.height); + frameContext.drawImage(prePTCanvas, 0, 0, frameCanvas.width, frameCanvas.height); } drawCard(); } @@ -680,6 +681,7 @@ function drawTextBuffer() { } async function drawText() { textContext.clearRect(0, 0, textCanvas.width, textCanvas.height); + prePTContext.clearRect(0, 0, prePTCanvas.width, prePTCanvas.height); drawTextBetweenFrames = false; for (var textObject of Object.entries(card.text)) { await writeText(textObject[1], textContext); @@ -782,6 +784,7 @@ function writeText(textObject, targetContext) { var manaPlacementCounter = 0; var realTextAlign = textAlign; savedRollYPosition = null; + var drawToPrePTCanvas = false; //variables that track various... things? var newLineSpacing = 0; var textSize = startingTextSize; @@ -931,6 +934,7 @@ function writeText(textObject, targetContext) { } else if (possibleCode.includes('roll')) { drawTextBetweenFrames = true; redrawFrames = true; + drawToPrePTCanvas = true; if (savedRollYPosition == null) { savedRollYPosition = currentY; } else { @@ -1086,17 +1090,21 @@ function writeText(textObject, targetContext) { if (!textObject.noVerticalCenter) { verticalAdjust = (textHeight - currentY + textSize * 0.15) / 2; } + var trueTargetContext = targetContext; + if (drawToPrePTCanvas) { + trueTargetContext = prePTContext; + } if (textRotation) { - targetContext.save(); - targetContext + trueTargetContext.save(); + trueTargetContext const shapeX = textX + ptShift[0]; const shapeY = textY + ptShift[1]; - targetContext.translate(shapeX, shapeY); - targetContext.rotate(Math.PI * textRotation / 180); - targetContext.drawImage(paragraphCanvas, permaShift[0] - canvasMargin, verticalAdjust - canvasMargin + permaShift[1]); - targetContext.restore(); + trueTargetContext.translate(shapeX, shapeY); + trueTargetContext.rotate(Math.PI * textRotation / 180); + trueTargetContext.drawImage(paragraphCanvas, permaShift[0] - canvasMargin, verticalAdjust - canvasMargin + permaShift[1]); + trueTargetContext.restore(); } else { - targetContext.drawImage(paragraphCanvas, textX - canvasMargin + ptShift[0] + permaShift[0], textY - canvasMargin + verticalAdjust + ptShift[1] + permaShift[1]); + trueTargetContext.drawImage(paragraphCanvas, textX - canvasMargin + ptShift[0] + permaShift[0], textY - canvasMargin + verticalAdjust + ptShift[1] + permaShift[1]); } drawingText = false; } @@ -1472,7 +1480,7 @@ function drawCard() { } else if (card.version.includes('dungeon') && typeof dungeonCanvas !== "undefined") { cardContext.drawImage(dungeonCanvas, 0, 0, cardCanvas.width, cardCanvas.height); } - if (!drawTextBetweenFrames) {cardContext.drawImage(textCanvas, 0, 0, cardCanvas.width, cardCanvas.height);} + cardContext.drawImage(textCanvas, 0, 0, cardCanvas.width, cardCanvas.height); cardContext.drawImage(setSymbol, scaleX(card.setSymbolX), scaleY(card.setSymbolY), setSymbol.width * card.setSymbolZoom, setSymbol.height * card.setSymbolZoom) cardContext.drawImage(bottomInfoCanvas, 0, 0, cardCanvas.width, cardCanvas.height); // guidelines diff --git a/js/frames/groupMisc-2.js b/js/frames/groupMisc-2.js index 5f4757b2..f107d556 100644 --- a/js/frames/groupMisc-2.js +++ b/js/frames/groupMisc-2.js @@ -1,5 +1,4 @@ loadFramePacks([ - {name:'Dungeon (AFR)', value:'Dungeon'}, {name:'Conspiracies (Draft Matters)', value:'Conspiracy'}, {name:'Future Shifted', value:'FutureRegular'}, {name:'Seventh Edition', value:'Seventh'}, @@ -7,6 +6,7 @@ loadFramePacks([ {name:'Legends Multicolored', value:'Legends'}, {name:'Alpha/Beta/Unlimited', value:'ABU'}, {name:'Misc', value:'disabled'}, + {name:'Dungeon (AFR)', value:'Dungeon'}, {name:'Planechase', value:'Planechase'}, {name:'Vanguard', value:'Vanguard'} ]) \ No newline at end of file diff --git a/js/frames/groupStandard-3.js b/js/frames/groupStandard-3.js index afbedeb5..35a7596b 100644 --- a/js/frames/groupStandard-3.js +++ b/js/frames/groupStandard-3.js @@ -20,6 +20,7 @@ loadFramePacks([ {name:'Aftermath (Amonkhet)', value:'Aftermath'}, {name:'Flip (Kamigawa)', value:'Flip'}, {name:'Levelers (Zendikar)', value:'Levelers'}, + {name:'Conspiracies (Draft Matters)', value:'Conspiracy'}, {name:'Custom Addons', value:'disabled'}, {name:'Brawl Legend Crowns', value:'Brawl'} ]) \ No newline at end of file diff --git a/js/frames/packMysticalArchive.js b/js/frames/packMysticalArchive.js index 66e1c850..84bfa899 100644 --- a/js/frames/packMysticalArchive.js +++ b/js/frames/packMysticalArchive.js @@ -10,7 +10,15 @@ availableFrames = [ {name:'Multicolored Frame', src:'/img/frames/mysticalArchive/m.png', masks:masks}, {name:'Artifact Frame', src:'/img/frames/mysticalArchive/a.png', masks:masks}, {name:'Land Frame', src:'/img/frames/mysticalArchive/c.png', masks:masks}, - {name:'Power/Toughness', src:'/img/frames/mysticalArchive/pt.png', bounds:{x:0.7014, y:0.8924, width:0.222, height:0.0520}} + {name:'Power/Toughness', src:'/img/frames/mysticalArchive/pt.png', bounds:{x:0.7014, y:0.8924, width:0.222, height:0.0520}}, + {name:'White Crown', src:'/img/frames/mysticalArchive/crowns/w.svg'}, + {name:'Blue Crown', src:'/img/frames/mysticalArchive/crowns/u.svg'}, + {name:'Black Crown', src:'/img/frames/mysticalArchive/crowns/b.svg'}, + {name:'Red Crown', src:'/img/frames/mysticalArchive/crowns/r.svg'}, + {name:'Green Crown', src:'/img/frames/mysticalArchive/crowns/g.svg'}, + {name:'Multicolored Crown', src:'/img/frames/mysticalArchive/crowns/m.svg'}, + {name:'Artifact Crown', src:'/img/frames/mysticalArchive/crowns/a.svg'}, + {name:'Land Crown', src:'/img/frames/mysticalArchive/crowns/l.svg'} ]; //disables/enables the "Load Frame Version" button document.querySelector('#loadFrameVersion').disabled = false; diff --git a/js/frames/packMysticalArchiveJP.js b/js/frames/packMysticalArchiveJP.js index d2aff325..26ad9c44 100644 --- a/js/frames/packMysticalArchiveJP.js +++ b/js/frames/packMysticalArchiveJP.js @@ -30,7 +30,15 @@ availableFrames = [ {name:'Multicolored Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/m.svg', bounds:bounds2, complementary:19}, {name:'Artifact Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/a.svg', bounds:bounds2, complementary:19}, {name:'Land Power/Toughness', src:'/img/frames/mysticalArchive/jp/pt/l.svg', bounds:bounds2, complementary:19}, - {name:'Power/Toughness Cutout', src:'/img/frames/mysticalArchive/jp/pt/cutout.svg', bounds:bounds2, erase:true} + {name:'Power/Toughness Cutout', src:'/img/frames/mysticalArchive/jp/pt/cutout.svg', bounds:bounds2, erase:true}, + {name:'White Crown', src:'/img/frames/mysticalArchive/jp/crowns/w.svg'}, + {name:'Blue Crown', src:'/img/frames/mysticalArchive/jp/crowns/u.svg'}, + {name:'Black Crown', src:'/img/frames/mysticalArchive/jp/crowns/b.svg'}, + {name:'Red Crown', src:'/img/frames/mysticalArchive/jp/crowns/r.svg'}, + {name:'Green Crown', src:'/img/frames/mysticalArchive/jp/crowns/g.svg'}, + {name:'Multicolored Crown', src:'/img/frames/mysticalArchive/jp/crowns/m.svg'}, + {name:'Artifact Crown', src:'/img/frames/mysticalArchive/jp/crowns/a.svg'}, + {name:'Land Crown', src:'/img/frames/mysticalArchive/jp/crowns/l.svg'} ]; //disables/enables the "Load Frame Version" button document.querySelector('#loadFrameVersion').disabled = false;