Add Pokemon frame

This commit is contained in:
Josh birnholz
2023-04-30 17:25:09 -04:00
parent 406e807d25
commit 24d68a3fde
85 changed files with 218 additions and 15 deletions

View File

@@ -34,5 +34,6 @@ loadFramePacks([
{name:'Ixalan - @feuer_ameise', value:'FeuerAmeiseIxalan'},
{name:'Kaldheim, Fullart - @feuer_ameise', value:'FeuerAmeiseKaldheim'},
{name:'Celid\'s Asap', value:'CustomCelidAsap'},
{name:'Magrao\'s Kaldheim', value:'CustomMagraoKaldheim'}
{name:'Magrao\'s Kaldheim', value:'CustomMagraoKaldheim'},
{name:'Pokemon', value:'Pokemon'}
])

View File

@@ -0,0 +1,36 @@
//checks to see if it needs to run
if (!card.manaSymbols.includes('/js/frames/manaSymbolsPokemon.js')) {
card.manaSymbols.push('/js/frames/manaSymbolsPokemon.js');
}
if (!mana.get('pokemonw')) {
loadManaSymbols([
'pokemon/pokemonw.png',
'pokemon/pokemonu.png',
'pokemon/pokemonb.png',
'pokemon/pokemonr.png',
'pokemon/pokemong.png',
'pokemon/pokemonc.png',
'pokemon/pokemont.png',
'pokemon/pokemon0.png',
'pokemon/pokemon1.png',
'pokemon/pokemon2.png',
'pokemon/pokemon3.png',
'pokemon/pokemon4.png',
'pokemon/pokemon5.png',
'pokemon/pokemon6.png',
'pokemon/pokemon7.png',
'pokemon/pokemon8.png',
'pokemon/pokemon9.png',
'pokemon/pokemon10.png',
'pokemon/pokemon11.png',
'pokemon/pokemon12.png',
'pokemon/pokemon13.png',
'pokemon/pokemon14.png',
'pokemon/pokemon15.png',
'pokemon/pokemon16.png',
'pokemon/pokemon17.png',
'pokemon/pokemon18.png',
'pokemon/pokemon19.png',
'pokemon/pokemon20.png',
]);
}

View File

