@c3d.gg/mwi-types 0.2.4 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +110 -495
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/domains/abilities/abilities.json +3331 -0
  5. package/dist/domains/abilities/constants.d.ts +3 -0
  6. package/dist/domains/abilities/constants.d.ts.map +1 -0
  7. package/dist/domains/abilities/constants.js +97 -0
  8. package/dist/domains/abilities/constants.js.map +1 -0
  9. package/dist/domains/abilities/index.d.ts +3 -0
  10. package/dist/domains/abilities/index.d.ts.map +1 -0
  11. package/dist/domains/abilities/index.js +2 -0
  12. package/dist/domains/abilities/index.js.map +1 -0
  13. package/dist/domains/abilities/types.d.ts +37 -0
  14. package/dist/domains/abilities/types.d.ts.map +1 -0
  15. package/dist/domains/abilities/types.js +2 -0
  16. package/dist/domains/abilities/types.js.map +1 -0
  17. package/dist/domains/actions/action_categories.json +356 -0
  18. package/dist/domains/actions/action_types.json +57 -0
  19. package/dist/domains/actions/actions.json +41966 -0
  20. package/dist/domains/actions/constants.d.ts +7 -0
  21. package/dist/domains/actions/constants.d.ts.map +1 -0
  22. package/dist/domains/actions/constants.js +1501 -0
  23. package/dist/domains/actions/constants.js.map +1 -0
  24. package/dist/domains/actions/index.d.ts +3 -0
  25. package/dist/domains/actions/index.d.ts.map +1 -0
  26. package/dist/domains/actions/index.js +2 -0
  27. package/dist/domains/actions/index.js.map +1 -0
  28. package/dist/domains/actions/types.d.ts +74 -0
  29. package/dist/domains/actions/types.d.ts.map +1 -0
  30. package/dist/domains/actions/types.js +2 -0
  31. package/dist/domains/actions/types.js.map +1 -0
  32. package/dist/domains/actions/utils.d.ts +9 -0
  33. package/dist/domains/actions/utils.d.ts.map +1 -0
  34. package/dist/domains/actions/utils.js +27 -0
  35. package/dist/domains/actions/utils.js.map +1 -0
  36. package/dist/domains/avatar/avatar_outfits.json +572 -0
  37. package/dist/domains/avatar/avatars.json +512 -0
  38. package/dist/domains/avatar/constants.d.ts +3 -0
  39. package/dist/domains/avatar/constants.d.ts.map +1 -0
  40. package/dist/domains/avatar/constants.js +185 -0
  41. package/dist/domains/avatar/constants.js.map +1 -0
  42. package/dist/domains/avatar/index.d.ts +3 -0
  43. package/dist/domains/avatar/index.d.ts.map +1 -0
  44. package/dist/domains/avatar/index.js +2 -0
  45. package/dist/domains/avatar/index.js.map +1 -0
  46. package/dist/domains/avatar/types.d.ts +22 -0
  47. package/dist/domains/avatar/types.d.ts.map +1 -0
  48. package/dist/domains/avatar/types.js +2 -0
  49. package/dist/domains/avatar/types.js.map +1 -0
  50. package/dist/domains/buffs/buff_types.json +474 -0
  51. package/dist/domains/buffs/community_buff_types.json +119 -0
  52. package/dist/domains/buffs/constants.d.ts +4 -0
  53. package/dist/domains/buffs/constants.d.ts.map +1 -0
  54. package/dist/domains/buffs/constants.js +181 -0
  55. package/dist/domains/buffs/constants.js.map +1 -0
  56. package/dist/domains/buffs/index.d.ts +3 -0
  57. package/dist/domains/buffs/index.d.ts.map +1 -0
  58. package/dist/domains/buffs/index.js +2 -0
  59. package/dist/domains/buffs/index.js.map +1 -0
  60. package/dist/domains/buffs/types.d.ts +27 -0
  61. package/dist/domains/buffs/types.d.ts.map +1 -0
  62. package/dist/domains/buffs/types.js +2 -0
  63. package/dist/domains/buffs/types.js.map +1 -0
  64. package/dist/domains/chat/chat_channel_types.json +128 -0
  65. package/dist/domains/chat/chat_icons.json +4352 -0
  66. package/dist/domains/chat/constants.d.ts +3 -0
  67. package/dist/domains/chat/constants.d.ts.map +1 -0
  68. package/dist/domains/chat/constants.js +461 -0
  69. package/dist/domains/chat/constants.js.map +1 -0
  70. package/dist/domains/chat/index.d.ts +3 -0
  71. package/dist/domains/chat/index.d.ts.map +1 -0
  72. package/dist/domains/chat/index.js +2 -0
  73. package/dist/domains/chat/index.js.map +1 -0
  74. package/dist/domains/chat/types.d.ts +20 -0
  75. package/dist/domains/chat/types.d.ts.map +1 -0
  76. package/dist/domains/chat/types.js +2 -0
  77. package/dist/domains/chat/types.js.map +1 -0
  78. package/dist/domains/combat/combat_style.json +68 -0
  79. package/dist/domains/combat/combat_trigger_comparator.json +26 -0
  80. package/dist/domains/combat/combat_trigger_condition.json +596 -0
  81. package/dist/domains/combat/combat_trigger_dependency.json +30 -0
  82. package/dist/domains/combat/constants.d.ts +6 -0
  83. package/dist/domains/combat/constants.d.ts.map +1 -0
  84. package/dist/domains/combat/constants.js +83 -0
  85. package/dist/domains/combat/constants.js.map +1 -0
  86. package/dist/domains/combat/damage_type.json +22 -0
  87. package/dist/domains/combat/index.d.ts +3 -0
  88. package/dist/domains/combat/index.d.ts.map +1 -0
  89. package/dist/domains/combat/index.js +2 -0
  90. package/dist/domains/combat/index.js.map +1 -0
  91. package/dist/domains/combat/types.d.ts +143 -0
  92. package/dist/domains/combat/types.d.ts.map +1 -0
  93. package/dist/domains/combat/types.js +2 -0
  94. package/dist/domains/combat/types.js.map +1 -0
  95. package/dist/domains/game-mode/constants.d.ts +3 -0
  96. package/dist/domains/game-mode/constants.d.ts.map +1 -0
  97. package/dist/domains/game-mode/constants.js +7 -0
  98. package/dist/domains/game-mode/constants.js.map +1 -0
  99. package/dist/domains/game-mode/game_mode.json +32 -0
  100. package/dist/domains/game-mode/index.d.ts +3 -0
  101. package/dist/domains/game-mode/index.d.ts.map +1 -0
  102. package/dist/domains/game-mode/index.js +2 -0
  103. package/dist/domains/game-mode/index.js.map +1 -0
  104. package/dist/domains/game-mode/types.d.ts +14 -0
  105. package/dist/domains/game-mode/types.d.ts.map +1 -0
  106. package/dist/domains/game-mode/types.js +2 -0
  107. package/dist/domains/game-mode/types.js.map +1 -0
  108. package/dist/domains/guild/constants.d.ts +2 -0
  109. package/dist/domains/guild/constants.d.ts.map +1 -0
  110. package/dist/domains/guild/constants.js +7 -0
  111. package/dist/domains/guild/constants.js.map +1 -0
  112. package/dist/domains/guild/guild_character_role.json +58 -0
  113. package/dist/domains/guild/index.d.ts +3 -0
  114. package/dist/domains/guild/index.d.ts.map +1 -0
  115. package/dist/domains/guild/index.js +2 -0
  116. package/dist/domains/guild/index.js.map +1 -0
  117. package/dist/domains/guild/types.d.ts +17 -0
  118. package/dist/domains/guild/types.d.ts.map +1 -0
  119. package/dist/domains/guild/types.js +2 -0
  120. package/dist/domains/guild/types.js.map +1 -0
  121. package/dist/domains/house/constants.d.ts +4 -0
  122. package/dist/domains/house/constants.d.ts.map +1 -0
  123. package/dist/domains/house/constants.js +39 -0
  124. package/dist/domains/house/constants.js.map +1 -0
  125. package/dist/domains/house/house_rooms.json +5553 -0
  126. package/dist/domains/house/index.d.ts +3 -0
  127. package/dist/domains/house/index.d.ts.map +1 -0
  128. package/dist/domains/house/index.js +2 -0
  129. package/dist/domains/house/index.js.map +1 -0
  130. package/dist/domains/house/types.d.ts +16 -0
  131. package/dist/domains/house/types.d.ts.map +1 -0
  132. package/dist/domains/house/types.js +2 -0
  133. package/dist/domains/house/types.js.map +1 -0
  134. package/dist/domains/items/constants.d.ts +8 -0
  135. package/dist/domains/items/constants.d.ts.map +1 -0
  136. package/dist/domains/items/constants.js +1969 -0
  137. package/dist/domains/items/constants.js.map +1 -0
  138. package/dist/domains/items/equipment_types.json +152 -0
  139. package/dist/domains/items/index.d.ts +3 -0
  140. package/dist/domains/items/index.d.ts.map +1 -0
  141. package/dist/domains/items/index.js +2 -0
  142. package/dist/domains/items/index.js.map +1 -0
  143. package/dist/domains/items/item_categories.json +50 -0
  144. package/dist/domains/items/item_locations.json +220 -0
  145. package/dist/domains/items/items.json +65871 -0
  146. package/dist/domains/items/types.d.ts +308 -0
  147. package/dist/domains/items/types.d.ts.map +1 -0
  148. package/dist/domains/items/types.js +2 -0
  149. package/dist/domains/items/types.js.map +1 -0
  150. package/dist/domains/items/utils.d.ts +10 -0
  151. package/dist/domains/items/utils.d.ts.map +1 -0
  152. package/dist/domains/items/utils.js +37 -0
  153. package/dist/domains/items/utils.js.map +1 -0
  154. package/dist/domains/leaderboard/constants.d.ts +3 -0
  155. package/dist/domains/leaderboard/constants.d.ts.map +1 -0
  156. package/dist/domains/leaderboard/constants.js +32 -0
  157. package/dist/domains/leaderboard/constants.js.map +1 -0
  158. package/dist/domains/leaderboard/index.d.ts +3 -0
  159. package/dist/domains/leaderboard/index.d.ts.map +1 -0
  160. package/dist/domains/leaderboard/index.js +2 -0
  161. package/dist/domains/leaderboard/index.js.map +1 -0
  162. package/dist/domains/leaderboard/leaderboard_categories.json +149 -0
  163. package/dist/domains/leaderboard/leaderboard_types.json +56 -0
  164. package/dist/domains/leaderboard/types.d.ts +21 -0
  165. package/dist/domains/leaderboard/types.d.ts.map +1 -0
  166. package/dist/domains/leaderboard/types.js +2 -0
  167. package/dist/domains/leaderboard/types.js.map +1 -0
  168. package/dist/domains/level/constants.d.ts +2 -0
  169. package/dist/domains/level/constants.d.ts.map +1 -0
  170. package/dist/domains/level/constants.js +153 -0
  171. package/dist/domains/level/constants.js.map +1 -0
  172. package/dist/domains/level/index.d.ts +2 -0
  173. package/dist/domains/level/index.d.ts.map +1 -0
  174. package/dist/domains/level/index.js +2 -0
  175. package/dist/domains/level/index.js.map +1 -0
  176. package/dist/domains/monsters/constants.d.ts +2 -0
  177. package/dist/domains/monsters/constants.d.ts.map +1 -0
  178. package/dist/domains/monsters/constants.js +80 -0
  179. package/dist/domains/monsters/constants.js.map +1 -0
  180. package/dist/domains/monsters/index.d.ts +3 -0
  181. package/dist/domains/monsters/index.d.ts.map +1 -0
  182. package/dist/domains/monsters/index.js +2 -0
  183. package/dist/domains/monsters/index.js.map +1 -0
  184. package/dist/domains/monsters/monsters.json +9313 -0
  185. package/dist/domains/monsters/types.d.ts +21 -0
  186. package/dist/domains/monsters/types.d.ts.map +1 -0
  187. package/dist/domains/monsters/types.js +2 -0
  188. package/dist/domains/monsters/types.js.map +1 -0
  189. package/dist/domains/monsters/utils.d.ts +6 -0
  190. package/dist/domains/monsters/utils.d.ts.map +1 -0
  191. package/dist/domains/monsters/utils.js +21 -0
  192. package/dist/domains/monsters/utils.js.map +1 -0
  193. package/dist/domains/name/constants.d.ts +2 -0
  194. package/dist/domains/name/constants.d.ts.map +1 -0
  195. package/dist/domains/name/constants.js +142 -0
  196. package/dist/domains/name/constants.js.map +1 -0
  197. package/dist/domains/name/index.d.ts +3 -0
  198. package/dist/domains/name/index.d.ts.map +1 -0
  199. package/dist/domains/name/index.js +2 -0
  200. package/dist/domains/name/index.js.map +1 -0
  201. package/dist/domains/name/name_colors.json +975 -0
  202. package/dist/domains/name/types.d.ts +10 -0
  203. package/dist/domains/name/types.d.ts.map +1 -0
  204. package/dist/domains/name/types.js +2 -0
  205. package/dist/domains/name/types.js.map +1 -0
  206. package/dist/domains/player/index.d.ts +2 -0
  207. package/dist/domains/player/index.d.ts.map +1 -0
  208. package/dist/domains/player/index.js +2 -0
  209. package/dist/domains/player/index.js.map +1 -0
  210. package/dist/domains/player/types.d.ts +23 -0
  211. package/dist/domains/player/types.d.ts.map +1 -0
  212. package/dist/domains/player/types.js +2 -0
  213. package/dist/domains/player/types.js.map +1 -0
  214. package/dist/{generated/types/recipes.d.ts → domains/recipes/constants.d.ts} +7 -84
  215. package/dist/domains/recipes/constants.d.ts.map +1 -0
  216. package/dist/domains/recipes/constants.js +2655 -0
  217. package/dist/domains/recipes/constants.js.map +1 -0
  218. package/dist/domains/recipes/index.d.ts +4 -0
  219. package/dist/domains/recipes/index.d.ts.map +1 -0
  220. package/dist/domains/recipes/index.js +3 -0
  221. package/dist/domains/recipes/index.js.map +1 -0
  222. package/dist/domains/recipes/recipes.json +21268 -0
  223. package/dist/domains/recipes/types.d.ts +65 -0
  224. package/dist/domains/recipes/types.d.ts.map +1 -0
  225. package/dist/domains/recipes/types.js +2 -0
  226. package/dist/domains/recipes/types.js.map +1 -0
  227. package/dist/domains/recipes/utils.d.ts +11 -0
  228. package/dist/domains/recipes/utils.d.ts.map +1 -0
  229. package/dist/domains/recipes/utils.js +78 -0
  230. package/dist/domains/recipes/utils.js.map +1 -0
  231. package/dist/domains/shared/constants.d.ts +2 -0
  232. package/dist/domains/shared/constants.d.ts.map +1 -0
  233. package/dist/domains/shared/constants.js +22 -0
  234. package/dist/domains/shared/constants.js.map +1 -0
  235. package/dist/domains/shared/index.d.ts +3 -0
  236. package/dist/domains/shared/index.d.ts.map +1 -0
  237. package/dist/domains/shared/index.js +2 -0
  238. package/dist/domains/shared/index.js.map +1 -0
  239. package/dist/domains/shared/openable_loot_drop.json +1276 -0
  240. package/dist/domains/shared/types.d.ts +28 -0
  241. package/dist/domains/shared/types.d.ts.map +1 -0
  242. package/dist/domains/shared/types.js +2 -0
  243. package/dist/domains/shared/types.js.map +1 -0
  244. package/dist/domains/shop/buyable_upgrades.json +338 -0
  245. package/dist/domains/shop/constants.d.ts +5 -0
  246. package/dist/domains/shop/constants.d.ts.map +1 -0
  247. package/dist/domains/shop/constants.js +109 -0
  248. package/dist/domains/shop/constants.js.map +1 -0
  249. package/dist/domains/shop/index.d.ts +3 -0
  250. package/dist/domains/shop/index.d.ts.map +1 -0
  251. package/dist/domains/shop/index.js +2 -0
  252. package/dist/domains/shop/index.js.map +1 -0
  253. package/dist/domains/shop/purchase_bundles.json +226 -0
  254. package/dist/domains/shop/shop_categories.json +12 -0
  255. package/dist/domains/shop/shop_items.json +758 -0
  256. package/dist/domains/shop/types.d.ts +55 -0
  257. package/dist/domains/shop/types.d.ts.map +1 -0
  258. package/dist/domains/shop/types.js +2 -0
  259. package/dist/domains/shop/types.js.map +1 -0
  260. package/dist/domains/skills/constants.d.ts +2 -0
  261. package/dist/domains/skills/constants.d.ts.map +1 -0
  262. package/dist/domains/skills/constants.js +21 -0
  263. package/dist/domains/skills/constants.js.map +1 -0
  264. package/dist/domains/skills/index.d.ts +3 -0
  265. package/dist/domains/skills/index.d.ts.map +1 -0
  266. package/dist/domains/skills/index.js +2 -0
  267. package/dist/domains/skills/index.js.map +1 -0
  268. package/dist/domains/skills/skills.json +128 -0
  269. package/dist/domains/skills/types.d.ts +10 -0
  270. package/dist/domains/skills/types.d.ts.map +1 -0
  271. package/dist/domains/skills/types.js +2 -0
  272. package/dist/domains/skills/types.js.map +1 -0
  273. package/dist/domains/skills/utils.d.ts +3 -0
  274. package/dist/domains/skills/utils.d.ts.map +1 -0
  275. package/dist/domains/skills/utils.js +7 -0
  276. package/dist/domains/skills/utils.js.map +1 -0
  277. package/dist/domains/tasks/constants.d.ts +3 -0
  278. package/dist/domains/tasks/constants.d.ts.map +1 -0
  279. package/dist/domains/tasks/constants.js +18 -0
  280. package/dist/domains/tasks/constants.js.map +1 -0
  281. package/dist/domains/tasks/index.d.ts +3 -0
  282. package/dist/domains/tasks/index.d.ts.map +1 -0
  283. package/dist/domains/tasks/index.js +2 -0
  284. package/dist/domains/tasks/index.js.map +1 -0
  285. package/dist/domains/tasks/random_task_type.json +56 -0
  286. package/dist/domains/tasks/task_shop_items.json +42 -0
  287. package/dist/domains/tasks/types.d.ts +18 -0
  288. package/dist/domains/tasks/types.d.ts.map +1 -0
  289. package/dist/domains/tasks/types.js +2 -0
  290. package/dist/domains/tasks/types.js.map +1 -0
  291. package/dist/index.d.ts +20 -1
  292. package/dist/index.d.ts.map +1 -1
  293. package/dist/index.js +19 -3
  294. package/dist/index.js.map +1 -1
  295. package/package.json +159 -68
  296. package/src/domains/abilities/abilities.json +3331 -0
  297. package/src/domains/actions/action_categories.json +356 -0
  298. package/src/domains/actions/action_types.json +57 -0
  299. package/src/domains/actions/actions.json +41966 -0
  300. package/src/domains/avatar/avatar_outfits.json +572 -0
  301. package/src/domains/avatar/avatars.json +512 -0
  302. package/src/domains/buffs/buff_types.json +474 -0
  303. package/src/domains/buffs/community_buff_types.json +119 -0
  304. package/src/domains/chat/chat_channel_types.json +128 -0
  305. package/src/domains/chat/chat_icons.json +4352 -0
  306. package/src/domains/combat/combat_style.json +68 -0
  307. package/src/domains/combat/combat_trigger_comparator.json +26 -0
  308. package/src/domains/combat/combat_trigger_condition.json +596 -0
  309. package/src/domains/combat/combat_trigger_dependency.json +30 -0
  310. package/src/domains/combat/damage_type.json +22 -0
  311. package/src/domains/game-mode/game_mode.json +32 -0
  312. package/src/domains/guild/guild_character_role.json +58 -0
  313. package/src/domains/house/house_rooms.json +5553 -0
  314. package/src/domains/items/equipment_types.json +152 -0
  315. package/src/domains/items/item_categories.json +50 -0
  316. package/src/domains/items/item_locations.json +220 -0
  317. package/src/domains/items/items.json +65871 -0
  318. package/src/domains/leaderboard/leaderboard_categories.json +149 -0
  319. package/src/domains/leaderboard/leaderboard_types.json +56 -0
  320. package/src/domains/monsters/monsters.json +9313 -0
  321. package/src/domains/name/name_colors.json +975 -0
  322. package/src/domains/recipes/recipes.json +21268 -0
  323. package/src/domains/shared/openable_loot_drop.json +1276 -0
  324. package/src/domains/shop/buyable_upgrades.json +338 -0
  325. package/src/domains/shop/purchase_bundles.json +226 -0
  326. package/src/domains/shop/shop_categories.json +12 -0
  327. package/src/domains/shop/shop_items.json +758 -0
  328. package/src/domains/skills/skills.json +128 -0
  329. package/src/domains/tasks/random_task_type.json +56 -0
  330. package/src/domains/tasks/task_shop_items.json +42 -0
  331. package/LICENSE +0 -21
  332. package/dist/generated/index.d.ts +0 -30
  333. package/dist/generated/index.d.ts.map +0 -1
  334. package/dist/generated/index.js +0 -34
  335. package/dist/generated/index.js.map +0 -1
  336. package/dist/generated/localization/en/translations.d.ts +0 -32
  337. package/dist/generated/localization/en/translations.d.ts.map +0 -1
  338. package/dist/generated/localization/en/translations.js +0 -2894
  339. package/dist/generated/localization/en/translations.js.map +0 -1
  340. package/dist/generated/localization/index.d.ts +0 -7
  341. package/dist/generated/localization/index.d.ts.map +0 -1
  342. package/dist/generated/localization/index.js +0 -8
  343. package/dist/generated/localization/index.js.map +0 -1
  344. package/dist/generated/localization/utils.d.ts +0 -14
  345. package/dist/generated/localization/utils.d.ts.map +0 -1
  346. package/dist/generated/localization/utils.js +0 -28
  347. package/dist/generated/localization/utils.js.map +0 -1
  348. package/dist/generated/localization/zh/translations.d.ts +0 -32
  349. package/dist/generated/localization/zh/translations.d.ts.map +0 -1
  350. package/dist/generated/localization/zh/translations.js +0 -2894
  351. package/dist/generated/localization/zh/translations.js.map +0 -1
  352. package/dist/generated/types/abilities.d.ts +0 -12
  353. package/dist/generated/types/abilities.d.ts.map +0 -1
  354. package/dist/generated/types/abilities.js +0 -477
  355. package/dist/generated/types/abilities.js.map +0 -1
  356. package/dist/generated/types/action-categories.d.ts +0 -39
  357. package/dist/generated/types/action-categories.d.ts.map +0 -1
  358. package/dist/generated/types/action-categories.js +0 -803
  359. package/dist/generated/types/action-categories.js.map +0 -1
  360. package/dist/generated/types/actions.d.ts +0 -144
  361. package/dist/generated/types/actions.d.ts.map +0 -1
  362. package/dist/generated/types/actions.js +0 -48406
  363. package/dist/generated/types/actions.js.map +0 -1
  364. package/dist/generated/types/avatar.d.ts +0 -34
  365. package/dist/generated/types/avatar.d.ts.map +0 -1
  366. package/dist/generated/types/avatar.js +0 -1000
  367. package/dist/generated/types/avatar.js.map +0 -1
  368. package/dist/generated/types/avatars.d.ts +0 -34
  369. package/dist/generated/types/avatars.d.ts.map +0 -1
  370. package/dist/generated/types/avatars.js +0 -1110
  371. package/dist/generated/types/avatars.js.map +0 -1
  372. package/dist/generated/types/buff-types.d.ts +0 -50
  373. package/dist/generated/types/buff-types.d.ts.map +0 -1
  374. package/dist/generated/types/buff-types.js +0 -819
  375. package/dist/generated/types/buff-types.js.map +0 -1
  376. package/dist/generated/types/chat-channel-types.d.ts +0 -19
  377. package/dist/generated/types/chat-channel-types.d.ts.map +0 -1
  378. package/dist/generated/types/chat-channel-types.js +0 -302
  379. package/dist/generated/types/chat-channel-types.js.map +0 -1
  380. package/dist/generated/types/chat-icons.d.ts +0 -56
  381. package/dist/generated/types/chat-icons.d.ts.map +0 -1
  382. package/dist/generated/types/chat-icons.js +0 -6656
  383. package/dist/generated/types/chat-icons.js.map +0 -1
  384. package/dist/generated/types/combat-styles.d.ts +0 -21
  385. package/dist/generated/types/combat-styles.d.ts.map +0 -1
  386. package/dist/generated/types/combat-styles.js +0 -125
  387. package/dist/generated/types/combat-styles.js.map +0 -1
  388. package/dist/generated/types/community-buffs.d.ts +0 -53
  389. package/dist/generated/types/community-buffs.d.ts.map +0 -1
  390. package/dist/generated/types/community-buffs.js +0 -222
  391. package/dist/generated/types/community-buffs.js.map +0 -1
  392. package/dist/generated/types/damage-types.d.ts +0 -17
  393. package/dist/generated/types/damage-types.d.ts.map +0 -1
  394. package/dist/generated/types/damage-types.js +0 -60
  395. package/dist/generated/types/damage-types.js.map +0 -1
  396. package/dist/generated/types/equipment-types.d.ts +0 -17
  397. package/dist/generated/types/equipment-types.d.ts.map +0 -1
  398. package/dist/generated/types/equipment-types.js +0 -249
  399. package/dist/generated/types/equipment-types.js.map +0 -1
  400. package/dist/generated/types/game-modes.d.ts +0 -49
  401. package/dist/generated/types/game-modes.d.ts.map +0 -1
  402. package/dist/generated/types/game-modes.js +0 -118
  403. package/dist/generated/types/game-modes.js.map +0 -1
  404. package/dist/generated/types/guild-character-roles.d.ts +0 -17
  405. package/dist/generated/types/guild-character-roles.d.ts.map +0 -1
  406. package/dist/generated/types/guild-character-roles.js +0 -60
  407. package/dist/generated/types/guild-character-roles.js.map +0 -1
  408. package/dist/generated/types/house-rooms.d.ts +0 -46
  409. package/dist/generated/types/house-rooms.d.ts.map +0 -1
  410. package/dist/generated/types/house-rooms.js +0 -5699
  411. package/dist/generated/types/house-rooms.js.map +0 -1
  412. package/dist/generated/types/item-categories.d.ts +0 -17
  413. package/dist/generated/types/item-categories.d.ts.map +0 -1
  414. package/dist/generated/types/item-categories.js +0 -96
  415. package/dist/generated/types/item-categories.js.map +0 -1
  416. package/dist/generated/types/item-locations.d.ts +0 -17
  417. package/dist/generated/types/item-locations.d.ts.map +0 -1
  418. package/dist/generated/types/item-locations.js +0 -258
  419. package/dist/generated/types/item-locations.js.map +0 -1
  420. package/dist/generated/types/items.d.ts +0 -73
  421. package/dist/generated/types/items.d.ts.map +0 -1
  422. package/dist/generated/types/items.js +0 -69551
  423. package/dist/generated/types/items.js.map +0 -1
  424. package/dist/generated/types/leaderboard-categories.d.ts +0 -33
  425. package/dist/generated/types/leaderboard-categories.d.ts.map +0 -1
  426. package/dist/generated/types/leaderboard-categories.js +0 -393
  427. package/dist/generated/types/leaderboard-categories.js.map +0 -1
  428. package/dist/generated/types/leaderboard-types.d.ts +0 -30
  429. package/dist/generated/types/leaderboard-types.d.ts.map +0 -1
  430. package/dist/generated/types/leaderboard-types.js +0 -163
  431. package/dist/generated/types/leaderboard-types.js.map +0 -1
  432. package/dist/generated/types/leaderboards.d.ts +0 -74
  433. package/dist/generated/types/leaderboards.d.ts.map +0 -1
  434. package/dist/generated/types/leaderboards.js +0 -457
  435. package/dist/generated/types/leaderboards.js.map +0 -1
  436. package/dist/generated/types/monsters.d.ts +0 -97
  437. package/dist/generated/types/monsters.d.ts.map +0 -1
  438. package/dist/generated/types/monsters.js +0 -9857
  439. package/dist/generated/types/monsters.js.map +0 -1
  440. package/dist/generated/types/name-colors.d.ts +0 -44
  441. package/dist/generated/types/name-colors.d.ts.map +0 -1
  442. package/dist/generated/types/name-colors.js +0 -1891
  443. package/dist/generated/types/name-colors.js.map +0 -1
  444. package/dist/generated/types/player-data.d.ts +0 -376
  445. package/dist/generated/types/player-data.d.ts.map +0 -1
  446. package/dist/generated/types/player-data.js +0 -54
  447. package/dist/generated/types/player-data.js.map +0 -1
  448. package/dist/generated/types/purchase-bundles.d.ts +0 -50
  449. package/dist/generated/types/purchase-bundles.d.ts.map +0 -1
  450. package/dist/generated/types/purchase-bundles.js +0 -358
  451. package/dist/generated/types/purchase-bundles.js.map +0 -1
  452. package/dist/generated/types/random-tasks.d.ts +0 -33
  453. package/dist/generated/types/random-tasks.d.ts.map +0 -1
  454. package/dist/generated/types/random-tasks.js +0 -162
  455. package/dist/generated/types/random-tasks.js.map +0 -1
  456. package/dist/generated/types/recipes.d.ts.map +0 -1
  457. package/dist/generated/types/recipes.js +0 -25996
  458. package/dist/generated/types/recipes.js.map +0 -1
  459. package/dist/generated/types/shop-categories.d.ts +0 -17
  460. package/dist/generated/types/shop-categories.d.ts.map +0 -1
  461. package/dist/generated/types/shop-categories.js +0 -42
  462. package/dist/generated/types/shop-categories.js.map +0 -1
  463. package/dist/generated/types/shop-items.d.ts +0 -35
  464. package/dist/generated/types/shop-items.d.ts.map +0 -1
  465. package/dist/generated/types/shop-items.js +0 -1313
  466. package/dist/generated/types/shop-items.js.map +0 -1
  467. package/dist/generated/types/skills.d.ts +0 -15
  468. package/dist/generated/types/skills.d.ts.map +0 -1
  469. package/dist/generated/types/skills.js +0 -219
  470. package/dist/generated/types/skills.js.map +0 -1
  471. package/dist/generated/types/task-shop-items.d.ts +0 -38
  472. package/dist/generated/types/task-shop-items.d.ts.map +0 -1
  473. package/dist/generated/types/task-shop-items.js +0 -160
  474. package/dist/generated/types/task-shop-items.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -1,562 +1,177 @@
1
1
  # @c3d.gg/mwi-types
2
2
 
3
- TypeScript type definitions, utility functions, and constants for Milky Way Idle game data.
4
-
5
- ## Overview
6
-
7
- `@c3d.gg/mwi-types` provides comprehensive TypeScript types for the Milky Way Idle game, including:
8
-
9
- - 🎯 **Complete type definitions** for all game entities (30+ types)
10
- - 🗺️ **Map-based collections** for O(1) lookups by HRID
11
- - 🛠️ **Rich utility functions** for filtering, searching, and sorting
12
- - 🔤 **HRID constants** as const arrays for type-safe identifiers
13
- - 🌍 **Type-safe translations** for multiple locales
14
- - 📦 **Tree-shakeable exports** for optimal bundle size
3
+ TypeScript types for Milky Way Idle game data.
15
4
 
16
5
  ## Installation
17
6
 
18
7
  ```bash
19
- npm install @c3d.gg/mwi-types
20
- # or
21
- yarn add @c3d.gg/mwi-types
22
- # or
23
- pnpm add @c3d.gg/mwi-types
24
- # or
25
8
  bun add @c3d.gg/mwi-types
26
9
  ```
27
10
 
28
- ## Usage
11
+ ## Import Patterns
29
12
 
30
- ### Basic Types and Collections
13
+ ### Types Only (lean, ~0KB runtime)
31
14
 
32
15
  ```typescript
33
- import { Item, ITEMS, Skill, SKILLS } from '@c3d.gg/mwi-types'
34
-
35
- // Access items from Map collection (O(1) lookup)
36
- const milk = ITEMS.get('/items/milk')
37
-
38
- // Iterate over all skills
39
- for (const [hrid, skill] of SKILLS) {
40
- console.log(`${skill.name}: Level ${skill.maxLevel}`)
41
- }
42
-
43
- // Convert to array when needed
44
- const allItems = Array.from(ITEMS.values())
16
+ import type { Item, ItemHrid } from '@c3d.gg/mwi-types/items'
17
+ import type { Recipe, RecipeHrid } from '@c3d.gg/mwi-types/recipes'
18
+ import type { Action, ActionHrid } from '@c3d.gg/mwi-types/actions'
19
+ import type { Monster, MonsterHrid } from '@c3d.gg/mwi-types/monsters'
20
+ import type { Skill, SkillHrid } from '@c3d.gg/mwi-types/skills'
45
21
  ```
46
22
 
47
- ### Utility Functions
48
-
49
- Every type comes with a comprehensive set of utility functions, organized into standard and domain-specific categories.
50
-
51
- #### Standard Functions (All Types)
52
-
53
- All entity types include these standard utilities:
23
+ ### Types + Constants (HRID arrays for validation)
54
24
 
