This commit is contained in:
Kyle
2019-02-10 15:22:03 -08:00
parent 86629592c1
commit 68b986ab4d
2 changed files with 13 additions and 1 deletions

View File

@@ -760,6 +760,14 @@ function drawText(text, xCoord, yCoord) {
//This draws the large chaos symbol found on planar cards and permenantly shifts the text over
card.drawImage(manaSymbolImages[57], x, y + 6, 48, 42)
x += 58
} else if (megaSplit[0].toLowerCase().slice(0, 2) == "up") {
y -= parseInt(megaSplit[0].toLowerCase().slice(2, megaSplit[0].length))
} else if (megaSplit[0].toLowerCase().slice(0, 4) == "down") {
y += parseInt(megaSplit[0].toLowerCase().slice(4, megaSplit[0].length))
} else if (megaSplit[0].toLowerCase().slice(0, 4) == "left") {
x -= parseInt(megaSplit[0].toLowerCase().slice(4, megaSplit[0].length))
} else if (megaSplit[0].toLowerCase().slice(0, 5) == "right") {
x += parseInt(megaSplit[0].toLowerCase().slice(5, megaSplit[0].length))
} else {
//It's an image (mana symbol, tap, etc...)
card.drawImage(manaSymbolImages[manaSymbolCode.indexOf(megaSplit[0].toLowerCase())], x + textXShift + textSize * 0.054, y + textSize * 0.075 + parseInt(document.getElementById("inputSymbolDown").value) + textBaselineShift[0] * card.font.split("px")[0], textSize * 0.77, textSize * 0.77)

View File

@@ -477,7 +477,11 @@
&#8226 left &#8594 Text aligns to the left<br>
&#8226 center &#8594 Text aligns to the center<br>
&#8226 right &#8594 Text aligns to the right<br>
&#8226 plane &#8594 Creates a large <img src="data/manaSymbols/56.png" style="height: 1em;"></img> and shifts the following text to the right. This is designed for planar cards.
&#8226 upX &#8594 Shifts the following text X pixels up<br>
&#8226 downX &#8594 Shifts the following text X pixels down<br>
&#8226 leftX &#8594 Shifts the following text X pixels left<br>
&#8226 rightX &#8594 Shifts the following text X pixels right<br>
&#8226 plane &#8594 Creates a large <img src="data/manaSymbols/56.png" style="height: 1em; background-color: white;"></img> and shifts the following text to the right. This is designed for planar cards.
</div>
<div class="extras" id="extras-set">
Every set in Magic: The Gathering has an associated 2-3 letter code. For example, Homelands is HM and Innistrad is ISD. This program uses the codes from <a href="http://gatherer.wizards.com" target="_blank">The Gatherer</a>, the official Magic card database. A handy list of all sets and their codes can be found on <a href="https://en.wikipedia.org/wiki/List_of_Magic:_The_Gathering_sets" target="_blank">Wikipedia</a>. These codes aren't caps sensitive.