cookie clicker but bigger
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1144 lines
26 KiB

  1. "use strict";
  2. const resourceTypes = {
  3. "food": {
  4. name: "Food"
  5. }
  6. }
  7. const buildings = {
  8. "micro": {
  9. "name": "Micro",
  10. "plural": "Micros",
  11. "desc": "A tasty, squirmy treat.",
  12. "cost": 1e1,
  13. "prod": 1e-1 / 1,
  14. "icon": "fa-universal-access"
  15. },
  16. "anthro": {
  17. "name": "Anthro",
  18. "plural": "Anthros",
  19. "desc": "Something more substantial to sate your hunger.",
  20. "cost": 1e2,
  21. "prod": 1e0 / 1.1,
  22. "icon": "fa-male"
  23. },
  24. "car": {
  25. "name": "Car",
  26. "plural": "Cars",
  27. "desc": "Crunchy shell, tasty center.",
  28. "cost": 1.2e3,
  29. "prod": 1e1 / 1.2,
  30. "icon": "fa-car"
  31. },
  32. "bus": {
  33. "name": "Bus",
  34. "plural": "Buses",
  35. "desc": "Probably the worst place to be when a macro is aroud.",
  36. "cost": 1.4e4,
  37. "prod": 1e2 / 1.3,
  38. "icon": "fa-bus"
  39. },
  40. "house": {
  41. "name": "House",
  42. "plural": "Houses",
  43. "desc": "Home sweet home - but it doesn't taste sweet?",
  44. "cost": 1.6e5,
  45. "prod": 1e3 / 1.4,
  46. "icon": "fa-home"
  47. },
  48. "apartment": {
  49. "name": "Apartment",
  50. "plural": "Apartments",
  51. "desc": "More snacks, less packaging.",
  52. "cost": 1.8e6,
  53. "prod": 1e4 / 1.5,
  54. "icon": "fa-building"
  55. },
  56. "block": {
  57. "name": "Block",
  58. "plural": "Blocks",
  59. "desc": "A whole pile of buildings.",
  60. "cost": 2e7,
  61. "prod": 1e5 / 1.6,
  62. "icon": "fa-warehouse"
  63. },
  64. "town": {
  65. "name": "Town",
  66. "plural": "Towns",
  67. "desc": "'Tourist trap' has never been this literal.",
  68. "cost": 2.2e8,
  69. "prod": 1e6 / 1.7,
  70. "icon": "fa-store"
  71. },
  72. "city": {
  73. "name": "City",
  74. "plural": "Cities",
  75. "desc": "Please no sitty on our city.",
  76. "cost": 2.4e9,
  77. "prod": 1e7 / 1.8,
  78. "icon": "fa-city"
  79. },
  80. "metro": {
  81. "name": "Metropolis",
  82. "plural": "Metropolises",
  83. "desc": "A big ol' city. Tasty, too.",
  84. "cost": 2.6e10,
  85. "prod": 1e8 / 1.9,
  86. "icon": "fa-landmark"
  87. },
  88. "county": {
  89. "name": "County",
  90. "plural": "Counties",
  91. "desc": "Why salt the land when you can slurp it?",
  92. "cost": 2.8e11,
  93. "prod": 1e9 / 2,
  94. "icon": "fa-map"
  95. },
  96. "state": {
  97. "name": "State",
  98. "plural": "States",
  99. "desc": "The United States is made up of...43 states - no, 42...",
  100. "cost": 3e12,
  101. "prod": 1e10 / 2.1,
  102. "icon": "fa-map-signs"
  103. },
  104. "country": {
  105. "name": "Country",
  106. "plural": "Countries",
  107. "desc": "One nation, under paw.",
  108. "cost": 3.2e13,
  109. "prod": 1e11 / 2.2,
  110. "icon": "fa-flag"
  111. },
  112. "continent": {
  113. "name": "Continent",
  114. "plural": "Continents",
  115. "desc": "Earth-shattering appetite!",
  116. "cost": 3.4e14,
  117. "prod": 1e12 / 2.3,
  118. "icon": "fa-mountain"
  119. },
  120. "planet": {
  121. "name": "Planet",
  122. "plural": "Planets",
  123. "desc": "Earth appetite!",
  124. "cost": 3.6e15,
  125. "prod": 1e13 / 2.4,
  126. "icon": "fa-globe-europe"
  127. },
  128. "solar-system": {
  129. "name": "Solar System",
  130. "plural": "Solar Systems",
  131. "desc": "Earths appetite!",
  132. "cost": 3.8e16,
  133. "prod": 1e14 / 2.5,
  134. "icon": "fa-meteor"
  135. },
  136. "galaxy": {
  137. "name": "Galaxy",
  138. "plural": "Galaxies",
  139. "desc": "In a galaxy far, far down your gullet...",
  140. "cost": 4.0e17,
  141. "prod": 1e15 / 2.6,
  142. "icon": "fa-sun"
  143. },
  144. "universe": {
  145. "name": "Universe",
  146. "plural": "Universes",
  147. "desc": "Into the you-verse.",
  148. "cost": 4.2e18,
  149. "prod": 1e16 / 2.7,
  150. "icon": "fa-asterisk"
  151. },
  152. "multiverse": {
  153. "name": "Multiverse",
  154. "plural": "Multiverses",
  155. "desc": "This is getting very silly.",
  156. "cost": 4.4e19,
  157. "prod": 1e17 / 2.8,
  158. "icon": "fa-infinity"
  159. }
  160. }
  161. const effect_types = {
  162. "prod": {
  163. "apply": function (effect, productivity) {
  164. return productivity * effect.amount;
  165. },
  166. "desc": function (effect) {
  167. return round(effect.amount, 2) + "x food production from " + buildings[effect.target].plural;
  168. }
  169. },
  170. "prod-all": {
  171. "apply": function (effect, productivity) {
  172. return productivity * effect.amount;
  173. },
  174. "desc": function (effect) {
  175. return round((effect.amount - 1) * 100) + "% increase to food production";
  176. }
  177. },
  178. "helper": {
  179. "apply": function (effect, productivity, helperCount) {
  180. return productivity * (1 + effect.amount * helperCount);
  181. },
  182. "desc": function (effect) {
  183. return "+" + round(effect.amount * 100) + "% food/sec from " + buildings[effect.helped].name + " for every " + buildings[effect.helper].name + " owned.";
  184. }
  185. },
  186. "click": {
  187. "apply": function (effect, bonus, productivity) {
  188. return bonus + productivity * effect.amount;
  189. },
  190. "desc": function (effect) {
  191. return round(effect.amount * 100) + "% of food/sec gained per click";
  192. }
  193. },
  194. "click-victim": {
  195. "desc": function (effect) {
  196. return "Devour larger prey";
  197. }
  198. },
  199. "powerup-freq": {
  200. "apply": function (effect, delay) {
  201. return delay * effect.amount;
  202. },
  203. "desc": function (effect) {
  204. return "Speed up powerup spawns by " + Math.round((1 / effect.amount - 1) * 100) + "%";
  205. }
  206. }
  207. }
  208. let upgrades = {
  209. }
  210. function createTemplateUpgrades() {
  211. createProdUpgrades();
  212. createProdAllUpgrades();
  213. createClickUpgrades();
  214. createHelperUpgrades();
  215. createClickVictimUpgrades();
  216. createPowerupFreqUpgrades();
  217. }
  218. const prodUpgradeCounts = [1, 5, 10, 25, 50, 75, 100];
  219. function createProdUpgrades() {
  220. for (const [key, value] of Object.entries(prodUpgradeText)) {
  221. let counter = 1;
  222. let prefix = key + "-prod-";
  223. for (let contents of value) {
  224. upgrades[prefix + counter] = {
  225. "name": contents.name,
  226. "desc": contents.desc,
  227. "icon": buildings[key].icon,
  228. "cost": {
  229. "food": buildings[key].cost * 5 * Math.pow(10, counter - 1)
  230. },
  231. "effects": [
  232. {
  233. "type": "prod",
  234. "amount": 2 + (counter - 1) * 0.25,
  235. "target": key
  236. }
  237. ]
  238. };
  239. upgrades[prefix + counter]["prereqs"] = {};
  240. upgrades[prefix + counter]["prereqs"]["buildings"] = {};
  241. upgrades[prefix + counter]["prereqs"]["buildings"][key] = prodUpgradeCounts[counter - 1];
  242. if (counter > 1) {
  243. upgrades[prefix + counter]["prereqs"]["upgrades"] = [
  244. prefix + (counter - 1)
  245. ];
  246. }
  247. counter += 1;
  248. }
  249. }
  250. }
  251. function createProdAllUpgrades() {
  252. let prefix = "prod-all-"
  253. let counter = 1;
  254. for (let contents of prodAllUpgradeText) {
  255. upgrades[prefix + counter] = {
  256. "name": contents.name,
  257. "desc": contents.desc,
  258. "icon": "fa-cogs",
  259. "cost": {
  260. "food": 5 * Math.pow(10, counter + 1)
  261. },
  262. "effects": [
  263. {
  264. "type": "prod-all",
  265. "amount": 1.05
  266. }
  267. ],
  268. "prereqs": {
  269. "productivity": {
  270. "food": Math.pow(10, counter)
  271. }
  272. }
  273. };
  274. if (counter > 1) {
  275. upgrades[prefix + counter]["prereqs"].upgrades = [
  276. prefix + (counter - 1)
  277. ];
  278. }
  279. counter += 1;
  280. }
  281. }
  282. function createClickUpgrades() {
  283. let prefix = "prod-click-";
  284. let counter = 1;
  285. for (let contents of clickUpgradeText) {
  286. upgrades[prefix + counter] = {
  287. name: contents.name,
  288. desc: contents.desc,
  289. icon: "fa-hand-pointer",
  290. cost: {
  291. food: Math.pow(10, (counter * 2) + 1)
  292. },
  293. effects: [
  294. {
  295. type: "click",
  296. amount: 0.01
  297. }
  298. ],
  299. prereqs: {
  300. productivity: {
  301. food: Math.pow(10, counter)
  302. }
  303. }
  304. };
  305. if (counter > 1) {
  306. upgrades[prefix + counter]["prereqs"].upgrades = [
  307. prefix + (counter - 1)
  308. ];
  309. }
  310. counter += 1;
  311. }
  312. }
  313. function createHelperUpgrades() {
  314. const infix = "-help-";
  315. Object.entries(helperUpgradeText).forEach(([helper, helpees]) => {
  316. const prefix = helper;
  317. Object.entries(helpees).forEach(([helped, texts]) => {
  318. const suffix = helped;
  319. let counter = 1;
  320. for (let text of texts) {
  321. const key = prefix + infix + suffix + "-" + counter;
  322. upgrades[key] = {
  323. "name": text.name,
  324. "desc": text.desc,
  325. "icon": "fa-hand-holding",
  326. "cost": {
  327. "food": buildings[helper].cost * 25 * counter + buildings[helped].cost * 50 * counter
  328. },
  329. "effects": [
  330. {
  331. "type": "helper",
  332. "helper": helper,
  333. "helped": helped,
  334. "amount": 0.01 * counter
  335. }
  336. ],
  337. "prereqs": {
  338. "buildings": {
  339. },
  340. "upgrades": [
  341. helper + "-prod-1"
  342. ]
  343. }
  344. };
  345. upgrades[key]["prereqs"]["buildings"][helper] = 10 * counter;
  346. if (counter > 1) {
  347. upgrades[key]["prereqs"]["upgrades"].push(prefix + infix + suffix + "-" + (counter - 1))
  348. }
  349. counter += 1;
  350. }
  351. });
  352. });
  353. }
  354. function createClickVictimUpgrades() {
  355. const prefix = "click-";
  356. let counter = 1;
  357. let previous = "micro";
  358. Object.entries(clickVictimUpgradeText).forEach(([key, text]) => {
  359. upgrades[prefix + key] = {
  360. "name": text.name,
  361. "desc": text.desc,
  362. "icon": buildings[key].icon,
  363. "cost": {
  364. "food": 1000 * Math.pow(10, counter)
  365. },
  366. "effects": [
  367. {
  368. "type": "click-victim",
  369. "id": key
  370. }
  371. ],
  372. "prereqs": {
  373. "upgrades": [
  374. ]
  375. }
  376. };
  377. if (counter > 1) {
  378. upgrades[prefix + key].prereqs.upgrades.push(prefix + previous);
  379. }
  380. counter += 1;
  381. previous = key;
  382. });
  383. }
  384. function createPowerupFreqUpgrades() {
  385. const prefix = "powerup-freq-";
  386. let counter = 1;
  387. powerupFreqUpgradeText.forEach(text => {
  388. upgrades[prefix + counter] = {
  389. "name": text.name,
  390. "desc": text.desc,
  391. "icon": "fa-drumstick-bite",
  392. "cost": {
  393. "food": 1000 * Math.pow(10, counter)
  394. },
  395. "effects": [
  396. {
  397. "type": "powerup-freq",
  398. "id": prefix + counter,
  399. "amount": 0.5
  400. }
  401. ],
  402. "prereqs": {
  403. "upgrades": [
  404. ]
  405. }
  406. };
  407. if (counter > 1) {
  408. upgrades[prefix + counter].prereqs.upgrades.push(prefix + (counter - 1));
  409. }
  410. counter += 1;
  411. });
  412. }
  413. let prodUpgradeText = {
  414. "micro": [
  415. {
  416. "name": "Bigger Micros",
  417. "desc": "A macro micro? It's more filling, for sure.",
  418. },
  419. {
  420. "name": "Beefy Micros",
  421. "desc": "25% more protein, 10% fewer carbs."
  422. },
  423. {
  424. "name": "Delicious Micros",
  425. "desc": "Betcha' can't eat just one."
  426. },
  427. {
  428. "name": "Irresistable Micros",
  429. "desc": "Genetically engineered to be delectable."
  430. },
  431. {
  432. "name": "Exquisite Micros",
  433. "desc": "Dangerously delicious."
  434. }
  435. ],
  436. "anthro": [
  437. {
  438. "name": "Willing Prey",
  439. "desc": "Why bother chasing down your meal?"
  440. },
  441. {
  442. "name": "Fattened Prey",
  443. "desc": "9 calories per gram!"
  444. },
  445. {
  446. "name": "Mesmerized Prey",
  447. "desc": "Why bother walking to your meal?"
  448. },
  449. {
  450. "name": "Food-Safe Lubricant",
  451. "desc": "Ease them down your gullet with ease. Thanks, chemistry!"
  452. },
  453. {
  454. "name": "Mandatory Meal Training",
  455. "desc": "Educating prey on basic food etiquette helps reduce maw congestion and speeds digestion by 27%."
  456. }
  457. ],
  458. "car": [
  459. {
  460. "name": "HOV Lane",
  461. "desc": "Think of the environment! And of your impending digestion, I guess."
  462. },
  463. {
  464. "name": "Lightweight Frames",
  465. "desc": "Although crunchy, the shell around the snacks isn't very appetizing."
  466. },
  467. {
  468. "name": "Traffic Engineering",
  469. "desc": "Maximizing throughput into your gullet."
  470. },
  471. {
  472. "name": "Super Highways",
  473. "desc": "Six lanes! Fresh pavement! A ravenous maw!"
  474. },
  475. {
  476. "name": "Stacked Cars",
  477. "desc": "When we couldn't make the roads any wider, we tried stacking the cars higher."
  478. }
  479. ],
  480. "bus": [
  481. {
  482. "name": "Bus Passes",
  483. "desc": "Save on greenhouse emissions. Save your predator's effort. Everyone wins!"
  484. },
  485. {
  486. "name": "Double Deckers",
  487. "desc": "Stack 'em up! Slurp 'em down!"
  488. },
  489. {
  490. "name": "Articulated Buses",
  491. "desc": "The bend really helps them slip down your throat."
  492. },
  493. {
  494. "name": "Tour Buses",
  495. "desc": "People come from around the world to see your intestinal tract.",
  496. },
  497. {
  498. "name": "Double Double Deckers",
  499. "desc": "Hard to swallow, true, but filling nonetheless."
  500. }
  501. ],
  502. "house": [
  503. {
  504. "name": "Second Story",
  505. "desc": "Twice as many snacks, half as much chewing."
  506. },
  507. {
  508. "name": "Remodeling",
  509. "desc": "Strip out that icky asbestos."
  510. },
  511. {
  512. "name": "Smaller Yards",
  513. "desc": "Less wasted space. More wasted homes."
  514. },
  515. {
  516. "name": "House Parties",
  517. "desc": "More people! More party! More prey!"
  518. },
  519. {
  520. "name": "Suburbia",
  521. "desc": "It's like a buffet line!"
  522. }
  523. ],
  524. "apartment": [
  525. {
  526. "name": "Rent Subsidies",
  527. "desc": "Encourage high-density living. Enjoy the result."
  528. },
  529. {
  530. "name": "High-Rises",
  531. "desc": "These sure are some Tilted Towers..."
  532. },
  533. {
  534. "name": "Reverse Eviction",
  535. "desc": "Forcibly putting people IN your lunch!"
  536. },
  537. {
  538. "name": "Higher High-Rises",
  539. "desc": "Almost as tall as you! Almost."
  540. },
  541. {
  542. "name": "Vertical Beds",
  543. "desc": "You can fit way more people in a studio apartment with this one weird tip..."
  544. }
  545. ],
  546. "block": [
  547. {
  548. "name": "Street Sweepers",
  549. "desc": "Keeps the gunk off the sidewalk, and thus, off your tongue."
  550. },
  551. {
  552. "name": "Zoning Laws",
  553. "desc": "Mandatory prey-per-square-meter requirements."
  554. },
  555. {
  556. "name": "Alleyway Appetizers",
  557. "desc": "You can fit people *between* the buildings."
  558. },
  559. {
  560. "name": "Block Party",
  561. "desc": "Everyone's invited!"
  562. },
  563. {
  564. "name": "Vertical Blocks",
  565. "desc": "There's no reason you can't stack them on top of each other, right?"
  566. }
  567. ],
  568. "town": [
  569. {
  570. "name": "Going to Town",
  571. "desc": "That's where the food is."
  572. },
  573. {
  574. "name": "Going to Town, II: Revelations",
  575. "desc": "That's where the food is, again."
  576. },
  577. {
  578. "name": "Going to Town 0: Origins",
  579. "desc": "That's where the food was."
  580. },
  581. {
  582. "name": "Going to Town III: Revengeance",
  583. "desc": "Look, it's just how nature works. Food gets ate."
  584. },
  585. {
  586. "name": "Going to Town IV: Endgame",
  587. "desc": "Food IS something one considers when eating the universe."
  588. }
  589. ],
  590. "city": [
  591. {
  592. "name": "Gridlock",
  593. "desc": "Keeps people within arm's reach."
  594. },
  595. {
  596. "name": "Skyscrapers",
  597. "desc": "Corn on the cob? Corn on the cob."
  598. },
  599. {
  600. "name": "Protest March",
  601. "desc": "\"We have rights!\" chants the crowd. Unfortunately, they also have calories."
  602. },
  603. {
  604. "name": "Urban Sprawl",
  605. "desc": "What a lovely spread of Hors d'oeuvres!"
  606. },
  607. {
  608. "name": "Sim City",
  609. "desc": "You wouldn't download a city."
  610. }
  611. ],
  612. "metro": [
  613. {
  614. "name": "Suburbia",
  615. "desc": "As far as the eye can see!"
  616. },
  617. {
  618. "name": "Mass Transit",
  619. "desc": "Mass transit? Ass transit."
  620. },
  621. {
  622. "name": "Slackened Building Codes",
  623. "desc": "Who cares about things over 'overcrowding'?"
  624. },
  625. {
  626. "name": "Over-Ground Subway",
  627. "desc": "Putting the subway above-ground makes it a *lot* easier to feed on."
  628. },
  629. {
  630. "name": "No Building Codes",
  631. "desc": "Just cram people inside."
  632. }
  633. ],
  634. "county": [
  635. {
  636. "name": "County Roads",
  637. "desc": "Eh, close enough."
  638. },
  639. {
  640. "name": "Redistricting",
  641. "desc": "Optimize your snacking excursions."
  642. },
  643. {
  644. "name": "Peoplesheds",
  645. "desc": "Like watersheds, but, you know, people."
  646. },
  647. {
  648. "name": "Economic Stimulus",
  649. "desc": "Just kidding! It's just an excuse to devour more people."
  650. },
  651. {
  652. "name": "Giant Pile of People",
  653. "desc": "Literally no pretenses anymore. You're just eating big piles of people."
  654. }
  655. ],
  656. "state": [
  657. {
  658. "name": "States' Rights",
  659. "desc": "...to feed you lots and lots of people."
  660. },
  661. {
  662. "name": "Interstate Commerce",
  663. "desc": "Exports: People. Imports: Not people."
  664. },
  665. {
  666. "name": "Gerrymandering",
  667. "desc": "Unethical? Yes. Illegal? Maybe. Delicious? Absolutely!"
  668. },
  669. {
  670. "name": "State of Hunger",
  671. "desc": "It's a regional emergency! Feed the poor beast!"
  672. },
  673. {
  674. "name": "Arcologies",
  675. "desc": "Just put everyone in one building. One big building."
  676. }
  677. ],
  678. "country": [
  679. {
  680. "name": "Country Roads",
  681. "desc": "Take me hooooooome / to the plaaaaaace / where GULP."
  682. },
  683. {
  684. "name": "Election Mawnth",
  685. "desc": "Get out the vote! Get in the monster!"
  686. },
  687. {
  688. "name": "Voretime Economy",
  689. "desc": "Better than a wartime economy."
  690. },
  691. {
  692. "name": "Two-Party Stomach",
  693. "desc": "We take the parties, and we put them in the stomach. Truly bipartisan!"
  694. },
  695. {
  696. "name": "Civil Vore",
  697. "desc": "I ran out of puns."
  698. },
  699. ],
  700. "continent": [
  701. {
  702. "name": "Continental Drift",
  703. "desc": "Drifting right into your mouth."
  704. },
  705. {
  706. "name": "Queso",
  707. "desc": "To go with the continent chips."
  708. },
  709. {
  710. "name": "More Queso",
  711. "desc": "To go with the queso and the continent chips."
  712. },
  713. {
  714. "name": "Pangaea",
  715. "desc": "It's like a BIG corn chip."
  716. },
  717. {
  718. "name": "Extra Dip",
  719. "desc": "MORE."
  720. }
  721. ],
  722. "planet": [
  723. {
  724. "name": "Flat Earth Rebuttal",
  725. "desc": "A flat earth wouldn't have the chewy center."
  726. },
  727. {
  728. "name": "Extra Quarters",
  729. "desc": "To put in the gumball machine."
  730. },
  731. {
  732. "name": "Earth-Like Planets",
  733. "desc": "They're a *lot* easier to eat than the gas giants."
  734. },
  735. {
  736. "name": "Ringworlds",
  737. "desc": "They're artificial, yes, but they're very nutritious."
  738. },
  739. {
  740. "name": "BFG",
  741. "desc": "The Big Fucking Gumball"
  742. }
  743. ],
  744. "solar-system": [
  745. {
  746. "name": "Sol Survivor",
  747. "desc": "Just kidding! Sol didn't survive."
  748. },
  749. {
  750. "name": "Solar Snacks",
  751. "desc": "Betcha' can't just eat one."
  752. },
  753. {
  754. "name": "Orbital Plain",
  755. "desc": "Sometimes you just want the vanilla flavor."
  756. },
  757. {
  758. "name": "Comet Cruncher",
  759. "desc": "A refreshing icy treat."
  760. },
  761. {
  762. "name": "Vorrery",
  763. "desc": "Orrery. Vorrery. Heh."
  764. }
  765. ],
  766. "galaxy": [
  767. {
  768. "name": "Galactic Hitman",
  769. "desc": "You're basically a hitman, right? You're taking people out."
  770. },
  771. {
  772. "name": "Mass Effect",
  773. "desc": "All of the mass you're eating is gonna have an effect on your waistline."
  774. },
  775. {
  776. "name": "Star Vores",
  777. "desc": "Munch."
  778. },
  779. {
  780. "name": "Star Citizens",
  781. "desc": "I'm sure we'll get to eat them eventually."
  782. },
  783. {
  784. "name": "Good Old Galaxies",
  785. "desc": "There are some great gems out there."
  786. }
  787. ],
  788. "universe": [
  789. {
  790. "name": "Universal Healthcare",
  791. "desc": "Gotta keep everyone in peak condition, right?"
  792. },
  793. {
  794. "name": "Big Crunch",
  795. "desc": "A heckin cromch."
  796. },
  797. {
  798. "name": "Bigger Cosmological Constant",
  799. "desc": "I don't know what this does, but it sure makes things tastier!"
  800. },
  801. {
  802. "name": "Big Bang 2",
  803. "desc": "If the big bang was so good..."
  804. },
  805. {
  806. "name": "Spacetime Salad",
  807. "desc": "Don't forget the quantum salt!"
  808. }
  809. ],
  810. "multiverse": [
  811. {
  812. "name": "Theory of Everything",
  813. "desc": "My theory: everything is edible."
  814. },
  815. {
  816. "name": "Extradimensional Fork",
  817. "desc": "To eat the multiverses with, duh."
  818. },
  819. {
  820. "name": "Multi-Multiverses",
  821. "desc": "Eh, why not?"
  822. },
  823. {
  824. "name": "More Food",
  825. "desc": "We're running out of ideas here."
  826. },
  827. {
  828. "name": "Gorge 2",
  829. "desc": "Coming Soon™"
  830. }
  831. ],
  832. }
  833. let prodAllUpgradeText = [
  834. {
  835. "name": "Sloth Metabolism",
  836. "desc": "Burn those calories. Eventually."
  837. },
  838. {
  839. "name": "Decent Metabolism",
  840. "desc": "Picking up the pace."
  841. },
  842. {
  843. "name": "Perky Metabolism",
  844. "desc": "Sweat a little."
  845. },
  846. {
  847. "name": "Quick Metabolism",
  848. "desc": "Burn those calories."
  849. },
  850. {
  851. "name": "Speedy Metabolism",
  852. "desc": "More prey, more power."
  853. },
  854. {
  855. "name": "Fast Metabolism",
  856. "desc": "You're a furnace. Fueled by people."
  857. },
  858. {
  859. "name": "Powerful Metabolism",
  860. "desc": "Digest them all."
  861. },
  862. {
  863. "name": "Unbelievable Metabolism",
  864. "desc": "Digest them all and more."
  865. },
  866. {
  867. "name": "Supernatural Metabolism",
  868. "desc": "Digest everything."
  869. },
  870. {
  871. "name": "Godly Metabolism",
  872. "desc": "Digest."
  873. }
  874. ]
  875. const clickUpgradeText = [
  876. {
  877. "name": "Grabby Hands",
  878. "desc": "Gathers prey, opens rooftops"
  879. },
  880. {
  881. "name": "Long Tongue",
  882. "desc": "Catches stragglers, tastes architecture"
  883. },
  884. {
  885. "name": "Sharp Eyes",
  886. "desc": "Spots snacks, probably unblinking"
  887. },
  888. {
  889. "name": "Sensitive Nose",
  890. "desc": "Sniffs meals, savors scents"
  891. },
  892. {
  893. "name": "Sensitive Ears",
  894. "desc": "Hears screams, finds leftovers"
  895. },
  896. {
  897. "name": "Greedy Hands",
  898. "desc": "Hoards prey, no leftovers"
  899. },
  900. {
  901. "name": "Nimble Tongue",
  902. "desc": "Snares snacks, without escape"
  903. },
  904. {
  905. "name": "Eagle Eyes",
  906. "desc": "Scans streets, always keen"
  907. },
  908. {
  909. "name": "Keen Nose",
  910. "desc": "Finds prey, never fooled"
  911. },
  912. {
  913. "name": "Perfect Ears",
  914. "desc": "Senses scuttles, won't relent"
  915. },
  916. ]
  917. const helperUpgradeText = {
  918. "anthro": {
  919. "micro": [
  920. {
  921. "name": "Gatherers",
  922. "desc": "Why bother chasing them, really?"
  923. },
  924. {
  925. "name": "Servants",
  926. "desc": "Why bother walking anywhere, really?"
  927. },
  928. ]
  929. }
  930. }
  931. const clickVictimUpgradeText = {
  932. "anthro": {
  933. "name": "Same-Size Prey",
  934. "desc": "Devour an anthro with every click"
  935. },
  936. "car": {
  937. "name": "Car Crusher",
  938. "desc": "Consume a car with every click"
  939. },
  940. "bus": {
  941. "name": "Bus Buffet",
  942. "desc": "Swallow an entire bus with every click"
  943. },
  944. "house": {
  945. "name": "Homewrecker",
  946. "desc": "Eat a home with every click"
  947. },
  948. "apartment": {
  949. "name": "Rent-Seeker",
  950. "desc": "Guzzle an apartment with every click"
  951. },
  952. "block": {
  953. "name": "Block Breaker",
  954. "desc": "Gulp an entire block with every click"
  955. },
  956. "town": {
  957. "name": "Town Terrorizer",
  958. "desc": "Bolt down a whole town with every click"
  959. },
  960. "city": {
  961. "name": "City Cafe",
  962. "desc": "Feast on an entire city with every click"
  963. },
  964. "metro": {
  965. "name": "Metro Muncher",
  966. "desc": "Polish off a metropolis with every click"
  967. },
  968. "county": {
  969. "name": "County Glurk",
  970. "desc": "Ingest an entire county with every click"
  971. },
  972. "state": {
  973. "name": "Stomached State",
  974. "desc": "Gobble an entire state with every click"
  975. },
  976. "country": {
  977. "name": "Country Chow",
  978. "desc": "Erase a country with every click"
  979. },
  980. "continent": {
  981. "name": "Continental Drift",
  982. "desc": "Chow down on a continent with every click"
  983. },
  984. "planet": {
  985. "name": "Popcorn Planets",
  986. "desc": "Ingest a planet whole with every click"
  987. },
  988. "solar-system": {
  989. "name": "Solar Snacks",
  990. "desc": "Dine on whole solar systems with every click"
  991. },
  992. "galaxy": {
  993. "name": "Galactic Center",
  994. "desc": "Dispatch a galaxy with every click"
  995. },
  996. "universe": {
  997. "name": "Universal Predator",
  998. "desc": "Digest a universe with every click"
  999. },
  1000. "multiverse": {
  1001. "name": "Omniscience",
  1002. "desc": "Gorge on the multiverse"
  1003. }
  1004. };
  1005. const powerupFreqUpgradeText = [
  1006. {
  1007. name: "All-You-Can-Eat",
  1008. desc: "Pour on the powerups.",
  1009. },
  1010. {
  1011. name: "Buffet",
  1012. desc: "Chow down on more and more.",
  1013. },
  1014. {
  1015. name: "Bottomless Bowl",
  1016. desc: "Eat up!",
  1017. },
  1018. {
  1019. name: "Endless Edibles",
  1020. desc: "For every one you eat, two more appear.",
  1021. },
  1022. {
  1023. name: "UNLIMITED BREADSTICKS",
  1024. desc: "UNLIMITED BREADSTICKS",
  1025. }
  1026. ]
  1027. // to avoid yoinking stuff from global variables directly...
  1028. // state.ownedUpgrades == ownedUpgrades
  1029. // state.resources == resources
  1030. // state.currentProductivity == currentProductivity
  1031. // state.belongings == belongings
  1032. const news = [
  1033. {
  1034. condition: state => {
  1035. return true;
  1036. },
  1037. lines: [
  1038. state => "This is news.",
  1039. state => "This is also news.",
  1040. state => "SPORTS!"
  1041. ]
  1042. },
  1043. {
  1044. condition: state => {
  1045. return state.resources.food > 100;
  1046. },
  1047. lines: [
  1048. state => "You have at least 100 food. Wow!"
  1049. ]
  1050. },
  1051. {
  1052. condition: state => {
  1053. return state.currentProductivity.food > 100;
  1054. },
  1055. lines: [
  1056. state => "You're eating more than 100 food per second. Wow!"
  1057. ]
  1058. },
  1059. {
  1060. condition: state => {
  1061. return state.belongings.micro.count >= 50;
  1062. },
  1063. lines: [
  1064. state => "You have at least 50 micros. Wow!"
  1065. ]
  1066. }
  1067. ]
  1068. const powerups = {
  1069. "instant-food": {
  1070. name: "Free Food",
  1071. description: "Tasty!",
  1072. icon: "fa-drumstick-bite",
  1073. effect: state => state.resources.food += 10000,
  1074. popup: (self, e) => {
  1075. clickPopup("GULP!", "gulp", [e.clientX, e.clientY]);
  1076. clickPopup("+10000 food", "food", [e.clientX, e.clientY]);
  1077. }
  1078. },
  1079. "free-car": {
  1080. name: "Free Car",
  1081. description: "It's FREE!",
  1082. icon: "fa-car",
  1083. effect: state => state.belongings.car.count += 1,
  1084. popup: (self, e) => {
  1085. clickPopup("CAR!", "gulp", [e.clientX, e.clientY]);
  1086. clickPopup("+1 car", "food", [e.clientX, e.clientY]);
  1087. }
  1088. },
  1089. "double": {
  1090. name: "Double Dip",
  1091. description: "Doubled productivity!",
  1092. icon: "fa-cogs",
  1093. duration: 10000,
  1094. effect: state => state.currentProductivity.food *= 2,
  1095. popup: (self, e) => {
  1096. clickPopup("VROOM!", "gulp", [e.clientX, e.clientY]);
  1097. }
  1098. }
  1099. }