| @@ -442,9 +442,13 @@ function createClickUpgrades() { | |||||
| } | } | ||||
| } | } | ||||
| const helperUpgradeColors = range.colors(3); | |||||
| function createHelperUpgrades() { | function createHelperUpgrades() { | ||||
| const infix = "-help-"; | const infix = "-help-"; | ||||
| let previousHelped = undefined; | |||||
| Object.entries(helperUpgradeText).forEach(([helper, helpees]) => { | Object.entries(helperUpgradeText).forEach(([helper, helpees]) => { | ||||
| const prefix = helper; | const prefix = helper; | ||||
| @@ -460,7 +464,7 @@ function createHelperUpgrades() { | |||||
| "desc": text.desc, | "desc": text.desc, | ||||
| "icon": [ | "icon": [ | ||||
| { icon: "fa-hand-holding", color: "black" }, | { icon: "fa-hand-holding", color: "black" }, | ||||
| { icon: buildings[helped].icon, color: "red", transform: "scale(0.5, 0.5) translate(0, -30px)" } | |||||
| { icon: buildings[helped].icon, color: helperUpgradeColors[counter - 1], transform: "scale(0.5, 0.5) translate(0, -30px)" } | |||||
| ], | ], | ||||
| "cost": { | "cost": { | ||||
| "food": buildings[helper].cost.food * 25 * counter + buildings[helped].cost.food * 50 * counter | "food": buildings[helper].cost.food * 25 * counter + buildings[helped].cost.food * 50 * counter | ||||
| @@ -483,13 +487,19 @@ function createHelperUpgrades() { | |||||
| } | } | ||||
| }; | }; | ||||
| upgrades[key]["prereqs"]["buildings"][helper] = 10 * counter; | upgrades[key]["prereqs"]["buildings"][helper] = 10 * counter; | ||||
| upgrades[key]["prereqs"]["buildings"][helped] = 1; | |||||
| if (counter > 1) { | if (counter > 1) { | ||||
| upgrades[key]["prereqs"]["upgrades"].push(prefix + infix + suffix + "-" + (counter - 1)) | upgrades[key]["prereqs"]["upgrades"].push(prefix + infix + suffix + "-" + (counter - 1)) | ||||
| } | } | ||||
| if (previousHelped !== undefined && counter == 1) { | |||||
| upgrades[key]["prereqs"]["upgrades"].push(prefix + infix + previousHelped + "-" + "1") | |||||
| } | |||||
| counter += 1; | counter += 1; | ||||
| } | } | ||||
| previousHelped = helped; | |||||
| }); | }); | ||||
| }); | }); | ||||
| @@ -1082,11 +1092,58 @@ const helperUpgradeText = { | |||||
| "desc": "Why bother chasing them, really?" | "desc": "Why bother chasing them, really?" | ||||
| }, | }, | ||||
| { | { | ||||
| "name": "Servants", | |||||
| "name": "", | |||||
| "desc": "Why bother walking anywhere, really?" | "desc": "Why bother walking anywhere, really?" | ||||
| }, | |||||
| ] | |||||
| } | |||||
| ], | |||||
| "car": [ | |||||
| { | |||||
| name: "Drivers", | |||||
| desc: "Better than a baby driver" | |||||
| } | |||||
| ], | |||||
| bus: [ | |||||
| { | |||||
| name: "Thank the bus driver", | |||||
| desc: "Thank the bus driver" | |||||
| } | |||||
| ], | |||||
| house: [ | |||||
| { | |||||
| name: "Carpenters", | |||||
| desc: "It's tool time!" | |||||
| } | |||||
| ], | |||||
| apartment: [ | |||||
| { | |||||
| name: "Landlords", | |||||
| desc: "Eat 'em" | |||||
| } | |||||
| ], | |||||
| block: [ | |||||
| { | |||||
| name: "Inspectors", | |||||
| desc: "Bringing everything up to code" | |||||
| } | |||||
| ], | |||||
| town: [ | |||||
| { | |||||
| name: "Mayors", | |||||
| desc: "Vote!" | |||||
| } | |||||
| ], | |||||
| city: [ | |||||
| { | |||||
| name: "Councils", | |||||
| desc: "Pass those ordinances" | |||||
| } | |||||
| ], | |||||
| metro: [ | |||||
| { | |||||
| name: "Urban Planners", | |||||
| desc: "Blueprints? Chewprints." | |||||
| } | |||||
| ], | |||||
| } | } | ||||
| } | } | ||||