cookie clicker but bigger
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

1235 行
27 KiB

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