salesTax to depend on state form

This commit is contained in:
Azgaar 2021-08-14 11:56:40 +03:00 committed by Peter
parent 0d7a509980
commit 30c6c09cee
3 changed files with 6 additions and 6 deletions

View file

@ -720,6 +720,10 @@ async function generate(options) {
BurgsAndStates.generate(); BurgsAndStates.generate();
Religions.generate();
BurgsAndStates.defineStateForms();
BurgsAndStates.defineTaxes();
Production.collectResources(); Production.collectResources();
Trade.defineCenters(); Trade.defineCenters();
@ -730,9 +734,6 @@ async function generate(options) {
pack.cells.road = new Uint16Array(pack.cells.i.length); pack.cells.road = new Uint16Array(pack.cells.i.length);
pack.cells.crossroad = new Uint16Array(pack.cells.i.length); pack.cells.crossroad = new Uint16Array(pack.cells.i.length);
Religions.generate();
BurgsAndStates.defineStateForms();
BurgsAndStates.generateProvinces(); BurgsAndStates.generateProvinces();
BurgsAndStates.defineBurgFeatures(); BurgsAndStates.defineBurgFeatures();
BurgsAndStates.defineTaxes(); BurgsAndStates.defineTaxes();

View file

@ -91,7 +91,6 @@ window.BurgsAndStates = (function () {
const basename = b.name.length < 9 && each5th(b.cell) ? b.name : Names.getCultureShort(b.culture); const basename = b.name.length < 9 && each5th(b.cell) ? b.name : Names.getCultureShort(b.culture);
const name = Names.getState(basename, b.culture); const name = Names.getState(basename, b.culture);
const type = cultures[b.culture].type; const type = cultures[b.culture].type;
const salesTax = rn(Math.random() * 0.3, 2);
const coa = COA.generate(null, null, null, type); const coa = COA.generate(null, null, null, type);
coa.shield = COA.getShield(b.culture, null); coa.shield = COA.getShield(b.culture, null);

View file

@ -599,7 +599,7 @@ window.Religions = (function () {
const cultureCost = c !== cells.culture[e] ? 10 : 0; const cultureCost = c !== cells.culture[e] ? 10 : 0;
const stateCost = s !== cells.state[e] ? 10 : 0; const stateCost = s !== cells.state[e] ? 10 : 0;
const biomeCost = cells.road[e] ? 1 : biomesData.cost[cells.biome[e]]; const biomeCost = biomesData.cost[cells.biome[e]];
const populationCost = Math.max(rn(popCost - cells.pop[e]), 0); const populationCost = Math.max(rn(popCost - cells.pop[e]), 0);
const heightCost = Math.max(cells.h[e], 20) - 20; const heightCost = Math.max(cells.h[e], 20) - 20;
const waterCost = cells.h[e] < 20 ? (cells.road[e] ? 50 : 1000) : 0; const waterCost = cells.h[e] < 20 ? (cells.road[e] ? 50 : 1000) : 0;
@ -644,7 +644,7 @@ window.Religions = (function () {
cells.c[n].forEach(function (e) { cells.c[n].forEach(function (e) {
const religionCost = cells.religion[e] === b ? 0 : 2000; const religionCost = cells.religion[e] === b ? 0 : 2000;
const biomeCost = cells.road[e] ? 0 : biomesData.cost[cells.biome[e]]; const biomeCost = biomesData.cost[cells.biome[e]];
const heightCost = Math.max(cells.h[e], 20) - 20; const heightCost = Math.max(cells.h[e], 20) - 20;
const waterCost = cells.h[e] < 20 ? (cells.road[e] ? 50 : 1000) : 0; const waterCost = cells.h[e] < 20 ? (cells.road[e] ? 50 : 1000) : 0;
const totalCost = const totalCost =