55
25
  ```typescript
56
- import {
57
- getItem, requireItem, getAllItems, isItemHrid,
58
- getSkill, requireSkill, getAllSkills, isSkillHrid,
59
- getAction, requireAction, getAllActions, isActionHrid,
60
- } from '@c3d.gg/mwi-types'
61
-
62
- // Safe getter (returns undefined if not found)
63
- const milk = getItem('/items/milk')
64
-
65
- // Throws if not found (useful when you know it exists)
66
- const sword = requireItem('/items/sword')
67
-
68
- // Type guard for HRIDs
69
- if (isItemHrid(someString)) {
70
- // someString is now typed as ItemHrid
71
- }
72
-
73
- // Get all entities as array
74
- const allItems = getAllItems()
75
- const allSkills = getAllSkills()
26
+ import { ITEM_HRIDS, ITEMS_BY_CATEGORY } from '@c3d.gg/mwi-types/items'
27
+ import { RECIPE_HRIDS, RECIPES_BY_OUTPUT } from '@c3d.gg/mwi-types/recipes'
28
+ import { ACTION_HRIDS, ACTIONS_BY_SKILL } from '@c3d.gg/mwi-types/actions'
76
29
  ```
77
30
 
78
- #### Items - Equipment & Trading
31
+ ### Raw JSON Data (custom processing)
79
32
 
