From e69762792aa3afa9db3ac21e50b73390bec27339 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 1 May 2021 22:22:52 +0300 Subject: [PATCH] resource styling - all 40 are done --- index.html | 521 +++++++-------------------------- modules/resources-generator.js | 54 ---- 2 files changed, 109 insertions(+), 466 deletions(-) diff --git a/index.html b/index.html index b932e746..f2c2c0c8 100644 --- a/index.html +++ b/index.html @@ -7674,7 +7674,6 @@ -<<<<<<< HEAD @@ -7687,7 +7686,6 @@ -======= @@ -7755,8 +7753,7 @@ - - + @@ -7769,10 +7766,9 @@ - + - - + @@ -7822,9 +7818,9 @@ - - - + + + @@ -7833,411 +7829,112 @@ ->>>>>>> 7c7c201e (resource styling) - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/modules/resources-generator.js b/modules/resources-generator.js index f0c0f71f..162922bc 100644 --- a/modules/resources-generator.js +++ b/modules/resources-generator.js @@ -526,62 +526,8 @@ window.Resources = (function () { } ]; -<<<<<<< HEAD const temp = i => grid.cells.temp[pack.cells.g[i]]; const group = i => pack.features[cells.f[i]].group; -======= - const getDefault = function() { - // model: cells eligibility function; chance: chance to get rosource in model-eligible cell - return [ - {i: 1, name: "Wood", icon: "resource-wood", color: "#966F33", value: 5, chance: 10, model: "forestAndTaiga", bonus: {fleet: 2, defence: 1}}, - {i: 2, name: "Stone", icon: "resource-stone", color: "#979EA2", value: 4, chance: 7, model: "hills", bonus: {prestige: 1, defence: 2}}, - {i: 3, name: "Marble", icon: "resource-marble", color: "#d6d0bf", value: 15, chance: 1, model: "mountains", bonus: {prestige: 2}}, - {i: 4, name: "Iron", icon: "resource-iron", color: "#5D686E", value: 8, chance: 8, model: "mountainsAndRareWetland", bonus: {artillery: 1, infantry: 1, defence: 1}}, - {i: 5, name: "Copper", icon: "resource-copper", color: "#b87333", value: 10, chance: 3, model: "mountains", bonus: {artillery: 2, defence: 1, prestige: 1}}, - {i: 6, name: "Lead", icon: "resource-lead", color: "#454343", value: 8, chance: 3, model: "mountains", bonus: {artillery: 1, defence: 1}}, - {i: 7, name: "Silver", icon: "resource-silver", color: "#C0C0C0", value: 15, chance: 3, model: "mountains", bonus: {prestige: 2}}, - {i: 8, name: "Gold", icon: "resource-gold", color: "#d4af37", value: 30, chance: 1, model: "upperRivers", bonus: {prestige: 3}}, - {i: 9, name: "Grain", icon: "resource-grain", color: "#F5DEB3", value: 1, chance: 15, model: "habitability", bonus: {population: 4}}, - {i: 10, name: "Сattle", icon: "resource-cattle", color: "#56b000", value: 2, chance: 10, model: "pasturesAndTemperateForest", bonus: {population: 2}}, - {i: 11, name: "Fish", icon: "resource-fish", color: "#7fcdff", value: 1, chance: 5, model: "waterAndRiver", bonus: {population: 2}}, - {i: 12, name: "Game", icon: "resource-game", color: "#c38a8a", value: 2, chance: 3, model: "forestAndTaiga", bonus: {archers: 2, population: 1}}, - {i: 13, name: "Wine", icon: "resource-wine", color: "#963e48", value: 3, chance: 4, model: "tropics", bonus: {population: 1, prestige: 1}}, - {i: 14, name: "Olives", icon: "resource-olives", color: "#BDBD7D", value: 3, chance: 4, model: "tropics", bonus: {population: 1}}, - {i: 15, name: "Honey", icon: "resource-honey", color: "#DCBC66", value: 4, chance: 3, model: "deciduousForestAndTaiga", bonus: {population: 1}}, - {i: 16, name: "Salt", icon: "resource-salt", color: "#E5E4E5", value: 5, chance: 4, model: "aridLandAndLakes", bonus: {population: 1, defence: 1}}, - {i: 17, name: "Dates", icon: "resource-dates", color: "#dbb2a3", value: 3, chance: 3, model: "desert", bonus: {population: 1}}, - {i: 18, name: "Horses", icon: "resource-horses", color: "#ba7447", value: 10, chance: 6, model: "grasslandsAndColdDesert", bonus: {cavalry: 2}}, - {i: 19, name: "Elephants", icon: "resource-elephants", color: "#C5CACD", value: 15, chance: 2, model: "savannaDesertTropicalForest", bonus: {cavalry: 1}}, - {i: 20, name: "Camels", icon: "resource-camels", color: "#C19A6B", value: 13, chance: 4, model: "desert", bonus: {cavalry: 1}}, - {i: 21, name: "Hemp", icon: "resource-hemp", color: "#069a06", value: 2, chance: 4, model: "forest", bonus: {fleet: 2}}, - {i: 22, name: "Pearls", icon: "resource-pearls", color: "#EAE0C8", value: 35, chance: 3, model: "tropicalWater", bonus: {prestige: 1}}, - {i: 23, name: "Gemstones", icon: "resource-gemstones", color: "#d6a7eb", value: 35, chance: 2, model: "mountains", bonus: {prestige: 1}}, - {i: 24, name: "Dyes", icon: "resource-dyes", color: "#eba7e3", value: 15, chance: .5, model: "habitableOrWater", bonus: {prestige: 1}}, - {i: 25, name: "Incense", icon: "resource-incense", color: "#ebe5a7", value: 25, chance: 2, model: "desertAndTropicalForest", bonus: {prestige: 2}}, - {i: 26, name: "Silk", icon: "resource-silk", color: "#F5F4F1", value: 30, chance: 1, model: "tropicalForest", bonus: {prestige: 2}}, - {i: 27, name: "Spices", icon: "resource-spices", color: "#e99c75", value: 30, chance: 2, model: "tropicalForest", bonus: {prestige: 2}}, - {i: 28, name: "Amber", icon: "resource-amber", color: "#FFE597", value: 15, chance: 2, model: "forestSeashore", bonus: {prestige: 1}}, - {i: 29, name: "Furs", icon: "resource-furs", color: "#635948", value: 13, chance: 2, model: "borealForest", bonus: {prestige: 1}}, - {i: 30, name: "Sheeps", icon: "resource-sheeps", color: "#53b574", value: 2, chance: 5, model: "pasturesAndTemperateForest", bonus: {infantry: 1}}, - {i: 31, name: "Slaves", icon: "resource-slaves", color: "#757575", value: 10, chance: 3, model: "lessHabitableSeashore", bonus: {population: 2}}, - {i: 32, name: "Tar", icon: "resource-tar", color: "#424242", value: 3, chance: 3, model: "forestAndTaiga", bonus: {fleet: 1}}, - {i: 33, name: "Saltpeter", icon: "resource-saltpeter", color: "#e6e3e3", value: 8, chance: 2, model: "habitability", bonus: {artillery: 3}}, - {i: 34, name: "Coal", icon: "resource-coal", color: "#36454f", value: 2, chance: 7, model: "hills", bonus: {artillery: 2}}, - {i: 35, name: "Oil", icon: "resource-oil", color: "#363636", value: 5, chance: 2, model: "lessHabitableOrWater", bonus: {artillery: 1}}, - {i: 36, name: "Tropical timber", icon: "resource-tropicalTimber", color: "#dbb7b4", value: 20, chance: 2, model: "tropicalForest", bonus: {prestige: 1}}, - {i: 37, name: "Whales", icon: "resource-whales", color: "#ffffff", value: 2, chance: 2, model: "colderWaters", bonus: {population: 1}}, - {i: 38, name: "Sugar", icon: "resource-sugar", color: "#7abf87", value: 3, chance: 3, model: "tropicalForest", bonus: {population: 1}}, - {i: 39, name: "Tea", icon: "resource-tea", color: "#d0f0c0", value: 10, chance: 2, model: "tropicalForest", bonus: {prestige: 1}}, - {i: 40, name: "Tobacco", icon: "resource-tobacco", color: "#6D5843", value: 10, chance: 2, model: "tropicalForest", bonus: {prestige: 1}}, - ] - } - - const chance = v => { - if (v < .01) return false; - if (v > 99.99) return true; - return v / 100 > Math.random(); - } ->>>>>>> 7c7c201e (resource styling) const temp = i => grid.cells.temp[pack.cells.g[i]]; const group = i => pack.features[cells.f[i]].group;