mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 21:31:39 -05:00
upgrayedd
This commit is contained in:
96
data/scripts/versions/versionFuture.js
Normal file
96
data/scripts/versions/versionFuture.js
Normal file
@@ -0,0 +1,96 @@
|
||||
var versionFutureImageList = [
|
||||
['White Frame', 'data/images/future/futureFrameW.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Blue Frame', 'data/images/future/futureFrameU.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Black Frame', 'data/images/future/futureFrameB.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Red Frame', 'data/images/future/futureFrameR.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Green Frame', 'data/images/future/futureFrameG.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Multicolored Frame', 'data/images/future/futureFrameM.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Artifact Frame', 'data/images/future/futureFrameA.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Clear Frame', 'data/images/future/futureFrameC.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['Land Frame', 'data/images/future/futureFrameL.png', 0, 0, 1, 1, ['Full', 'Border (future)']],
|
||||
['White Power/Toughness', 'data/images/future/futurePTW.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Blue Power/Toughness', 'data/images/future/futurePTU.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Black Power/Toughness', 'data/images/future/futurePTB.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Red Power/Toughness', 'data/images/future/futurePTR.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Green Power/Toughness', 'data/images/future/futurePTG.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Multicolored Power/Toughness', 'data/images/future/futurePTM.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Artifact Power/Toughness', 'data/images/future/futurePTA.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Clear Power/Toughness', 'data/images/future/futurePTC.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['Land Power/Toughness', 'data/images/future/futurePTL.png', 567/744, 918/1039, 129/744, 81/1039, ['Full']],
|
||||
['White Icon', 'data/images/future/futureWhite.png', 49/744, 49/1039, 32/744, 32/1039, ['Artifact Icon (future)', 'Creature Icon (future)', 'Enchantment Icon (future)', 'Instant Icon (future)', 'Land Icon (future)', 'Multitype Icon (future)', 'Sorcery Icon (future)']],
|
||||
['Gray Icon', 'data/images/future/futureGray.png', 49/744, 49/1039, 32/744, 32/1039, ['Artifact Icon (future)', 'Creature Icon (future)', 'Enchantment Icon (future)', 'Instant Icon (future)', 'Land Icon (future)', 'Multitype Icon (future)', 'Sorcery Icon (future)']]
|
||||
]
|
||||
|
||||
var versionFutureMaskList = [['Border (future)', 'data/images/future/futureMaskBorder.png'], ['Artifact Icon (future)', 'data/images/future/futureMaskArtifact.png'], ['Creature Icon (future)', 'data/images/future/futureMaskCreature.png'], ['Enchantment Icon (future)', 'data/images/future/futureMaskEnchantment.png'], ['Instant Icon (future)', 'data/images/future/futureMaskInstant.png'], ['Land Icon (future)', 'data/images/future/futureMaskLand.png'], ['Multitype Icon (future)', 'data/images/future/futureMaskMulti.png'], ['Sorcery Icon (future)', 'data/images/future/futureMaskSorcery.png']]
|
||||
|
||||
if (!loadedVersions.includes('future')) {
|
||||
loadedVersions.push('future')
|
||||
loadMaskImages(versionFutureMaskList)
|
||||
loadFrameImages(versionFutureImageList, 'frameClassFuture')
|
||||
}
|
||||
|
||||
if (currentVersion != 'future') {
|
||||
currentVersion = 'future'
|
||||
|
||||
hideFrameImages('frameClassFuture')
|
||||
|
||||
loadTextOptions([
|
||||
new cardText('Card Title', '', 264/1500, 195/2100, 1248/1500, 91/2100, 'matrixb', 91/2100, 'white', ['oneLine=true']),
|
||||
new cardText('Card Type', '', 182/1500, 1261/2100, 1248/1500, 75/2100, 'matrixb', 75/2100, 'white', ['oneLine=true']),
|
||||
new cardText('Rules Text', '', 154/1500, 1313/2100, 1211/1500, 670/2100, 'mplantin', 73/2100, 'black'),
|
||||
new cardText('Power/Toughness', '', 1160/1500, 1960/2100, 210/1500, 83/2100, 'mplantin', 83/2100, 'white', ['oneLine=true,textAlign="center"'])
|
||||
])
|
||||
|
||||
artX = scaleX(129 / 1500)
|
||||
artY = scaleY(177 / 2100)
|
||||
artWidth = scaleX(1307 / 1500)
|
||||
artHeight = scaleY(1229 / 2100)
|
||||
|
||||
manaCostXPath = '[scaleX(91/744), scaleX(61/744), scaleX(46/744), scaleX(46/744), scaleX(59/744), scaleX(106/744)][manaSymbolIndex]'
|
||||
manaCostYPath = '[scaleY(140/1039), scaleY(207/1039), scaleY(281/1039), scaleY(356/1039), scaleY(437/1039), scaleY(512/1039)][manaSymbolIndex]'
|
||||
manaCostDiameter = 'scaleX(59/744)'
|
||||
manaCostShadowOffset = '[0, 0]'
|
||||
manaCostDirection = 'forward'
|
||||
|
||||
setSymbolX = [scaleX(1367/1500), 'center']
|
||||
setSymbolY = [scaleY(1249/2100), 'center']
|
||||
setSymbolWidth = scaleX(80/1500)
|
||||
setSymbolHeight = scaleY(80/2100)
|
||||
|
||||
watermarkX = scaleX(0.5)
|
||||
watermarkY = scaleY(1593/2100)
|
||||
watermarkWidth = scaleX(1140/1500)
|
||||
watermarkHeight = scaleY(484/2100)
|
||||
|
||||
bottomInfoFunction = 'bottomInfoFuture'
|
||||
|
||||
bottomInfoUpdated()
|
||||
}
|
||||
|
||||
function bottomInfoFuture() {
|
||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var ptBoxShift = 0
|
||||
var copyrightFillColor = 'white'
|
||||
for (var i = 0; i < cardTextList.length; i++) {
|
||||
if (cardTextList[i].name == 'Power/Toughness' && cardTextList[i].text != '') {
|
||||
ptBoxShift = -1/6
|
||||
}
|
||||
}
|
||||
var cardMasterChildren = cardMaster.children
|
||||
for (var i = cardMasterChildren.length - 1; i >= 0; i--) {
|
||||
var uniqueNumber = parseInt(cardMasterChildren[i].id.replace('uniqueNumber', ''))
|
||||
for (var n = 0; n < cardMasterList.length; n++) {
|
||||
if (cardMasterList[n].uniqueNumber == uniqueNumber) {
|
||||
if (cardMasterList[n].name.includes('White Frame') || cardMasterList[n].name.includes('Artifact Frame') || cardMasterList[n].name.includes('Colorless Frame')) {
|
||||
copyrightFillColor = 'black'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
writeText(
|
||||
[
|
||||
{text: '{right}{oldartistbrush}' + document.getElementById('inputInfoArtist').value, x: 141/1500, y: 1938/2100, width: 1216/1500 + ptBoxShift, height: 52/2100, font: 'matrixb', fontSize: 52/2100, fontColor: copyrightFillColor, otherParameters: ['oneLine=true']},
|
||||
{text: '{right}\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x: 141/1500, y: 1980/2100, width: 1216/1500 + ptBoxShift, height: 36/2100, font: 'mplantin', fontSize: 36/2100, fontColor: copyrightFillColor, otherParameters: ['oneLine=true']},
|
||||
{text: '{right}*Not for Sale* CardConjurer.com', x: 141/1500, y: 2012/2100, width: 1216/1500 + ptBoxShift, height: 28/2100, font: 'mplantin', fontSize: 28/2100, fontColor: copyrightFillColor, otherParameters: ['oneLine=true']}
|
||||
], bottomInfoContext)
|
||||
}
|
91
data/scripts/versions/versionM15.js
Normal file
91
data/scripts/versions/versionM15.js
Normal file
@@ -0,0 +1,91 @@
|
||||
var versionM15ImageList = [
|
||||
['White Frame', 'data/images/m15/m15FrameW.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Blue Frame', 'data/images/m15/m15FrameU.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Black Frame', 'data/images/m15/m15FrameB.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Red Frame', 'data/images/m15/m15FrameR.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Green Frame', 'data/images/m15/m15FrameG.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Multicolored Frame', 'data/images/m15/m15FrameM.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Artifact Frame', 'data/images/m15/m15FrameA.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Vehicle Frame', 'data/images/m15/m15FrameV.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Land Frame', 'data/images/m15/m15FrameL.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['White Power/Toughness', 'data/images/m15/m15PTW.png', 1142/1500, 1856/2100, 287/1500, 157/2100, ['Full']],
|
||||
['Blue Power/Toughness', 'data/images/m15/m15PTU.png', 1142/1500, 1856/2100, 287/1500, 157/2100, ['Full']],
|
||||
['Black Power/Toughness', 'data/images/m15/m15PTB.png', 1142/1500, 1856/2100, 287/1500, 157/2100, ['Full']],
|
||||
['Red Power/Toughness', 'data/images/m15/m15PTR.png', 1142/1500, 1856/2100, 287/1500, 157/2100, ['Full']],
|
||||
['Green Power/Toughness', 'data/images/m15/m15PTG.png', 1142/1500, 1856/2100, 287/1500, 157/2100, ['Full']],
|
||||
['Multicolored Power/Toughness', 'data/images/m15/m15PTM.png', 1142/1500, 1856/2100, 287/1500, 157/2100, ['Full']],
|
||||
['Artifact Power/Toughness', 'data/images/m15/m15PTA.png', 1142/1500, 1856/2100, 287/1500, 157/2100, ['Full']],
|
||||
['White Legend Crown', 'data/images/m15/m15CrownW.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Blue Legend Crown', 'data/images/m15/m15CrownU.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Black Legend Crown', 'data/images/m15/m15CrownB.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Red Legend Crown', 'data/images/m15/m15CrownR.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Green Legend Crown', 'data/images/m15/m15CrownG.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Multicolored Legend Crown', 'data/images/m15/m15CrownM.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Artifact Legend Crown', 'data/images/m15/m15CrownA.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Land Legend Crown', 'data/images/m15/m15CrownL.png', 38/1500, 29/2100, 1422/1500, 341/2100, ['Full']],
|
||||
['Midnight Frame', 'data/images/m15/m15Midnight.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']]
|
||||
]
|
||||
|
||||
var versionM15MaskList = [['Full', 'data/images/maskFull.png'], ['Border (m15)', 'data/images/m15/m15MaskBorder.png'], ['Right Half', 'data/images/maskRightHalf.png'], ['Pinline (m15)', 'data/images/m15/m15MaskPinline.png'], ['Title (m15)', 'data/images/m15/m15MaskTitle.png'], ['Type (m15)', 'data/images/m15/m15MaskType.png'], ['Rules (m15)', 'data/images/m15/m15MaskRules.png'], ['Frame (m15)', 'data/images/m15/m15MaskFrame.png']]
|
||||
|
||||
if (!loadedVersions.includes('m15')) {
|
||||
loadedVersions.push('m15')
|
||||
loadMaskImages(versionM15MaskList)
|
||||
loadFrameImages(versionM15ImageList, 'frameClassM15')
|
||||
}
|
||||
|
||||
if (currentVersion != 'm15') {
|
||||
currentVersion = 'm15'
|
||||
|
||||
hideFrameImages('frameClassM15')
|
||||
|
||||
loadTextOptions([
|
||||
new cardText('Card Title', '', 126/1500, 187/2100, 1248/1500, 80/2100, 'belerenb', 80/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Card Type', '', 126/1500, 1263/2100, 1248/1500, 68/2100, 'belerenb', 68/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Rules Text', '', 135/1500, 1372/2100, 1230/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Power/Toughness', '', 1190/1500, 1950/2100, 210/1500, 78/2100, 'belerenbsc', 78/2100, 'black', ['oneLine=true,textAlign="center"'])
|
||||
])
|
||||
|
||||
artX = scaleX(111 / 1500)
|
||||
artY = scaleY(233 / 2100)
|
||||
artWidth = scaleX(1278 / 1500)
|
||||
artHeight = scaleY(936 / 2100)
|
||||
|
||||
manaCostXPath = '1316 - 78 * manaSymbolIndex'
|
||||
manaCostYPath = '121'
|
||||
manaCostDiameter = '70'
|
||||
manaCostShadowOffset = '[-2, 6]'
|
||||
manaCostDirection = 'reverse'
|
||||
|
||||
setSymbolX = [scaleX(1382/1500), 'right']
|
||||
setSymbolY = [scaleY(1240/2100), 'center']
|
||||
setSymbolWidth = scaleX(180/1500)
|
||||
setSymbolHeight = scaleY(80/2100)
|
||||
|
||||
watermarkX = scaleX(0.5)
|
||||
watermarkY = scaleY(1630/2100)
|
||||
watermarkWidth = scaleX(1140/1500)
|
||||
watermarkHeight = scaleY(484/2100)
|
||||
|
||||
bottomInfoFunction = 'bottomInfoM15'
|
||||
|
||||
bottomInfoUpdated()
|
||||
}
|
||||
|
||||
function bottomInfoM15() {
|
||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var ptBoxShift = 0
|
||||
for (var i = 0; i < cardTextList.length; i++) {
|
||||
if (cardTextList[i].name == 'Power/Toughness' && cardTextList[i].text != '') {
|
||||
ptBoxShift = 36/2100
|
||||
}
|
||||
}
|
||||
writeText(
|
||||
[
|
||||
{text: document.getElementById('inputInfoNumber').value, x: 97/1500, y: 1990/2100, width: 1306/1500, height: 36/2100, font: 'gothammedium', fontSize: 36/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: document.getElementById('inputInfoSet').value + '{right' + scaleX(0.005) + '}\u2605{right' + scaleX(0.005) + '}' + document.getElementById('inputInfoLanguage').value + ' {artistbrush}{up' + scaleY(36/2100) + '}' + document.getElementById('inputInfoRarity').value + ' {down' + scaleY(72/2100) + '}{up' + scaleY(36/2100) + '}{fontbelerenbsc}' + document.getElementById('inputInfoArtist').value, x: 97/1500, y: 2026/2100, width: 1306/1500, height: 36/2100, font: 'gothammedium', fontSize: 36/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '{right}\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x: 97/1500, y: 1990/2100 + ptBoxShift, width: 1306/1500, height: 35/2100, font: 'mplantin', fontSize: 35/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '*Not for Sale*', x: 97/1500, y: 2056/2100, width: 1306/1500, height: 30/2100, font: 'gothammedium', fontSize: 30/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '{right}CardConjurer.com', x: 97/1500, y: 2020/2100 + ptBoxShift, width: 1306/1500, height: 30/2100, font: 'mplantin', fontSize: 30/2100, fontColor: 'white', otherParameters: ['oneLine=true']}
|
||||
], bottomInfoContext)
|
||||
}
|
61
data/scripts/versions/versionM15Nyx.js
Normal file
61
data/scripts/versions/versionM15Nyx.js
Normal file
@@ -0,0 +1,61 @@
|
||||
var versionM15NyxImageList = [
|
||||
['White Nyx Nyx Frame', 'data/images/m15/m15FrameWNyx.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Blue Nyx Frame', 'data/images/m15/m15FrameUNyx.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Black Nyx Frame', 'data/images/m15/m15FrameBNyx.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Red Nyx Frame', 'data/images/m15/m15FrameRNyx.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Green Nyx Frame', 'data/images/m15/m15FrameGNyx.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Multicolored Nyx Frame', 'data/images/m15/m15FrameMNyx.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['Artifact Nyx Frame', 'data/images/m15/m15FrameANyx.png', 0, 0, 1, 1, ['Full', 'Pinline (m15)', 'Title (m15)', 'Type (m15)', 'Rules (m15)', 'Frame (m15)', 'Border (m15)']],
|
||||
['White Nyx Legend Crown', 'data/images/m15/m15CrownWNyx.png', 39/1500, 29/2100, 1422/1500, 341/2100, ['Full', 'Nyx Crown (m15)', 'Nyx Crown Outer (m15)', 'Nyx Crown Inner (m15)', 'Nyx Crown Shadowless (m15)']],
|
||||
['Blue Nyx Legend Crown', 'data/images/m15/m15CrownUNyx.png', 39/1500, 29/2100, 1422/1500, 341/2100, ['Full', 'Nyx Crown (m15)', 'Nyx Crown Outer (m15)', 'Nyx Crown Inner (m15)', 'Nyx Crown Shadowless (m15)']],
|
||||
['Black Nyx Legend Crown', 'data/images/m15/m15CrownBNyx.png', 39/1500, 29/2100, 1422/1500, 341/2100, ['Full', 'Nyx Crown (m15)', 'Nyx Crown Outer (m15)', 'Nyx Crown Inner (m15)', 'Nyx Crown Shadowless (m15)']],
|
||||
['Red Nyx Legend Crown', 'data/images/m15/m15CrownRNyx.png', 39/1500, 29/2100, 1422/1500, 341/2100, ['Full', 'Nyx Crown (m15)', 'Nyx Crown Outer (m15)', 'Nyx Crown Inner (m15)', 'Nyx Crown Shadowless (m15)']],
|
||||
['Green Nyx Legend Crown', 'data/images/m15/m15CrownGNyx.png', 39/1500, 29/2100, 1422/1500, 341/2100, ['Full', 'Nyx Crown (m15)', 'Nyx Crown Outer (m15)', 'Nyx Crown Inner (m15)', 'Nyx Crown Shadowless (m15)']],
|
||||
['Multicolored Nyx Legend Crown', 'data/images/m15/m15CrownMNyx.png', 39/1500, 29/2100, 1422/1500, 341/2100, ['Full', 'Nyx Crown (m15)', 'Nyx Crown Outer (m15)', 'Nyx Crown Inner (m15)', 'Nyx Crown Shadowless (m15)']]
|
||||
]
|
||||
|
||||
var versionM15NyxMaskList = [['Nyx Crown (m15)', 'data/images/m15/m15MaskNyxCrown.png'], ['Nyx Crown Outer (m15)', 'data/images/m15/m15MaskNyxCrownOuter.png'], ['Nyx Crown Inner (m15)', 'data/images/m15/m15MaskNyxCrownInner.png'], ['Nyx Crown Shadowless (m15)', 'data/images/m15/m15MaskNyxCrownShadowless.png']]
|
||||
|
||||
if (!loadedVersions.includes('m15Nyx')) {
|
||||
loadedVersions.push("m15Nyx")
|
||||
loadMaskImages(versionM15NyxMaskList)
|
||||
loadFrameImages(versionM15NyxImageList, 'frameClassM15')
|
||||
}
|
||||
|
||||
if (currentVersion != 'm15') {
|
||||
currentVersion = 'm15'
|
||||
|
||||
hideFrameImages('frameClassM15')
|
||||
|
||||
loadTextOptions([
|
||||
new cardText('Card Title', '', 126/1500, 187/2100, 1248/1500, 80/2100, 'belerenb', 80/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Card Type', '', 126/1500, 1263/2100, 1248/1500, 68/2100, 'belerenb', 68/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Rules Text', '', 135/1500, 1372/2100, 1230/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Power/Toughness', '', 1190/1500, 1950/2100, 210/1500, 78/2100, 'belerenbsc', 78/2100, 'black', ['oneLine=true,textAlign="center"'])
|
||||
])
|
||||
|
||||
artX = scaleX(111 / 1500)
|
||||
artY = scaleY(233 / 2100)
|
||||
artWidth = scaleX(1278 / 1500)
|
||||
artHeight = scaleY(936 / 2100)
|
||||
|
||||
manaCostXPath = '1316 - 78 * manaSymbolIndex'
|
||||
manaCostYPath = '121'
|
||||
manaCostDiameter = '70'
|
||||
manaCostShadowOffset = '[-2, 6]'
|
||||
manaCostDirection = 'reverse'
|
||||
|
||||
setSymbolX = [scaleX(1382/1500), 'right']
|
||||
setSymbolY = [scaleY(1200/2100), 'center']
|
||||
setSymbolWidth = scaleX(180/1500)
|
||||
setSymbolHeight = scaleY(80/2100)
|
||||
|
||||
watermarkX = scaleX(0.5)
|
||||
watermarkY = scaleY(1630/2100)
|
||||
watermarkWidth = scaleX(1140/1500)
|
||||
watermarkHeight = scaleY(484/2100)
|
||||
|
||||
bottomInfoFunction = 'bottomInfoM15'
|
||||
|
||||
bottomInfoUpdated()
|
||||
}
|
232
data/scripts/versions/versionPlaneswalker.js
Normal file
232
data/scripts/versions/versionPlaneswalker.js
Normal file
@@ -0,0 +1,232 @@
|
||||
var versionPlaneswalkerImageList = [
|
||||
['White Frame', 'data/images/planeswalker/planeswalkerFrameW.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Blue Frame', 'data/images/planeswalker/planeswalkerFrameU.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Black Frame', 'data/images/planeswalker/planeswalkerFrameB.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Red Frame', 'data/images/planeswalker/planeswalkerFrameR.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Green Frame', 'data/images/planeswalker/planeswalkerFrameG.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Multicolored Frame', 'data/images/planeswalker/planeswalkerFrameM.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Artifact Frame', 'data/images/planeswalker/planeswalkerFrameA.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Colorless Frame', 'data/images/planeswalker/planeswalkerFrameC.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']],
|
||||
['Dark Twins', 'data/images/planeswalker/planeswalkerDarkTwins.png', 0, 0, 1, 1, ['Full', 'Pinline (planeswalker)', 'Title (planeswalker)', 'Type (planeswalker)', 'Frame (planeswalker)', 'Border (planeswalker)']]
|
||||
]
|
||||
|
||||
var versionPlaneswalkerMaskList = [['Pinline (planeswalker)', 'data/images/planeswalker/planeswalkerMaskPinline.png'], ['Border (planeswalker)', 'data/images/planeswalker/planeswalkerMaskBorder.png'], ['Title (planeswalker)', 'data/images/planeswalker/planeswalkerMaskTitle.png'], ['Type (planeswalker)', 'data/images/planeswalker/planeswalkerMaskType.png'], ['Frame (planeswalker)', 'data/images/planeswalker/planeswalkerMaskFrame.png'], ['Rules Text (planeswalker)', 'data/images/planeswalker/planeswalkerMaskText.png']]
|
||||
|
||||
if (!loadedVersions.includes('planeswalker')) {
|
||||
loadedVersions.push('planeswalker')
|
||||
newCanvas('planeswalker')
|
||||
loadMaskImages(versionPlaneswalkerMaskList)
|
||||
loadFrameImages(versionPlaneswalkerImageList, 'frameClassPlaneswalker')
|
||||
|
||||
document.getElementById('tabPicker').innerHTML += `<div onclick='toggleTabs(this, "planeswalkerTab")'>Planeswalker</div>`
|
||||
var planeswalkerTab = document.createElement("div")
|
||||
planeswalkerTab.classList.add('hidden')
|
||||
planeswalkerTab.id = 'planeswalkerTab'
|
||||
planeswalkerTab.innerHTML = `
|
||||
One: <input type="number" class="input number" id="inputPlaneswalker1" oninput="planeswalkerAbilities()" value="200" min="0"><input type="text" class="input text" id="inputPlaneswalker1Icon" oninput="planeswalkerAbilities()" value="+1">
|
||||
Two: <input type="number" class="input number" id="inputPlaneswalker2" oninput="planeswalkerAbilities()" value="200" min="0"><input type="text" class="input text" id="inputPlaneswalker2Icon" oninput="planeswalkerAbilities()" value="0">
|
||||
Three: <input type="number" class="input number" id="inputPlaneswalker3" oninput="planeswalkerAbilities()" value="200" min="0"><input type="text" class="input text" id="inputPlaneswalker3Icon" oninput="planeswalkerAbilities()" value="-3">
|
||||
Four: <input type="number" class="input number" id="inputPlaneswalker4" oninput="planeswalkerAbilities()" value="0" min="0" max="1039"><input type="text" class="input text" id="inputPlaneswalker4Icon" oninput="planeswalkerAbilities()" value="-9"><br>
|
||||
For two-ability Planeswalkers only:<br>
|
||||
<input type="checkbox" onchange="changePlaneswalkerAbilityLayout()" id="inputWARSpacing"> Use War of the Spark ability spacing<br>
|
||||
<input type="checkbox" onchange="changePlaneswalkerAbilityLayout()" id="inputWARReverse"> Reverse War of the Spark ability spacing<br>
|
||||
<input type="checkbox" onchange="invertPlaneswalkerColors()" id="inputColorInvert"> Dark ability boxes`
|
||||
document.getElementById('tabOptions').appendChild(planeswalkerTab)
|
||||
var planeswalkerPlus = new Image()
|
||||
planeswalkerPlus.crossOrigin = 'anonymous'
|
||||
planeswalkerPlus.src = 'data/images/planeswalker/planeswalkerPlus.png'
|
||||
var planeswalkerNeutral = new Image()
|
||||
planeswalkerNeutral.crossOrigin = "anonymous"
|
||||
planeswalkerNeutral.src = 'data/images/planeswalker/planeswalkerNeutral.png'
|
||||
var planeswalkerMinus = new Image()
|
||||
planeswalkerMinus.crossOrigin = "anonymous"
|
||||
planeswalkerMinus.src = 'data/images/planeswalker/planeswalkerMinus.png'
|
||||
var lightToDarkPlaneswalker = new Image()
|
||||
lightToDarkPlaneswalker.crossOrigin = 'anonymous'
|
||||
lightToDarkPlaneswalker.src = 'data/images/planeswalker/abilityLineOdd.png'
|
||||
var darkToLightPlaneswalker = new Image()
|
||||
darkToLightPlaneswalker.crossOrigin = 'anonymous'
|
||||
darkToLightPlaneswalker.src = 'data/images/planeswalker/abilityLineEven.png'
|
||||
var lightToDarkPlaneswalkerDarkened= new Image()
|
||||
lightToDarkPlaneswalkerDarkened.crossOrigin = 'anonymous'
|
||||
lightToDarkPlaneswalkerDarkened.src = 'data/images/planeswalker/abilityLineOddDarkened.png'
|
||||
var darkToLightPlaneswalkerDarkened = new Image()
|
||||
darkToLightPlaneswalkerDarkened.crossOrigin = 'anonymous'
|
||||
darkToLightPlaneswalkerDarkened.onload = function() {invertPlaneswalkerColors()}
|
||||
darkToLightPlaneswalkerDarkened.src = 'data/images/planeswalker/abilityLineEvenDarkened.png'
|
||||
setTimeout(planeswalkerAbilities, 1000)
|
||||
//placeholders:
|
||||
var darkColor = '#a4a4a4'
|
||||
var lightColor = 'white'
|
||||
var planeswalkerLightToDark = new Image()
|
||||
var planeswalkerDarkToLight = new Image()
|
||||
planeswalkerDarkToLight.onload = function(){planeswalkerAbilities()}
|
||||
}
|
||||
|
||||
if (currentVersion != 'planeswalker') {
|
||||
currentVersion = 'planeswalker'
|
||||
|
||||
hideFrameImages('frameClassPlaneswalker')
|
||||
|
||||
loadTextOptions([
|
||||
new cardText('Card Title', '', 130/1500, 149/2100, 1248/1500, 80/2100, 'belerenb', 80/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Card Type', '', 130/1500, 1258/2100, 1248/1500, 68/2100, 'belerenb', 68/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Ability 1', '', 270/1500, 1153/2100, 1120/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Ability 2', '', 270/1500, 1153/2100, 1120/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Ability 3', '', 270/1500, 1153/2100, 1120/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Ability 4', '', 270/1500, 1153/2100, 1120/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Loyalty', '', 1215/1500, 1954/2100, 210/1500, 78/2100, 'belerenbsc', 78/2100, 'white', ['oneLine=true,textAlign="center"'])
|
||||
])
|
||||
|
||||
artX = scaleX(100 / 1500)
|
||||
artY = scaleY(190 / 2100)
|
||||
artWidth = scaleX(1508 / 1500)
|
||||
artHeight = scaleY(1730 / 2100)
|
||||
|
||||
manaCostXPath = '1316 - 78 * manaSymbolIndex'
|
||||
manaCostYPath = '86'
|
||||
manaCostDiameter = '70'
|
||||
manaCostShadowOffset = '[-2, 6]'
|
||||
manaCostDirection = 'reverse'
|
||||
|
||||
setSymbolX = [scaleX(1383/1500), 'right']
|
||||
setSymbolY = [scaleY(1237/2100), 'center']
|
||||
setSymbolWidth = scaleX(180/1500)
|
||||
setSymbolHeight = scaleY(80/2100)
|
||||
|
||||
watermarkX = scaleX(0.5)
|
||||
watermarkY = scaleY(1630/2100)
|
||||
watermarkWidth = scaleX(1140/1500)
|
||||
watermarkHeight = scaleY(484/2100)
|
||||
|
||||
bottomInfoFunction = 'bottomInfoPlaneswalker'
|
||||
|
||||
bottomInfoUpdated()
|
||||
}
|
||||
|
||||
function bottomInfoPlaneswalker() {
|
||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var ptBoxShift = 36/2100
|
||||
writeText(
|
||||
[
|
||||
{text: document.getElementById('inputInfoNumber').value, x: 97/1500, y: 1990/2100, width: 1306/1500, height: 36/2100, font: 'gothammedium', fontSize: 36/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: document.getElementById('inputInfoSet').value + '{right' + scaleX(0.005) + '}\u2605{right' + scaleX(0.005) + '}' + document.getElementById('inputInfoLanguage').value + ' {artistbrush}{up' + scaleY(36/2100) + '}' + document.getElementById('inputInfoRarity').value + ' {down' + scaleY(72/2100) + '}{up' + scaleY(36/2100) + '}{fontbelerenbsc}' + document.getElementById('inputInfoArtist').value, x: 97/1500, y: 2026/2100, width: 1306/1500, height: 36/2100, font: 'gothammedium', fontSize: 36/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '{right}\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x: 97/1500, y: 1990/2100 + ptBoxShift, width: 1306/1500, height: 35/2100, font: 'mplantin', fontSize: 35/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '*Not for Sale*', x: 97/1500, y: 2056/2100, width: 1306/1500, height: 30/2100, font: 'gothammedium', fontSize: 30/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '{right}CardConjurer.com', x: 97/1500, y: 2020/2100 + ptBoxShift, width: 1306/1500, height: 30/2100, font: 'mplantin', fontSize: 30/2100, fontColor: 'white', otherParameters: ['oneLine=true']}
|
||||
], bottomInfoContext)
|
||||
}
|
||||
|
||||
var planeswalkerAbilityLayout = [[0], [0, scaleY(784/1050)], [0, scaleY(730/1050), scaleY(863/1050)], [0, scaleY(697/1050), scaleY(784/1050), scaleY(878/1050)], [0, scaleY(683/1050), scaleY(756/1050), scaleY(830/1050), scaleY(904/1050)]]
|
||||
var planeswalkerAbilityCount = 3
|
||||
var ability1Y = 0, ability2Y = 0, ability3Y = 0, ability4Y = 0, ability5Y = cardHeight
|
||||
|
||||
function planeswalkerAbilities() {
|
||||
planeswalkerContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
planeswalkerAbilityCount = 0
|
||||
for (var i = 1; i < 5; i++) {
|
||||
cardTextList[i + 1].y = 2
|
||||
if (getFloat('inputPlaneswalker' + i) != 0) {
|
||||
planeswalkerAbilityCount += 1;
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
if (planeswalkerAbilityCount > 0) {
|
||||
ability1Y = scaleY(648/1050)
|
||||
if (planeswalkerAbilityCount > 1) {
|
||||
window.ability2Y = getFloat("inputPlaneswalker1") + ability1Y
|
||||
if (planeswalkerAbilityCount > 2) {
|
||||
ability3Y = getFloat('inputPlaneswalker2') + ability2Y
|
||||
if (planeswalkerAbilityCount > 3) {
|
||||
ability4Y = getFloat('inputPlaneswalker3') + ability3Y
|
||||
// planeswalkerContext.writeText(version.textList[5][1], scale(133), ability4Y + (scale(950) - ability4Y) / 2, scale(555), 0, "mplantin", scale(38), "black", "lineSpace=0.97");
|
||||
cardTextList[5].y = (ability4Y) / cardHeight + cardTextList[5].fontSize - 10/2100
|
||||
cardTextList[5].height = getFloat('inputPlaneswalker4') / cardHeight
|
||||
}
|
||||
// planeswalkerContext.writeText(version.textList[4][1], scale(133), ability3Y + getValue("inputPlaneswalker3") / 2, scale(555), 0, "mplantin", scale(38), "black", "lineSpace=0.97");
|
||||
cardTextList[4].y = (ability3Y) / cardHeight + cardTextList[4].fontSize - 10/2100
|
||||
cardTextList[4].height = getFloat('inputPlaneswalker3') / cardHeight
|
||||
}
|
||||
// planeswalkerContext.writeText(version.textList[3][1], scale(133), ability2Y + getValue("inputPlaneswalker2") / 2, scale(555), 0, "mplantin", scale(38), "black", "lineSpace=0.97");
|
||||
cardTextList[3].y = (ability2Y) / cardHeight + cardTextList[3].fontSize - 10/2100
|
||||
cardTextList[3].height = getFloat('inputPlaneswalker2') / cardHeight
|
||||
}
|
||||
// planeswalkerContext.writeText(version.textList[2][1], scale(133), ability1Y + getValue("inputPlaneswalker1") / 2, scale(555), 0, "mplantin", scale(38), "black", "lineSpace=0.97", "planeswalkerTextFunction");
|
||||
cardTextList[2].y = (ability1Y) / cardHeight + cardTextList[2].fontSize - 10/2100
|
||||
cardTextList[2].height = getFloat('inputPlaneswalker1') / cardHeight
|
||||
planeswalkerTextFunction()
|
||||
}
|
||||
}
|
||||
function planeswalkerTextFunction() {
|
||||
planeswalkerContext.globalCompositeOperation = 'destination-over'
|
||||
var lastAdjust = 0
|
||||
var textBoxWidth = scaleX(1210/1500)
|
||||
for (var i = 1; i < planeswalkerAbilityCount + 1; i++) {
|
||||
if (i == planeswalkerAbilityCount) {
|
||||
lastAdjust = 2 * cardHeight
|
||||
}
|
||||
if (i % 2 == 1) {
|
||||
planeswalkerContext.fillStyle = lightColor
|
||||
planeswalkerContext.globalAlpha = 0.608
|
||||
planeswalkerContext.fillRect(scaleX(91/750), window['ability' + i + 'Y'] + scaleY(10/1050), textBoxWidth, window['ability' + (i + 1) + 'Y'] - window['ability' + i + 'Y'] - scaleY(20/1050) + lastAdjust)
|
||||
if (i == 1 && planeswalkerAbilityCount != 1) {
|
||||
planeswalkerContext.fillRect(scaleX(91/750), window['ability' + i + 'Y'], textBoxWidth, scaleY(10/1050))
|
||||
}
|
||||
planeswalkerContext.globalAlpha = 1
|
||||
planeswalkerContext.drawImage(planeswalkerLightToDark, scaleX(91/750), window['ability' + (i + 1) + 'Y'] - scaleY(10/1050) + lastAdjust, textBoxWidth, scaleY(20/1050))
|
||||
} else {
|
||||
planeswalkerContext.fillStyle = darkColor
|
||||
planeswalkerContext.globalAlpha = 0.706
|
||||
planeswalkerContext.fillRect(scaleX(91/750), window['ability' + i + 'Y'] + scaleY(10/1050), textBoxWidth, window['ability' + (i + 1) + 'Y'] - window['ability' + i + 'Y'] - scaleY(20/1050) + lastAdjust)
|
||||
planeswalkerContext.globalAlpha = 1
|
||||
planeswalkerContext.drawImage(planeswalkerDarkToLight, scaleX(91/750), window['ability' + (i + 1)+ 'Y'] - scaleY(10/1050) + lastAdjust, textBoxWidth, scaleY(20/1050))
|
||||
}
|
||||
}
|
||||
planeswalkerContext.globalCompositeOperation = 'destination-in'
|
||||
planeswalkerContext.drawImage(maskImageList[maskNameList.indexOf('Rules Text (planeswalker)')], 0, 0, cardWidth, cardHeight)
|
||||
planeswalkerContext.globalCompositeOperation = 'source-over'
|
||||
planeswalkerContext.fillStyle = 'white'
|
||||
planeswalkerContext.font = scaleY(30/1050) + 'px belerenbsc'
|
||||
planeswalkerContext.textAlign = 'center'
|
||||
for (var i = 1; i < planeswalkerAbilityCount + 1; i++) {
|
||||
var planeswalkerIconValue = document.getElementById('inputPlaneswalker' + i + 'Icon').value
|
||||
var planeswalkerMidpoint = getFloat('inputPlaneswalker' + i + '') / 2 + window['ability' + i + 'Y']
|
||||
if (planeswalkerIconValue.includes('+')) {
|
||||
planeswalkerContext.drawImage(planeswalkerPlus, scaleX(22/750), planeswalkerAbilityLayout[planeswalkerAbilityCount][i] - scaleY(27/1050), scaleX(105/750), scaleY(76/1050))
|
||||
planeswalkerContext.fillText(planeswalkerIconValue, scaleX(77/750), planeswalkerAbilityLayout[planeswalkerAbilityCount][i] + scaleY(18/1050))
|
||||
} else if (planeswalkerIconValue.includes('-')) {
|
||||
planeswalkerContext.drawImage(planeswalkerMinus, scaleX(21/750), planeswalkerAbilityLayout[planeswalkerAbilityCount][i] - scaleY(16/1050), scaleX(106/750), scaleY(74/1050))
|
||||
planeswalkerContext.fillText(planeswalkerIconValue, scaleX(77/750), planeswalkerAbilityLayout[planeswalkerAbilityCount][i] + scaleY(19/1050))
|
||||
} else if (planeswalkerIconValue != '') {
|
||||
planeswalkerContext.drawImage(planeswalkerNeutral, scaleX(21/750), planeswalkerAbilityLayout[planeswalkerAbilityCount][i] - scaleY(16/1050), scaleX(106/750), scaleY(64/1050))
|
||||
planeswalkerContext.fillText(planeswalkerIconValue, scaleX(77/750), planeswalkerAbilityLayout[planeswalkerAbilityCount][i] + scaleY(20/1050))
|
||||
}
|
||||
}
|
||||
cardTextEdited()
|
||||
}
|
||||
function changePlaneswalkerAbilityLayout() {
|
||||
if (document.getElementById('inputWARSpacing').checked) {
|
||||
if (document.getElementById('inputWARReverse').checked) {
|
||||
planeswalkerAbilityLayout[2] = [0, scaleY(784/1050), scaleY(878/1050)]
|
||||
} else {
|
||||
planeswalkerAbilityLayout[2] = [0, scaleY(697/1050), scaleY(784/1050)]
|
||||
}
|
||||
} else {
|
||||
planeswalkerAbilityLayout[2] = [0, scaleY(730/1050), scaleY(863/1050)]
|
||||
}
|
||||
planeswalkerAbilities()
|
||||
}
|
||||
function invertPlaneswalkerColors() {
|
||||
if (document.getElementById('inputColorInvert').checked) {
|
||||
darkColor = '#5b5b5b'
|
||||
lightColor = 'black'
|
||||
planeswalkerLightToDark.src = lightToDarkPlaneswalkerDarkened.src
|
||||
planeswalkerDarkToLight.src = darkToLightPlaneswalkerDarkened.src
|
||||
} else {
|
||||
darkColor = '#a4a4a4'
|
||||
lightColor = 'white'
|
||||
planeswalkerLightToDark.src = lightToDarkPlaneswalker.src
|
||||
planeswalkerDarkToLight.src = darkToLightPlaneswalker.src
|
||||
}
|
||||
}
|
73
data/scripts/versions/versionStorybook.js
Normal file
73
data/scripts/versions/versionStorybook.js
Normal file
@@ -0,0 +1,73 @@
|
||||
var versionStorybookImageList = [
|
||||
['White Frame', 'data/images/storybook/storybookFrameW.png', 0, 0, 1, 1, ['Full']],
|
||||
['Blue Frame', 'data/images/storybook/storybookFrameU.png', 0, 0, 1, 1, ['Full']],
|
||||
['Black Frame', 'data/images/storybook/storybookFrameB.png', 0, 0, 1, 1, ['Full']],
|
||||
['Red Frame', 'data/images/storybook/storybookFrameR.png', 0, 0, 1, 1, ['Full']],
|
||||
['Green Frame', 'data/images/storybook/storybookFrameG.png', 0, 0, 1, 1, ['Full']],
|
||||
['Colorless Frame', 'data/images/storybook/storybookFrameC.png', 0, 0, 1, 1, ['Full']]
|
||||
]
|
||||
|
||||
var versionStorybookMaskList = [['Storybook Right Half', 'data/images/storybook/maskStorybookRightHalf.png']]
|
||||
|
||||
if (!loadedVersions.includes('storybook')) {
|
||||
loadedVersions.push('storybook')
|
||||
// loadMaskImages(versionStorybookMaskList)
|
||||
loadFrameImages(versionStorybookImageList, 'frameClassStorybook')
|
||||
}
|
||||
|
||||
if (currentVersion != 'storybook') {
|
||||
currentVersion = 'storybook'
|
||||
|
||||
hideFrameImages('frameClassStorybook')
|
||||
|
||||
loadTextOptions([
|
||||
new cardText('Card Title', '', 222/1500, 187/2100, 1248/1500, 80/2100, 'belerenb', 80/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Card Type', '', 345/1500, 1268/2100, 1248/1500, 68/2100, 'belerenb', 68/2100, 'black', ['oneLine=true']),
|
||||
new cardText('Rules Text', '', 124/1500, 1348/2100, 600/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Rules Text (Right)', '', 780/1500, 1348/2100, 600/1500, 624/2100, 'mplantin', 74/2100, 'black'),
|
||||
new cardText('Power/Toughness', '', 1190/1500, 1950/2100, 210/1500, 78/2100, 'belerenbsc', 78/2100, 'black', ['oneLine=true,textAlign="center"'])
|
||||
])
|
||||
|
||||
artX = scaleX(50/1500)
|
||||
artY = scaleY(54/2100)
|
||||
artWidth = scaleX(1405/1500)
|
||||
artHeight = scaleY(1175/2100)
|
||||
|
||||
manaCostXPath = '1316 - 78 * manaSymbolIndex'
|
||||
manaCostYPath = '121'
|
||||
manaCostDiameter = '70'
|
||||
manaCostShadowOffset = '[-2, 6]'
|
||||
manaCostDirection = 'reverse'
|
||||
|
||||
setSymbolX = [scaleX(1328/1500), 'center']
|
||||
setSymbolY = [scaleY(1245/2100), 'center']
|
||||
setSymbolWidth = scaleX(74/1500)
|
||||
setSymbolHeight = scaleY(74/2100)
|
||||
|
||||
watermarkX = scaleX(0.5)
|
||||
watermarkY = scaleY(1630/2100)
|
||||
watermarkWidth = scaleX(1140/1500)
|
||||
watermarkHeight = scaleY(484/2100)
|
||||
|
||||
bottomInfoFunction = 'bottomInfoStorybook'
|
||||
|
||||
bottomInfoUpdated()
|
||||
}
|
||||
|
||||
function bottomInfoStorybook() {
|
||||
bottomInfoContext.clearRect(0, 0, cardWidth, cardHeight)
|
||||
var ptBoxShift = 0
|
||||
for (var i = 0; i < cardTextList.length; i++) {
|
||||
if (cardTextList[i].name == 'Power/Toughness' && cardTextList[i].text != '') {
|
||||
ptBoxShift = 36/2100
|
||||
}
|
||||
}
|
||||
writeText(
|
||||
[
|
||||
{text: document.getElementById('inputInfoNumber').value, x: 97/1500, y: 2000/2100, width: 1306/1500, height: 36/2100, font: 'gothammedium', fontSize: 36/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: document.getElementById('inputInfoSet').value + '{right' + scaleX(0.005) + '}\u2605{right' + scaleX(0.005) + '}' + document.getElementById('inputInfoLanguage').value + ' {artistbrush}{up' + scaleY(36/2100) + '}' + document.getElementById('inputInfoRarity').value + ' {down' + scaleY(72/2100) + '}{up' + scaleY(36/2100) + '}{fontbelerenbsc}' + document.getElementById('inputInfoArtist').value, x: 97/1500, y: 2036/2100, width: 1306/1500, height: 36/2100, font: 'gothammedium', fontSize: 36/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '{right}\u2122 & \u00a9 ' + date.getFullYear() + ' Wizards of the Coast', x: 97/1500, y: 2000/2100 + ptBoxShift, width: 1306/1500, height: 35/2100, font: 'mplantin', fontSize: 35/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '*Not for Sale*', x: 97/1500, y: 2066/2100, width: 1306/1500, height: 30/2100, font: 'gothammedium', fontSize: 30/2100, fontColor: 'white', otherParameters: ['oneLine=true']},
|
||||
{text: '{right}CardConjurer.com', x: 97/1500, y: 2030/2100 + ptBoxShift, width: 1306/1500, height: 30/2100, font: 'mplantin', fontSize: 30/2100, fontColor: 'white', otherParameters: ['oneLine=true']}
|
||||
], bottomInfoContext)
|
||||
}
|
Reference in New Issue
Block a user