80
33
  ```typescript
81
- import {
82
- getItemsByCategory,
83
- getEquipmentByType,
84
- isEquipment,
85
- isTradable,
86
- getItemsForSkill,
87
- calculateEnhancementCost,
88
- getItemValue,
89
- } from '@c3d.gg/mwi-types/types/items'
90
-
91
- // Filter items by category
92
- const foods = getItemsByCategory('/item_categories/food')
93
-
94
- // Get equipment by type
95
- const weapons = getEquipmentByType('/equipment_types/weapon')
96
-
97
- // Check item properties
98
- const isWeaponEquipment = isEquipment(sword)
99
- const canTradeItem = isTradable(milk)
100
-
101
- // Get equipment for a skill requirement
102
- const cookingEquipment = getItemsForSkill('/skills/cooking')
103
-
104
- // Calculate enhancement costs
105
- const enhanceCost = calculateEnhancementCost(sword, 5)
106
-
107
- // Get item value for sorting/comparison
108
- const itemValue = getItemValue(sword)
34
+ import itemsJson from '@c3d.gg/mwi-types/items/data'
35
+ import recipesJson from '@c3d.gg/mwi-types/recipes/data'
109
36
  ```
110
37
 
111
- #### Actions - Skills, Combat & Production
38
+ ### Utils (lazy-loaded data + type guards)
112
39
 
113
40
  ```typescript
114
- import {
115
- getActionsByFunction,
116
- getActionsByType,
117
- getActionsByCategory,
118
- getActionsBySkill,
119
- isProductionAction,
120
- isCombatAction,
121
- isGatheringAction,
122
- meetsActionRequirements,
123
- hasRequiredItems,
124
- getProductionActions,
125
- getCombatActions,
126
- getGatheringActions,
127
- } from '@c3d.gg/mwi-types/types/actions'
128
-
129
- // Get actions by different criteria
130
- const productionActions = getActionsByFunction('/action_functions/production')
131
- const cookingActions = getActionsBySkill('/skills/cooking')
132
- const craftingActions = getActionsByType('/action_types/crafting')
133
-
134
- // Check action types
135
- const isRecipe = isProductionAction(action)
136
- const isFighting = isCombatAction(action)
137
-
138
- // Check if player can perform action
139
- const playerSkills = { '/skills/cooking': 25 }
140
- const inventory = { '/items/milk': 10, '/items/wheat': 5 }
141
- const canDoAction = meetsActionRequirements(action, playerSkills) &&
142
- hasRequiredItems(action, inventory)
143
-
144
- // Get all actions by function type
145
- const allRecipes = getProductionActions()
146
- const allCombat = getCombatActions()
147
- const allGathering = getGatheringActions()
148
- ```
41
+ // Items
42
+ import { getItem, getAllItems, getItemsByCategory, isItemHrid, isEquipment, isTradable } from '@c3d.gg/mwi-types/items/utils'
149
43
 
150
- #### Recipes - Crafting & Recipe Trees
44
+ // Recipes
45
+ import { getRecipe, getAllRecipes, getRecipesForOutput, buildRecipeTree, getTotalMaterials, isRecipeHrid } from '@c3d.gg/mwi-types/recipes/utils'
151
46
 
152
- ```typescript
153
- import {
154
- getRecipesBySkill,
155
- getRecipesByType,
156
- getRecipesByCategory,
157
- getRecipesForOutput,
158
- canCraftRecipe,
159
- buildRecipeTree,
160
- calculateRecipeTreeStats,
161
- getTotalMaterials,
162
- getMissingMaterials,
163
- getCraftingPath,
164
- calculateModifiedTime,
165
- } from '@c3d.gg/mwi-types/types/recipes'
166
-
167
- // Find recipes by skill/category
168
- const cookingRecipes = getRecipesBySkill('/skills/cooking')
169
- const foodRecipes = getRecipesByCategory('/action_categories/cooking')
170
- const breadRecipes = getRecipesForOutput('/items/bread')
171
-
172
- // Check crafting requirements
173
- const inventory = { '/items/wheat': 10, '/items/water': 5 }
174
- const canMakeBread = canCraftRecipe(breadRecipe, inventory)
175
-
176
- // Build complete recipe dependency tree
177
- const recipeTree = buildRecipeTree('/items/enchanted_sword', 1)
178
- const treeStats = calculateRecipeTreeStats(recipeTree)
179
-
180
- // Calculate materials needed
181
- const totalMaterials = getTotalMaterials(recipeTree)
182
- const missing = getMissingMaterials(recipeTree, inventory)
183
-
184
- // Get optimal crafting order
185
- const craftingOrder = getCraftingPath(recipeTree)
186
-
187
- // Calculate modified crafting time with bonuses
188
- const modifiers = { efficiency: 10, toolSpeed: 15, teaSpeed: 5, haste: 0 }
189
- const actualTime = calculateModifiedTime(baseTime, modifiers)
190
- ```
47
+ // Actions
48
+ import { getAction, getActionsBySkill, isProductionAction, isCombatAction, isActionHrid } from '@c3d.gg/mwi-types/actions/utils'
191
49
 
192
- #### Monsters - Combat & Loot
50
+ // Monsters
51
+ import { getMonster, getMonstersByCombatLevel, isMonsterHrid } from '@c3d.gg/mwi-types/monsters/utils'
193
52
 
194
- ```typescript
195
- import {
196
- getMonstersByCombatLevel,
197
- getMonstersByDamageType,
198
- getMonstersInLevelRange,
199
- getItemDropChances,
200
- } from '@c3d.gg/mwi-types/types/monsters'
201
-
202
- // Find monsters by level
203
- const level50Monsters = getMonstersByCombatLevel(50)
204
- const midTierMonsters = getMonstersInLevelRange(40, 60)
205
-
206
- // Find monsters by damage type
207
- const fireMonsters = getMonstersByDamageType('/damage_types/fire')
208
-
209
- // Analyze drop rates for specific items
210
- const swordDrops = getItemDropChances('/items/iron_sword')
211
- // Returns: [{ monsterHrid, dropRate, isRare }, ...]
53
+ // Skills
54
+ import { isSkillHrid } from '@c3d.gg/mwi-types/skills/utils'
212
55
  ```
213
56
 
214
- #### House Rooms - Player Housing
57
+ ## Utils Reference
215
58
 
216
- ```typescript
217
- import {
218
- getHouseRoomBySkill,
219
- getUpgradeCost,
220
- getTotalUpgradeCost,
221
- roomProvidesActionType,
222
- getRoomBuffsAtLevel,
223
- getMaxRoomLevel,
224
- } from '@c3d.gg/mwi-types/types/house-rooms'
225
-
226
- // Find room for skill
227
- const cookingRoom = getHouseRoomBySkill('/skills/cooking')
228
-
229
- // Calculate upgrade costs
230
- const level5Cost = getUpgradeCost(cookingRoom, 5)
231
- const totalCost = getTotalUpgradeCost(cookingRoom, 1, 5) // levels 1→5
232
-
233
- // Check room capabilities
234
- const supportsAction = roomProvidesActionType(room, '/action_types/crafting')
235
- const buffsAtLevel10 = getRoomBuffsAtLevel(room, 10)
236
- const maxLevel = getMaxRoomLevel(room)
237
- ```
59
+ ### items/utils
238
60
 
239
- #### Random Tasks - Daily Tasks
61
+ | Function | Description |
62
+ |----------|-------------|
63
+ | `getItem(hrid)` | Get item by HRID, returns undefined if not found |
64
+ | `requireItem(hrid)` | Get item or throw |
65
+ | `getAllItems()` | Get all items as array |
66
+ | `getItemsByCategory(categoryHrid)` | Filter items by category |
67
+ | `isEquipment(item)` | Check if item has equipment stats |
68
+ | `isTradable(item)` | Check if item can be traded |
69
+ | `isItemHrid(value)` | Type guard for ItemHrid |
240
70
 
241
- ```typescript
242
- import {
243
- getRandomTasksBySkill,
244
- getCombatRandomTasks,
245
- getNonCombatRandomTasks,
246
- isTaskAvailableForSkill,
247
- sortRandomTasksByIndex,
248
- findRandomTaskByName,
249
- getRandomTasksCount,
250
- } from '@c3d.gg/mwi-types/types/random-tasks'
251
-
252
- // Get tasks by type
253
- const cookingTasks = getRandomTasksBySkill('/skills/cooking')
254
- const combatTasks = getCombatRandomTasks()
255
- const skillTasks = getNonCombatRandomTasks()
256
-
257
- // Task utilities
258
- const isAvailable = isTaskAvailableForSkill(taskHrid, '/skills/alchemy')
259
- const sortedTasks = sortRandomTasksByIndex(tasks)
260
- const brewingTask = findRandomTaskByName('brewing')
261
- const stats = getRandomTasksCount() // { total, combat, nonCombat }
262
- ```
71
+ ### recipes/utils
263
72
 
264
- #### Leaderboards - Rankings
73
+ | Function | Description |
74
+ |----------|-------------|
75
+ | `getRecipe(hrid)` | Get recipe by HRID |
76
+ | `requireRecipe(hrid)` | Get recipe or throw |
77
+ | `getAllRecipes()` | Get all recipes as array |
78
+ | `getRecipesForOutput(itemHrid)` | Find recipes that produce an item |
79
+ | `buildRecipeTree(itemHrid, qty)` | Build full dependency tree |
80
+ | `getTotalMaterials(node)` | Sum base materials from tree |
81
+ | `isRecipeHrid(value)` | Type guard for RecipeHrid |
265
82
 
