diff --git a/modules/burgs-and-states.js b/modules/burgs-and-states.js index 4a1751fd..f2d7c59e 100644 --- a/modules/burgs-and-states.js +++ b/modules/burgs-and-states.js @@ -361,7 +361,6 @@ if (buddies.length > 2) continue; if (adversaries.length <= buddies.length) continue; cells.state[i] = cells.state[adversaries[0]]; - //debug.append("circle").attr("cx", cells.p[i][0]).attr("cy", cells.p[i][1]).attr("r", .5).attr("fill", "red"); } TIME && console.timeEnd("normalizeStates"); } @@ -412,11 +411,6 @@ const relaxed = chain.map(i => voronoi.vertices.p[i]).filter((p, i) => i%15 === 0 || i+1 === chain.length); paths.push([s.i, relaxed]); - // if (s.i == 13) debug.selectAll(".circle").data(points).enter().append("circle").attr("cx", d => d[0]).attr("cy", d => d[1]).attr("r", .5).attr("fill", "red"); - // if (s.i == 13) d3.select("#cells").selectAll(".polygon").data(d3.range(voronoi.cells.v.length)).enter().append("polygon").attr("points", d => voronoi.cells.v[d] ? voronoi.cells.v[d].map(v => c.p[v]) : ""); - // if (s.i == 13) debug.append("path").attr("d", round(lineGen(relaxed))).attr("fill", "none").attr("stroke", "blue").attr("stroke-width", .5); - // if (s.i == 13) debug.selectAll(".circle").data(chain).enter().append("circle").attr("cx", d => c.p[d][0]).attr("cy", d => c.p[d][1]).attr("r", 1); - function getHull(start, state, maxLake) { const queue = [start], hull = new Set(); @@ -451,7 +445,6 @@ const h = c.p.length < 200 ? 0 : c.p.length < 600 ? .5 : 1; // power of horyzontality shift const end = pointsInside[d3.scan(pointsInside, (a, b) => (c.p[a][0] - c.p[b][0]) + (Math.abs(c.p[a][1] - y) - Math.abs(c.p[b][1] - y)) * h)]; // left point const start = pointsInside[d3.scan(pointsInside, (a, b) => (c.p[b][0] - c.p[a][0]) - (Math.abs(c.p[b][1] - y) - Math.abs(c.p[a][1] - y)) * h)]; // right point - //debug.append("line").attr("x1", c.p[start][0]).attr("y1", c.p[start][1]).attr("x2", c.p[end][0]).attr("y2", c.p[end][1]).attr("stroke", "#00dd00"); // connect leftmost and rightmost points with shortest path const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p}); @@ -966,7 +959,6 @@ cells.province[p.center] = p.i; queue.queue({e:p.center, p:0, province:p.i, state:p.state}); cost[p.center] = 1; - //debug.append("circle").attr("cx", cells.p[p.center][0]).attr("cy", cells.p[p.center][1]).attr("r", .3).attr("fill", "red"); }); while (queue.length) { diff --git a/modules/coa-generator.js b/modules/coa-generator.js index 50140fac..6d1c62e7 100644 --- a/modules/coa-generator.js +++ b/modules/coa-generator.js @@ -5,9 +5,9 @@ }(this, (function () {'use strict'; const tinctures = { - field: { metals: 30, colours: 42, stains: 1, patterns: 12 }, - division: { metals: 30, colours: 42, stains: 1, patterns: 6 }, - charge: { metals: 16, colours: 24, stains: 1, patterns: 0 }, + field: { metals: 3, colours: 4, stains: +P(.03), patterns: 1 }, + division: { metals: 5, colours: 8, stains: +P(.03), patterns: 1 }, + charge: { metals: 2, colours: 3, stains: +P(.05), patterns: 0 }, metals: { argent: 3, or: 2 }, colours: { gules: 5, azure: 4, sable: 3, purpure: 3, vert: 2 }, stains: { murrey: 1, sanguine: 1, tenné: 1 }, @@ -127,7 +127,7 @@ quarter: { e: 1 }, canton: { e: 5, beh: 1, def: 1, bdefh: 1, kn: 1 }, cross: { acgi: 1 }, - pall: { BCKFEILGbdmfo: 1 }, + pall: { BCKFEILGJbdmfo: 1 }, pallReversed: { aczac: 1 }, chevron: { ach: 3, hhh: 1 }, chevronReversed: { bbb: 1 }, @@ -209,6 +209,7 @@ // other editors const t1 = P(kinship) ? parent.t1 : getTincture("field"); + if (t1.includes("-")) usedPattern = t1; const coa = {t1}; let charge = P(usedPattern ? .5 : .93) ? true : false; // 80% for charge diff --git a/modules/coa-renderer.js b/modules/coa-renderer.js index 6a4be2fb..8c212658 100644 --- a/modules/coa-renderer.js +++ b/modules/coa-renderer.js @@ -362,9 +362,9 @@ H: [0, 76] }, round: { - a: [-40, -47.5], b: [0, -47.5], c: [40, -47.5], + a: [-40, -40], b: [0, -40], c: [40, -40], d: [-40, 0], e: [0, 0], f: [40, 0], - g: [-32.5, 47.5], h: [0, 47.5], i: [32.5, 47.5], + g: [-40, 40], h: [0, 40], i: [40, 40], y: [-48, -48], z: [0, 57.5], j: [-35.5, -35.5], k: [0, -37.5], l: [35.5, -35.5], m: [-35.5, 35.5], n: [0, 37.5], o: [35.5, 35.5], diff --git a/modules/ui/tools.js b/modules/ui/tools.js index 992880fb..5e9a96fe 100644 --- a/modules/ui/tools.js +++ b/modules/ui/tools.js @@ -282,7 +282,7 @@ function regenerateEmblems() { const parent = province.burg ? pack.burgs[province.burg] : pack.states[province.state]; let dominion = false; - if (province.burg) { + if (!province.burg) { dominion = P(.2); if (province.formName === "Colony") dominion = P(.95); else if (province.formName === "Island") dominion = P(.6); else