cookie clicker but bigger
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

265 Zeilen
5.1 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. },
  15. "anthro": {
  16. "name": "Anthro",
  17. "plural": "Anthros",
  18. "desc": "Something more substantial to sate your hunger.",
  19. "cost": 1e2,
  20. "prod": 1e0/1.1
  21. },
  22. "car": {
  23. "name": "Car",
  24. "plural": "Cars",
  25. "desc": "Crunchy shell, tasty center.",
  26. "cost": 1e3,
  27. "prod": 1e1/1.2
  28. },
  29. "bus": {
  30. "name": "Bus",
  31. "plural": "Buses",
  32. "desc": "Probably the worst place to be when a macro is aroud.",
  33. "cost": 1e4,
  34. "prod": 1e2/1.3
  35. },
  36. "house": {
  37. "name": "House",
  38. "plural": "Houses",
  39. "desc": "Home sweet home - but it doesn't taste sweet?",
  40. "cost": 1e5,
  41. "prod": 1e3/1.4
  42. },
  43. "apartment": {
  44. "name": "Apartment",
  45. "plural": "Apartments",
  46. "desc": "More snacks, less packaging.",
  47. "cost": 1e6,
  48. "prod": 1e4/1.5
  49. },
  50. "block": {
  51. "name": "Block",
  52. "plural": "Blocks",
  53. "desc": "A whole pile of buildings.",
  54. "cost": 1e7,
  55. "prod": 1e5/1.6
  56. },
  57. "town": {
  58. "name": "Town",
  59. "plural": "Towns",
  60. "desc": "'Tourist trap' has never been this literal.",
  61. "cost": 1e8,
  62. "prod": 1e6/1.7
  63. },
  64. "city": {
  65. "name": "City",
  66. "plural": "Cities",
  67. "desc": "Please no sitty on our city.",
  68. "cost": 1e9,
  69. "prod": 1e7/1.8
  70. },
  71. "metro": {
  72. "name": "Metropolis",
  73. "plural": "Metropolises",
  74. "desc": "A big ol' city. Tasty, too.",
  75. "cost": 1e10,
  76. "prod": 1e8/1.9
  77. },
  78. "county": {
  79. "name": "County",
  80. "plural": "Counties",
  81. "desc": "Why salt the land when you can slurp it?",
  82. "cost": 1e11,
  83. "prod": 1e9/2
  84. },
  85. "state": {
  86. "name": "State",
  87. "plural": "States",
  88. "desc": "The United States is made up of...43 states - no, 42...",
  89. "cost": 1e12,
  90. "prod": 1e10/2.1
  91. },
  92. "country": {
  93. "name": "Country",
  94. "plural": "Countries",
  95. "desc": "One nation, under paw.",
  96. "cost": 1e13,
  97. "prod": 1e11/2.2
  98. },
  99. "continent": {
  100. "name": "Continent",
  101. "plural": "Continents",
  102. "desc": "Earth-shattering appetite!",
  103. "cost": 1e14,
  104. "prod": 1e12/2.3
  105. },
  106. "planet": {
  107. "name": "Planet",
  108. "plural": "Planets",
  109. "desc": "Earth appetite!",
  110. "cost": 1e15,
  111. "prod": 1e13/2.4
  112. }
  113. }
  114. const upgrade_types = {
  115. "prod": {
  116. "apply": function(effect, productivity) {
  117. return productivity * 2;
  118. },
  119. "desc": function(effect) {
  120. return "2x food production from " + effect.target;
  121. }
  122. },
  123. "prod-all": {
  124. "apply": function(effect, productivity) {
  125. return productivity * effect.amount;
  126. },
  127. "desc": function(effect) {
  128. return Math.round((effect.amount - 1) * 100) + "% increase to food production";
  129. }
  130. }
  131. }
  132. const upgrades = {
  133. "micro-prod-1": {
  134. "name": "Bigger Micros",
  135. "desc": "A macro micro? Certainly more filling.",
  136. "cost": {
  137. "food": buildings.micro.cost * 5
  138. },
  139. "effect": {
  140. "type": "prod",
  141. "target": "micro",
  142. "amount": 2,
  143. },
  144. "prereqs": {
  145. "buildings": {
  146. "micro": 1
  147. }
  148. }
  149. },
  150. "micro-prod-2": {
  151. "name": "Beefy Micros",
  152. "desc": "25% more protein, 10% fewer carbs.",
  153. "cost": {
  154. "food": buildings.micro.cost * 50
  155. },
  156. "effect": {
  157. "type": "prod",
  158. "target": "micro",
  159. "amount": 2,
  160. },
  161. "prereqs": {
  162. "buildings": {
  163. "micro": 10
  164. },
  165. "upgrades": [
  166. "micro-prod-1"
  167. ]
  168. }
  169. },
  170. "anthro-prod-1": {
  171. "name": "Willing Prey",
  172. "desc": "Why bother chasing it down?",
  173. "cost": {
  174. "food": buildings.anthro.cost * 5
  175. },
  176. "effect": {
  177. "type": "prod",
  178. "target": "anthro",
  179. "amount": 2,
  180. },
  181. "prereqs": {
  182. "buildings": {
  183. "anthro": 1
  184. }
  185. }
  186. },
  187. "anthro-prod-2": {
  188. "name": "Mesmerized Prey",
  189. "desc": "Why bother walking over to it?",
  190. "cost": {
  191. "food": buildings.anthro.cost * 50
  192. },
  193. "effect": {
  194. "type": "prod",
  195. "target": "anthro",
  196. "amount": 2,
  197. },
  198. "prereqs": {
  199. "buildings": {
  200. "anthro": 10
  201. },
  202. "upgrades": [
  203. "anthro-prod-1"
  204. ]
  205. }
  206. },
  207. "prod-1": {
  208. "name": "Sloth Metabolism",
  209. "desc": "Burn those calories. Eventually.",
  210. "cost": {
  211. "food": 5e2
  212. },
  213. "effect": {
  214. "type": "prod-all",
  215. "amount": 1.05
  216. },
  217. "prereqs": {
  218. "productivity": {
  219. "food": 1e1
  220. }
  221. },
  222. },
  223. "prod-2": {
  224. "name": "Decent Metabolism",
  225. "desc": "Picking up the pace.",
  226. "cost": {
  227. "food": 5e3
  228. },
  229. "effect": {
  230. "type": "prod-all",
  231. "amount": 1.05
  232. },
  233. "prereqs": {
  234. "productivity": {
  235. "food": 1e2
  236. },
  237. "upgrades": [
  238. "prod-1"
  239. ]
  240. },
  241. },
  242. "prod-3": {
  243. "name": "Perky Metabolism",
  244. "desc": "Sweat a little.",
  245. "cost": {
  246. "food": 5e4
  247. },
  248. "effect": {
  249. "type": "prod-all",
  250. "amount": 1.05
  251. },
  252. "prereqs": {
  253. "productivity": {
  254. "food": 1e3
  255. },
  256. "upgrades": [
  257. "prod-2"
  258. ]
  259. },
  260. }
  261. }