Advertisement
Ytterfragl

Mining Madness Code

Jul 22nd, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.06 KB | None | 0 0
  1. Let's make a game!
  2. name:Mining Madness
  3. by:Ytterfragl
  4. desc:It's mining time! Gather resources, and make the biggest tunnels ever!
  5. created:02/25/2018
  6. updated:yettobedetermined
  7. version:0.0.1
  8. Settings
  9. background:yettobedetermined
  10. building cost increase:110%
  11. building cost refund:35%
  12. //ADD SPRITES HERE IF NESSECARY
  13. no bulk particles
  14. CSS
  15. #game
  16. {
  17. background:brown;
  18. font-family:"Terminal";
  19. color:black;
  20. }
  21. CSS
  22. #game.thing.cantAfford.notOwned
  23. {
  24. filter:text-color:red;
  25. }
  26. CSS
  27. #game.thing.cantAfford.notOwned
  28. {
  29. color: black;
  30. }
  31. CSS
  32. #game.filters On
  33. {
  34. text-shadow: 3px 3px 0 black;
  35. }
  36. //I should probably experiment more with these
  37. Layout
  38. *shop
  39. contains:upgrades, buildings
  40. header:Buy things here to gain more resources!
  41. footer:More will be added soon!
  42. *statistics
  43. header:These are the overall statistics of your mining, including achievements.
  44. *resources
  45. contains:resources
  46. header:These are the things you get from mining, and you use these to buy things.
  47. *upgrades
  48. contains:upgrades
  49. in:shop
  50. header: These will boost the effect of your buildings, mining and more!
  51. *buildings
  52. contains:buildings
  53. in:shop
  54. header:These buildings will give you resources over time.
  55. *achievements
  56. contains:achievements
  57. in:statistics
  58. header:These are the achievements that you've earned in-game.
  59. *yachievements
  60. contains:tag:Yachievement
  61. in:achievements
  62. header:These achievements are incredibly difficult to obtain. There is a <b>secret<b> prize for the player who collects them all!
  63. Buttons
  64.  
  65. *pickaxe
  66. name:Pickaxe
  67. desc:Use the pickaxe to mine the ground!
  68. on click:
  69. if (chance(20%)) yield (1 + shovels) clay
  70. if (have pickaxeupgrade1) yield (1 + drills) stone
  71. if (have pickaxeupgrade1 and chance(20%)) yield (1 + drills) copper
  72. if (have pickaxeupgrade1 and chance(10%)) yield 1 tin
  73. yield (1 + shovels) dirt
  74. $cps=$cps+1
  75. end
  76. on tick:$cps=0
  77.  
  78. *dirttomoney
  79. name:Dirt Exchange
  80. desc:Sell your dirt for money!
  81. on click:
  82. if (dirt >= 10)
  83. lose 10 dirt
  84. yield 1 money
  85. end
  86. end
  87.  
  88. *claytomoney
  89. name:Clay Exchange
  90. desc:Sell your clay for money!
  91. on click:
  92. if (clay >= 10)
  93. lose 10 clay
  94. yield 5 money
  95. end
  96. end
  97.  
  98. *stonetomoney
  99. name:Stone Exchange
  100. desc:Sell your stone for money!
  101. on click:
  102. if (stone >= 10)
  103. lose 10 stone
  104. yield 10 money
  105. end
  106. end
  107.  
  108. *coppertomoney
  109. name:Copper Exchange
  110. desc:Sell your copper for money!
  111. on click:
  112. if (copper >= 10)
  113. lose 10 copper
  114. yield 20 money
  115. end
  116. end
  117.  
  118. *tintomoney
  119. name: Tin Exchange
  120. desc:Sell your tin for money!
  121. on click:
  122. if (tin >= 10)
  123. lose 10 tin
  124. yield 15 money
  125. end
  126. end
  127.  
  128. *bronzemaker
  129. name:Bronze Maker
  130. desc:Combine your copper and tin to make bronze!
  131. on click:
  132. if (copper >= 8 and tin >= 2)
  133. lose 8 copper
  134. lose 2 tin
  135. yield 10 bronze
  136. end
  137. end
  138. Resources
  139.  
  140. *money
  141. name:Money
  142. desc:The stuff that makes the world go round!
  143. start with: 50
  144. *dirt
  145. name:Dirt
  146. desc:Extremely abundant. Not very useful.
  147. *clay
  148. name:Clay
  149. desc:More useful than dirt, and can be made into many things.
  150. *stone
  151. name:Stone
  152. desc:A very sturdy material, many opportunities available.
  153. hidden
  154. req:have pickaxeupgrade1
  155. *copper
  156. name:Copper
  157. desc:Conductive, and quite common.
  158. hidden
  159. req:have pickaxeupgrade1
  160. *tin
  161. name:Tin
  162. desc:Used to make a variety of alloys, including bronze.
  163. hidden
  164. req:have pickaxeupgrade1
  165. *bronze
  166. name:Bronze
  167. desc:An alloy made from copper and tin.
  168. hidden when 0
  169. *coal
  170. name:Coal
  171. desc:A material made from carbon, commonly used as a fuel source.
  172. *iron
  173. name:Iron
  174. desc:A sturdy metal. Used for making steel.
  175. *ytterbium
  176. name:Ytterbium
  177. desc:Ytterfragl is proud of you!
  178. hidden when 0
  179. Buildings
  180.  
  181. *shovel|shovels
  182. name:Makeshift Shovel
  183. desc:A very weak shovel, but it still sorta works.</>Increases dirt and clay production by 1.
  184. tag:tool
  185. cost:10 dirt, 2 clay
  186. shown
  187.  
  188. *digger|diggers
  189. name:Digger
  190. desc:This kind digger will shovel the ground for you.</>Produces 1 dirt or clay every 4 seconds.
  191. tag:worker
  192. cost:10 money
  193. hidden
  194. req:50 dirt, 10 clay
  195. on tick:
  196. $diggerdirtorclay=random(1,5)
  197. if ($diggerdirtorclay=5) yield 0.25 clay
  198. if ($diggerdirtorclay<5) yield 0.25 dirt
  199. end
  200.  
  201. *miner|miners
  202. name: Miner
  203. desc:A miner that gathers stone for you!</>Gains 1 stone per second.
  204. tag:worker
  205. cost:35 money
  206. hidden
  207. req:10 stone
  208. on tick:yield 1 stone
  209.  
  210. *drill|drills
  211. name:Jackhammer
  212. desc:A giant drill used for digging holes.</>Increases stone, copper and tin production by 1.
  213. tag:tool
  214. cost:20 stone, 5 copper
  215. hidden
  216. req:10 stone, 1 copper
  217.  
  218. *mine|mines
  219. name:Mineshaft
  220. desc:An entire area dedicated to mining!</>Collects stone and some metals.
  221. tag:building
  222. cost:50 stone, 100 money
  223. hidden
  224. req:100 money, 75 stone, 25 copper, 10 tin
  225. on tick:
  226. $mineresource=random(1,100)
  227. if ($mineresource>=30) yield 1 copper
  228. else if ($mineresource>=50) yield 1 tin
  229. else if ($mineresource>=60) yield 1 coal
  230. else if ($mineresource>=65) yield 1 iron
  231. else yield 1 stone
  232. end
  233.  
  234. Upgrades
  235.  
  236. *pickaxeupgrade1
  237. name:Pickaxe Upgrade I
  238. desc:This will make your pickaxe stronger.</>Enables more resources to be gathered.
  239. cost:25 clay, 100 money
  240. hidden
  241. req:20 clay, 80 money
  242. passive:multiply yield of pickaxe by 2
  243.  
  244. *shovelboost1
  245. name:Sturdy Reinforcement
  246. desc:Now those shovels will be more useful!</>Doubles effect of all shovels.
  247. cost:20 stone
  248. hidden
  249. req:10 shovels, 15 stone
  250. Achievements
  251.  
  252. *1dirt
  253. name:First Dirt
  254. desc:Mine 1 dirt.
  255. req:1 dirt
  256. *1kdirt
  257. name:Dirty Business
  258. desc:Mine 1,000 dirt.
  259. req:dirt:earned>=1000
  260. *1mdirt
  261. name:Roll in the Dirt
  262. desc:Mine 1 million dirt.
  263. req:dirt:earned>=1000000
  264. *1clay
  265. name:At Least it's Useful
  266. desc:Mine 1 clay.
  267. req:1 clay
  268. *1kclay
  269. name:Pile of Bricks
  270. desc:Mine 1,000 clay.
  271. req:clay:earned>=1000
  272. *1mclay
  273. name:Brick Wall
  274. desc:Mine 1 million clay.
  275. req:clay:earned>=1000000
  276. *1stone
  277. name:Rock Solid
  278. desc:Mine 1 stone
  279. req:1 stone
  280. *1kstone
  281. name:Found it Under a Rock
  282. desc:Mine 1,000 stone.<q>Wait a minute, it <b>is<b> the rock!<q>
  283. req:stone:earned>=1000
  284. *1mstone
  285. name:Rock Concert
  286. desc:Mine 1 million stone.
  287. req:stone:earned>=1000000
  288. *1copper
  289. name:It's not bronze!
  290. desc:Mine 1 copper.
  291. req:1 copper
  292. *1kcopper
  293. name:Copper Wire
  294. desc:Mine 1000 copper.
  295. req:copper:earned>=1000
  296. *1mcopper
  297. name:Just add Tin
  298. desc:Mine 1 million copper.
  299. req:copper:earned>=1000000
  300. *1tin
  301. name:Tin Can
  302. desc:Mine 1 tin.
  303. req:1 tin
  304. *1ktin
  305. name:Protective Coating
  306. desc:Mine 1000 tin.
  307. req:tin:earned>=1000
  308. *1mtin
  309. name:Just add Copper
  310. desc:Mine 1 million tin.
  311. req:tin:earned>=1000000
  312. *1bronze
  313. name:Tin and Copper
  314. desc:Make 1 bronze.
  315. req:1 bronze
  316. *1kbronze
  317. name:Copper and Tin
  318. desc:Make 1,000 bronze.
  319. req:bronze:earned>=1000
  320. *1mbronze
  321. name:Bronze Medal
  322. desc:Make 1 million bronze.<q>At least you made the top 3!<q>
  323. *1click
  324. name:Time to Mine
  325. desc:Click the pickaxe once.<q>That's the way!<q>
  326. req:1 pickaxe:clicks
  327. *1kclicks
  328. name:Mine a Bit
  329. desc:Click the pickaxe 1,000 times.<q>Remember to take breaks!<q>
  330. req:1000 pickaxe:clicks
  331. *100kclicks
  332. name:Mine a Lot
  333. desc:Click the pickaxe 100,000 times.<q>Haven't you had enough already?<q>
  334. req:100000 pickaxe:clicks
  335. *1mclicks
  336. name:Frantic Miner
  337. desc:Click the pickaxe 1 million times.<q>You've been playing all this time, <i>right?<i><q>
  338. req:1000000 pickaxe:clicks
  339. *10mclicks
  340. name:Dedicated Miner
  341. desc:Click 10 million times.<q>You've been playing for a <b>really<b> long time now.<q>
  342. tag:Yachievement
  343. req:10000000 pickaxe:clicks
  344. on earn:toast You have received a Y-achievement!!
  345. hidden when 0
  346. *8cps
  347. name:Hyper-Clicker
  348. desc:Click quite fast.<q>Not bad, but could you do a little better?<q>
  349. req:$cps>=8
  350. *12cps
  351. name:Extreme Clicker
  352. desc:Click <i>very<i> fast.<q>You're pretty good!<q>
  353. req:$cps>=12
  354. *16cps
  355. name:Insane Clicker
  356. desc:Click your way into insanity.<q><b><i>WOW,<i><b> you know how to click!<q>
  357. tag:Yachievement
  358. req:$cps>=16
  359. on earn:toast You have received a Y-achievement!!
  360. hidden when 0
  361.  
  362. Shinies
  363. *mouse
  364. name:Mouse Pickaxe
  365. frequency:10
  366. duration:10
  367. no click
  368. movement:onMouse followMouse
  369. //add an icon for this
  370.  
  371. *ruby
  372. name:Ruby
  373. frequency:300
  374. frequency variation:300
  375. duration:15
  376. movement:anywhere spinCW moveRandom fade
  377. on click:
  378. $moneyfromruby=max(100,money:earned/100)
  379. //toast You have earned [$moneyfromruby] money!
  380. yield $moneyfromruby money
  381. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement