old sagas & acorn holo stamp

This commit is contained in:
Kyle
2022-07-02 11:49:02 -07:00
parent 38c6749084
commit bda3a4534b
23 changed files with 61 additions and 8 deletions

View File

@@ -1754,11 +1754,11 @@ function drawCard() {
cardContext.drawImage(planeswalkerPreFrameCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
}
cardContext.drawImage(frameCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
if (card.version.includes('planeswalker') && typeof planeswalkerPostFrameCanvas !== "undefined") {
if (card.version.toLowerCase().includes('planeswalker') && typeof planeswalkerPostFrameCanvas !== "undefined") {
cardContext.drawImage(planeswalkerPostFrameCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
} else if (card.version.includes('planeswalker') && typeof planeswalkerCanvas !== "undefined") {
} else if (card.version.toLowerCase().includes('planeswalker') && typeof planeswalkerCanvas !== "undefined") {
cardContext.drawImage(planeswalkerCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
} else if (card.version.includes('QRCode') && typeof qrCodeCanvas !== "undefined") {
} else if (card.version.toLowerCase().includes('qrcode') && typeof qrCodeCanvas !== "undefined") {
cardContext.drawImage(qrCodeCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
} // REMOVE/DELETE PLANESWALKERCANVAS AFTER A FEW WEEKS
// guidelines
@@ -1768,11 +1768,11 @@ function drawCard() {
// watermark
cardContext.drawImage(watermarkCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
// custom elements for sagas, classes, and dungeons
if (card.version.includes('saga') && typeof sagaCanvas !== "undefined") {
if (card.version.toLowerCase().includes('saga') && typeof sagaCanvas !== "undefined") {
cardContext.drawImage(sagaCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
} else if (card.version.includes('class') && typeof classCanvas !== "undefined") {
} else if (card.version.toLowerCase().includes('class') && typeof classCanvas !== "undefined") {
cardContext.drawImage(classCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
} else if (card.version.includes('dungeon') && typeof dungeonCanvas !== "undefined") {
} else if (card.version.toLowerCase().includes('dungeon') && typeof dungeonCanvas !== "undefined") {
cardContext.drawImage(dungeonCanvas, 0, 0, cardCanvas.width, cardCanvas.height);
}
// text

View File

@@ -157,6 +157,7 @@ const frameNames = new Map ([
['Tapped (Horizontal M15)', 'Tapped'],
['Textless Duals', 'CustomDualLands'],
['Seventh Edition Planeswalkers', 'PlaneswalkerSeventh'],
['Seventh Edition Sagas', 'OldSaga'],
['Floating Old Border', 'OldFloating'],
['Floating Old Border (Short)', 'OldFloatingShort'],
['Classicshifted', 'Classicshifted'],

View File

@@ -6,6 +6,7 @@ loadFramePacks([
{name:'Textless Duals', value:'CustomDualLands'},
{name:'Textless Seventh', value:'SeventhTextless'},
{name:'Seventh Edition Planeswalkers', value:'PlaneswalkerSeventh'},
{name:'Seventh Edition Sagas', value:'OldSaga'},
{name:'Floating Old Border', value:'OldFloating'},
{name:'Floating Old Border (Short)', value:'OldFloatingShort'},
{name:'Classicshifted Series', value:'disabled'},

View File

@@ -12,7 +12,8 @@ availableFrames = [
{name:'Land Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampL.png', bounds:bounds},
{name:'Artifact (2) Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampA2.png', bounds:bounds},
{name:'Artifact (3) Holo Stamp', src:'/img/frames/m15/holoStamps/m15HoloStampA3.png', bounds:bounds},
{name:'Plain Holo Stamp', src:'/img/frames/m15/holoStamps/stamp.png', bounds:{x:0.4554, y:0.9172, width:0.0894, height:0.0320}}
{name:'Plain Holo Stamp', src:'/img/frames/m15/holoStamps/stamp.png', bounds:{x:0.4554, y:0.9172, width:0.0894, height:0.0320}},
{name:'Acorn Holo Stamp', src:'/img/frames/m15/holoStamps/acorn.png', bounds:{x:0.4554, y:0.9129, width:0.0894, height:0.0381}}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = true;

49
js/frames/packOldSaga.js Normal file
View File

@@ -0,0 +1,49 @@
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/old/saga/w.png'},
{name:'Blue Frame', src:'/img/frames/old/saga/u.png'},
{name:'Black Frame', src:'/img/frames/old/saga/b.png'},
{name:'Red Frame', src:'/img/frames/old/saga/r.png'},
{name:'Green Frame', src:'/img/frames/old/saga/g.png'},
{name:'Multicolored Frame', src:'/img/frames/old/saga/m.png'},
{name:'Land Frame', src:'/img/frames/old/saga/l.png'},
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = async function() {
//resets things so that every frame doesn't have to
await resetCardIrregularities();
//sets card version
card.version = 'oldSaga';
card.onload = '/js/frames/versionSaga.js';
loadScript('/js/frames/versionSaga.js');
//art bounds
card.artBounds = {x:0.5334, y:0.1091, width:0.3734, height:0.722};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9, y:0.8643, width:0.12, height:0.0372, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.3027, y:0.4748, width:0.3547, height:0.6767};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', x:0.1067, y:0.0562, width:0.8174, height:72/2100, oneLine:true, size:72/1638, align:'right', manaCost:true},
title: {name:'Title', text:'', x:0.1134, y:0.0505, width:0.7734, height:0.041, oneLine:true, font:'goudymedieval', size:0.041, color:'white', shadowX:0.002, shadowY:0.0015},
type: {name:'Type', text:'', x:0.1074, y:0.8391, width:0.7852, height:0.0543, oneLine:true, size:0.032, color:'white', shadowX:0.002, shadowY:0.0015},
ability0: {name:'Ability 1', text:'', x:0.1447, y:0.2896, width:0.32, height:0.1786, size:0.0305},
ability1: {name:'Ability 2', text:'', x:0.1447, y:0, width:0.32, height:0.1786, size:0.0305},
ability2: {name:'Ability 3', text:'', x:0.1447, y:0, width:0.32, height:0.1786, size:0.0305},
ability3: {name:'Ability 4', text:'', x:0.1447, y:0, width:0.32, height:0, size:0.0305},
reminder: {name:'Reminder Text', text:'{i}(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)', x:0.1, y:0.1043, width:0.3667, height:0.1772, size:0.0281, shadowColor:'white'}
});
//bottom info
loadBottomInfo({
top: {text:'Illus: {elemidinfo-artist}', x:0.1, y:1872/2100, width:0.8, height:0.0267, oneLine:true, size:0.0267, align:'center', shadowX:0.0021, shadowY:0.0015, color:'white'},
wizards: {name:'wizards', text:'\u2122 & \u00a9 {elemidinfo-year} Wizards of the Coast, Inc. {elemidinfo-number}', x:0.1, y:1933/2100, width:0.8, height:0.0172, oneLine:true, size:0.0172, align:'center', shadowX:0.0014, shadowY:0.001, color:'white'},
bottom: {text:'NOT FOR SALE CardConjurer.com', x:0.1, y:1973/2100, width:0.8, height:26/2100, oneLine:true, size:26/2100, align:'center', shadowX:0.0014, shadowY:0.001, color:'white'}
});
}
//loads available frames
loadFramePack();

View File

@@ -31,7 +31,7 @@ if (!loadedVersions.includes('/js/frames/versionSaga.js')) {
</div>
</div>`;
if (!card.saga) {
card.saga = {abilities:[1, 1, 1, 0], count:3, x:0.1, width:0.3947};
card.saga = {abilities:[1, 1, 1, 0], count:3, x:(card.version === "oldSaga" ? 0.1114 : 0.1), width:(card.version === "oldSaga" ? 0.3727 : 0.3947)};
}
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var sagaChapter = new Image();