Hide flavor text bar per frame pack

This commit is contained in:
Josh Birnholz
2023-08-01 11:03:52 -04:00
parent 39a3516bf0
commit 8d7621ea79
16 changed files with 17 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ async function resetCardIrregularities({canvas = [getStandardWidth(), getStandar
card.bottomInfoZoom = 1; card.bottomInfoZoom = 1;
replacementMasks = {}; replacementMasks = {};
card.hideBottomInfoBorder = false; card.hideBottomInfoBorder = false;
card.showsFlavorBar = true;
//rotation //rotation
if (card.landscape) { if (card.landscape) {
// previewContext.scale(card.width/card.height, card.height/card.width); // previewContext.scale(card.width/card.height, card.height/card.width);
@@ -2775,7 +2776,7 @@ function writeText(textObject, targetContext) {
} }
if (card.version == 'pokemon') { if (card.version == 'pokemon') {
rawText = rawText.replace(/{flavor}/g, '{oldflavor}{fontsize-20}{fontgillsansbolditalic}'); rawText = rawText.replace(/{flavor}/g, '{oldflavor}{fontsize-20}{fontgillsansbolditalic}');
} else if (autoFramePack == 'Seventh' || autoFramePack == '8th' || card.version == 'invocation' || card.version == "storybook_mul" || card.version == 'tardis') { } else if (!card.showsFlavorBar) {
rawText = rawText.replace(/{flavor}/g, '{oldflavor}'); rawText = rawText.replace(/{flavor}/g, '{oldflavor}');
} }
rawText = rawText.replace(/ - /g, ' — '); rawText = rawText.replace(/ - /g, ' — ');

View File

@@ -39,6 +39,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = '8th'; card.version = '8th';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0.088, y:0.12, width:0.824, height:0.4348}; card.artBounds = {x:0.088, y:0.12, width:0.824, height:0.4348};
autoFitArt(); autoFitArt();

View File

@@ -24,6 +24,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = '8thColorshifted'; card.version = '8thColorshifted';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0.088, y:0.12, width:0.824, height:0.4348}; card.artBounds = {x:0.088, y:0.12, width:0.824, height:0.4348};
autoFitArt(); autoFitArt();

View File

@@ -28,6 +28,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'abu'; card.version = 'abu';
card.showsFlavorBar = false;
loadScript('/js/frames/manaSymbolsOld.js'); loadScript('/js/frames/manaSymbolsOld.js');
//art bounds //art bounds
card.artBounds = {x:0.116, y:0.1043, width:0.7654, height:0.441}; card.artBounds = {x:0.116, y:0.1043, width:0.7654, height:0.441};

View File

@@ -20,6 +20,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'fourth'; card.version = 'fourth';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0.1034, y:0.0886, width:0.794, height:0.4543}; card.artBounds = {x:0.1034, y:0.0886, width:0.794, height:0.4543};
autoFitArt(); autoFitArt();

View File

@@ -33,6 +33,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'futureRegular'; card.version = 'futureRegular';
card.showsFlavorBar = false;
loadScript('/js/frames/manaSymbolsFuture.js'); loadScript('/js/frames/manaSymbolsFuture.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.'); // 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 //art bounds

View File

@@ -32,6 +32,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'invocation'; card.version = 'invocation';
card.showsFlavorBar = false;
loadScript('/js/frames/manaSymbolsOutline.js'); loadScript('/js/frames/manaSymbolsOutline.js');
//art bounds //art bounds
card.artBounds = {x:173/1500, y:313/2100, width:1150/1500, height:819/2100}; card.artBounds = {x:173/1500, y:313/2100, width:1150/1500, height:819/2100};

View File

@@ -10,6 +10,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'legends'; card.version = 'legends';
card.showsFlavorBar = false;
loadScript('/js/frames/manaSymbolsOld.js'); loadScript('/js/frames/manaSymbolsOld.js');
//art bounds //art bounds
card.artBounds = {x:0.1074, y:0.0924, width:0.7854, height:0.4524}; card.artBounds = {x:0.1074, y:0.0924, width:0.7854, height:0.4524};

View File

@@ -28,6 +28,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'oldFloating'; card.version = 'oldFloating';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0, y:0, width:1, height:1}; card.artBounds = {x:0, y:0, width:1, height:1};
autoFitArt(); autoFitArt();

View File

@@ -28,6 +28,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'oldFloatingShort'; card.version = 'oldFloatingShort';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0, y:0, width:1, height:1}; card.artBounds = {x:0, y:0, width:1, height:1};
autoFitArt(); autoFitArt();

View File

@@ -24,6 +24,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'playtest'; card.version = 'playtest';
card.showsFlavorBar = false;
loadScript('/js/frames/manaSymbolsOutline.js'); loadScript('/js/frames/manaSymbolsOutline.js');
//art bounds //art bounds
card.artBounds = {x:0.132, y:0.1439, width:0.736, height:0.3362}; card.artBounds = {x:0.132, y:0.1439, width:0.736, height:0.3362};

View File

@@ -47,6 +47,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'seventh'; card.version = 'seventh';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0.12, y:0.0991, width:0.7667, height:0.4429}; card.artBounds = {x:0.12, y:0.0991, width:0.7667, height:0.4429};
autoFitArt(); autoFitArt();

View File

@@ -47,6 +47,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'fifth'; card.version = 'fifth';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0.12, y:0.0991, width:0.7667, height:0.4429}; card.artBounds = {x:0.12, y:0.0991, width:0.7667, height:0.4429};
autoFitArt(); autoFitArt();

View File

@@ -31,6 +31,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'seventhSnowLands'; card.version = 'seventhSnowLands';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:0.12, y:0.0991, width:0.7667, height:0.4429}; card.artBounds = {x:0.12, y:0.0991, width:0.7667, height:0.4429};
autoFitArt(); autoFitArt();

View File

@@ -39,6 +39,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
replacementMasks = {'Right Half':'img/frames/storybook/mul/rightHalf.png'}; replacementMasks = {'Right Half':'img/frames/storybook/mul/rightHalf.png'};
//sets card version //sets card version
card.version = 'storybook_mul'; card.version = 'storybook_mul';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:54/1500, y:62/2100, width:1398/1500, height:1157/2100}; card.artBounds = {x:54/1500, y:62/2100, width:1398/1500, height:1157/2100};
autoFitArt(); autoFitArt();

View File

@@ -32,6 +32,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
await resetCardIrregularities(); await resetCardIrregularities();
//sets card version //sets card version
card.version = 'tardis'; card.version = 'tardis';
card.showsFlavorBar = false;
//art bounds //art bounds
card.artBounds = {x:115/1500, y:264/2100, width:1271/1500, height:898/2100}; card.artBounds = {x:115/1500, y:264/2100, width:1271/1500, height:898/2100};
autoFitArt(); autoFitArt();