From 30c6c09ceed1fdf87966250ce73d664b21a43d71 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 14 Aug 2021 11:56:40 +0300 Subject: [PATCH] salesTax to depend on state form --- main.js | 7 ++++--- modules/burgs-and-states.js | 1 - modules/religions-generator.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index bf3ed812..c011bfb3 100644 --- a/main.js +++ b/main.js @@ -720,6 +720,10 @@ async function generate(options) { BurgsAndStates.generate(); + Religions.generate(); + BurgsAndStates.defineStateForms(); + BurgsAndStates.defineTaxes(); + Production.collectResources(); Trade.defineCenters(); @@ -730,9 +734,6 @@ async function generate(options) { pack.cells.road = new Uint16Array(pack.cells.i.length); pack.cells.crossroad = new Uint16Array(pack.cells.i.length); - Religions.generate(); - BurgsAndStates.defineStateForms(); - BurgsAndStates.generateProvinces(); BurgsAndStates.defineBurgFeatures(); BurgsAndStates.defineTaxes(); diff --git a/modules/burgs-and-states.js b/modules/burgs-and-states.js index 473c3119..8efea460 100644 --- a/modules/burgs-and-states.js +++ b/modules/burgs-and-states.js @@ -91,7 +91,6 @@ window.BurgsAndStates = (function () { const basename = b.name.length < 9 && each5th(b.cell) ? b.name : Names.getCultureShort(b.culture); const name = Names.getState(basename, b.culture); const type = cultures[b.culture].type; - const salesTax = rn(Math.random() * 0.3, 2); const coa = COA.generate(null, null, null, type); coa.shield = COA.getShield(b.culture, null); diff --git a/modules/religions-generator.js b/modules/religions-generator.js index 6d9c02a3..391127c1 100644 --- a/modules/religions-generator.js +++ b/modules/religions-generator.js @@ -599,7 +599,7 @@ window.Religions = (function () { const cultureCost = c !== cells.culture[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 heightCost = Math.max(cells.h[e], 20) - 20; 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) { 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 waterCost = cells.h[e] < 20 ? (cells.road[e] ? 50 : 1000) : 0; const totalCost =