dungeon / tap symbols

This commit is contained in:
Kyle
2021-07-01 13:44:43 -07:00
parent ee89900ab8
commit 7c9d68507a
17 changed files with 191 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -11,11 +11,11 @@
version="1.1" version="1.1"
width="600" width="600"
height="600" height="600"
id="svg5391"> id="svg5426">
<defs <defs
id="defs5393" /> id="defs5428" />
<metadata <metadata
id="metadata5396"> id="metadata5431">
<rdf:RDF> <rdf:RDF>
<cc:Work <cc:Work
rdf:about=""> rdf:about="">
@@ -27,19 +27,24 @@
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>
<g <g
transform="translate(-284.8627,49.643341)" transform="translate(-664.86264,143.92905)"
id="layer1"> id="layer1">
<circle <circle
cx="-475.125" cx="-369.99899"
cy="365.06799" cy="365.13901"
r="50" r="50"
transform="matrix(6,0,0,6,3435.6127,-1940.0513)" transform="matrix(6,0,0,6,3184.8566,-2034.7631)"
id="circle447" id="circle457"
style="fill:#c9c4be" /> style="fill:#c9c4be" />
<path <path
d="m 853.51868,285.44471 -63.42,76.37397 -15.53999,-15.52797 c 6.042,-15.24601 9.86998,-29.274 11.44199,-42.08402 1.57201,-12.79798 0.92399,-24.65399 -1.944,-35.60398 -0.28784,-1.42802 -0.63601,-2.802 -1.07999,-4.092 -0.426,-1.31403 -0.92999,-2.532 -1.51203,-3.67801 -2.29799,-6.88799 -5.75398,-13.37401 -10.36199,-19.404 -4.602,-6.06001 -11.20798,-13.38 -19.836,-22.00802 L 705.95469,173.2507 495.39067,383.8267 c -18.41398,18.396 -28.34397,34.374 -29.77799,47.87401 -1.44601,13.53597 5.17802,27.62999 19.85401,42.30597 l 6.042,5.16602 -16.39799,16.39199 -138.072,-138.07201 16.39198,-16.39198 6.9,6.88799 c 14.382,14.964 28.33199,21.73799 41.85599,20.28601 13.51803,-1.42802 29.34603,-11.22599 47.46602,-29.34599 L 660.64268,127.93269 613.6147,80.904705 c -13.23001,-12.654021 -24.522,-21.504022 -33.87003,-26.532022 -9.354,-5.039976 -20.21999,-7.127995 -32.57399,-6.257984 -1.73398,0 -3.53999,0.07213 -5.39998,0.210013 -1.872,0.149961 -3.816,0.365979 -5.82602,0.641982 -3.744,0.293884 -7.04999,0.714011 -9.91798,1.302014 -2.88003,0.575992 -5.616,0.995985 -8.20201,1.290003 -0.87001,0.293884 -1.65602,0.503997 -2.36999,0.641982 -0.72002,0.137884 -1.65602,0.22209 -2.80801,0.210013 -3.168,0.869977 -6.76802,1.878006 -10.78799,3.023986 -4.03802,1.134003 -9.06602,2.447993 -15.10802,3.876014 l -14.238,-15.108019 74.64002,-65.142004 306.36598,306.384027 z" d="m 961.19678,422.43491 c -19.45197,19.43999 -50.98797,19.43999 -70.44597,0 L 698.49281,230.1769 c -19.43399,-19.452 -19.43399,-51.00004 0,-70.45204 l 270.04198,-270.03601 c 19.458,-19.43999 51.00001,-19.43999 70.44601,0 l 192.258,192.258001 c 19.446,19.451999 19.446,50.987999 0,70.439999 L 961.19678,422.43491 z"
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
id="path451" id="path459"
style="fill:#0d0f0f" /> style="fill:#0d0f0f" />
<path
d="M 1170.4528,203.3089 H 954.42279 l 79.09801,-56.31002 c -29.376,-23.32201 -63.38401,-34.968 -101.90398,-34.968 -19.25403,0 -32.472,3.666 -39.528,11.01598 -7.11602,7.362 -10.65601,20.658 -10.65601,39.92401 0,53.23802 27.372,110.04003 82.12799,170.37602 l -62.334,63.13799 C 828.6868,308.2549 792.45282,229.3969 792.45282,159.91686 c 0,-41.556 12.50399,-74.669987 37.614,-99.269989 25.08598,-24.587992 58.48197,-36.876 100.00198,-36.876 50.718,0 105.99,19.277985 165.858,57.797991 l 46.356,-79.0799892 28.17,200.8200272 z"
inkscape:connector-curvature="0"
id="path461"
style="fill:#ffffff" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="600"
height="600"
id="svg5391">
<defs
id="defs5393" />
<metadata
id="metadata5396">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-284.8627,49.643341)"
id="layer1">
<circle
cx="-475.125"
cy="365.06799"
r="50"
transform="matrix(6,0,0,6,3435.6127,-1940.0513)"
id="circle447"
style="fill:#c9c4be" />
<path
d="m 853.51868,285.44471 -63.42,76.37397 -15.53999,-15.52797 c 6.042,-15.24601 9.86998,-29.274 11.44199,-42.08402 1.57201,-12.79798 0.92399,-24.65399 -1.944,-35.60398 -0.28784,-1.42802 -0.63601,-2.802 -1.07999,-4.092 -0.426,-1.31403 -0.92999,-2.532 -1.51203,-3.67801 -2.29799,-6.88799 -5.75398,-13.37401 -10.36199,-19.404 -4.602,-6.06001 -11.20798,-13.38 -19.836,-22.00802 L 705.95469,173.2507 495.39067,383.8267 c -18.41398,18.396 -28.34397,34.374 -29.77799,47.87401 -1.44601,13.53597 5.17802,27.62999 19.85401,42.30597 l 6.042,5.16602 -16.39799,16.39199 -138.072,-138.07201 16.39198,-16.39198 6.9,6.88799 c 14.382,14.964 28.33199,21.73799 41.85599,20.28601 13.51803,-1.42802 29.34603,-11.22599 47.46602,-29.34599 L 660.64268,127.93269 613.6147,80.904705 c -13.23001,-12.654021 -24.522,-21.504022 -33.87003,-26.532022 -9.354,-5.039976 -20.21999,-7.127995 -32.57399,-6.257984 -1.73398,0 -3.53999,0.07213 -5.39998,0.210013 -1.872,0.149961 -3.816,0.365979 -5.82602,0.641982 -3.744,0.293884 -7.04999,0.714011 -9.91798,1.302014 -2.88003,0.575992 -5.616,0.995985 -8.20201,1.290003 -0.87001,0.293884 -1.65602,0.503997 -2.36999,0.641982 -0.72002,0.137884 -1.65602,0.22209 -2.80801,0.210013 -3.168,0.869977 -6.76802,1.878006 -10.78799,3.023986 -4.03802,1.134003 -9.06602,2.447993 -15.10802,3.876014 l -14.238,-15.108019 74.64002,-65.142004 306.36598,306.384027 z"
inkscape:connector-curvature="0"
id="path451"
style="fill:#0d0f0f" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -233,7 +233,7 @@ function toggleCollapse(event) {
} }
//Mana Symbols //Mana Symbols
var manaSymbols = []; var manaSymbols = [];
loadManaSymbols(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', 'w', 'u', 'b', 'r', 'g', 'c', 'x', 'y', 'z', 't', 'untap', 'e', 's']); loadManaSymbols(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', 'w', 'u', 'b', 'r', 'g', 'c', 'x', 'y', 'z', 't', 'untap', 'e', 's', 'oldtap', 'originaltap']);
loadManaSymbols(['wu', 'wb', 'ub', 'ur', 'br', 'bg', 'rg', 'rw', 'gw', 'gu', '2w', '2u', '2b', '2r', '2g', 'wp', 'up', 'bp', 'rp', 'gp'], [1.2, 1.2]); loadManaSymbols(['wu', 'wb', 'ub', 'ur', 'br', 'bg', 'rg', 'rw', 'gw', 'gu', '2w', '2u', '2b', '2r', '2g', 'wp', 'up', 'bp', 'rp', 'gp'], [1.2, 1.2]);
loadManaSymbols(['bar.png', 'whitebar.png']); loadManaSymbols(['bar.png', 'whitebar.png']);
loadManaSymbols(['chaos'], [1.2, 1]); loadManaSymbols(['chaos'], [1.2, 1]);

