diff --git a/data/borders/planeswalker/multiGradient.png b/data/borders/planeswalker/multiGradient.png index eea2b1ab..4bda36d4 100644 Binary files a/data/borders/planeswalker/multiGradient.png and b/data/borders/planeswalker/multiGradient.png differ diff --git a/data/borders/planeswalkerTall/abilityLineEven.png b/data/borders/planeswalkerTall/abilityLineEven.png new file mode 100644 index 00000000..598788bb Binary files /dev/null and b/data/borders/planeswalkerTall/abilityLineEven.png differ diff --git a/data/borders/planeswalkerTall/abilityLineOdd.png b/data/borders/planeswalkerTall/abilityLineOdd.png new file mode 100644 index 00000000..a7868474 Binary files /dev/null and b/data/borders/planeswalkerTall/abilityLineOdd.png differ diff --git a/data/borders/planeswalkerTall/artMask.png b/data/borders/planeswalkerTall/artMask.png new file mode 100644 index 00000000..1675a0bb Binary files /dev/null and b/data/borders/planeswalkerTall/artMask.png differ diff --git a/data/borders/planeswalkerTall/artifact/frame.png b/data/borders/planeswalkerTall/artifact/frame.png new file mode 100644 index 00000000..78764791 Binary files /dev/null and b/data/borders/planeswalkerTall/artifact/frame.png differ diff --git a/data/borders/planeswalkerTall/artifact/pt.png b/data/borders/planeswalkerTall/artifact/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/artifact/pt.png differ diff --git a/data/borders/planeswalkerTall/artifact/stamp.png b/data/borders/planeswalkerTall/artifact/stamp.png new file mode 100644 index 00000000..44d67f2d Binary files /dev/null and b/data/borders/planeswalkerTall/artifact/stamp.png differ diff --git a/data/borders/planeswalkerTall/black/frame.png b/data/borders/planeswalkerTall/black/frame.png new file mode 100644 index 00000000..dd9137d9 Binary files /dev/null and b/data/borders/planeswalkerTall/black/frame.png differ diff --git a/data/borders/planeswalkerTall/black/pt.png b/data/borders/planeswalkerTall/black/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/black/pt.png differ diff --git a/data/borders/planeswalkerTall/black/stamp.png b/data/borders/planeswalkerTall/black/stamp.png new file mode 100644 index 00000000..bf364181 Binary files /dev/null and b/data/borders/planeswalkerTall/black/stamp.png differ diff --git a/data/borders/planeswalkerTall/blue/frame.png b/data/borders/planeswalkerTall/blue/frame.png new file mode 100644 index 00000000..2267c60e Binary files /dev/null and b/data/borders/planeswalkerTall/blue/frame.png differ diff --git a/data/borders/planeswalkerTall/blue/pt.png b/data/borders/planeswalkerTall/blue/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/blue/pt.png differ diff --git a/data/borders/planeswalkerTall/blue/stamp.png b/data/borders/planeswalkerTall/blue/stamp.png new file mode 100644 index 00000000..fa6f5686 Binary files /dev/null and b/data/borders/planeswalkerTall/blue/stamp.png differ diff --git a/data/borders/planeswalkerTall/border.js b/data/borders/planeswalkerTall/border.js new file mode 100644 index 00000000..263e9291 --- /dev/null +++ b/data/borders/planeswalkerTall/border.js @@ -0,0 +1,144 @@ +//Planeswalker Border +//Anything to do with... +//Loading Images +imgMultiGradient.src = borderPath + "multiGradient.png" +imgMultiMask.src = borderPath + "multiMask.png" +imgFrameMask.src = borderPath + "frameMask.png" +imgRareStampMask.src = borderPath + "rareStampMask.png" +imgBorderMask.src = borderPath + "borderMask.png" +imgAbilityLineOdd.src = borderPath + "abilityLineOdd.png" +imgAbilityLineEven.src = borderPath + "abilityLineEven.png" +document.getElementById("textSize").value = 33 +document.getElementById("inputCreatureColor").value = "#ffffff" +//Card Title +var titleFont = "40px belerenb" //40 +var titleFontSpacing = "-0.1px" //-0.1 +var titleX = 62 //62 +var titleY = 42 //42 +//Mana Cost +var manaCostRadius = 17.5 //17.5 +var manaCostX = 657 //657 +var manaCostY = 46 //46 +//Card Type +var typeFont = "33.5px belerenb" //33.5 +var typeFontSpacing = "0.05px" //0.05 +var typeX = 62 //62 +var typeY = 526 //596 +//Rules/Flavor Text +var textFont = "px mplantin" +var textFontSpacing = -0.4 //-0.4 +var textX = 134 //134 +var textY = 580 //650 +var textWidth = 682 //682 +//Power Toughness +var ptFont = "39px belerenb" //39 +var ptFontSpacing = "0.3px" //0.3 +var ptTextX = 655 //655 +var ptTextY = 935 //935 +imgBorderCreature.imgValues(598, 920, 118, 75) +//Bottom Info +var infoY = 993 //993 +//Set Symbol +var setSymbolY = 545 //615 +var setSymbolRight = 695 //695 +var setSymbolWidth = 90 //90 +var setSymbolHeight = 42 //42 +//Watermark +var watermarkWidth = 520 //520 +var watermarkHeight = 250 //250 +var watermarkY = 805 //805 +//Rare Stamp +var rareStampY = 955 //955 +//Color Options +loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,colorless-Colorless,artifact-Artifact") +document.getElementById("secondColorSelection").innerHTML = document.getElementById("colorSelection").innerHTML +document.getElementById("thirdColorSelection").innerHTML = document.getElementById("colorSelection").innerHTML +//"Being a Planeswalker is being able to do what a card do" +// —Unknown AP English Student +stampBorder = true +var artX = 52 +var artY = 106 +//With all the new values in place, the program will update it's border images +finishTemplate() +//Any special functions go at the bottom +var uniqueFunctionName = "planeswalkerTallCustomFunction" + +function planeswalkerTallCustomFunction() { + //Bottom info is important + bottomInfoM15() + //But now it has to draw/write the loyalty things! + var abilityLineY = 580 + for (i = 0; i < abilityLines.length; i ++) { + var loyaltyValue = document.getElementById("abilityValue" + i).value + if (loyaltyValue != "") { + card.fillStyle = "white" + card.textAlign = "center" + card.font = "31px belerenbsc" + if (loyaltyValue.charAt(0) == "-") { + card.drawImage(manaSymbolImages[58], 34, abilityLineY + abilityLines[i] / 2 - 28, 84, 64) + card.fillText(loyaltyValue, 76, abilityLineY + abilityLines[i] / 2 - 22) + } else if (loyaltyValue.charAt(0) == "+") { + card.drawImage(manaSymbolImages[59], 34, abilityLineY + abilityLines[i] / 2 - 38, 82, 62) + card.fillText(loyaltyValue, 74, abilityLineY + abilityLines[i] / 2 - 24) + } else { + card.drawImage(manaSymbolImages[60], 34, abilityLineY + abilityLines[i] / 2 - 28, 82, 56) + card.fillText(loyaltyValue, 74, abilityLineY + abilityLines[i] / 2 - 21) + } + card.font = "37px mplantin" + card.fillStyle = "black" + card.fillText(":", 124, abilityLineY + abilityLines[i] / 2 - 28) + } + abilityLineY += abilityLines[i] + } +} + +var savedFrameMask = new Image() +savedFrameMask.src = borderPath + "frameMask.png" +var abilityLineCanvas = document.createElement("canvas") +abilityLineCanvas.width = cardWidth +abilityLineCanvas.height = cardHeight +var abilityLineContext = abilityLineCanvas.getContext("2d") +var abilityLines = [] +function planeswalkerAbilityLines() { + abilityLines = [] + if (document.getElementById("abilityLine1").value > 0) {abilityLines[abilityLines.length] = parseInt(document.getElementById("abilityLine1").value)} + if (document.getElementById("abilityLine2").value > 0) {abilityLines[abilityLines.length] = parseInt(document.getElementById("abilityLine2").value)} + if (document.getElementById("abilityLine3").value > 0) {abilityLines[abilityLines.length] = parseInt(document.getElementById("abilityLine3").value)} + if (document.getElementById("abilityLine4").value > 0) {abilityLines[abilityLines.length] = parseInt(document.getElementById("abilityLine4").value)} + abilityLineContext.clearRect(0, 0, cardWidth, cardHeight) + var abilityLineY = 575 + for (i = 0; i < abilityLines.length; i ++) { + if (i == abilityLines.length - 1) { + // abilityLines[i] += cardHeight - abilityLines[i] + if (i % 2 === 0) { + abilityLineContext.fillStyle = "#95959595" + } else { + abilityLineContext.fillStyle = "#6a6a6a6a" + } + abilityLineContext.fillRect(50, abilityLineY + 5, cardWidth - 100, cardHeight - abilityLineY - 90) + } else { + if (i % 2 === 0) { + abilityLineContext.fillStyle = "#95959595" + abilityLineContext.drawImage(imgAbilityLineOdd, 93, abilityLineY + abilityLines[i] - 5, 596, 10) + } else { + abilityLineContext.fillStyle = "#6a6a6a6a" + abilityLineContext.drawImage(imgAbilityLineEven, 93, abilityLineY + abilityLines[i] - 5, 596, 10) + } + abilityLineContext.fillRect(50, abilityLineY + 5, cardWidth - 100, abilityLines[i] - 10) + } + abilityLineY += abilityLines[i] + } + abilityLineContext.drawImage(savedFrameMask, 0, 0, cardWidth, cardHeight) + imgFrameMask.src = abilityLineCanvas.toDataURL() + imgFrameMask.hasToLoad = true +} +imgFrameMask.onload = function() { + if (imgFrameMask.hasToLoad == true) { + imgFrameMask.hasToLoad = false + createBorder() + } +} +//Reveals the planeswalker card manipulation menu section +document.getElementById("cmmPlaneswalker").style.display = "block" +//After a second the first ability lines will be generated +setTimeout(function(){if (document.getElementById("borderSelection").value == "planeswalkerTall/") {planeswalkerAbilityLines()}}, 1000) \ No newline at end of file diff --git a/data/borders/planeswalkerTall/borderMask.png b/data/borders/planeswalkerTall/borderMask.png new file mode 100644 index 00000000..1cabe562 Binary files /dev/null and b/data/borders/planeswalkerTall/borderMask.png differ diff --git a/data/borders/planeswalkerTall/colorless/frame.png b/data/borders/planeswalkerTall/colorless/frame.png new file mode 100644 index 00000000..6cf1d33e Binary files /dev/null and b/data/borders/planeswalkerTall/colorless/frame.png differ diff --git a/data/borders/planeswalkerTall/colorless/pt.png b/data/borders/planeswalkerTall/colorless/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/colorless/pt.png differ diff --git a/data/borders/planeswalkerTall/colorless/stamp.png b/data/borders/planeswalkerTall/colorless/stamp.png new file mode 100644 index 00000000..02c868ca Binary files /dev/null and b/data/borders/planeswalkerTall/colorless/stamp.png differ diff --git a/data/borders/planeswalkerTall/frameMask.png b/data/borders/planeswalkerTall/frameMask.png new file mode 100644 index 00000000..0ba53d86 Binary files /dev/null and b/data/borders/planeswalkerTall/frameMask.png differ diff --git a/data/borders/planeswalkerTall/gold/frame.png b/data/borders/planeswalkerTall/gold/frame.png new file mode 100644 index 00000000..62bd37e3 Binary files /dev/null and b/data/borders/planeswalkerTall/gold/frame.png differ diff --git a/data/borders/planeswalkerTall/gold/pt.png b/data/borders/planeswalkerTall/gold/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/gold/pt.png differ diff --git a/data/borders/planeswalkerTall/gold/stamp.png b/data/borders/planeswalkerTall/gold/stamp.png new file mode 100644 index 00000000..6a130e0a Binary files /dev/null and b/data/borders/planeswalkerTall/gold/stamp.png differ diff --git a/data/borders/planeswalkerTall/green/frame.png b/data/borders/planeswalkerTall/green/frame.png new file mode 100644 index 00000000..2ddb1b2a Binary files /dev/null and b/data/borders/planeswalkerTall/green/frame.png differ diff --git a/data/borders/planeswalkerTall/green/pt.png b/data/borders/planeswalkerTall/green/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/green/pt.png differ diff --git a/data/borders/planeswalkerTall/green/stamp.png b/data/borders/planeswalkerTall/green/stamp.png new file mode 100644 index 00000000..18f40cba Binary files /dev/null and b/data/borders/planeswalkerTall/green/stamp.png differ diff --git a/data/borders/planeswalkerTall/multiGradient.png b/data/borders/planeswalkerTall/multiGradient.png new file mode 100644 index 00000000..72e513cd Binary files /dev/null and b/data/borders/planeswalkerTall/multiGradient.png differ diff --git a/data/borders/planeswalkerTall/multiMask.png b/data/borders/planeswalkerTall/multiMask.png new file mode 100644 index 00000000..d87102ef Binary files /dev/null and b/data/borders/planeswalkerTall/multiMask.png differ diff --git a/data/borders/planeswalkerTall/rareStampMask.png b/data/borders/planeswalkerTall/rareStampMask.png new file mode 100644 index 00000000..96d78d86 Binary files /dev/null and b/data/borders/planeswalkerTall/rareStampMask.png differ diff --git a/data/borders/planeswalkerTall/red/frame.png b/data/borders/planeswalkerTall/red/frame.png new file mode 100644 index 00000000..e65ba8fb Binary files /dev/null and b/data/borders/planeswalkerTall/red/frame.png differ diff --git a/data/borders/planeswalkerTall/red/pt.png b/data/borders/planeswalkerTall/red/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/red/pt.png differ diff --git a/data/borders/planeswalkerTall/red/stamp.png b/data/borders/planeswalkerTall/red/stamp.png new file mode 100644 index 00000000..598c4c55 Binary files /dev/null and b/data/borders/planeswalkerTall/red/stamp.png differ diff --git a/data/borders/planeswalkerTall/white/frame.png b/data/borders/planeswalkerTall/white/frame.png new file mode 100644 index 00000000..4e0e0fd0 Binary files /dev/null and b/data/borders/planeswalkerTall/white/frame.png differ diff --git a/data/borders/planeswalkerTall/white/pt.png b/data/borders/planeswalkerTall/white/pt.png new file mode 100644 index 00000000..3ca7595c Binary files /dev/null and b/data/borders/planeswalkerTall/white/pt.png differ diff --git a/data/borders/planeswalkerTall/white/stamp.png b/data/borders/planeswalkerTall/white/stamp.png new file mode 100644 index 00000000..64ec9bf3 Binary files /dev/null and b/data/borders/planeswalkerTall/white/stamp.png differ diff --git a/index.html b/index.html index 4b1a9024..f2606b2d 100644 --- a/index.html +++ b/index.html @@ -49,7 +49,8 @@