diff --git a/data/images/future/futureAFull.png b/data/images/future/futureAFull.png new file mode 100644 index 00000000..7fc59f5b Binary files /dev/null and b/data/images/future/futureAFull.png differ diff --git a/data/images/future/futureAPT.png b/data/images/future/futureAPT.png new file mode 100644 index 00000000..81107e90 Binary files /dev/null and b/data/images/future/futureAPT.png differ diff --git a/data/images/future/futureBFull.png b/data/images/future/futureBFull.png new file mode 100644 index 00000000..7fb788e3 Binary files /dev/null and b/data/images/future/futureBFull.png differ diff --git a/data/images/future/futureBPT.png b/data/images/future/futureBPT.png new file mode 100644 index 00000000..d5c238f9 Binary files /dev/null and b/data/images/future/futureBPT.png differ diff --git a/data/images/future/futureCFull.png b/data/images/future/futureCFull.png new file mode 100644 index 00000000..ae8546ec Binary files /dev/null and b/data/images/future/futureCFull.png differ diff --git a/data/images/future/futureCPT.png b/data/images/future/futureCPT.png new file mode 100644 index 00000000..1ef49481 Binary files /dev/null and b/data/images/future/futureCPT.png differ diff --git a/data/images/future/futureCSV.csv b/data/images/future/futureCSV.csv new file mode 100644 index 00000000..196d902d --- /dev/null +++ b/data/images/future/futureCSV.csv @@ -0,0 +1,22 @@ +displayName,imagePath,maskOptions,framePickerOptions +White,future/futureWFull.png,Full-0-0-744-1039,Future +Blue,future/futureUFull.png,Full-0-0-744-1039,Future +Black,future/futureBFull.png,Full-0-0-744-1039,Future +Red,future/futureRFull.png,Full-0-0-744-1039,Future +Green,future/futureGFull.png,Full-0-0-744-1039,Future +Multicolored,future/futureMFull.png,Full-0-0-744-1039,Future +Artifact,future/futureAFull.png,Full-0-0-744-1039,Future +Land,future/futureLFull.png,Full-0-0-744-1039,Future +Colorless,future/futureCFull.png,Full-0-0-744-1039,Future +White Icon,future/futureWhite.png,Icon Future Creature-49-49-32-32;Icon Future Instant-49-49-32-32;Icon Future Sorcery-49-49-32-32;Icon Future Enchantment-49-49-32-32;Icon Future Artifact-49-49-32-32;Icon Future Land-49-49-32-32;Icon Future Multi-49-49-32-32,Future +Gray Icon,future/futureGray.png,Icon Future Creature-49-49-32-32;Icon Future Instant-49-49-32-32;Icon Future Sorcery-49-49-32-32;Icon Future Enchantment-49-49-32-32;Icon Future Artifact-49-49-32-32;Icon Future Land-49-49-32-32;Icon Future Multi-49-49-32-32,Future +White PT,future/futureWPT.png,Full-567-918-129-81,Future +Blue PT,future/futureUPT.png,Full-567-918-129-81,Future +Black PT,future/futureBPT.png,Full-567-918-129-81,Future +Red PT,future/futureRPT.png,Full-567-918-129-81,Future +Green PT,future/futureGPT.png,Full-567-918-129-81,Future +Multicolored PT,future/futureMPT.png,Full-567-918-129-81,Future +Artifact PT,future/futureAPT.png,Full-567-918-129-81,Future +Land PT,future/futureLPT.png,Full-567-918-129-81,Future +Colorless PT,future/futureCPT.png,Full-567-918-129-81,Future +Black Border,masks/BorderFuture.png,Full-0-0-744-1039;Border Future-0-0-744-1039,Future \ No newline at end of file diff --git a/data/images/future/futureGFull.png b/data/images/future/futureGFull.png new file mode 100644 index 00000000..cf268921 Binary files /dev/null and b/data/images/future/futureGFull.png differ diff --git a/data/images/future/futureGPT.png b/data/images/future/futureGPT.png new file mode 100644 index 00000000..2132e56f Binary files /dev/null and b/data/images/future/futureGPT.png differ diff --git a/data/images/future/futureGray.png b/data/images/future/futureGray.png new file mode 100644 index 00000000..e0af4f7e Binary files /dev/null and b/data/images/future/futureGray.png differ diff --git a/data/images/future/futureLFull.png b/data/images/future/futureLFull.png new file mode 100644 index 00000000..eb228a6c Binary files /dev/null and b/data/images/future/futureLFull.png differ diff --git a/data/images/future/futureLPT.png b/data/images/future/futureLPT.png new file mode 100644 index 00000000..ec1ea6d5 Binary files /dev/null and b/data/images/future/futureLPT.png differ diff --git a/data/images/future/futureMFull.png b/data/images/future/futureMFull.png new file mode 100644 index 00000000..b5b5a833 Binary files /dev/null and b/data/images/future/futureMFull.png differ diff --git a/data/images/future/futureMPT.png b/data/images/future/futureMPT.png new file mode 100644 index 00000000..99d09868 Binary files /dev/null and b/data/images/future/futureMPT.png differ diff --git a/data/images/future/futureRFull.png b/data/images/future/futureRFull.png new file mode 100644 index 00000000..f59b31a4 Binary files /dev/null and b/data/images/future/futureRFull.png differ diff --git a/data/images/future/futureRPT.png b/data/images/future/futureRPT.png new file mode 100644 index 00000000..14c35771 Binary files /dev/null and b/data/images/future/futureRPT.png differ diff --git a/data/images/future/futureUFull.png b/data/images/future/futureUFull.png new file mode 100644 index 00000000..0a04067c Binary files /dev/null and b/data/images/future/futureUFull.png differ diff --git a/data/images/future/futureUPT.png b/data/images/future/futureUPT.png new file mode 100644 index 00000000..0b834229 Binary files /dev/null and b/data/images/future/futureUPT.png differ diff --git a/data/images/future/futureWFull.png b/data/images/future/futureWFull.png new file mode 100644 index 00000000..afe9b2fc Binary files /dev/null and b/data/images/future/futureWFull.png differ diff --git a/data/images/future/futureWPT.png b/data/images/future/futureWPT.png new file mode 100644 index 00000000..97b817b0 Binary files /dev/null and b/data/images/future/futureWPT.png differ diff --git a/data/images/future/futureWhite.png b/data/images/future/futureWhite.png new file mode 100644 index 00000000..928ed091 Binary files /dev/null and b/data/images/future/futureWhite.png differ diff --git a/data/images/manaSymbols/64.png b/data/images/manaSymbols/64.png new file mode 100644 index 00000000..d409ee8d Binary files /dev/null and b/data/images/manaSymbols/64.png differ diff --git a/data/images/manaSymbols/65.png b/data/images/manaSymbols/65.png new file mode 100644 index 00000000..f3a332c3 Binary files /dev/null and b/data/images/manaSymbols/65.png differ diff --git a/data/images/manaSymbols/future/0.png b/data/images/manaSymbols/future/0.png new file mode 100644 index 00000000..a44c45f5 Binary files /dev/null and b/data/images/manaSymbols/future/0.png differ diff --git a/data/images/manaSymbols/future/1.png b/data/images/manaSymbols/future/1.png new file mode 100644 index 00000000..46ba6bf0 Binary files /dev/null and b/data/images/manaSymbols/future/1.png differ diff --git a/data/images/manaSymbols/future/10.png b/data/images/manaSymbols/future/10.png new file mode 100644 index 00000000..7669e8ba Binary files /dev/null and b/data/images/manaSymbols/future/10.png differ diff --git a/data/images/manaSymbols/future/11.png b/data/images/manaSymbols/future/11.png new file mode 100644 index 00000000..1038bb40 Binary files /dev/null and b/data/images/manaSymbols/future/11.png differ diff --git a/data/images/manaSymbols/future/12.png b/data/images/manaSymbols/future/12.png new file mode 100644 index 00000000..7bb86aec Binary files /dev/null and b/data/images/manaSymbols/future/12.png differ diff --git a/data/images/manaSymbols/future/13.png b/data/images/manaSymbols/future/13.png new file mode 100644 index 00000000..b7ef99b8 Binary files /dev/null and b/data/images/manaSymbols/future/13.png differ diff --git a/data/images/manaSymbols/future/14.png b/data/images/manaSymbols/future/14.png new file mode 100644 index 00000000..7a58b2aa Binary files /dev/null and b/data/images/manaSymbols/future/14.png differ diff --git a/data/images/manaSymbols/future/15.png b/data/images/manaSymbols/future/15.png new file mode 100644 index 00000000..d14ad331 Binary files /dev/null and b/data/images/manaSymbols/future/15.png differ diff --git a/data/images/manaSymbols/future/16.png b/data/images/manaSymbols/future/16.png new file mode 100644 index 00000000..9e86e139 Binary files /dev/null and b/data/images/manaSymbols/future/16.png differ diff --git a/data/images/manaSymbols/future/17.png b/data/images/manaSymbols/future/17.png new file mode 100644 index 00000000..535ceecb Binary files /dev/null and b/data/images/manaSymbols/future/17.png differ diff --git a/data/images/manaSymbols/future/18.png b/data/images/manaSymbols/future/18.png new file mode 100644 index 00000000..b4f7a4d9 Binary files /dev/null and b/data/images/manaSymbols/future/18.png differ diff --git a/data/images/manaSymbols/future/19.png b/data/images/manaSymbols/future/19.png new file mode 100644 index 00000000..0f6c1738 Binary files /dev/null and b/data/images/manaSymbols/future/19.png differ diff --git a/data/images/manaSymbols/future/2.png b/data/images/manaSymbols/future/2.png new file mode 100644 index 00000000..e5d63c41 Binary files /dev/null and b/data/images/manaSymbols/future/2.png differ diff --git a/data/images/manaSymbols/future/20.png b/data/images/manaSymbols/future/20.png new file mode 100644 index 00000000..c88b5bb8 Binary files /dev/null and b/data/images/manaSymbols/future/20.png differ diff --git a/data/images/manaSymbols/future/21.png b/data/images/manaSymbols/future/21.png new file mode 100644 index 00000000..75a65b1d Binary files /dev/null and b/data/images/manaSymbols/future/21.png differ diff --git a/data/images/manaSymbols/future/22.png b/data/images/manaSymbols/future/22.png new file mode 100644 index 00000000..02cb67db Binary files /dev/null and b/data/images/manaSymbols/future/22.png differ diff --git a/data/images/manaSymbols/future/23.png b/data/images/manaSymbols/future/23.png new file mode 100644 index 00000000..26011509 Binary files /dev/null and b/data/images/manaSymbols/future/23.png differ diff --git a/data/images/manaSymbols/future/24.png b/data/images/manaSymbols/future/24.png new file mode 100644 index 00000000..5d58f73a Binary files /dev/null and b/data/images/manaSymbols/future/24.png differ diff --git a/data/images/manaSymbols/future/25.png b/data/images/manaSymbols/future/25.png new file mode 100644 index 00000000..7fbbd5fc Binary files /dev/null and b/data/images/manaSymbols/future/25.png differ diff --git a/data/images/manaSymbols/future/26.png b/data/images/manaSymbols/future/26.png new file mode 100644 index 00000000..52de3d29 Binary files /dev/null and b/data/images/manaSymbols/future/26.png differ diff --git a/data/images/manaSymbols/future/27.png b/data/images/manaSymbols/future/27.png new file mode 100644 index 00000000..704d8919 Binary files /dev/null and b/data/images/manaSymbols/future/27.png differ diff --git a/data/images/manaSymbols/future/28.png b/data/images/manaSymbols/future/28.png new file mode 100644 index 00000000..ddaf8da5 Binary files /dev/null and b/data/images/manaSymbols/future/28.png differ diff --git a/data/images/manaSymbols/future/29.png b/data/images/manaSymbols/future/29.png new file mode 100644 index 00000000..8798d076 Binary files /dev/null and b/data/images/manaSymbols/future/29.png differ diff --git a/data/images/manaSymbols/future/3.png b/data/images/manaSymbols/future/3.png new file mode 100644 index 00000000..fca19572 Binary files /dev/null and b/data/images/manaSymbols/future/3.png differ diff --git a/data/images/manaSymbols/future/30.png b/data/images/manaSymbols/future/30.png new file mode 100644 index 00000000..c04ddda5 Binary files /dev/null and b/data/images/manaSymbols/future/30.png differ diff --git a/data/images/manaSymbols/future/31.png b/data/images/manaSymbols/future/31.png new file mode 100644 index 00000000..414d4bcc Binary files /dev/null and b/data/images/manaSymbols/future/31.png differ diff --git a/data/images/manaSymbols/future/32.png b/data/images/manaSymbols/future/32.png new file mode 100644 index 00000000..c30195dd Binary files /dev/null and b/data/images/manaSymbols/future/32.png differ diff --git a/data/images/manaSymbols/future/33.png b/data/images/manaSymbols/future/33.png new file mode 100644 index 00000000..02459a93 Binary files /dev/null and b/data/images/manaSymbols/future/33.png differ diff --git a/data/images/manaSymbols/future/34.png b/data/images/manaSymbols/future/34.png new file mode 100644 index 00000000..3b3d7c19 Binary files /dev/null and b/data/images/manaSymbols/future/34.png differ diff --git a/data/images/manaSymbols/future/35.png b/data/images/manaSymbols/future/35.png new file mode 100644 index 00000000..4d8da46d Binary files /dev/null and b/data/images/manaSymbols/future/35.png differ diff --git a/data/images/manaSymbols/future/36.png b/data/images/manaSymbols/future/36.png new file mode 100644 index 00000000..3e4cdfb3 Binary files /dev/null and b/data/images/manaSymbols/future/36.png differ diff --git a/data/images/manaSymbols/future/4.png b/data/images/manaSymbols/future/4.png new file mode 100644 index 00000000..2f347bdf Binary files /dev/null and b/data/images/manaSymbols/future/4.png differ diff --git a/data/images/manaSymbols/future/5.png b/data/images/manaSymbols/future/5.png new file mode 100644 index 00000000..0880896c Binary files /dev/null and b/data/images/manaSymbols/future/5.png differ diff --git a/data/images/manaSymbols/future/6.png b/data/images/manaSymbols/future/6.png new file mode 100644 index 00000000..4c6dced5 Binary files /dev/null and b/data/images/manaSymbols/future/6.png differ diff --git a/data/images/manaSymbols/future/7.png b/data/images/manaSymbols/future/7.png new file mode 100644 index 00000000..cf2af3b0 Binary files /dev/null and b/data/images/manaSymbols/future/7.png differ diff --git a/data/images/manaSymbols/future/8.png b/data/images/manaSymbols/future/8.png new file mode 100644 index 00000000..f5f77069 Binary files /dev/null and b/data/images/manaSymbols/future/8.png differ diff --git a/data/images/manaSymbols/future/9.png b/data/images/manaSymbols/future/9.png new file mode 100644 index 00000000..7a008e49 Binary files /dev/null and b/data/images/manaSymbols/future/9.png differ diff --git a/data/images/masks/BorderFuture.png b/data/images/masks/BorderFuture.png new file mode 100644 index 00000000..dcd20d4f Binary files /dev/null and b/data/images/masks/BorderFuture.png differ diff --git a/data/images/masks/IconFutureArtifact.png b/data/images/masks/IconFutureArtifact.png new file mode 100644 index 00000000..ee121333 Binary files /dev/null and b/data/images/masks/IconFutureArtifact.png differ diff --git a/data/images/masks/IconFutureCreature.png b/data/images/masks/IconFutureCreature.png new file mode 100644 index 00000000..51115ab4 Binary files /dev/null and b/data/images/masks/IconFutureCreature.png differ diff --git a/data/images/masks/IconFutureEnchantment.png b/data/images/masks/IconFutureEnchantment.png new file mode 100644 index 00000000..7f9aceb4 Binary files /dev/null and b/data/images/masks/IconFutureEnchantment.png differ diff --git a/data/images/masks/IconFutureInstant.png b/data/images/masks/IconFutureInstant.png new file mode 100644 index 00000000..aff4b167 Binary files /dev/null and b/data/images/masks/IconFutureInstant.png differ diff --git a/data/images/masks/IconFutureLand.png b/data/images/masks/IconFutureLand.png new file mode 100644 index 00000000..adfa6b18 Binary files /dev/null and b/data/images/masks/IconFutureLand.png differ diff --git a/data/images/masks/IconFutureMulti.png b/data/images/masks/IconFutureMulti.png new file mode 100644 index 00000000..442dea45 Binary files /dev/null and b/data/images/masks/IconFutureMulti.png differ diff --git a/data/images/masks/IconFutureSorcery.png b/data/images/masks/IconFutureSorcery.png new file mode 100644 index 00000000..0e3dfd27 Binary files /dev/null and b/data/images/masks/IconFutureSorcery.png differ diff --git a/data/scripts/main.js b/data/scripts/main.js index 00c073d1..b021b68f 100644 --- a/data/scripts/main.js +++ b/data/scripts/main.js @@ -5,8 +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); +// changeVersionTo("future") +// setTimeout(function() {cardMaster.insertBefore(frameList[37].cardMasterElement("Full"), cardMaster.children[newFrameInsertionLocation]);cardMasterUpdated();}, 1000); // console.log("First frame manually loaded") } @@ -45,7 +45,7 @@ function initiate() { newCanvas("temp"); newCanvas("cardFinal"); //Mana symbol Array setup - window.manaSymbolCodeList = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "w", "u", "b", "r", "g", "2w", "2u", "2b", "2r", "2g", "pw", "pu", "pb", "pr", "pg", "wu", "wb", "ub", "ur", "br", "bg", "rg", "rw", "gw", "gu", "x", "s", "c", "t","untap", "e", "y", "z", "1/2", "inf", "chaos", "plane", "l+", "l-", "l0", "oldtap", "artistbrush", "bar"]; + window.manaSymbolCodeList = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "w", "u", "b", "r", "g", "2w", "2u", "2b", "2r", "2g", "pw", "pu", "pb", "pr", "pg", "wu", "wb", "ub", "ur", "br", "bg", "rg", "rw", "gw", "gu", "x", "s", "c", "t","untap", "e", "y", "z", "1/2", "inf", "chaos", "plane", "l+", "l-", "l0", "oldtap", "artistbrush", "bar", "whiteBrush", "blackBrush"]; window.manaSymbolImageList = []; //Manually create a few important images window.cardArt = new Image(); @@ -454,6 +454,10 @@ function updateSetSymbol() { setSymbolX = version.setSymbolRight - setSymbolWidth setSymbolY = version.setSymbolVertical - setSymbolHeight / 2 } + if (version.currentVersion == "future") { + //Also center the set symbol horizontally + setSymbolX = version.setSymbolRight - setSymbolWidth / 2; + } setSymbolContext.drawImage(setSymbol, setSymbolX, setSymbolY, setSymbolWidth, setSymbolHeight) cardImageUpdated() } @@ -569,7 +573,15 @@ CanvasRenderingContext2D.prototype.writeText = function(text = "", textX = 0, te var artistBrushWidth = textSize * 1.2 lineContext.drawImage(manaSymbolImageList[62], currentLineX, currentLineY - artistBrushWidth * 0.58, artistBrushWidth, artistBrushWidth * 13 / 21) currentLineX += artistBrushWidth * 1.1 - } else if (possibleCodeLower.includes("fontcolor")) { + } else if (possibleCodeLower == "oldartistbrush") { + var artistBrushWidth = textSize * 2.4 + if (lineContext.fillStyle == "#ffffff" || lineContext.fillStyle == "white") { + lineContext.drawImage(manaSymbolImageList[64], currentLineX, currentLineY - artistBrushWidth * 13 / 63, artistBrushWidth, artistBrushWidth * 13 / 63); + } else { + lineContext.drawImage(manaSymbolImageList[65], currentLineX, currentLineY - artistBrushWidth * 13 / 63, artistBrushWidth, artistBrushWidth * 13 / 63); + } + currentLineX += artistBrushWidth * 1.1 + } else if (possibleCodeLower.includes("fontcolor")) { lineContext.fillStyle = possibleCodeLower.slice(9, possibleCodeLower.length) } else if (possibleCodeLower.includes("font")) { textFont = possibleCodeLower.slice(5, possibleCodeLower.length) @@ -663,14 +675,19 @@ function loadManaSymbolImages() { //Draws a mana cost 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(" ") + if (version == "future") { + splitManaCost.reverse(); + } var currentSymbolIndex = 0 var currentX = symbolsX var currentY = symbolsY + var realManaCostIndex = 0; for (var i = splitManaCost.length - 1; i >= 0; i --) { if (manaSymbolCodeList.includes(splitManaCost[i])) { - if (Array.isArray(direction) && i < direction.length) { - currentX = direction[i][0] - currentY = direction[i][1] +// console.log(realManaCostIndex, splitManaCost[i]) + if (Array.isArray(direction) && realManaCostIndex < direction.length) { + currentX = direction[realManaCostIndex][0] + currentY = direction[realManaCostIndex][1] } if (version == "m15") { this.fillStyle = "black" @@ -680,12 +697,21 @@ CanvasRenderingContext2D.prototype.drawManaCost = function(text, symbolsX, symbo 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) + } else if (version == "future") { + if (realManaCostIndex < direction.length) { + if (window.version.futureManaSymbolNameList.includes(splitManaCost[i]) && window.version.futureManaSymbolImageList[window.version.futureManaSymbolNameList.indexOf(splitManaCost[i])]) { + this.drawImage(window.version.futureManaSymbolImageList[window.version.futureManaSymbolNameList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter) + } else { + this.drawImage(manaSymbolImageList[manaSymbolCodeList.indexOf(splitManaCost[i])], currentX, currentY, diameter, diameter) + } + } } if (direction == "horizontal") { currentX += distance } else if (direction == "vertical") { currentY += distance - } + } + realManaCostIndex += 1; } } } @@ -1040,7 +1066,7 @@ function inputCardNameNumberTextImport(index) { document.getElementById("inputCardArtName").value = beforeAfter(importCardTextResponse, '"name":"', '",'); document.getElementById("inputSetCode").value = beforeAfter(importCardTextResponse, '"set":"', '",'); document.getElementById("inputSetRarity").value = beforeAfter(importCardTextResponse, '"rarity":"', '",')[0]; - whiteToTransparent(setSymbol, "https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=" + document.getElementById("inputSetCode").value + "&size=large&rarity=" + document.getElementById("inputSetRarity").value); + autocrop(setSymbol, "https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=" + document.getElementById("inputSetCode").value + "&size=large&rarity=" + document.getElementById("inputSetRarity").value); inputCardArtName(beforeAfter(importCardTextResponse, '"name":"', '",')); } function importText(text, target) { diff --git a/data/versions/future.js b/data/versions/future.js new file mode 100644 index 00000000..982f7058 --- /dev/null +++ b/data/versions/future.js @@ -0,0 +1,66 @@ +//============================================// +// Card Conjurer, by Kyle Burton // +//============================================// +if (version.currentVersion != "future") { + //Name, text, x, y, width, height, font, size, color, other + version.textList = [ + ["Title", "", scale(131), scale(87), scale(550), 0, "matrixb", 45, "white", "oneLine=true"], + ["Type", "", scale(91), scale(615), scale(557), 0, "matrixb", 37, "white", "oneLine=true"], + ["Rules Text", "", scale(76), scale(650), scale(594), scale(278), "mplantin", 36, "black", "lineSpace=0.97"], + ["Power Toughness", "", scale(574), scale(960), scale(106), 0, "mplantin", 42, "white", "oneLine=true,textAlign='center'"] + ]; + if (!version.addedFuture) { + version.addedFuture = true; + version.futureManaSymbolNameList = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "w", "u", "b", "r", "g", "wu", "wb", "ub", "ur", "br", "bg", "rg", "rw", "gw", "gu", "x"] + version.futureManaSymbolImageList = [] + for (var i = 0; i < version.futureManaSymbolNameList.length; i++) { + version.futureManaSymbolImageList[i] = new Image(); + version.futureManaSymbolImageList[i].src = "data/images/manaSymbols/future/" + i + ".png" + } + } +} +version.currentVersion = "future" +version.artX = scale(64) +version.artY = scale(88) +version.artWidth = scale(648) +version.artHeight = scale(608) +version.setSymbolRight = scale(678) +version.setSymbolVertical = scale(618) +version.setSymbolWidth = scale(40) +version.setSymbolHeight = scale(40) +version.bottomInfoFunction = "futureBottomInfo" +version.manaCostX = scale(91) +version.manaCostY = scale(140) +version.manaCostDiameter = scale(59) +version.manaCostDistance = scale(-38) +version.manaCostDirection = [[91, 140], [61, 207], [46, 281], [46, 356], [59, 437], [106, 512]]; +version.manaCostVersion = "future"; +version.watermarkWidth = scale(520) +version.watermarkHeight = scale(250) +version.watermarkY = scale(800) +version.masksToAdd = ["Border Future", "Icon Future Creature", "Icon Future Instant", "Icon Future Sorcery", "Icon Future Enchantment", "Icon Future Artifact", "Icon Future Land", "Icon Future Multi"]; +filterFramePicker("frameClassFuture"); + + +function futureBottomInfo() { + var colorToFill = "white" + var copyrightShift = 0; + for (var i = 0; i < cardMaster.children.length; i++) { + if (parseInt(cardMaster.children[i].id.replace("frameIndex", "")) >= 0 && frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].image.src.includes("PT") && !frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].framePickerClasses.includes("frameClassCustom")) { + copyrightShift = scale(-124); + } + if (parseInt(cardMaster.children[i].id.replace("frameIndex", "")) >= 0 && !frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].framePickerClasses.includes("frameClassCustom")) { + var frameColorSource = frameList[parseInt(cardMaster.children[i].id.replace("frameIndex", ""))].image.src; + if (frameColorSource.includes("WFull") || frameColorSource.includes("AFull") || frameColorSource.includes("CFull")) { + colorToFill = "black"; + } + } + } + bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight) + bottomInfoContext.writeText("{right}{oldArtistBrush}" + document.getElementById("inputInfoArtist").value, scale(70), scale(952), scale(604) + copyrightShift, 0, "matrixb", scale(26), colorToFill, "oneLine=true") + bottomInfoContext.writeText("\u2122 & \u00a9 " + date.getFullYear() + " Wizards of the Coast *Not For Sale*", scale(70), scale(975), scale(604) + copyrightShift, 0, "mplantin", scale(18), colorToFill, "oneLine=true,textAlign='right'") + cardImageUpdated() +} + setTimeout(futureBottomInfo, 250) + +finishChangingVersion("data/images/future/futureCSV.csv") diff --git a/index.html b/index.html index 06a55c85..038327ae 100644 --- a/index.html +++ b/index.html @@ -89,9 +89,9 @@