40
js/frames/packDungeon.js Normal file
View File

@@ -0,0 +1,40 @@
//Create objects for common properties across available frames
// var masks = [{src:'/img/frames/saga/sagaMaskPinline.png', name:'Pinline'}, {src:'/img/frames/m15/regular/m15MaskTitle.png', name:'Title'}, {src:'/img/frames/saga/sagaMaskType.png', name:'Type'}, {src:'/img/frames/saga/sagaMaskFrame.png', name:'Frame'}, {src:'/img/frames/saga/sagaMaskBanner.png', name:'Banner'}, {src:'/img/frames/saga/sagaMaskBannerRight.png', name:'Banner (Right)'}, {src:'/img/frames/saga/sagaMaskText.png', name:'Text'}, {src:'/img/frames/saga/sagaMaskTextRight.png', name:'Text (Right)'}, {src:'/img/frames/saga/sagaMaskBorder.png', name:'Border'}];
//defines available frames
availableFrames = [
{name:'White Frame', src:'/img/frames/dungeon/regular/b.png', complementary:7},
{name:'Blue Frame', src:'/img/frames/dungeon/regular/b.png', complementary:7},
{name:'Black Frame', src:'/img/frames/dungeon/regular/b.png', complementary:7},
{name:'Red Frame', src:'/img/frames/dungeon/regular/b.png', complementary:7},
{name:'Green Frame', src:'/img/frames/dungeon/regular/b.png', complementary:7},
{name:'Multicolored Frame', src:'/img/frames/dungeon/regular/b.png', complementary:7},
{name:'Land Frame', src:'/img/frames/dungeon/regular/b.png', complementary:7},
{name:'Floor', src:'/img/frames/dungeon/regular/floor.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 = 'dungeon';
card.onload = '/js/frames/versionDungeon.js';
loadScript('/js/frames/versionDungeon.js');
//art bounds
card.artBounds = {x:0, y:0, width:1, height:1};
autoFitArt();
//set symbol bounds
card.setSymbolBounds = {x:0.9227, y:0.8739, width:0.12, height:0.0381, vertical:'center', horizontal: 'right'};
resetSetSymbol();
//watermark bounds
card.watermarkBounds = {x:0.3027, y:0.4748, width:0.3547, height:0.6767};
resetWatermark();
//text
loadTextOptions({
title: {name:'Title', text:'', x:0.0854, y:0.0522, width:0.8292, height:0.0543, oneLine:true, font:'belerenbsc', size:0.0381, color:'white', align:'center'},
room1: {name:'Ability 1', text:'', x:0.1334, y:0.2896, width:0.35, height:0.1786, size:0.0305},
});
}
//loads available frames
loadFramePack();

View File

@@ -0,0 +1,90 @@
//checks to see if it needs to run
if (!loadedVersions.includes('/js/frames/versionDungeon.js')) {
loadedVersions.push('/js/frames/versionDungeon.js');
sizeCanvas('dungeon');
document.querySelector('#creator-menu-tabs').innerHTML += '<h3 class="selectable readable-background" onclick="toggleCreatorTabs(event, `dungeon`)">Dungeon</h3>';
var newHTML = document.createElement('div');
newHTML.id = 'creator-menu-dungeon';
newHTML.classList.add('hidden');
newHTML.innerHTML = `
<div class='readable-background padding'>
<h5 class='padding margin-bottom input-description'>Adjust the height (first input) and chapter count (second input) of each Dungeon ability</h5>
<textarea id='dungeon-input' type='number' class='input margin-bottom' onchange='dungeonEdited();'>0,0,16,2\n0,2,16,17</textarea>
</div>`;
if (!card.dungeon) {
card.dungeon = {abilities:[1, 1, 1, 0], count:3, x:0.1, width:0.3947};
}
document.querySelector('#creator-menu-sections').appendChild(newHTML);
var dungeonFX1 = new Image();
dungeonFX1.src = '/img/frames/dungeon/walls/fx/straight.png';
var dungeonFX2 = new Image();
dungeonFX2.src = '/img/frames/dungeon/walls/fx/corner.png';
var dungeonFX3 = new Image();
dungeonFX3.src = '/img/frames/dungeon/walls/fx/t.png';
var dungeonFX4 = new Image();
dungeonFX4.src = '/img/frames/dungeon/walls/fx/cross.png';
var dungeonShape1 = new Image();
dungeonShape1.src = '/img/frames/dungeon/walls/shape/straight.png';
var dungeonShape2 = new Image();
dungeonShape2.src = '/img/frames/dungeon/walls/shape/corner.png';
var dungeonShape3 = new Image();
dungeonShape3.src = '/img/frames/dungeon/walls/shape/t.png';
var dungeonShape4 = new Image();
dungeonShape4.src = '/img/frames/dungeon/walls/shape/cross.png';
// var dungeonTexture = new Image();
// dungeonTexture.src = '/img/frames/dungeon/dungeonTexture.png';
dungeonShape4.onload = dungeonEdited;
}
function dungeonEdited() {
//gather data
data = document.querySelector('#dungeon-input').value;
rooms = [];
data.replace(/ /g, '').split('\n').forEach(room => {
newRoom = room.split(',');
for (i = 0; i < newRoom.length; i++) {
newRoom[i] = parseInt(newRoom[i]);
}
rooms.push(newRoom);
});
console.log(rooms);
//draw to dungeon canvas
dungeonContext.clearRect(0, 0, dungeonCanvas.width, dungeonCanvas.height);
drawTextBuffer();
drawCard();
}
//Data structures...
class Vertex {
constructor(x = 0, y = 0, up = false, down = false, left = false, right = false) {
this.x = x;
this.y = y;
this.up = up;
this.down = down;
this.left = left;
this.right = right;
}
}
class Graph {
// defining vertex array and
// adjacent list
constructor(noOfVertices)
{
this.noOfVertices = noOfVertices;
this.AdjList = new Map();
}
// functions to be implemented
// addVertex(v)
// addEdge(v, w)
// printGraph()
// bfs(v)
// dfs(v)
}