diff --git a/css/style-9.css b/css/style-9.css index 701f6913..88dcc0ac 100644 --- a/css/style-9.css +++ b/css/style-9.css @@ -19,6 +19,10 @@ font-family: matrixb; src: url("/fonts/matrix-b.ttf"); } +@font-face { + font-family: matrixbsc; + src: url("/fonts/Matrix Bold Small Caps.ttf"); +} @font-face { font-family: mplantin; src: url("/fonts/mplantin.ttf"); diff --git a/fonts/Matrix Bold Small Caps.ttf b/fonts/Matrix Bold Small Caps.ttf new file mode 100644 index 00000000..326e007b Binary files /dev/null and b/fonts/Matrix Bold Small Caps.ttf differ diff --git a/img/frames/8th/a.png b/img/frames/8th/a.png new file mode 100644 index 00000000..d574c918 Binary files /dev/null and b/img/frames/8th/a.png differ diff --git a/img/frames/8th/aThumb.png b/img/frames/8th/aThumb.png new file mode 100644 index 00000000..d56f34c9 Binary files /dev/null and b/img/frames/8th/aThumb.png differ diff --git a/img/frames/8th/b.png b/img/frames/8th/b.png new file mode 100644 index 00000000..b3947bb8 Binary files /dev/null and b/img/frames/8th/b.png differ diff --git a/img/frames/8th/bThumb.png b/img/frames/8th/bThumb.png new file mode 100644 index 00000000..5805bfa8 Binary files /dev/null and b/img/frames/8th/bThumb.png differ diff --git a/img/frames/8th/frame.png b/img/frames/8th/frame.png new file mode 100644 index 00000000..b7f2ec9a Binary files /dev/null and b/img/frames/8th/frame.png differ diff --git a/img/frames/8th/frameThumb.png b/img/frames/8th/frameThumb.png new file mode 100644 index 00000000..864f7bb2 Binary files /dev/null and b/img/frames/8th/frameThumb.png differ diff --git a/img/frames/8th/g.png b/img/frames/8th/g.png new file mode 100644 index 00000000..9d4d8723 Binary files /dev/null and b/img/frames/8th/g.png differ diff --git a/img/frames/8th/gThumb.png b/img/frames/8th/gThumb.png new file mode 100644 index 00000000..f60d8ce8 Binary files /dev/null and b/img/frames/8th/gThumb.png differ diff --git a/img/frames/8th/l.png b/img/frames/8th/l.png new file mode 100644 index 00000000..01057b8d Binary files /dev/null and b/img/frames/8th/l.png differ diff --git a/img/frames/8th/lThumb.png b/img/frames/8th/lThumb.png new file mode 100644 index 00000000..9820a22d Binary files /dev/null and b/img/frames/8th/lThumb.png differ diff --git a/img/frames/8th/m.png b/img/frames/8th/m.png new file mode 100644 index 00000000..7c991fc1 Binary files /dev/null and b/img/frames/8th/m.png differ diff --git a/img/frames/8th/mThumb.png b/img/frames/8th/mThumb.png new file mode 100644 index 00000000..64957a31 Binary files /dev/null and b/img/frames/8th/mThumb.png differ diff --git a/img/frames/8th/pinline.png b/img/frames/8th/pinline.png new file mode 100644 index 00000000..e1778539 Binary files /dev/null and b/img/frames/8th/pinline.png differ diff --git a/img/frames/8th/pinlineThumb.png b/img/frames/8th/pinlineThumb.png new file mode 100644 index 00000000..023c20e7 Binary files /dev/null and b/img/frames/8th/pinlineThumb.png differ diff --git a/img/frames/8th/pt/a.png b/img/frames/8th/pt/a.png new file mode 100644 index 00000000..cb28122a Binary files /dev/null and b/img/frames/8th/pt/a.png differ diff --git a/img/frames/8th/pt/aThumb.png b/img/frames/8th/pt/aThumb.png new file mode 100644 index 00000000..c8527b44 Binary files /dev/null and b/img/frames/8th/pt/aThumb.png differ diff --git a/img/frames/8th/pt/b.png b/img/frames/8th/pt/b.png new file mode 100644 index 00000000..01d515a8 Binary files /dev/null and b/img/frames/8th/pt/b.png differ diff --git a/img/frames/8th/pt/bThumb.png b/img/frames/8th/pt/bThumb.png new file mode 100644 index 00000000..da6d3895 Binary files /dev/null and b/img/frames/8th/pt/bThumb.png differ diff --git a/img/frames/8th/pt/g.png b/img/frames/8th/pt/g.png new file mode 100644 index 00000000..56b8d9aa Binary files /dev/null and b/img/frames/8th/pt/g.png differ diff --git a/img/frames/8th/pt/gThumb.png b/img/frames/8th/pt/gThumb.png new file mode 100644 index 00000000..e03acbe6 Binary files /dev/null and b/img/frames/8th/pt/gThumb.png differ diff --git a/img/frames/8th/pt/l.png b/img/frames/8th/pt/l.png new file mode 100644 index 00000000..a491379e Binary files /dev/null and b/img/frames/8th/pt/l.png differ diff --git a/img/frames/8th/pt/lThumb.png b/img/frames/8th/pt/lThumb.png new file mode 100644 index 00000000..a3ddcf71 Binary files /dev/null and b/img/frames/8th/pt/lThumb.png differ diff --git a/img/frames/8th/pt/m.png b/img/frames/8th/pt/m.png new file mode 100644 index 00000000..8b40e96e Binary files /dev/null and b/img/frames/8th/pt/m.png differ diff --git a/img/frames/8th/pt/mThumb.png b/img/frames/8th/pt/mThumb.png new file mode 100644 index 00000000..7fa53595 Binary files /dev/null and b/img/frames/8th/pt/mThumb.png differ diff --git a/img/frames/8th/pt/r.png b/img/frames/8th/pt/r.png new file mode 100644 index 00000000..2c70ecf1 Binary files /dev/null and b/img/frames/8th/pt/r.png differ diff --git a/img/frames/8th/pt/rThumb.png b/img/frames/8th/pt/rThumb.png new file mode 100644 index 00000000..732f6e2d Binary files /dev/null and b/img/frames/8th/pt/rThumb.png differ diff --git a/img/frames/8th/pt/u.png b/img/frames/8th/pt/u.png new file mode 100644 index 00000000..ff46b810 Binary files /dev/null and b/img/frames/8th/pt/u.png differ diff --git a/img/frames/8th/pt/uThumb.png b/img/frames/8th/pt/uThumb.png new file mode 100644 index 00000000..f8e98de9 Binary files /dev/null and b/img/frames/8th/pt/uThumb.png differ diff --git a/img/frames/8th/pt/w.png b/img/frames/8th/pt/w.png new file mode 100644 index 00000000..c580b2d4 Binary files /dev/null and b/img/frames/8th/pt/w.png differ diff --git a/img/frames/8th/pt/wThumb.png b/img/frames/8th/pt/wThumb.png new file mode 100644 index 00000000..92885bb7 Binary files /dev/null and b/img/frames/8th/pt/wThumb.png differ diff --git a/img/frames/8th/r.png b/img/frames/8th/r.png new file mode 100644 index 00000000..89868e60 Binary files /dev/null and b/img/frames/8th/r.png differ diff --git a/img/frames/8th/rThumb.png b/img/frames/8th/rThumb.png new file mode 100644 index 00000000..d44378a5 Binary files /dev/null and b/img/frames/8th/rThumb.png differ diff --git a/img/frames/8th/rules.png b/img/frames/8th/rules.png new file mode 100644 index 00000000..e1e53c35 Binary files /dev/null and b/img/frames/8th/rules.png differ diff --git a/img/frames/8th/rulesThumb.png b/img/frames/8th/rulesThumb.png new file mode 100644 index 00000000..382a3a54 Binary files /dev/null and b/img/frames/8th/rulesThumb.png differ diff --git a/img/frames/8th/title.png b/img/frames/8th/title.png new file mode 100644 index 00000000..e2a54d94 Binary files /dev/null and b/img/frames/8th/title.png differ diff --git a/img/frames/8th/titleThumb.png b/img/frames/8th/titleThumb.png new file mode 100644 index 00000000..0584ba3c Binary files /dev/null and b/img/frames/8th/titleThumb.png differ diff --git a/img/frames/8th/type.png b/img/frames/8th/type.png new file mode 100644 index 00000000..a7d7f035 Binary files /dev/null and b/img/frames/8th/type.png differ diff --git a/img/frames/8th/typeThumb.png b/img/frames/8th/typeThumb.png new file mode 100644 index 00000000..6b6c3e93 Binary files /dev/null and b/img/frames/8th/typeThumb.png differ diff --git a/img/frames/8th/u.png b/img/frames/8th/u.png new file mode 100644 index 00000000..e9b7ba77 Binary files /dev/null and b/img/frames/8th/u.png differ diff --git a/img/frames/8th/uThumb.png b/img/frames/8th/uThumb.png new file mode 100644 index 00000000..858d6b6e Binary files /dev/null and b/img/frames/8th/uThumb.png differ diff --git a/img/frames/8th/w.png b/img/frames/8th/w.png new file mode 100644 index 00000000..3b0b3d48 Binary files /dev/null and b/img/frames/8th/w.png differ diff --git a/img/frames/8th/wThumb.png b/img/frames/8th/wThumb.png new file mode 100644 index 00000000..e10e1da1 Binary files /dev/null and b/img/frames/8th/wThumb.png differ diff --git a/js/creator-23.js b/js/creator-23.js index 752a1747..98e82af0 100644 --- a/js/creator-23.js +++ b/js/creator-23.js @@ -1026,6 +1026,15 @@ function writeText(textObject, targetContext) { textJustify = 'center'; } else if (possibleCode == 'justify-right') { textJustify = 'right'; + } else if (possibleCode.includes('conditionalcolor')) { + var codeParams = possibleCode.split(":"); + for (var eligibleFrame of codeParams[1].split(",")) { + eligibleFrame = eligibleFrame.replace(/_/g, " "); + if (card.frames.findIndex(element => element.name.toLowerCase().includes(eligibleFrame)) != -1) { + textColor = codeParams[2]; + lineContext.fillStyle = textColor; + } + } } else if (possibleCode.includes('fontcolor')) { textColor = possibleCode.replace('fontcolor', ''); lineContext.fillStyle = textColor; diff --git a/js/frames/groupMisc-2.js b/js/frames/groupMisc-2.js index 9ade7cc3..80e01528 100644 --- a/js/frames/groupMisc-2.js +++ b/js/frames/groupMisc-2.js @@ -1,6 +1,7 @@ loadFramePacks([ {name:'Old', value:'disabled'}, {name:'Future Shifted', value:'FutureRegular'}, + {name:'8th Edition', value:'8th'}, {name:'Seventh Edition', value:'Seventh'}, {name:'Fifth Edition', value:'SeventhButFifth'}, {name:'Fourth Edition', value:'Fourth'}, diff --git a/js/frames/pack8th.js b/js/frames/pack8th.js new file mode 100644 index 00000000..e6340694 --- /dev/null +++ b/js/frames/pack8th.js @@ -0,0 +1,56 @@ +//Create objects for common properties across available frames +var masks = [{src:'/img/frames/8th/pinline.png', name:'Pinline'}, {src:'/img/frames/8th/title.png', name:'Title'}, {src:'/img/frames/8th/type.png', name:'Type'}, {src:'/img/frames/8th/rules.png', name:'Rules'}, {src:'/img/frames/8th/frame.png', name:'Frame'}]; +var bounds = {x:0.7227, y:0.8796, width:0.2147, height:0.0839}; +//defines available frames +availableFrames = [ + {name:'White Frame', src:'/img/frames/8th/w.png', masks:masks}, + {name:'Blue Frame', src:'/img/frames/8th/u.png', masks:masks}, + {name:'Black Frame', src:'/img/frames/8th/b.png', masks:masks}, + {name:'Red Frame', src:'/img/frames/8th/r.png', masks:masks}, + {name:'Green Frame', src:'/img/frames/8th/g.png', masks:masks}, + {name:'Multicolored Frame', src:'/img/frames/8th/m.png', masks:masks}, + {name:'Artifact Frame', src:'/img/frames/8th/a.png', masks:masks}, + {name:'Land Frame', src:'/img/frames/8th/l.png', masks:masks}, + {name:'White Power/Toughness', src:'/img/frames/8th/pt/w.png', bounds:bounds}, + {name:'Blue Power/Toughness', src:'/img/frames/8th/pt/u.png', bounds:bounds}, + {name:'Black Power/Toughness', src:'/img/frames/8th/pt/b.png', bounds:bounds}, + {name:'Red Power/Toughness', src:'/img/frames/8th/pt/r.png', bounds:bounds}, + {name:'Green Power/Toughness', src:'/img/frames/8th/pt/g.png', bounds:bounds}, + {name:'Multicolored Power/Toughness', src:'/img/frames/8th/pt/m.png', bounds:bounds}, + {name:'Artifact Power/Toughness', src:'/img/frames/8th/pt/a.png', bounds:bounds}, + {name:'Colorless Power/Toughness', src:'/img/frames/8th/pt/l.png', bounds:bounds} +]; +//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 = '8th'; + //art bounds + card.artBounds = {x:0.088, y:0.12, width:0.824, height:0.4348}; + autoFitArt(); + //set symbol bounds + card.setSymbolBounds = {x:0.9047, y:0.5886, width:0.12, height:0.0391, vertical:'center', horizontal: 'right'}; + resetSetSymbol(); + //watermark bounds + card.watermarkBounds = {x:0.5, y:0.7605, width:0.75, height:0.2305}; + resetWatermark(); + //text + loadTextOptions({ + mana: {name:'Mana Cost', text:'', y:0.0705, width:0.9147, height:65/2100, oneLine:true, size:65/1638, align:'right', shadowX:-0.001, shadowY:0.0029, manaCost:true, manaSpacing:0}, + title: {name:'Title', text:'', x:0.09, y:0.0629, width:0.824, height:0.0429, oneLine:true, font:'matrixb', size:0.0429}, + type: {name:'Type', text:'', x:0.1, y:0.572, width:0.8, height:0.0358, oneLine:true, font:'matrixb', size:0.0358}, + rules: {name:'Rules Text', text:'', x:0.1, y:0.6277, width:0.8, height:0.2691, size:0.0362}, + pt: {name:'Power/Toughness', text:'', x:0.7667, y:0.8953, width:0.1367, height:0.0443, size:0.0443, font:'matrixbsc', oneLine:true, align:'center'} + }); + //bottom info + loadBottomInfo({ + top: {text:'{conditionalcolor:Black_Frame,Land_Frame:white}\uFFEE {elemidinfo-artist}', x:0.094, y:1904/2100, width:0.8107, height:0.0248, oneLine:true, font:'matrixb', size:0.0248, color:'black', shadowX:0.0007, shadowY:0.0005}, + wizards: {name:'wizards', text:'{conditionalcolor:Black_Frame,Land_Frame:white}\u2122 & \u00a9 1993-' + date.getFullYear() + ' Wizards of the Coast, Inc. {elemidinfo-number}', x:0.094, y:1958/2100, width:0.8107, height:0.0153, oneLine:true, font:'mplantin', size:0.0153, color:'black', shadowX:0.0007, shadowY:0.0005}, + bottom: {text:'{conditionalcolor:Black_Frame,Land_Frame:white}NOT FOR SALE CardConjurer.com', x:0.094, y:1994/2100, width:0.8107, height:0.0134, oneLine:true, font:'mplantin', size:0.0134, color:'black', shadowX:0.0007, shadowY:0.0005} + }); +} +//loads available frames +loadFramePack(); \ No newline at end of file