This commit is contained in:
Kyle
2019-05-27 17:39:24 -07:00
parent 5e46a38362
commit 5a19f9d4ee
38 changed files with 97 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

View File

@@ -0,0 +1,64 @@
//============================================//
// OLD Border //
//============================================//
//General Booleans
cardData.miracle = false
cardData.nyx = false
cardData.rareStamp = false
cardData.legendary = false
cardData.pinline = false
cardData.titleTypeBoxes = false
cardData.bottomInfoFunction = "none"
//Specific Values
cardData.cardArtX = cwidth(89)
cardData.cardArtY = cheight(103)
cardData.manaSymbolX = cwidth(655)
cardData.manaSymbolY = cheight(50)
document.getElementById("inputTitleColor").value = "#ffffff"
cardData.titleFont = "goudymedieval"
cardData.titleShadow = cwidth(2)
cardData.titleFontSize = cwidth(43)
cardData.titleX = cwidth(81)
cardData.titleY = cheight(81)
document.getElementById("inputTypeColor").value = "#ffffff"
cardData.typeFont = "mplantin"
cardData.typeShadow = cwidth(2)
cardData.typeX = cwidth(76)
cardData.typeY = cheight(616)
cardData.textX = cwidth(92)
cardData.textY = cheight(657)
document.getElementById("inputCreatureColor").value = "#ffffff"
cardData.ptFont = "46px mplantin"
cardData.ptShadow = cwidth(2)
cardData.ptX = cwidth(655)
cardData.ptY = cheight(984)
cardData.setSymbolX = cwidth(671)
cardData.setSymbolY = cheight(603)
cardData.bottomInfoFunction = "bottomInfoOld"
//Images
imgArtMask.load("data/borders/old/imgArtMask.png")
imgFrameMask.load("data/borders/old/imgFrameMask.png")
imgRulesMask.load("data/borders/old/imgRulesMask.png")
imgBorderMask.load("data/borders/old/imgBorderMask.png")
//Loads the colors
loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,artifact-Artifact,whiteLand-White Land,blueLand-Blue Land,blackLand-Black Land,redLand-Red Land,greenLand-Green Land,colorlessLand-Colorless Land")
//Finishes loading the border style
finishChangingBorder()
function bottomInfoOld() {
var infoArtist = "Illus. " + document.getElementById("inputInfoArtist").value
var copyrightNumber = "\u2122 & \u00a9 1993-" + date.getFullYear() + " Wizards of the Coast, Inc. " + document.getElementById("inputInfoNumber").value
textContext.textAlign = "center"
textContext.fillStyle = "black"
textContext.font = "31px mplantin"
textContext.fillText(infoArtist, cwidth(377), cheight(970))
textContext.fillStyle = "white"
textContext.fillText(infoArtist, cwidth(375), cheight(968))
if (document.getElementById("inputFrameColor").value.includes("white")) {
textContext.fillStyle = "black"
}
textContext.font = "17px mplantin"
textContext.fillText(copyrightNumber, cwidth(375), cheight(989))
drawCard()
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
data/borders/old/red/pt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -59,10 +59,10 @@ var savedArtList = [], cardArtUrlList = [], cardArtArtistList = []
var defaultCardData = {
version:"m15",
manaSymbolX:cwidth(659), manaSymbolY:cheight(60), manaSymbolRadius:cwidth(17.5), manaSymbolDirection:"left",
titleX:cwidth(63), titleY:cheight(94), titleRight:cwidth(687), titleFont:"belerenb", titleFontSize:cwidth(40), titleAlignment:"left",
typeX:cwidth(63), typeY:cheight(630), typeRight:cwidth(687), typeFont:"belerenb", typeFontSize:cwidth(34), typeAlignment:"left",
titleX:cwidth(63), titleY:cheight(94), titleRight:cwidth(687), titleFont:"belerenb", titleFontSize:cwidth(40), titleAlignment:"left", titleShadow:"none",
typeX:cwidth(63), typeY:cheight(630), typeRight:cwidth(687), typeFont:"belerenb", typeFontSize:cwidth(34), typeAlignment:"left", typeShadow:"none",
textX:cwidth(63), textY:cheight(690), textRight:cwidth(690), textFont:"mplantin",
ptFont:"39px belerenb", ptX:cwidth(645), ptY:cheight(975),
ptFont:"39px belerenb", ptX:cwidth(645), ptY:cheight(975), ptShadow:"none",
ptBoxX:cwidth(571), ptBoxY:cheight(929), ptBoxWidth:cwidth(135), ptBoxHeight:cheight(76),
setSymbolWidth:cwidth(77), setSymbolHeight:cheight(42), setSymbolX:cwidth(693), setSymbolY:cheight(620), setSymbolAlignment:"right",
watermarkWidth:cwidth(520), watermarkHeight:cheight(250), watermarkY:cheight(815),
@@ -185,7 +185,7 @@ CanvasRenderingContext2D.prototype.mask = function(image, masks, color, maskOpac
}
//Text processor... kind of?
CanvasRenderingContext2D.prototype.writeText = function(text, inputX, inputY, inputRightLimit, textFont, textFontSize, textColor, skipLines, outline, outlineColor, textAlignment = "left") {
CanvasRenderingContext2D.prototype.writeText = function(text, inputX, inputY, inputRightLimit, textFont, textFontSize, textColor, skipLines, outline, outlineColor, textAlignment = "left", shadow = "none") {
this.font = textFontSize + "px " + textFont
this.fillStyle = textColor
this.strokeStyle = outlineColor
@@ -210,6 +210,11 @@ CanvasRenderingContext2D.prototype.writeText = function(text, inputX, inputY, in
textFontSize -= 0.5
this.font = textFontSize + "px " + textFont
}
if (shadow != false) {
this.fillStyle = "black"
this.fillText(text, x + shadow, y + shadow)
this.fillStyle = textColor
}
if (outline) {
this.strokeText(text, x, y)
}
@@ -661,8 +666,8 @@ function sectionTextFunction() {
textContext.clearRect(0, 0, cardWidth, cardHeight)
//mana cost, name, type, text
var manaSymbolWidth = textContext.manaCost(document.getElementById("inputCost").value, cardData.manaSymbolX, cardData.manaSymbolY, cardData.manaSymbolRadius, cardData.manaSymbolDirection)
textContext.writeText(document.getElementById("inputName").value, cardData.titleX, cardData.titleY, cardData.titleRight - manaSymbolWidth, cardData.titleFont, cardData.titleFontSize, document.getElementById("inputTitleColor").value, false, document.getElementById("inputCheckboxTitleOutline").checked, document.getElementById("inputTitleOutlineColor").value, cardData.titleAlignment)
textContext.writeText(document.getElementById("inputType").value, cardData.typeX, cardData.typeY, cardData.typeRight, cardData.typeFont, cardData.typeFontSize, document.getElementById("inputTypeColor").value, false, document.getElementById("inputCheckboxTypeOutline").checked, document.getElementById("inputTypeOutlineColor").value, cardData.typeAlignment)
textContext.writeText(document.getElementById("inputName").value, cardData.titleX, cardData.titleY, cardData.titleRight - manaSymbolWidth, cardData.titleFont, cardData.titleFontSize, document.getElementById("inputTitleColor").value, false, document.getElementById("inputCheckboxTitleOutline").checked, document.getElementById("inputTitleOutlineColor").value, cardData.titleAlignment, cardData.titleShadow)
textContext.writeText(document.getElementById("inputType").value, cardData.typeX, cardData.typeY, cardData.typeRight, cardData.typeFont, cardData.typeFontSize, document.getElementById("inputTypeColor").value, false, document.getElementById("inputCheckboxTypeOutline").checked, document.getElementById("inputTypeOutlineColor").value, cardData.typeAlignment, cardData.typeShadow)
textContext.writeText(document.getElementById("inputText").value, cardData.textX, cardData.textY + parseInt(document.getElementById("inputTextDown").value), cardData.textRight, cardData.textFont, parseInt(document.getElementById("inputTextSize").value), document.getElementById("inputRulesColor").value, true, document.getElementById("inputCheckboxRulesOutline").checked, document.getElementById("inputRulesOutlineColor").value)
//Power Toughness
if (document.getElementById("inputCheckboxPowerToughness").checked && cardData.creature) {
@@ -674,6 +679,11 @@ function sectionTextFunction() {
textContext.textAlign = "center"
textContext.font = cardData.ptFont
textContext.fillStyle = document.getElementById("inputCreatureColor").value
if (cardData.ptShadow != "none") {
textContext.fillStyle = "black"
textContext.fillText(document.getElementById("inputPowerToughness").value, cardData.ptX + parseInt(cardData.ptShadow), cardData.ptY + parseInt(cardData.ptShadow))
textContext.fillStyle = document.getElementById("inputCreatureColor").value
}
textContext.fillText(document.getElementById("inputPowerToughness").value, cardData.ptX, cardData.ptY)
textContext.textAlign = "left"
}
@@ -1036,20 +1046,14 @@ function checkCookies() {
alert("Thanks for using Card Conjurer! Unfortunately different browsers treat custom fonts differently and it appears that you are using a browser other than Chrome. Everything may work perfectly, but if you notice that the text looks odd try switching to Chrome.")
}
setCookie("visited", "true")
setCookie("cookieUpdated4", "true")
setCookie("cookieUpdated5", "true")
} else {
console.log("Welcome back to Card Conjurer!")
if (getCookie("cookieUpdated4") != "true") {
alert("Card Conjurer has been updated since your last visit. After reworking the system I haven't had time to add all the old border styles back, but feel free to contact me at CardConjurerMTG@gmail.com if you would like to request a border style or have any questions. \r\n\r\nNewest border style: Plane")
setCookie("cookieUpdated4", "true")
if (getCookie("cookieUpdated5") != "true") {
alert("Card Conjurer has been updated since your last visit. Feel free to contact me at CardConjurerMTG@gmail.com if you would like to request a border style or have any questions. \r\n\r\nNewest border style: Old")
setCookie("cookieUpdated5", "true")
} else {
console.log("There are no new updates since your last visit.")
if (getCookie("donationRequest") != "true") {
alert("Card Conjurer is now hosted with the custom domain cardconjurer.com! That means that running this website currently costs $10 per year. It's not much, but any donation, even if it's just dollar, would be greatly appreciated :) \r\n\r\nAnyways, thanks for using Card Conjurer! I hope you enjoy making some sweet custom Magic cards!")
setCookie("donationRequest", "true")
} else {
console.log("I hope you enjoy making custom cards!")
}
}
}
}
@@ -1076,7 +1080,7 @@ setTimeout(function(){sectionTextFunction()}, 500)
setTimeout(function(){sectionTextFunction()}, 1000)
// Only for working on frames n' stuff :)
// setTimeout(function(){
// document.getElementById("inputCardVersion").value = "plane"
// document.getElementById("inputCardVersion").value = "old"
// document.getElementById("inputCardVersion").onchange()
// }, 500)

View File

@@ -13,14 +13,14 @@ var setCodeListPreMythic = ['1E', '2E', '2U', '3E', '4E', '5E', '6E', '7E', '8ED
'AQ', 'LE', 'DK', 'FE', 'HM', 'IA', 'AL', 'MI', 'VI', 'WL', 'TE', 'ST', 'EX', 'UZ', 'GU', 'AP', 'OD',
'TOR', 'JUD', 'ONS', 'LGN', 'SCG', 'MRD', 'DST', '5DN', 'CHK', 'BOK', 'SOK', 'RAV', 'GPT', 'DIS', 'CSP',
'TSP', 'PLC', 'FUT', 'LRW', 'MOR', 'SHM', 'EVE', 'PO', 'P2', 'PK', 'P3', 'P4', 'CH', 'BR', 'BD', 'EVG',
'UG', 'UNH', 'MED', 'ME2', 'ME3', 'ME4']
'UG', 'UNH', 'MED', 'ME2', 'ME3', 'ME4', 'HOP']
//Common through Mythic
var setCodeListPostMythic = ['M10', 'M11', 'M12', 'M13', 'M14', 'M15', 'ORI', 'M19', 'ALA', 'CON',
'ARB', 'ZEN', 'WWK', 'ROE', 'SOM', 'MBS', 'NPH', 'ISD', 'DKA', 'AVR', 'RTR', 'GTC', 'DGM', 'THS', 'BNG',
'JOU', 'KTK', 'FRF', 'DTK', 'BFZ', 'OGW', 'SOI', 'EMN', 'KLD', 'AER', 'AKH', 'HOU', 'XLN', 'RIX', 'DOM',
'GRN', 'RNA', /*'MH1',*/ 'GS1', 'MD1', 'DD2', 'DDC', 'DDD', 'DDE', 'DDF', 'DDG', 'DDH', 'DDI', 'DDJ', 'DDK',
'DDL', 'DDM', 'DDN', 'DDP', 'DDQ', 'DDR', 'DDS', 'DDT', 'DDU', 'SS1', 'H09', 'PD2', 'PD3', 'MMA', 'MM2',
'EMA', 'MM3', 'IMA', 'A25', 'UMA', 'HOP', 'PC2', 'PCA', 'ARC', 'E01', 'CMD', 'CM1', 'C13', 'C14', 'C15',
'EMA', 'MM3', 'IMA', 'A25', 'UMA', 'PC2', 'PCA', 'ARC', 'E01', 'CMD', 'CM1', 'C13', 'C14', 'C15',
'C16', 'CMA', 'C17', 'CM2', 'C18', 'CNS', 'CN2', 'E02', 'BBD', 'UST', 'VMA', 'TPR', 'W16', 'W17',
'GK1_IZZET', 'GK1_SELESN', 'GK1_BOROS', 'GK1_GOLGAR', 'GK2_RAKDOS', 'GK2_AZORIU', 'GK2_SIMIC',
'GK2_GRUUL', 'GK2_ORZHOV', 'WAR']

View File

@@ -88,6 +88,7 @@
<span class="dropdown">
<select onchange="backToDefault(this.value)" id="inputCardVersion">
<option value="m15">M15</option>
<option value="old">Old</option>
<option value="planeswalker">Planeswalker (M15)</option>
<option value="tokenTextless">Token (Textless)</option>
<option value="tokenText">Token (Regular)</option>
@@ -240,14 +241,14 @@
<span class="dropdown">
<select class="selectColor" onchange="imgPowerToughness.load(this.value + 'pt.png')"></select>
</span>
<input id="inputPowerToughness" class="input" type="text" oninput="sectionTextFunction()">
<input id="inputPowerToughness" class="input" type="text" value="" oninput="sectionTextFunction()">
<br><br>
Rules Text
<br>
<textarea id="inputText" class="input" rows="5" cols="40" style="width: 100%; resize: none; height: 200px" placeholder="Remember to include curly brackets ('{' and '}') around each code. To skip to the next line use {line}. See 'Mana Symbols' and 'Other Codes' (below) for more information." oninput="sectionTextFunction()" onkeypress="textAreaKeyPressed()"></textarea>
<br>
Rules Text Font Size
<input id="inputTextSize" type="number" class="input" min="0" value="37" step="0.5" oninput="sectionTextFunction()">
<input id="inputTextSize" type="number" class="input" min="0" value="37" step="1" oninput="sectionTextFunction()">
<br>
Pixels Between Paragraphs
<input id="inputTextShift" type="number" class="input" min="0" value="13" oninput="sectionTextFunction()">
@@ -476,10 +477,10 @@
<!--CSS-->
<style>
/*fonts*/
@font-face {
/*@font-face {
font-family: relaymedium;
src: url("data/fonts/relay-medium.ttf");
}
}*/
@font-face {
font-family: gothammedium;
src: url("data/fonts/gotham-medium.ttf");
@@ -512,6 +513,10 @@
font-family: mplantini;
src: url("data/fonts/mplantin-i.ttf");
}
@font-face {
font-family: goudymedieval;
src: url("data/fonts/goudy-medieval.ttf");
}
:root {
/*Color Palette*/
@@ -525,7 +530,7 @@
/*Page-wide styling*/
* {
font-family: belerenb;
font-size: 20pt; /*Master font size*/
font-size: 16pt; /*Master font size*/
user-select: none;
color: #eee;
}