266
- ```typescript
267
- import {
268
- getGuildLeaderboardCategories,
269
- getSkillLeaderboardCategories,
270
- getLeaderboardCategoriesBySkill,
271
- getSteamLeaderboardTypes,
272
- getLeaderboardTypesByGameMode,
273
- sortLeaderboardCategoriesByIndex,
274
- searchLeaderboardCategories,
275
- getLeaderboardStats,
276
- } from '@c3d.gg/mwi-types/types/leaderboards'
277
-
278
- // Get different leaderboard types
279
- const guildCategories = getGuildLeaderboardCategories()
280
- const skillCategories = getSkillLeaderboardCategories()
281
- const cookingLeaderboards = getLeaderboardCategoriesBySkill('/skills/cooking')
282
-
283
- // Filter by platform/game mode
284
- const steamLeaderboards = getSteamLeaderboardTypes()
285
- const ironmanLeaderboards = getLeaderboardTypesByGameMode('/game_modes/ironman')
286
-
287
- // Sorting and searching
288
- const sortedCategories = sortLeaderboardCategoriesByIndex(categories)
289
- const combatLeaderboards = searchLeaderboardCategories('combat')
290
- const stats = getLeaderboardStats()
291
- ```
83
+ ### actions/utils
292
84
 
293
- #### Player Data - Character State
85
+ | Function | Description |
86
+ |----------|-------------|
87
+ | `getAction(hrid)` | Get action by HRID |
88
+ | `getActionsBySkill(skillHrid)` | Filter actions by skill requirement |
89
+ | `isProductionAction(action)` | Check if production action |
90
+ | `isCombatAction(action)` | Check if combat action |
91
+ | `isActionHrid(value)` | Type guard for ActionHrid |
294
92
 
295
- ```typescript
296
- import {
297
- isPlayerData,
298
- getCharacterSkillLevel,
299
- getTotalSkillLevel,
300
- getItemCount,
301
- getEnhancedItems,
302
- getActiveActions,
303
- getActionProgress,
304
- isInGuild,
305
- isOnline,
306
- getInventoryItemCount,
307
- } from '@c3d.gg/mwi-types/types/player-data'
308
-
309
- // Validate player data
310
- if (isPlayerData(data)) {
311
- // Skill utilities
312
- const cookingLevel = getCharacterSkillLevel(data.characterSkills, '/skills/cooking')
313
- const totalLevel = getTotalSkillLevel(data.characterSkills)
314
-
315
- // Inventory utilities
316
- const milkCount = getItemCount(data.characterItems, '/items/milk')
317
- const enhancedGear = getEnhancedItems(data.characterItems)
318
-
319
- // Action queue utilities
320
- const currentActions = getActiveActions(data.characterActions)
321
- const progress = getActionProgress(currentActions[0])
322
-
323
- // Social utilities
324
- const hasGuild = isInGuild(data)
325
- const playerOnline = isOnline(data.character)
326
-
327
- // Inventory stats
328
- const totalItems = getInventoryItemCount(data.characterItems)
329
- }
330
- ```
93
+ ### monsters/utils
331
94
 
332
- #### Shop Items - Commerce & Purchases
95
+ | Function | Description |
96
+ |----------|-------------|
97
+ | `getMonster(hrid)` | Get monster by HRID |
98
+ | `getMonstersByCombatLevel(level)` | Filter by exact combat level |
99
+ | `isMonsterHrid(value)` | Type guard for MonsterHrid |
333
100
 
334
- ```typescript
335
- import {
336
- getShopItemsByCategory,
337
- getShopItemsByCurrency,
338
- getShopItemsForItem,
339
- canAffordShopItem,
340
- calculateTotalShopCost,
341
- findCheapestShopItem,
342
- sortShopItemsByIndex,
343
- groupShopItemsByCategory,
344
- } from '@c3d.gg/mwi-types/types/shop-items'
345
-
346
- // Find shop items by category
347
- const upgrades = getShopItemsByCategory('/shop_categories/upgrades')
348
-
349
- // Find items by currency type
350
- const cowbellItems = getShopItemsByCurrency('/items/cowbell')
351
-
352
- // Find shop entries for a specific item
353
- const milkShopEntries = getShopItemsForItem('/items/milk')
354
-
355
- // Check if player can afford item
356
- const inventory = { '/items/cowbell': 1000, '/items/supporterpoints': 50 }
357
- const canAfford = canAffordShopItem(shopItem, inventory)
358
-
359
- // Calculate total cost for multiple purchases
360
- const totalCost = calculateTotalShopCost([item1, item2, item3])
361
-
362
- // Find cheapest way to buy an item
363
- const cheapest = findCheapestShopItem('/items/milk', '/items/cowbell')
364
-
365
- // Sort and group shop items
366
- const sorted = sortShopItemsByIndex(shopItems)
367
- const grouped = groupShopItemsByCategory()
368
- ```
101
+ ### skills/utils
369
102
 
370
- #### Community Buffs - Server Bonuses
103
+ | Function | Description |
104
+ |----------|-------------|
105
+ | `isSkillHrid(value)` | Type guard for SkillHrid |
371
106
 
372
- ```typescript
373
- import {
374
- getCommunityBuffsByActionType,
375
- calculateCommunityBuffValue,
376
- isCommunityBuffActiveForAction,
377
- getTotalCowbellCost,
378
- sortCommunityBuffsByIndex,
379
- } from '@c3d.gg/mwi-types/types/community-buffs'
380
-
381
- // Get buffs that apply to specific action types
382
- const cookingBuffs = getCommunityBuffsByActionType('/action_types/cooking')
383
-
384
- // Calculate buff effectiveness at level
385
- const buffValue = calculateCommunityBuffValue(communityBuff, 5)
386
- // Returns: { flat: number, ratio: number }
387
-
388
- // Check if buff applies to action
389
- const appliesTo = isCommunityBuffActiveForAction(buffType, '/action_types/combat')
390
-
391
- // Calculate total cost for multiple buffs
392
- const buffHrids = ['/community_buffs/cooking_speed', '/community_buffs/double_loot']
393
- const totalCost = getTotalCowbellCost(buffHrids)
394
-
395
- // Sort buffs for display
396
- const sortedBuffs = sortCommunityBuffsByIndex(communityBuffs)
397
- ```
107
+ ## Usage Examples
398
108
 
399
- #### Purchase Bundles - Monetization
109
+ ### Type Guards
400
110
 
401
111
  ```typescript
402
- import {
403
- getStandardOnlyBundles,
404
- getIroncowOnlyBundles,
405
- getMooPassBundles,
406
- getCowbellBundles,
407
- getBundlesByPriceRange,
408
- sortPurchaseBundlesByIndex,
409
- getBundleValuePerDollar,
410
- } from '@c3d.gg/mwi-types/types/purchase-bundles'
411
-
412
- // Get bundles by game mode availability
413
- const standardBundles = getStandardOnlyBundles()
414
- const ironcowBundles = getIroncowOnlyBundles()
415
-
416
- // Get bundles by type
417
- const mooPassOptions = getMooPassBundles()
418
- const cowbellOptions = getCowbellBundles()
419
-
420
- // Find bundles in price range (in cents)
421
- const budgetBundles = getBundlesByPriceRange(99, 999) // $0.99 to $9.99
422
-
423
- // Sort bundles for display
424
- const sortedBundles = sortPurchaseBundlesByIndex(allBundles)
425
-
426
- // Calculate value efficiency
427
- const valuePerDollar = getBundleValuePerDollar('/bundles/mega_cowbell_pack')
428
- ```
429
-
430
- ### HRID Constants
112
+ import { isItemHrid } from '@c3d.gg/mwi-types/items/utils'
113
+ import { isRecipeHrid } from '@c3d.gg/mwi-types/recipes/utils'
431
114
 
