new frames

This commit is contained in:
Kyle
2021-01-07 17:08:05 -08:00
parent d13e57dae6
commit 8a55e257b3
190 changed files with 153 additions and 15 deletions

3
js/frames/groupCustom.js Normal file
View File

@@ -0,0 +1,3 @@
loadFramePacks([
{name:'Cartoony - Sheepwave', value:'Cartoony'}
])

View File

@@ -1,4 +1,5 @@
loadFramePacks([
{name:'Kaldheim', value:'Kaldheim'},
{name:'Commander Legends', value:'CommanderLegends'},
{name:'Zendikar Rising', value:'ZendikarRising'},
{name:'M21', value:'M21'},

View File

@@ -0,0 +1,14 @@
//checks to see if it needs to run
if (!card.manaSymbols.includes('/js/frames/manaSymbolsCartoony.js')) {
card.manaSymbols.push('/js/frames/manaSymbolsCartoony.js');
}
if (findManaSymbolIndex('cw') == -1) {
loadManaSymbols([
['cartoony/cw.png', 'cw', 4], ['cartoony/cu.png', 'cu', 4], ['cartoony/cb.png', 'cb', 4], ['cartoony/cr.png', 'cr', 4], ['cartoony/cg.png', 'cg', 4],
['cartoony/c0.png', 'cc', 15], ['cartoony/c1.png', 'cc', 15], ['cartoony/c2.png', 'cc', 15], ['cartoony/c3.png', 'cc', 15], ['cartoony/c4.png', 'cc', 15],
['cartoony/c5.png', 'cc', 15], ['cartoony/c6.png', 'cc', 15], ['cartoony/c7.png', 'cc', 15], ['cartoony/c8.png', 'cc', 15], ['cartoony/c9.png', 'cc', 15],
['cartoony/c10.png', 'cc', 15], ['cartoony/c11.png', 'cc', 15], ['cartoony/c12.png', 'cc', 15], ['cartoony/c13.png', 'cc', 15], ['cartoony/c14.png', 'cc', 15],
['cartoony/c15.png', 'cc', 15], ['cartoony/c16.png', 'cc', 15], ['cartoony/c17.png', 'cc', 15], ['cartoony/c18.png', 'cc', 15], ['cartoony/c19.png', 'cc', 15],
['cartoony/cc.png', 'cc', 15], ['cartoony/ct.png', 'cdark', 1], ['cartoony/cx.png', 'cc', 15], ['cartoony/cy.png', 'cc', 15], ['cartoony/cz.png', 'cc', 15],
]);
}

32
js/frames/packCartoony.js Normal file
View File

@@ -0,0 +1,32 @@
//defines available frames
availableFrames = [{src:'/img/frames/m15/regular/m15FrameA.png', name:'unnamed'}];
//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 = 'cartoony';
loadScript('/js/frames/manaSymbolsCartoony.js');
// notify('The Future version adds special mana symbols. To use them, place an "F" before the following mana symbols: wubrg, 0-20, x, and hybrid mana symbols.');
//art bounds
card.artBounds = {x:0.0767, y:0.1129, width:0.8476, height:0.4429};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.5910, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
resetWatermark();
//text
loadTextOptions({
mana: {name:'Mana Cost', text:'', y:0.01, oneLine:true, size:180/1638, manaCost:true, manaSpacing:-0.11, noVerticalCenter:true, arcRadius:2, arcStart:0.165},
title: {name:'Title', y:0.02, text:'', oneLine:true, font:'Acme-Regular', size:0.081, arcRadius:2, arcStart:-0.165, noVerticalCenter:true, outlineWidth:0.0048, color:'white'}, //, x:0.0854, width:0.8292, height:0.0543
type: {name:'Type', text:'', x:0.0854, y:0.5664, width:0.8292, height:0.0543, oneLine:true, font:'belerenb', size:0.0324},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6303, width:0.828, height:0.2875, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.7928, y:0.902, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames
loadFramePack();

View File

@@ -1,14 +1,23 @@
//Create objects for common properties across available frames
var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}];
var bounds = {x:0.7627, y:0.8853, width:0.192, height:0.0753};
var masks = [{src:'/img/frames/kaldheim/maskDetails.png', name:'Details'}, {src:'/img/frames/kaldheim/maskPinline.png', name:'Pinline'}, {src:'/img/frames/kaldheim/maskTitle.png', name:'Title'}, {src:'/img/frames/kaldheim/maskType.png', name:'Type'}, {src:'/img/frames/kaldheim/maskTextbox.png', name:'Rules'}, {src:'/img/frames/kaldheim/maskBorder.png', name:'Border'}, {src:'/img/frames/kaldheim/maskFrame.png', name:'Frame'}];
var masks2 = [{src:'/img/frames/kaldheim/maskPTCorners.png', name:'Corners'}, {src:'/img/frames/kaldheim/maskPTCornersRight.png', name:'Corners (right)'}];
var bounds = {x:0.7627, y:0.8853, width:0.188, height:0.0724};
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/kaldheim/frameW.png', masks:masks},
{name:'Blue Frame', src:'/img/frames/kaldheim/frameU.png', masks:masks},
{name:'Black Frame', src:'/img/frames/kaldheim/frameB.png', masks:masks},
{name:'Red Frame', src:'/img/frames/kaldheim/frameR.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/kaldheim/ptW.png', bounds:bounds},
{name:'Blue Power/Toughness', src:'/img/frames/kaldheim/ptU.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/kaldheim/ptR.png', bounds:bounds}
{name:'Green Frame', src:'/img/frames/kaldheim/frameG.png', masks:masks},
{name:'Multicolored Frame', src:'/img/frames/kaldheim/frameM.png', masks:masks},
{name:'Artifact Frame', src:'/img/frames/kaldheim/frameA.png', masks:masks},
{name:'White Power/Toughness', src:'/img/frames/kaldheim/ptW.png', bounds:bounds, masks:masks2},
{name:'Blue Power/Toughness', src:'/img/frames/kaldheim/ptU.png', bounds:bounds, masks:masks2},
{name:'Black Power/Toughness', src:'/img/frames/kaldheim/ptB.png', bounds:bounds, masks:masks2},
{name:'Red Power/Toughness', src:'/img/frames/kaldheim/ptR.png', bounds:bounds, masks:masks2},
{name:'Green Power/Toughness', src:'/img/frames/kaldheim/ptG.png', bounds:bounds, masks:masks2},
{name:'Multicolored Power/Toughness', src:'/img/frames/kaldheim/ptM.png', bounds:bounds, masks:masks2},
{name:'Artifact Power/Toughness', src:'/img/frames/kaldheim/ptA.png', bounds:bounds, masks:masks2}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;
@@ -22,7 +31,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
card.artBounds = {x:0.1047, y:0.1158, width:0.7907, height:0.462};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9213, y:0.6081, width:0.12, height:0.0410, vertical:'center', horizontal: 'right'};
card.setSymbolBounds = {x:0.9213, y:0.6081, width:0.12, height:0.04, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.5, y:0.7762, width:0.75, height:0.2305};
@@ -33,7 +42,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
title: {name:'Title', text:'', x:0.0667, y:0.0591, width:0.8667, height:0.0543, oneLine:true, font:'belerenb', color:'white', size:0.0381, shadowX:0.0027, shadowY:0.002},
type: {name:'Type', text:'', x:0.0734, y:0.5829, width:0.8534, height:0.0543, oneLine:true, font:'belerenb', color:'white', size:0.0324, shadowX:0.0027, shadowY:0.002},
rules: {name:'Rules Text', text:'', x:0.086, y:0.6405, width:0.828, height:0.2739, size:0.0362},
pt: {name:'Power/Toughness', text:'', x:0.798, y:0.9039, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
pt: {name:'Power/Toughness', text:'', x:0.7954, y:0.9029, width:0.1367, height:0.0372, size:0.0372, font:'belerenbsc', oneLine:true, align:'center'}
});
}
//loads available frames