From 55473ad8ee8ae6761f5df1244ed2ba4a95134011 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 28 Dec 2019 13:24:46 -0600 Subject: [PATCH] Add color to powerup upgrades; mess around with the click victim upgrade icons --- constants.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/constants.js b/constants.js index f418a24..e3be3ac 100644 --- a/constants.js +++ b/constants.js @@ -512,12 +512,13 @@ function createClickVictimUpgrades() { let counter = 1; let previous = "micro"; Object.entries(clickVictimUpgradeText).forEach(([key, text]) => { + let newColor = clickVictimUpgradeColors[counter - 1] + "dd"; upgrades[prefix + key] = { "name": text.name, "desc": text.desc, "icon": [ { icon: buildings[key].icon, color: "#eee" }, - { icon: "fa-hand-pointer", color: clickVictimUpgradeColors[counter - 1] } + { icon: "fa-hand-pointer", color: newColor, transform: "scale(0.75, 0.75) translate(20px, 20px) rotate(-15deg)" } ], "cost": { "food": 1000 * Math.pow(10, counter) @@ -542,6 +543,8 @@ function createClickVictimUpgrades() { }); } +const powerupFreqColors = range.colors(5); + function createPowerupFreqUpgrades() { const prefix = "powerup-freq-"; let counter = 1; @@ -549,7 +552,9 @@ function createPowerupFreqUpgrades() { upgrades[prefix + counter] = { "name": text.name, "desc": text.desc, - "icon": "fa-drumstick-bite", + "icon": [ + { icon: "fa-drumstick-bite", color: powerupFreqColors[counter - 1] } + ], "cost": { "powerups": 5 * counter },