432
- ```typescript
433
- import { ITEM_HRIDS, ItemHrid, SKILL_HRIDS, SkillHrid } from '@c3d.gg/mwi-types'
434
-
435
- // All HRIDs are const arrays
436
- const firstItem = ITEM_HRIDS[0] // Type: ItemHrid
437
-
438
- // Use for exhaustive checks
439
- function handleSkill(skill: SkillHrid) {
440
- switch (skill) {
441
- case '/skills/alchemy':
442
- // ...
443
- case '/skills/brewing':
444
- // ...
445
- // TypeScript ensures all cases are handled
446
- }
115
+ function processHrid(value: string) {
116
+ if (isItemHrid(value)) {
117
+ // value is now typed as ItemHrid
118
+ }
119
+ if (isRecipeHrid(value)) {
120
+ // value is now typed as RecipeHrid
121
+ }
447
122
  }
448
-
449
- // Check if a string is a valid HRID
450
- ITEM_HRIDS.includes(someString) // Type guard
451
123
  ```
452
124
 
453
- ### Import Paths
454
-
455
- The package provides multiple entry points for better tree-shaking:
125
+ ### Recipe Tree
456
126
 
457
127
  ```typescript
458
- // Main entry - all types and utilities
459
- import { getItem, Item, ITEMS } from '@c3d.gg/mwi-types'
460
- // Localization
461
- import { getTranslation } from '@c3d.gg/mwi-types/localization'
462
- // Individual type modules (recommended for tree-shaking)
463
- import { getItem, Item, ITEMS } from '@c3d.gg/mwi-types/types/items'
464
- // Player data types
465
- import { Character, PlayerData } from '@c3d.gg/mwi-types/types/player-data'
466
- import { getSkill, Skill, SKILLS } from '@c3d.gg/mwi-types/types/skills'
467
- // Utils only
468
- import { filterByCategory, sortByIndex } from '@c3d.gg/mwi-types/utils'
128
+ import { buildRecipeTree, getTotalMaterials } from '@c3d.gg/mwi-types/recipes/utils'
129
+ import type { ItemHrid } from '@c3d.gg/mwi-types/items'
130
+
131
+ const tree = buildRecipeTree('/items/cheese' as ItemHrid, 10)
132
+ const materials = getTotalMaterials(tree)
133
+ // Map<ItemHrid, number> of base materials needed
469
134
  ```
470
135
 
471
- ### Type-Safe Translations
136
+ ### Item Lookup
472
137
 
473
138
  ```typescript
474
- import { getTranslation } from '@c3d.gg/mwi-types/localization'
139
+ import { getItem, getItemsByCategory } from '@c3d.gg/mwi-types/items/utils'
140
+ import type { ItemHrid, ItemCategoryHrid } from '@c3d.gg/mwi-types/items'
475
141
 
476
- // Get translations for a specific locale
477
- const enTranslations = getTranslation('en')
478
- const zhTranslations = getTranslation('zh')
479
-
480
- // Access translated content
481
- const milkName = enTranslations.items['/items/milk'].name
482
- const alchemyDesc = enTranslations.skills['/skills/alchemy'].description
483
-
484
- // All translations are fully typed
485
- enTranslations.actions['/actions/brewing_weak_beer'].name
142
+ const milk = getItem('/items/milk' as ItemHrid)
143
+ const foods = getItemsByCategory('/item_categories/food' as ItemCategoryHrid)
486
144
  ```
487
145
 
488
- ## Available Types
489
-
490
- ### Core Game Logic
491
-
492
- - **Skills** - All game skills with experience and level requirements
493
- - **Items** - Resources, equipment, consumables with full property data
494
- - **Actions** - Skill-specific actions with requirements and outputs
495
- - **Recipes** - Crafting recipes with ingredients and results
496
- - **Equipment** - Equipment types and stat modifiers
497
- - **Abilities** - Combat abilities with damage calculations
498
-
499
- ### Combat System
500
-
501
- - **Combat Monsters** - NPCs with stats, abilities, and loot tables
502
- - **Combat Styles** - Attack styles and combat mechanics
503
- - **Damage Types** - Elemental and physical damage categories
504
- - **Buffs** - Status effects and stat modifiers
505
-
506
- ### Game Features
146
+ ## Available Domains
507
147
 
508
- - **House Rooms** - Player housing upgrades and bonuses
509
- - **Shops** - Shop categories and purchasable items
510
- - **Tasks** - Daily/random tasks and rewards
511
- - **Community Buffs** - Server-wide effects
512
- - **Quests** - Quest chains and progression
148
+ | Domain | Types | Constants | Utils |
149
+ |--------|-------|-----------|-------|
150
+ | `/items` | Item, ItemHrid, ItemCategory, etc. | ITEM_HRIDS, ITEMS_BY_CATEGORY | Yes |
151
+ | `/recipes` | Recipe, RecipeHrid, RecipeTreeNode | RECIPE_HRIDS, RECIPES_BY_OUTPUT | Yes |
152
+ | `/actions` | Action, ActionHrid, ActionCategory | ACTION_HRIDS, ACTIONS_BY_SKILL | Yes |
153
+ | `/monsters` | Monster, MonsterHrid | MONSTER_HRIDS | Yes |
154
+ | `/skills` | Skill, SkillHrid | SKILL_HRIDS | Yes |
155
+ | `/abilities` | Ability, AbilityHrid | ABILITY_HRIDS | No |
156
+ | `/buffs` | Buff, BuffType | BUFF_TYPES_HRIDS | No |
157
+ | `/combat` | CombatStyle, DamageType | COMBAT_STYLE_HRIDS | No |
158
+ | `/house` | HouseRoom, HouseRoomHrid | HOUSE_ROOM_HRIDS | No |
159
+ | `/shop` | ShopItem, PurchaseBundle | SHOP_ITEMS_HRIDS | No |
160
+ | `/tasks` | RandomTaskType | RANDOM_TASK_TYPE_HRIDS | No |
161
+ | `/leaderboard` | LeaderboardCategory | LEADERBOARD_CATEGORY_HRIDS | No |
513
162
 
514
- ### Social & UI
163
+ ## Main Entry Point
515
164
 
516
- - **Chat** - Icons, colors, and channel types
517
- - **Avatars** - Character customization options
518
- - **Guild Roles** - Permissions and hierarchy
519
- - **Leaderboards** - Ranking categories and scoring
165
+ For convenience, types and constants (but not utils) are re-exported from the root:
520
166
 
521
- ### Player Data
522
-
523
- - **Character** - Full character state and progression
524
- - **Inventory** - Item storage and equipment loadouts
525
- - **Skills Progress** - Experience and level tracking
526
-
527
- ## Auto-Generated Package
528
-
529
- ⚠️ **Important**: This package is auto-generated from Milky Way Idle game data files. Do not manually edit the generated files in the `dist` directory. All type definitions are generated from the source game data to ensure accuracy and completeness.
530
-
531
- ## Development
532
-
533
- To contribute or report issues, please visit our [GitHub repository](https://github.com/c3d-gg/mwi-types).
534
-
535
- ### Building from Source
536
-
537
- ```bash
538
- # Clone the repository
539
- git clone https://github.com/c3d-gg/mwi-types.git
540
- cd mwi-types
541
-
542
- # Install dependencies
543
- bun install
544
-
545
- # Generate types
546
- bun run generate
547
-
548
- # Type check
549
- bun run typecheck
167
+ ```typescript
168
+ import { ITEM_HRIDS, SKILL_HRIDS, type Item, type Skill } from '@c3d.gg/mwi-types'
550
169
  ```
551
170
 
552
- ## Requirements
171
+ ## Auto-Generated
553
172
 
554
- - TypeScript 5.0 or higher
173
+ This package is generated from Milky Way Idle game data. Do not edit `dist/` files.
555
174
 
556
175
  ## License
557
176
 
558
- MIT © C3D
559
-
560
- ## Changelog
561
-
562
- See [CHANGELOG.md](./CHANGELOG.md) for version history and breaking changes.
177
+ MIT