@@ -14,7 +14,8 @@ availableFrames = [
{name:'Black Extension (Cornered)', src:'/img/frames/margins/blackCorners.png', bounds:bounds},
{name:'White Border Extension', src:'/img/frames/white.png', ogBounds:ogBounds, bounds:bounds, masks:masks, noDefaultMask:true},
{name:'Silver Border Extension', src:'/img/frames/silver.png', ogBounds:ogBounds, bounds:bounds, masks:masks, noDefaultMask:true},
{name:'Gold Border Extension', src:'/img/frames/gold.png', ogBounds:ogBounds, bounds:bounds, masks:masks, noDefaultMask:true}
{name:'Gold Border Extension', src:'/img/frames/gold.png', ogBounds:ogBounds, bounds:bounds, masks:masks, noDefaultMask:true},
{name:'Pokemon Border Extension', src:'/img/frames/custom/pokemon/extension.png', ogBounds:ogBounds, bounds:bounds, masks:masks, noDefaultMask:true}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;

75
js/frames/packPokemon.js Normal file
View File

@@ -0,0 +1,75 @@
//Create objects for common properties across available frames
// var masks = [{src:'/img/frames/m15/regular/m15MaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/m15/regular/m15MaskType.png', name:'Type'}, {src:'/img/frames/m15/regular/m15MaskRules.png', name:'Rules'}, {src:'/img/frames/m15/regular/m15MaskFrame.png', name:'Frame'}, {src:'/img/frames/m15/regular/m15MaskBorder.png', name:'Border'}];
var masks = [];
var boomerangMasks = [{src:'/img/frames/custom/pokemon/boomerangs/div.png', name:'Divider'}, {src:'/img/frames/custom/pokemon/boomerangs/left.png', name:'Left'}, {src:'/img/frames/custom/pokemon/boomerangs/right.png', name:'Right'}];
// var bounds = {x:0.7573, y:0.8848, width:0.188, height:0.0733};
//defines available frames
availableFrames = [
{name: 'Psychic Frame', src:'/img/frames/custom/pokemon/psychic.png'},
{name: 'Water Frame', src:'/img/frames/custom/pokemon/water.png'},
{name: 'Lightning Frame', src:'/img/frames/custom/pokemon/lightning.png'},
{name: 'Metal Frame', src:'/img/frames/custom/pokemon/metal.png'},
{name: 'Fighting Frame', src:'/img/frames/custom/pokemon/fighting.png'},
{name: 'Fire Frame', src:'/img/frames/custom/pokemon/fire.png'},
{name: 'Grass Frame', src:'/img/frames/custom/pokemon/grass.png'},
{name: 'Colorless Frame', src:'/img/frames/custom/pokemon/colorless.png'},
{name: 'Darkness Frame', src:'/img/frames/custom/pokemon/dark.png'},
{name: 'Psychic Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/psychic.png', masks:boomerangMasks},
{name: 'Water Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/water.png', masks:boomerangMasks},
{name: 'Lightning Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/lightning.png', masks:boomerangMasks},
{name: 'Metal Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/metal.png', masks:boomerangMasks},
{name: 'Fighting Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/fighting.png', masks:boomerangMasks},
{name: 'Fire Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/fire.png', masks:boomerangMasks},
{name: 'Grass Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/grass.png', masks:boomerangMasks},
{name: 'Colorless Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/colorless.png', masks:boomerangMasks},
{name: 'Darkness Boomerangs', src:'/img/frames/custom/pokemon/boomerangs/dark.png', masks:boomerangMasks}
];
//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 = 'pokemon';
loadScript('/js/frames/manaSymbolsPokemon.js');
notify('Use the separate text entry for noncreature cards in order for the text to be spaced differently');
notify('Try making keyword abilities bold using {bold}!');
//art bounds
card.artBounds = {x:172/1500, y:259/2100, width:1156/1500, height:819/2100};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:1356/1500, y:1140/2100, width:116/1500, height:61/2100, 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:'', x:758/1500, y:142/2100, width:597/1500, height:102/2100, oneLine:true, size:64/1500, align:'right', manaCost:true, manaSpacing:0, manaPrefix:'pokemon'},
title: {name:'Title', text:'', x:146/1500, y:153/2100, width:1195/1500, height:71/2100, oneLine:true, font:'gillsansbold', size:71/1500},
type: {name:'Type', text:'', x:251/1500, y:1122/2100, width:1001/1500, height:42/2100, oneLine:true, font:'gillsansbolditalic', size:28/1500, align:'center'},
rules: {name:'Rules Text', text:'', x:150/1500, y:1185/2100, width:1205/1500, height:629/2100, size:47/1500, font:'gillsans', manaPrefix:'pokemon'},
rulesnoncreature: {name:'Rules Text (noncreature)', text:'', x:150/1500, y:1185/2100, width:1205/1500, height:785/2100, size:47/1500, font:'gillsans', manaPrefix:'pokemon'},
// leftStatTitle: {name:'Left Stat Title', text:'', x:139/1500, y:1817/2100, width: 228/1500, height: 43/2100, size: 79/1500, font:'gillsansbold', align:'center'},
middleStatTitle: {name:'Middle Stat Title', text:'power', x:629/1500, y:1817/2100, width: 228/1500, height: 43/2100, size: 79/1500, font:'gillsansbold', align:'center'},
rightStatTitle: {name:'Right Stat Title', text:'toughness', x:1135/1500, y:1817/2100, width: 228/1500, height: 43/2100, size: 79/1500, font:'gillsansbold', align:'center'},
// leftStat: {name:'Left Stat', text:'', x:139/1500, y:1880/2100, width: 228/1500, height: 61/2100, size: 61/1500, font:'gillsansbold', align:'center', manaPrefix:'pokemon'},
middleStat: {name:'Middle Stat', text:'', x:585/1500, y:1872/2100, width: 300/1500, height: 102/2100, size: 79/1500, font:'gillsansbold', align:'center', manaPrefix:'pokemon'},
pt: {name:'Right Stat', text:'', x:1098/1500, y:1872/2100, width: 300/1500, height: 102/2100, size: 79/1500, font:'gillsansbold', align:'center', manaPrefix:'pokemon'},
// pt: {name:'Power/Toughness', text:'', x:1189/1500, y:1894/2100, width:205/1500, height:78/2100, size:61/1500, font:'gillsansbold', oneLine:true, align:'center'}
});
loadBottomInfo({
top: {text:'Illus. {elemidinfo-artist}', x:85/1500, y:1969/2100, width:411/1500, height:25/2100, oneLine:true, font:'gillsansbold', size:25/1500, align:'left'},
bottom: {text:'{elemidinfo-number} {elemidinfo-rarity}', x:1005/1500, y:1969/2100, width:411/1500, height:25/2100, oneLine:true, font:'gillsansbold', size:25/1500, align:'right'},
});
}
//loads available frames
loadFramePack();
//Only for the main version as the webpage loads:
if (!card.text) {
document.querySelector('#loadFrameVersion').click();
}