constants.lua 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. shipList = {
  2. {
  3. model = "Llama",
  4. cost = 10000,
  5. hullStrength = 25,
  6. attack = 10,
  7. speed = 10,
  8. maxFuel = 10,
  9. code = 1
  10. },
  11. {
  12. model = "Pigeon",
  13. cost = 15000,
  14. hullStrength = 25,
  15. attack = 5,
  16. speed = 11,
  17. maxFuel = 30,
  18. code = 2
  19. },
  20. {
  21. model = "Hyena",
  22. cost = 21000,
  23. hullStrength = 25,
  24. attack = 4,
  25. speed = 0,
  26. maxFuel = 10,
  27. code = 3
  28. },
  29. {
  30. model = "Shark",
  31. cost = 25000,
  32. hullStrength = 80,
  33. attack = 4,
  34. speed = 0,
  35. maxFuel = 10,
  36. code = 4
  37. },
  38. {
  39. model = "Mammoth",
  40. cost = 30000,
  41. hullStrength = 120,
  42. attack = 5,
  43. speed = 0,
  44. maxFuel = 8,
  45. code = 5
  46. },
  47. {
  48. model = "Koala",
  49. cost = 37000,
  50. hullStrength = 80,
  51. attack = 3,
  52. speed = 0,
  53. maxFuel = 20,
  54. code = 6
  55. },
  56. {
  57. model = "Spider",
  58. cost = 45000,
  59. hullStrength = 50,
  60. attack = 4,
  61. speed = 0,
  62. maxFuel = 100,
  63. code = 7
  64. },
  65. {
  66. model = "Gorilla",
  67. cost = 53000,
  68. hullStrength = 70,
  69. attack = 5,
  70. speed = 0,
  71. maxFuel = 120,
  72. code = 8
  73. },
  74. {
  75. model = "Giraffe",
  76. cost = 64000,
  77. hullStrength = 196,
  78. attack = 10,
  79. speed = 0,
  80. maxFuel = 10,
  81. code = 9
  82. },
  83. {
  84. model = "Stork",
  85. cost = 78000,
  86. hullStrength = 237,
  87. attack = 13,
  88. speed = 0,
  89. maxFuel = 10,
  90. code = 10
  91. },
  92. {
  93. model = "Elephant",
  94. cost = 94000,
  95. hullStrength = 285,
  96. attack = 15,
  97. speed = 0,
  98. maxFuel = 10,
  99. code = 11
  100. },
  101. {
  102. model = "Mule",
  103. cost = 110000,
  104. hullStrength = 344,
  105. attack = 19,
  106. speed = 0,
  107. maxFuel = 10,
  108. code = 12
  109. },
  110. {
  111. model = "Tiger",
  112. cost = 130000,
  113. hullStrength = 414,
  114. attack = 22,
  115. speed = 0,
  116. maxFuel = 10,
  117. code = 13
  118. },
  119. {
  120. model = "Rhino",
  121. cost = 160000,
  122. hullStrength = 499,
  123. attack = 27,
  124. speed = 0,
  125. maxFuel = 10,
  126. code = 14
  127. },
  128. {
  129. model = "Pelican",
  130. cost = 200000,
  131. hullStrength = 601,
  132. attack = 33,
  133. speed = 0,
  134. maxFuel = 10,
  135. code = 15
  136. },
  137. {
  138. model = "Penguin",
  139. cost = 240000,
  140. hullStrength = 724,
  141. attack = 40,
  142. speed = 0,
  143. maxFuel = 10,
  144. code = 16
  145. },
  146. {
  147. model = "Moose",
  148. cost = 290000,
  149. hullStrength = 873,
  150. attack = 48,
  151. speed = 0,
  152. maxFuel = 10,
  153. code = 17
  154. },
  155. {
  156. model = "Zebra",
  157. cost = 340000,
  158. hullStrength = 1052,
  159. attack = 58,
  160. speed = 1,
  161. maxFuel = 10,
  162. code = 18
  163. },
  164. {
  165. model = "Kestrel",
  166. cost = 420000,
  167. hullStrength = 1267,
  168. attack = 70,
  169. speed = 1,
  170. maxFuel = 10,
  171. code = 19
  172. }
  173. }
  174. for i, ship in ipairs(shipList) do
  175. shipList[ship.model] = ship
  176. end
  177. commodityList = {
  178. {
  179. name = "Water",
  180. baseCost = 50,
  181. baseStock = 30,
  182. legal = true,
  183. expensiveText = "I have heard there is a drought.",
  184. cheapText = "A new water source was discovered."
  185. },
  186. {
  187. name = "Furs",
  188. baseCost = 300,
  189. baseStock = 30,
  190. legal = true,
  191. expensiveText = "Weather is colder than usual.",
  192. cheapText = "Weather is warmer than usual."
  193. },
  194. {
  195. name = "Food",
  196. baseCost = 100,
  197. baseStock = 60,
  198. legal = true,
  199. expensiveText = "There are rumors of a famine.",
  200. cheapText = "There was a high crop yield."
  201. },
  202. {
  203. name = "Ore",
  204. baseCost = 500,
  205. baseStock = 30,
  206. legal = true,
  207. expensiveText = "There are rumors of war.",
  208. cheapText = "A peace agreement is predicted."
  209. },
  210. {
  211. name = "Games",
  212. baseCost = 200,
  213. baseStock = 10,
  214. legal = true,
  215. expensiveText = "The birth rate is rising.",
  216. cheapText = "The birth rate is decreasing."
  217. },
  218. {
  219. name = "Guns",
  220. baseCost = 900,
  221. baseStock = 30,
  222. legal = true,
  223. expensiveText = "Terrorism is on the rise.",
  224. cheapText = "Terrorism has been stamped out."
  225. },
  226. {
  227. name = "Medicine",
  228. baseCost = 500,
  229. baseStock = 30,
  230. legal = true,
  231. expensiveText = "A terrible virus is spreading.",
  232. cheapText = "The plague is under control."
  233. },
  234. {
  235. name = "Computers",
  236. baseCost = 800,
  237. baseStock = 60,
  238. legal = true,
  239. expensiveText = "There was a technological collapse.",
  240. cheapText = "There was a technological boom."
  241. },
  242. {
  243. name = "Narcotics",
  244. baseCost = 2500,
  245. baseStock = 10,
  246. legal = true,
  247. expensiveText = "Drug addiction rates are high.",
  248. cheapText = "Drug addiction rates are low."
  249. },
  250. {
  251. name = "Machinery",
  252. baseCost = 1000,
  253. baseStock = 30,
  254. legal = true,
  255. expensiveText = "They are rapidly industrializing.",
  256. cheapText = "Manufacturing is in decline."
  257. }
  258. }
  259. for i, commodity in ipairs(commodityList) do
  260. commodityList[commodity.name] = commodity
  261. commodity.code = i
  262. end
  263. serviceList = {
  264. {
  265. name = "Repair Ship",
  266. cost = 125
  267. },
  268. {
  269. name = "Refuel Ship",
  270. cost = 75
  271. },
  272. {
  273. name = "Sleep 1 Night",
  274. cost = 5
  275. },
  276. {
  277. name = "Sleep 10 Nights",
  278. cost = 50
  279. }
  280. }
  281. for i, service in ipairs(serviceList) do
  282. serviceList[service.name] = service
  283. end
  284. sun = {
  285. name = "Sun",
  286. coordinates = { x = 79, y = 79 }
  287. }
  288. planetList = {
  289. {
  290. name = "Mercury",
  291. shipyard = { "Llama", "Hyena", "Shark", "Pigeon" },
  292. startingCoordinates = { x = 100, y = 100 },
  293. lawfulRating = 0.5,
  294. code = 1,
  295. yearTime = 88
  296. },
  297. {
  298. name = "Venus",
  299. shipyard = { "Llama", "Hyena", "Shark" },
  300. startingCoordinates = { x = 122, y = 122 },
  301. lawfulRating = 0.75,
  302. code = 2,
  303. yearTime = 225
  304. },
  305. {
  306. name = "Earth",
  307. shipyard = { "Llama", "Hyena", "Shark" },
  308. startingCoordinates = { x = 140, y = 140 },
  309. lawfulRating = 0.9,
  310. code = 3,
  311. yearTime = 365
  312. },
  313. {
  314. name = "Mars",
  315. shipyard = { "Llama", "Hyena", "Shark", "Koala", "Spider", "Gorilla" },
  316. startingCoordinates = { x = 174, y = 174 },
  317. lawfulRating = 0.85,
  318. code = 4,
  319. yearTime = 687
  320. },
  321. {
  322. name = "Jupiter",
  323. shipyard = { "Llama", "Hyena", "Shark", "Koala", "Spider", "Gorilla" },
  324. startingCoordinates = { x = 416, y = 416 },
  325. lawfulRating = 0.5,
  326. code = 5,
  327. yearTime = 4333
  328. },
  329. {
  330. name = "Saturn",
  331. shipyard = { "Koala", "Spider", "Gorilla" },
  332. startingCoordinates = { x = 800, y = 800 },
  333. lawfulRating = 0.3,
  334. code = 6,
  335. yearTime = 10756
  336. }
  337. }
  338. for i, planet in ipairs(planetList) do
  339. planetList[planet.name] = planet
  340. planet.credits = 1e100
  341. planet.coordinates = {}
  342. planet.coordinates.x = planet.startingCoordinates.x
  343. planet.coordinates.y = planet.startingCoordinates.y
  344. planet.commodityList = {}
  345. planet.commodities = {}
  346. planet.commodityRates = {}
  347. for j, commodity in ipairs(commodityList) do
  348. table.insert(planet.commodityList, commodity.name)
  349. planet.commodityRates[commodity.name] = 1
  350. planet.commodities[commodity.name] = commodity.baseStock
  351. end
  352. end
  353. local planetConnections = {
  354. { "Mercury", "Venus" },
  355. { "Mercury", "Earth" },
  356. { "Mercury", "Mars" },
  357. { "Venus", "Earth" },
  358. { "Venus", "Mars" },
  359. { "Earth", "Mars" },
  360. { "Mars", "Jupiter" },
  361. { "Jupiter", "Saturn" }
  362. }
  363. commodityResaleFactor = 0.72
  364. shipResaleFactor = 0.63