diff --git a/data/images/masks/BorderSeventh.png b/data/images/masks/BorderSeventh.png new file mode 100644 index 00000000..ee74d92e Binary files /dev/null and b/data/images/masks/BorderSeventh.png differ diff --git a/data/images/masks/FrameSeventh.png b/data/images/masks/FrameSeventh.png new file mode 100644 index 00000000..a5acaed2 Binary files /dev/null and b/data/images/masks/FrameSeventh.png differ diff --git a/data/images/masks/PinlineSeventh.png b/data/images/masks/PinlineSeventh.png new file mode 100644 index 00000000..f7983f35 Binary files /dev/null and b/data/images/masks/PinlineSeventh.png differ diff --git a/data/images/masks/RulesTextSeventh.png b/data/images/masks/RulesTextSeventh.png new file mode 100644 index 00000000..632c0a17 Binary files /dev/null and b/data/images/masks/RulesTextSeventh.png differ diff --git a/data/images/seventh/seventhAFull.png b/data/images/seventh/seventhAFull.png new file mode 100644 index 00000000..81ec1b38 Binary files /dev/null and b/data/images/seventh/seventhAFull.png differ diff --git a/data/images/seventh/seventhBFull.png b/data/images/seventh/seventhBFull.png new file mode 100644 index 00000000..94c70b97 Binary files /dev/null and b/data/images/seventh/seventhBFull.png differ diff --git a/data/images/seventh/seventhBLFull.png b/data/images/seventh/seventhBLFull.png new file mode 100644 index 00000000..528e6bc3 Binary files /dev/null and b/data/images/seventh/seventhBLFull.png differ diff --git a/data/images/seventh/seventhCSV.csv b/data/images/seventh/seventhCSV.csv new file mode 100644 index 00000000..f9899d84 --- /dev/null +++ b/data/images/seventh/seventhCSV.csv @@ -0,0 +1,16 @@ +displayName,imagePath,maskOptions,framePickerOptions +White,seventh/seventhWFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Blue,seventh/seventhUFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Black,seventh/seventhBFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Red,seventh/seventhRFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Green,seventh/seventhGFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Multicolored,seventh/seventhMFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Artifact,seventh/seventhAFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +White Land,seventh/seventhWLFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Blue Land,seventh/seventhULFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Black Land,seventh/seventhBLFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Red Land,seventh/seventhRLFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Green Land,seventh/seventhGLFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Multicolored Land,seventh/seventhMLFull.png,Full-0-0-744-1039;Pinline Seventh-0-0-744-1039;Rules Text Seventh-0-0-744-1039,Seventh +Border,masks/BorderSeventh.png,Full-0-0-744-1039;Border Seventh-0-0-744-1039,Seventh +Foil Stamp,seventh/seventhFoilStamp.png,Full-81-867-300-115,Seventh \ No newline at end of file diff --git a/data/images/seventh/seventhFoilStamp.png b/data/images/seventh/seventhFoilStamp.png new file mode 100644 index 00000000..dbee3ead Binary files /dev/null and b/data/images/seventh/seventhFoilStamp.png differ diff --git a/data/images/seventh/seventhGFull.png b/data/images/seventh/seventhGFull.png new file mode 100644 index 00000000..39409f90 Binary files /dev/null and b/data/images/seventh/seventhGFull.png differ diff --git a/data/images/seventh/seventhGLFull.png b/data/images/seventh/seventhGLFull.png new file mode 100644 index 00000000..9c7cc815 Binary files /dev/null and b/data/images/seventh/seventhGLFull.png differ diff --git a/data/images/seventh/seventhMFull.png b/data/images/seventh/seventhMFull.png new file mode 100644 index 00000000..8f214238 Binary files /dev/null and b/data/images/seventh/seventhMFull.png differ diff --git a/data/images/seventh/seventhMLFull.png b/data/images/seventh/seventhMLFull.png new file mode 100644 index 00000000..d0cb3429 Binary files /dev/null and b/data/images/seventh/seventhMLFull.png differ diff --git a/data/images/seventh/seventhRFull.png b/data/images/seventh/seventhRFull.png new file mode 100644 index 00000000..10fae618 Binary files /dev/null and b/data/images/seventh/seventhRFull.png differ diff --git a/data/images/seventh/seventhRLFull.png b/data/images/seventh/seventhRLFull.png new file mode 100644 index 00000000..5abe15f6 Binary files /dev/null and b/data/images/seventh/seventhRLFull.png differ diff --git a/data/images/seventh/seventhUFull.png b/data/images/seventh/seventhUFull.png new file mode 100644 index 00000000..78a1039c Binary files /dev/null and b/data/images/seventh/seventhUFull.png differ diff --git a/data/images/seventh/seventhULFull.png b/data/images/seventh/seventhULFull.png new file mode 100644 index 00000000..69ba154d Binary files /dev/null and b/data/images/seventh/seventhULFull.png differ diff --git a/data/images/seventh/seventhWFull.png b/data/images/seventh/seventhWFull.png new file mode 100644 index 00000000..29a69872 Binary files /dev/null and b/data/images/seventh/seventhWFull.png differ diff --git a/data/images/seventh/seventhWLFull.png b/data/images/seventh/seventhWLFull.png new file mode 100644 index 00000000..d71b0c8d Binary files /dev/null and b/data/images/seventh/seventhWLFull.png differ diff --git a/data/scripts/main.js b/data/scripts/main.js index 1507ebd8..00c073d1 100644 --- a/data/scripts/main.js +++ b/data/scripts/main.js @@ -5,6 +5,8 @@ function testFunction() { cardMaster.insertBefore(frameList[5].cardMasterElement("Full"), cardMaster.children[newFrameInsertionLocation]); cardMasterUpdated(); +// changeVersionTo("seventh") +// setTimeout(function() {cardMaster.insertBefore(frameList[40].cardMasterElement("Full"), cardMaster.children[newFrameInsertionLocation]);cardMasterUpdated();}, 1000); // console.log("First frame manually loaded") } @@ -301,7 +303,7 @@ function cardImageUpdated() { cardFinalContext.drawImage(bottomInfoCanvas, 0, 0, cardWidth, cardHeight); // cardFinalContext.drawImage(textCanvas, 0, 0, cardWidth, cardHeight); cardFinalContext.drawImage(setSymbolCanvas, 0, 0, cardWidth, cardHeight) - cardFinalContext.drawManaCost(document.getElementById("inputManaCost").value, version.manaCostX, version.manaCostY, version.manaCostDiameter, version.manaCostDistance, version.manaCostDirection) + cardFinalContext.drawManaCost(document.getElementById("inputManaCost").value, version.manaCostX, version.manaCostY, version.manaCostDiameter, version.manaCostDistance, version.manaCostDirection, version.manaCostVersion) //Clear the corners cardFinalContext.globalCompositeOperation = "destination-out" cardFinalContext.drawImage(maskList[1], 0, 0, cardWidth, cardHeight) @@ -576,6 +578,8 @@ CanvasRenderingContext2D.prototype.writeText = function(text = "", textX = 0, te outline = true; lineContext.strokeStyle = possibleCodeLower.replace("outline:", "").split(",")[0]; lineContext.lineWidth = parseInt(possibleCodeLower.replace("outline:", "").split(",")[1]); + } else if (possibleCodeLower.includes("shadow")) { + shadow = parseInt(possibleCodeLower.replace("shadow", "")); } else if (manaSymbolCodeList.includes(possibleCodeLower.split("/").join(""))) { //THIS HAS TO BE THE LAST ONE var manaSymbolDiameter = textSize * 0.77 @@ -622,7 +626,9 @@ CanvasRenderingContext2D.prototype.writeText = function(text = "", textX = 0, te } //Whether or not the current line is finished, write to it. if (shadow > 0) { - lineContext.fillText(wordToWrite, currentLineX + shadow, currentLineY + shadow) + lineContext.fillStyle = "black"; + lineContext.fillText(wordToWrite, currentLineX + shadow, currentLineY + shadow); + lineContext.fillStyle = textColor; } if (outline != undefined) { lineContext.strokeText(wordToWrite, currentLineX, currentLineY) @@ -655,7 +661,7 @@ function loadManaSymbolImages() { } } //Draws a mana cost -CanvasRenderingContext2D.prototype.drawManaCost = function(text, symbolsX, symbolsY, diameter = 50, distance = -50, direction = "horizontal") { +CanvasRenderingContext2D.prototype.drawManaCost = function(text, symbolsX, symbolsY, diameter = 50, distance = -50, direction = "horizontal", version = "m15") { var splitManaCost = text.toLowerCase().replace(/{/g, " ").replace(/}/g, " ").split("/").join("").split(" ") var currentSymbolIndex = 0 var currentX = symbolsX @@ -666,11 +672,15 @@ CanvasRenderingContext2D.prototype.drawManaCost = function(text, symbolsX, symbo currentX = direction[i][0] currentY = direction[i][1] } - this.fillStyle = "black" - this.beginPath() - this.arc(currentX + diameter / 2.13, currentY + diameter / 1.7, diameter / 2, 0, 2 * Math.PI, false) - this.fill() - this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter) + if (version == "m15") { + this.fillStyle = "black" + this.beginPath() + this.arc(currentX + diameter / 2.13, currentY + diameter / 1.7, diameter / 2, 0, 2 * Math.PI, false) + this.fill() + this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter) + } else if (version == "seventh") { + this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter) + } if (direction == "horizontal") { currentX += distance } else if (direction == "vertical") { @@ -894,7 +904,8 @@ function textCodeTutorial() { _left#-moves the following text # pixels left _right#-moves the following text # pixels right _SYMBOL-creates a mana symbol, where SYMBOL can be: w, u, b, r, g, 1, 2, 3, etc... - _outline:*,#-outlines the following text with # thickness and * color` + _outline:*,#-outlines the following text with # thickness and * color + _shadow#-creates a text shadow # pixels left and # pixels right` var textCodeTutorialArray = textCodeTutorialString.split("_") for (var i = 0; i < textCodeTutorialArray.length; i ++) { document.getElementById("textCodeTutorial").innerHTML += "
{" + textCodeTutorialArray[i].split("-")[0] + "}
" + textCodeTutorialArray[i].split("-")[1] + "
" diff --git a/data/versions/expedition.js b/data/versions/expedition.js index cebb27ea..d628195f 100644 --- a/data/versions/expedition.js +++ b/data/versions/expedition.js @@ -25,6 +25,7 @@ version.manaCostY = scale(54) version.manaCostDiameter = scale(34) version.manaCostDistance = scale(-38) version.manaCostDirection = "horizontal" +version.manaCostVersion = "m15" version.watermarkWidth = scale(520) version.watermarkHeight = scale(250) version.watermarkY = scale(800) diff --git a/data/versions/m15.js b/data/versions/m15.js index 49434c50..1a83f2d9 100644 --- a/data/versions/m15.js +++ b/data/versions/m15.js @@ -26,6 +26,7 @@ version.manaCostY = scale(60) version.manaCostDiameter = scale(34) version.manaCostDistance = scale(-38) version.manaCostDirection = "horizontal" +version.manaCostVersion = "m15" // version.rareStampX = scale(340) // version.rareStampY = scale(965) // version.rareStampWidth = scale(70) diff --git a/data/versions/m15extras.js b/data/versions/m15extras.js index c245ab91..6546d75b 100644 --- a/data/versions/m15extras.js +++ b/data/versions/m15extras.js @@ -26,6 +26,7 @@ version.manaCostY = scale(60) version.manaCostDiameter = scale(34) version.manaCostDistance = scale(-38) version.manaCostDirection = "horizontal" +version.manaCostVersion = "m15" version.watermarkWidth = scale(520) version.watermarkHeight = scale(250) version.watermarkY = scale(800) diff --git a/data/versions/planeswalker.js b/data/versions/planeswalker.js index 2c23aeb5..5b53b28d 100644 --- a/data/versions/planeswalker.js +++ b/data/versions/planeswalker.js @@ -28,6 +28,7 @@ version.manaCostY = scale(43) version.manaCostDiameter = scale(34) version.manaCostDistance = scale(-39) version.manaCostDirection = "horizontal" +version.manaCostVersion = "m15" version.watermarkWidth = scale(520) version.watermarkHeight = scale(250) version.watermarkY = scale(800) diff --git a/data/versions/seventh.js b/data/versions/seventh.js new file mode 100644 index 00000000..41d3e036 --- /dev/null +++ b/data/versions/seventh.js @@ -0,0 +1,45 @@ +//============================================// +// Card Conjurer, by Kyle Burton // +//============================================// +if (version.currentVersion != "seventh") { + //Name, text, x, y, width, height, font, size, color, other + version.textList = [ + ["Title", "", scale(82), scale(70), scale(630), 0, "goudymedieval", 42, "white", "oneLine=true,shadow=2"], + ["Type", "", scale(82), scale(600), scale(630), 0, "mplantin", 33, "white", "oneLine=true,shadow=2"], + ["Rules Text", "", scale(97), scale(630), scale(554), scale(292), "mplantin", 36, "black", "lineSpace=0.97"], + ["Power Toughness", "", scale(592), scale(959), scale(110), 0, "mplantin", 47, "white", "oneLine=true,textAlign='center',shadow=2"] + ]; +} +version.currentVersion = "seventh" +version.artX = scale(88) +version.artY = scale(102) +version.artWidth = scale(567) +version.artHeight = scale(461) +version.setSymbolRight = scale(663) +version.setSymbolVertical = scale(598) +version.setSymbolWidth = scale(90) +version.setSymbolHeight = scale(39) +version.bottomInfoFunction = "seventhBottomInfo" +version.manaCostX = scale(648) +version.manaCostY = scale(49) +version.manaCostDiameter = scale(36) +version.manaCostDistance = scale(-41) +version.manaCostDirection = "horizontal" +version.manaCostVersion = "seventh" +version.watermarkWidth = scale(520) +version.watermarkHeight = scale(250) +version.watermarkY = scale(800) +version.masksToAdd = ["Rules Text Seventh", "Pinline Seventh", "Frame Seventh", "Border Seventh"]; +filterFramePicker("frameClassSeventh"); + + +function seventhBottomInfo() { + //remember to ctrl+f for 'artistBrushWidth' and adjust that when fixing these values! + bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight) + bottomInfoContext.writeText("{center}{shadow2}Illus: " + document.getElementById("inputInfoArtist").value, scale(46), scale(948), scale(651), 0, "mplantin", 29, "white", "oneLine=true") + bottomInfoContext.writeText("{center}\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast *Not For Sale*", scale(46), scale(972), scale(651), 0, "mplantin", 18, "white", "oneLine=true,textAlign='right'") + cardImageUpdated() +} + setTimeout(seventhBottomInfo, 250) + +finishChangingVersion("data/images/seventh/seventhCSV.csv") diff --git a/data/versions/unhinged.js b/data/versions/unhinged.js index 668c65c3..f45cb809 100644 --- a/data/versions/unhinged.js +++ b/data/versions/unhinged.js @@ -23,6 +23,7 @@ version.manaCostY = scale(60) version.manaCostDiameter = scale(34) version.manaCostDistance = scale(-38) version.manaCostDirection = "horizontal" +version.manaCostVersion = "m15" version.watermarkWidth = scale(520) version.watermarkHeight = scale(250) version.watermarkY = scale(800) diff --git a/index.html b/index.html index bba2be7b..06a55c85 100644 --- a/index.html +++ b/index.html @@ -132,6 +132,7 @@ +
Hide unrelated frames