@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.
- package/CHANGELOG.md +3 -0
- package/README.md +110 -495
- package/dist/.tsbuildinfo +1 -1
- package/dist/domains/abilities/abilities.json +3331 -0
- package/dist/domains/abilities/constants.d.ts +3 -0
- package/dist/domains/abilities/constants.d.ts.map +1 -0
- package/dist/domains/abilities/constants.js +97 -0
- package/dist/domains/abilities/constants.js.map +1 -0
- package/dist/domains/abilities/index.d.ts +3 -0
- package/dist/domains/abilities/index.d.ts.map +1 -0
- package/dist/domains/abilities/index.js +2 -0
- package/dist/domains/abilities/index.js.map +1 -0
- package/dist/domains/abilities/types.d.ts +37 -0
- package/dist/domains/abilities/types.d.ts.map +1 -0
- package/dist/domains/abilities/types.js +2 -0
- package/dist/domains/abilities/types.js.map +1 -0
- package/dist/domains/actions/action_categories.json +356 -0
- package/dist/domains/actions/action_types.json +57 -0
- package/dist/domains/actions/actions.json +41966 -0
- package/dist/domains/actions/constants.d.ts +7 -0
- package/dist/domains/actions/constants.d.ts.map +1 -0
- package/dist/domains/actions/constants.js +1501 -0
- package/dist/domains/actions/constants.js.map +1 -0
- package/dist/domains/actions/index.d.ts +3 -0
- package/dist/domains/actions/index.d.ts.map +1 -0
- package/dist/domains/actions/index.js +2 -0
- package/dist/domains/actions/index.js.map +1 -0
- package/dist/domains/actions/types.d.ts +74 -0
- package/dist/domains/actions/types.d.ts.map +1 -0
- package/dist/domains/actions/types.js +2 -0
- package/dist/domains/actions/types.js.map +1 -0
- package/dist/domains/actions/utils.d.ts +9 -0
- package/dist/domains/actions/utils.d.ts.map +1 -0
- package/dist/domains/actions/utils.js +27 -0
- package/dist/domains/actions/utils.js.map +1 -0
- package/dist/domains/avatar/avatar_outfits.json +572 -0
- package/dist/domains/avatar/avatars.json +512 -0
- package/dist/domains/avatar/constants.d.ts +3 -0
- package/dist/domains/avatar/constants.d.ts.map +1 -0
- package/dist/domains/avatar/constants.js +185 -0
- package/dist/domains/avatar/constants.js.map +1 -0
- package/dist/domains/avatar/index.d.ts +3 -0
- package/dist/domains/avatar/index.d.ts.map +1 -0
- package/dist/domains/avatar/index.js +2 -0
- package/dist/domains/avatar/index.js.map +1 -0
- package/dist/domains/avatar/types.d.ts +22 -0
- package/dist/domains/avatar/types.d.ts.map +1 -0
- package/dist/domains/avatar/types.js +2 -0
- package/dist/domains/avatar/types.js.map +1 -0
- package/dist/domains/buffs/buff_types.json +474 -0
- package/dist/domains/buffs/community_buff_types.json +119 -0
- package/dist/domains/buffs/constants.d.ts +4 -0
- package/dist/domains/buffs/constants.d.ts.map +1 -0
- package/dist/domains/buffs/constants.js +181 -0
- package/dist/domains/buffs/constants.js.map +1 -0
- package/dist/domains/buffs/index.d.ts +3 -0
- package/dist/domains/buffs/index.d.ts.map +1 -0
- package/dist/domains/buffs/index.js +2 -0
- package/dist/domains/buffs/index.js.map +1 -0
- package/dist/domains/buffs/types.d.ts +27 -0
- package/dist/domains/buffs/types.d.ts.map +1 -0
- package/dist/domains/buffs/types.js +2 -0
- package/dist/domains/buffs/types.js.map +1 -0
- package/dist/domains/chat/chat_channel_types.json +128 -0
- package/dist/domains/chat/chat_icons.json +4352 -0
- package/dist/domains/chat/constants.d.ts +3 -0
- package/dist/domains/chat/constants.d.ts.map +1 -0
- package/dist/domains/chat/constants.js +461 -0
- package/dist/domains/chat/constants.js.map +1 -0
- package/dist/domains/chat/index.d.ts +3 -0
- package/dist/domains/chat/index.d.ts.map +1 -0
- package/dist/domains/chat/index.js +2 -0
- package/dist/domains/chat/index.js.map +1 -0
- package/dist/domains/chat/types.d.ts +20 -0
- package/dist/domains/chat/types.d.ts.map +1 -0
- package/dist/domains/chat/types.js +2 -0
- package/dist/domains/chat/types.js.map +1 -0
- package/dist/domains/combat/combat_style.json +68 -0
- package/dist/domains/combat/combat_trigger_comparator.json +26 -0
- package/dist/domains/combat/combat_trigger_condition.json +596 -0
- package/dist/domains/combat/combat_trigger_dependency.json +30 -0
- package/dist/domains/combat/constants.d.ts +6 -0
- package/dist/domains/combat/constants.d.ts.map +1 -0
- package/dist/domains/combat/constants.js +83 -0
- package/dist/domains/combat/constants.js.map +1 -0
- package/dist/domains/combat/damage_type.json +22 -0
- package/dist/domains/combat/index.d.ts +3 -0
- package/dist/domains/combat/index.d.ts.map +1 -0
- package/dist/domains/combat/index.js +2 -0
- package/dist/domains/combat/index.js.map +1 -0
- package/dist/domains/combat/types.d.ts +143 -0
- package/dist/domains/combat/types.d.ts.map +1 -0
- package/dist/domains/combat/types.js +2 -0
- package/dist/domains/combat/types.js.map +1 -0
- package/dist/domains/game-mode/constants.d.ts +3 -0
- package/dist/domains/game-mode/constants.d.ts.map +1 -0
- package/dist/domains/game-mode/constants.js +7 -0
- package/dist/domains/game-mode/constants.js.map +1 -0
- package/dist/domains/game-mode/game_mode.json +32 -0
- package/dist/domains/game-mode/index.d.ts +3 -0
- package/dist/domains/game-mode/index.d.ts.map +1 -0
- package/dist/domains/game-mode/index.js +2 -0
- package/dist/domains/game-mode/index.js.map +1 -0
- package/dist/domains/game-mode/types.d.ts +14 -0
- package/dist/domains/game-mode/types.d.ts.map +1 -0
- package/dist/domains/game-mode/types.js +2 -0
- package/dist/domains/game-mode/types.js.map +1 -0
- package/dist/domains/guild/constants.d.ts +2 -0
- package/dist/domains/guild/constants.d.ts.map +1 -0
- package/dist/domains/guild/constants.js +7 -0
- package/dist/domains/guild/constants.js.map +1 -0
- package/dist/domains/guild/guild_character_role.json +58 -0
- package/dist/domains/guild/index.d.ts +3 -0
- package/dist/domains/guild/index.d.ts.map +1 -0
- package/dist/domains/guild/index.js +2 -0
- package/dist/domains/guild/index.js.map +1 -0
- package/dist/domains/guild/types.d.ts +17 -0
- package/dist/domains/guild/types.d.ts.map +1 -0
- package/dist/domains/guild/types.js +2 -0
- package/dist/domains/guild/types.js.map +1 -0
- package/dist/domains/house/constants.d.ts +4 -0
- package/dist/domains/house/constants.d.ts.map +1 -0
- package/dist/domains/house/constants.js +39 -0
- package/dist/domains/house/constants.js.map +1 -0
- package/dist/domains/house/house_rooms.json +5553 -0
- package/dist/domains/house/index.d.ts +3 -0
- package/dist/domains/house/index.d.ts.map +1 -0
- package/dist/domains/house/index.js +2 -0
- package/dist/domains/house/index.js.map +1 -0
- package/dist/domains/house/types.d.ts +16 -0
- package/dist/domains/house/types.d.ts.map +1 -0
- package/dist/domains/house/types.js +2 -0
- package/dist/domains/house/types.js.map +1 -0
- package/dist/domains/items/constants.d.ts +8 -0
- package/dist/domains/items/constants.d.ts.map +1 -0
- package/dist/domains/items/constants.js +1969 -0
- package/dist/domains/items/constants.js.map +1 -0
- package/dist/domains/items/equipment_types.json +152 -0
- package/dist/domains/items/index.d.ts +3 -0
- package/dist/domains/items/index.d.ts.map +1 -0
- package/dist/domains/items/index.js +2 -0
- package/dist/domains/items/index.js.map +1 -0
- package/dist/domains/items/item_categories.json +50 -0
- package/dist/domains/items/item_locations.json +220 -0
- package/dist/domains/items/items.json +65871 -0
- package/dist/domains/items/types.d.ts +308 -0
- package/dist/domains/items/types.d.ts.map +1 -0
- package/dist/domains/items/types.js +2 -0
- package/dist/domains/items/types.js.map +1 -0
- package/dist/domains/items/utils.d.ts +10 -0
- package/dist/domains/items/utils.d.ts.map +1 -0
- package/dist/domains/items/utils.js +37 -0
- package/dist/domains/items/utils.js.map +1 -0
- package/dist/domains/leaderboard/constants.d.ts +3 -0
- package/dist/domains/leaderboard/constants.d.ts.map +1 -0
- package/dist/domains/leaderboard/constants.js +32 -0
- package/dist/domains/leaderboard/constants.js.map +1 -0
- package/dist/domains/leaderboard/index.d.ts +3 -0
- package/dist/domains/leaderboard/index.d.ts.map +1 -0
- package/dist/domains/leaderboard/index.js +2 -0
- package/dist/domains/leaderboard/index.js.map +1 -0
- package/dist/domains/leaderboard/leaderboard_categories.json +149 -0
- package/dist/domains/leaderboard/leaderboard_types.json +56 -0
- package/dist/domains/leaderboard/types.d.ts +21 -0
- package/dist/domains/leaderboard/types.d.ts.map +1 -0
- package/dist/domains/leaderboard/types.js +2 -0
- package/dist/domains/leaderboard/types.js.map +1 -0
- package/dist/domains/level/constants.d.ts +2 -0
- package/dist/domains/level/constants.d.ts.map +1 -0
- package/dist/domains/level/constants.js +153 -0
- package/dist/domains/level/constants.js.map +1 -0
- package/dist/domains/level/index.d.ts +2 -0
- package/dist/domains/level/index.d.ts.map +1 -0
- package/dist/domains/level/index.js +2 -0
- package/dist/domains/level/index.js.map +1 -0
- package/dist/domains/monsters/constants.d.ts +2 -0
- package/dist/domains/monsters/constants.d.ts.map +1 -0
- package/dist/domains/monsters/constants.js +80 -0
- package/dist/domains/monsters/constants.js.map +1 -0
- package/dist/domains/monsters/index.d.ts +3 -0
- package/dist/domains/monsters/index.d.ts.map +1 -0
- package/dist/domains/monsters/index.js +2 -0
- package/dist/domains/monsters/index.js.map +1 -0
- package/dist/domains/monsters/monsters.json +9313 -0
- package/dist/domains/monsters/types.d.ts +21 -0
- package/dist/domains/monsters/types.d.ts.map +1 -0
- package/dist/domains/monsters/types.js +2 -0
- package/dist/domains/monsters/types.js.map +1 -0
- package/dist/domains/monsters/utils.d.ts +6 -0
- package/dist/domains/monsters/utils.d.ts.map +1 -0
- package/dist/domains/monsters/utils.js +21 -0
- package/dist/domains/monsters/utils.js.map +1 -0
- package/dist/domains/name/constants.d.ts +2 -0
- package/dist/domains/name/constants.d.ts.map +1 -0
- package/dist/domains/name/constants.js +142 -0
- package/dist/domains/name/constants.js.map +1 -0
- package/dist/domains/name/index.d.ts +3 -0
- package/dist/domains/name/index.d.ts.map +1 -0
- package/dist/domains/name/index.js +2 -0
- package/dist/domains/name/index.js.map +1 -0
- package/dist/domains/name/name_colors.json +975 -0
- package/dist/domains/name/types.d.ts +10 -0
- package/dist/domains/name/types.d.ts.map +1 -0
- package/dist/domains/name/types.js +2 -0
- package/dist/domains/name/types.js.map +1 -0
- package/dist/domains/player/index.d.ts +2 -0
- package/dist/domains/player/index.d.ts.map +1 -0
- package/dist/domains/player/index.js +2 -0
- package/dist/domains/player/index.js.map +1 -0
- package/dist/domains/player/types.d.ts +23 -0
- package/dist/domains/player/types.d.ts.map +1 -0
- package/dist/domains/player/types.js +2 -0
- package/dist/domains/player/types.js.map +1 -0
- package/dist/{generated/types/recipes.d.ts → domains/recipes/constants.d.ts} +7 -84
- package/dist/domains/recipes/constants.d.ts.map +1 -0
- package/dist/domains/recipes/constants.js +2655 -0
- package/dist/domains/recipes/constants.js.map +1 -0
- package/dist/domains/recipes/index.d.ts +4 -0
- package/dist/domains/recipes/index.d.ts.map +1 -0
- package/dist/domains/recipes/index.js +3 -0
- package/dist/domains/recipes/index.js.map +1 -0
- package/dist/domains/recipes/recipes.json +21268 -0
- package/dist/domains/recipes/types.d.ts +65 -0
- package/dist/domains/recipes/types.d.ts.map +1 -0
- package/dist/domains/recipes/types.js +2 -0
- package/dist/domains/recipes/types.js.map +1 -0
- package/dist/domains/recipes/utils.d.ts +11 -0
- package/dist/domains/recipes/utils.d.ts.map +1 -0
- package/dist/domains/recipes/utils.js +78 -0
- package/dist/domains/recipes/utils.js.map +1 -0
- package/dist/domains/shared/constants.d.ts +2 -0
- package/dist/domains/shared/constants.d.ts.map +1 -0
- package/dist/domains/shared/constants.js +22 -0
- package/dist/domains/shared/constants.js.map +1 -0
- package/dist/domains/shared/index.d.ts +3 -0
- package/dist/domains/shared/index.d.ts.map +1 -0
- package/dist/domains/shared/index.js +2 -0
- package/dist/domains/shared/index.js.map +1 -0
- package/dist/domains/shared/openable_loot_drop.json +1276 -0
- package/dist/domains/shared/types.d.ts +28 -0
- package/dist/domains/shared/types.d.ts.map +1 -0
- package/dist/domains/shared/types.js +2 -0
- package/dist/domains/shared/types.js.map +1 -0
- package/dist/domains/shop/buyable_upgrades.json +338 -0
- package/dist/domains/shop/constants.d.ts +5 -0
- package/dist/domains/shop/constants.d.ts.map +1 -0
- package/dist/domains/shop/constants.js +109 -0
- package/dist/domains/shop/constants.js.map +1 -0
- package/dist/domains/shop/index.d.ts +3 -0
- package/dist/domains/shop/index.d.ts.map +1 -0
- package/dist/domains/shop/index.js +2 -0
- package/dist/domains/shop/index.js.map +1 -0
- package/dist/domains/shop/purchase_bundles.json +226 -0
- package/dist/domains/shop/shop_categories.json +12 -0
- package/dist/domains/shop/shop_items.json +758 -0
- package/dist/domains/shop/types.d.ts +55 -0
- package/dist/domains/shop/types.d.ts.map +1 -0
- package/dist/domains/shop/types.js +2 -0
- package/dist/domains/shop/types.js.map +1 -0
- package/dist/domains/skills/constants.d.ts +2 -0
- package/dist/domains/skills/constants.d.ts.map +1 -0
- package/dist/domains/skills/constants.js +21 -0
- package/dist/domains/skills/constants.js.map +1 -0
- package/dist/domains/skills/index.d.ts +3 -0
- package/dist/domains/skills/index.d.ts.map +1 -0
- package/dist/domains/skills/index.js +2 -0
- package/dist/domains/skills/index.js.map +1 -0
- package/dist/domains/skills/skills.json +128 -0
- package/dist/domains/skills/types.d.ts +10 -0
- package/dist/domains/skills/types.d.ts.map +1 -0
- package/dist/domains/skills/types.js +2 -0
- package/dist/domains/skills/types.js.map +1 -0
- package/dist/domains/skills/utils.d.ts +3 -0
- package/dist/domains/skills/utils.d.ts.map +1 -0
- package/dist/domains/skills/utils.js +7 -0
- package/dist/domains/skills/utils.js.map +1 -0
- package/dist/domains/tasks/constants.d.ts +3 -0
- package/dist/domains/tasks/constants.d.ts.map +1 -0
- package/dist/domains/tasks/constants.js +18 -0
- package/dist/domains/tasks/constants.js.map +1 -0
- package/dist/domains/tasks/index.d.ts +3 -0
- package/dist/domains/tasks/index.d.ts.map +1 -0
- package/dist/domains/tasks/index.js +2 -0
- package/dist/domains/tasks/index.js.map +1 -0
- package/dist/domains/tasks/random_task_type.json +56 -0
- package/dist/domains/tasks/task_shop_items.json +42 -0
- package/dist/domains/tasks/types.d.ts +18 -0
- package/dist/domains/tasks/types.d.ts.map +1 -0
- package/dist/domains/tasks/types.js +2 -0
- package/dist/domains/tasks/types.js.map +1 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/package.json +159 -68
- package/src/domains/abilities/abilities.json +3331 -0
- package/src/domains/actions/action_categories.json +356 -0
- package/src/domains/actions/action_types.json +57 -0
- package/src/domains/actions/actions.json +41966 -0
- package/src/domains/avatar/avatar_outfits.json +572 -0
- package/src/domains/avatar/avatars.json +512 -0
- package/src/domains/buffs/buff_types.json +474 -0
- package/src/domains/buffs/community_buff_types.json +119 -0
- package/src/domains/chat/chat_channel_types.json +128 -0
- package/src/domains/chat/chat_icons.json +4352 -0
- package/src/domains/combat/combat_style.json +68 -0
- package/src/domains/combat/combat_trigger_comparator.json +26 -0
- package/src/domains/combat/combat_trigger_condition.json +596 -0
- package/src/domains/combat/combat_trigger_dependency.json +30 -0
- package/src/domains/combat/damage_type.json +22 -0
- package/src/domains/game-mode/game_mode.json +32 -0
- package/src/domains/guild/guild_character_role.json +58 -0
- package/src/domains/house/house_rooms.json +5553 -0
- package/src/domains/items/equipment_types.json +152 -0
- package/src/domains/items/item_categories.json +50 -0
- package/src/domains/items/item_locations.json +220 -0
- package/src/domains/items/items.json +65871 -0
- package/src/domains/leaderboard/leaderboard_categories.json +149 -0
- package/src/domains/leaderboard/leaderboard_types.json +56 -0
- package/src/domains/monsters/monsters.json +9313 -0
- package/src/domains/name/name_colors.json +975 -0
- package/src/domains/recipes/recipes.json +21268 -0
- package/src/domains/shared/openable_loot_drop.json +1276 -0
- package/src/domains/shop/buyable_upgrades.json +338 -0
- package/src/domains/shop/purchase_bundles.json +226 -0
- package/src/domains/shop/shop_categories.json +12 -0
- package/src/domains/shop/shop_items.json +758 -0
- package/src/domains/skills/skills.json +128 -0
- package/src/domains/tasks/random_task_type.json +56 -0
- package/src/domains/tasks/task_shop_items.json +42 -0
- package/LICENSE +0 -21
- package/dist/generated/index.d.ts +0 -30
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/index.js +0 -34
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/localization/en/translations.d.ts +0 -32
- package/dist/generated/localization/en/translations.d.ts.map +0 -1
- package/dist/generated/localization/en/translations.js +0 -2894
- package/dist/generated/localization/en/translations.js.map +0 -1
- package/dist/generated/localization/index.d.ts +0 -7
- package/dist/generated/localization/index.d.ts.map +0 -1
- package/dist/generated/localization/index.js +0 -8
- package/dist/generated/localization/index.js.map +0 -1
- package/dist/generated/localization/utils.d.ts +0 -14
- package/dist/generated/localization/utils.d.ts.map +0 -1
- package/dist/generated/localization/utils.js +0 -28
- package/dist/generated/localization/utils.js.map +0 -1
- package/dist/generated/localization/zh/translations.d.ts +0 -32
- package/dist/generated/localization/zh/translations.d.ts.map +0 -1
- package/dist/generated/localization/zh/translations.js +0 -2894
- package/dist/generated/localization/zh/translations.js.map +0 -1
- package/dist/generated/types/abilities.d.ts +0 -12
- package/dist/generated/types/abilities.d.ts.map +0 -1
- package/dist/generated/types/abilities.js +0 -477
- package/dist/generated/types/abilities.js.map +0 -1
- package/dist/generated/types/action-categories.d.ts +0 -39
- package/dist/generated/types/action-categories.d.ts.map +0 -1
- package/dist/generated/types/action-categories.js +0 -803
- package/dist/generated/types/action-categories.js.map +0 -1
- package/dist/generated/types/actions.d.ts +0 -144
- package/dist/generated/types/actions.d.ts.map +0 -1
- package/dist/generated/types/actions.js +0 -48406
- package/dist/generated/types/actions.js.map +0 -1
- package/dist/generated/types/avatar.d.ts +0 -34
- package/dist/generated/types/avatar.d.ts.map +0 -1
- package/dist/generated/types/avatar.js +0 -1000
- package/dist/generated/types/avatar.js.map +0 -1
- package/dist/generated/types/avatars.d.ts +0 -34
- package/dist/generated/types/avatars.d.ts.map +0 -1
- package/dist/generated/types/avatars.js +0 -1110
- package/dist/generated/types/avatars.js.map +0 -1
- package/dist/generated/types/buff-types.d.ts +0 -50
- package/dist/generated/types/buff-types.d.ts.map +0 -1
- package/dist/generated/types/buff-types.js +0 -819
- package/dist/generated/types/buff-types.js.map +0 -1
- package/dist/generated/types/chat-channel-types.d.ts +0 -19
- package/dist/generated/types/chat-channel-types.d.ts.map +0 -1
- package/dist/generated/types/chat-channel-types.js +0 -302
- package/dist/generated/types/chat-channel-types.js.map +0 -1
- package/dist/generated/types/chat-icons.d.ts +0 -56
- package/dist/generated/types/chat-icons.d.ts.map +0 -1
- package/dist/generated/types/chat-icons.js +0 -6656
- package/dist/generated/types/chat-icons.js.map +0 -1
- package/dist/generated/types/combat-styles.d.ts +0 -21
- package/dist/generated/types/combat-styles.d.ts.map +0 -1
- package/dist/generated/types/combat-styles.js +0 -125
- package/dist/generated/types/combat-styles.js.map +0 -1
- package/dist/generated/types/community-buffs.d.ts +0 -53
- package/dist/generated/types/community-buffs.d.ts.map +0 -1
- package/dist/generated/types/community-buffs.js +0 -222
- package/dist/generated/types/community-buffs.js.map +0 -1
- package/dist/generated/types/damage-types.d.ts +0 -17
- package/dist/generated/types/damage-types.d.ts.map +0 -1
- package/dist/generated/types/damage-types.js +0 -60
- package/dist/generated/types/damage-types.js.map +0 -1
- package/dist/generated/types/equipment-types.d.ts +0 -17
- package/dist/generated/types/equipment-types.d.ts.map +0 -1
- package/dist/generated/types/equipment-types.js +0 -249
- package/dist/generated/types/equipment-types.js.map +0 -1
- package/dist/generated/types/game-modes.d.ts +0 -49
- package/dist/generated/types/game-modes.d.ts.map +0 -1
- package/dist/generated/types/game-modes.js +0 -118
- package/dist/generated/types/game-modes.js.map +0 -1
- package/dist/generated/types/guild-character-roles.d.ts +0 -17
- package/dist/generated/types/guild-character-roles.d.ts.map +0 -1
- package/dist/generated/types/guild-character-roles.js +0 -60
- package/dist/generated/types/guild-character-roles.js.map +0 -1
- package/dist/generated/types/house-rooms.d.ts +0 -46
- package/dist/generated/types/house-rooms.d.ts.map +0 -1
- package/dist/generated/types/house-rooms.js +0 -5699
- package/dist/generated/types/house-rooms.js.map +0 -1
- package/dist/generated/types/item-categories.d.ts +0 -17
- package/dist/generated/types/item-categories.d.ts.map +0 -1
- package/dist/generated/types/item-categories.js +0 -96
- package/dist/generated/types/item-categories.js.map +0 -1
- package/dist/generated/types/item-locations.d.ts +0 -17
- package/dist/generated/types/item-locations.d.ts.map +0 -1
- package/dist/generated/types/item-locations.js +0 -258
- package/dist/generated/types/item-locations.js.map +0 -1
- package/dist/generated/types/items.d.ts +0 -73
- package/dist/generated/types/items.d.ts.map +0 -1
- package/dist/generated/types/items.js +0 -69551
- package/dist/generated/types/items.js.map +0 -1
- package/dist/generated/types/leaderboard-categories.d.ts +0 -33
- package/dist/generated/types/leaderboard-categories.d.ts.map +0 -1
- package/dist/generated/types/leaderboard-categories.js +0 -393
- package/dist/generated/types/leaderboard-categories.js.map +0 -1
- package/dist/generated/types/leaderboard-types.d.ts +0 -30
- package/dist/generated/types/leaderboard-types.d.ts.map +0 -1
- package/dist/generated/types/leaderboard-types.js +0 -163
- package/dist/generated/types/leaderboard-types.js.map +0 -1
- package/dist/generated/types/leaderboards.d.ts +0 -74
- package/dist/generated/types/leaderboards.d.ts.map +0 -1
- package/dist/generated/types/leaderboards.js +0 -457
- package/dist/generated/types/leaderboards.js.map +0 -1
- package/dist/generated/types/monsters.d.ts +0 -97
- package/dist/generated/types/monsters.d.ts.map +0 -1
- package/dist/generated/types/monsters.js +0 -9857
- package/dist/generated/types/monsters.js.map +0 -1
- package/dist/generated/types/name-colors.d.ts +0 -44
- package/dist/generated/types/name-colors.d.ts.map +0 -1
- package/dist/generated/types/name-colors.js +0 -1891
- package/dist/generated/types/name-colors.js.map +0 -1
- package/dist/generated/types/player-data.d.ts +0 -376
- package/dist/generated/types/player-data.d.ts.map +0 -1
- package/dist/generated/types/player-data.js +0 -54
- package/dist/generated/types/player-data.js.map +0 -1
- package/dist/generated/types/purchase-bundles.d.ts +0 -50
- package/dist/generated/types/purchase-bundles.d.ts.map +0 -1
- package/dist/generated/types/purchase-bundles.js +0 -358
- package/dist/generated/types/purchase-bundles.js.map +0 -1
- package/dist/generated/types/random-tasks.d.ts +0 -33
- package/dist/generated/types/random-tasks.d.ts.map +0 -1
- package/dist/generated/types/random-tasks.js +0 -162
- package/dist/generated/types/random-tasks.js.map +0 -1
- package/dist/generated/types/recipes.d.ts.map +0 -1
- package/dist/generated/types/recipes.js +0 -25996
- package/dist/generated/types/recipes.js.map +0 -1
- package/dist/generated/types/shop-categories.d.ts +0 -17
- package/dist/generated/types/shop-categories.d.ts.map +0 -1
- package/dist/generated/types/shop-categories.js +0 -42
- package/dist/generated/types/shop-categories.js.map +0 -1
- package/dist/generated/types/shop-items.d.ts +0 -35
- package/dist/generated/types/shop-items.d.ts.map +0 -1
- package/dist/generated/types/shop-items.js +0 -1313
- package/dist/generated/types/shop-items.js.map +0 -1
- package/dist/generated/types/skills.d.ts +0 -15
- package/dist/generated/types/skills.d.ts.map +0 -1
- package/dist/generated/types/skills.js +0 -219
- package/dist/generated/types/skills.js.map +0 -1
- package/dist/generated/types/task-shop-items.d.ts +0 -38
- package/dist/generated/types/task-shop-items.d.ts.map +0 -1
- package/dist/generated/types/task-shop-items.js +0 -160
- package/dist/generated/types/task-shop-items.js.map +0 -1
package/CHANGELOG.md
ADDED
package/README.md
CHANGED
|
@@ -1,562 +1,177 @@
|
|
|
1
1
|
# @c3d.gg/mwi-types
|
|
2
2
|
|
|
3
|
-
TypeScript
|
|
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
|
-
##
|
|
11
|
+
## Import Patterns
|
|
29
12
|
|
|
30
|
-
###
|
|
13
|
+
### Types Only (lean, ~0KB runtime)
|
|
31
14
|
|
|
32
15
|
```typescript
|
|
33
|
-
import { Item,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
58
|
-
|
|
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
|
-
|
|
31
|
+
### Raw JSON Data (custom processing)
|
|
79
32
|
|
|
80
33
|
```typescript
|
|
81
|
-
import
|
|
82
|
-
|
|
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
|
-
|
|
38
|
+
### Utils (lazy-loaded data + type guards)
|
|
112
39
|
|
|
113
40
|
```typescript
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
44
|
+
// Recipes
|
|
45
|
+
import { getRecipe, getAllRecipes, getRecipesForOutput, buildRecipeTree, getTotalMaterials, isRecipeHrid } from '@c3d.gg/mwi-types/recipes/utils'
|
|
151
46
|
|
|
152
|
-
|
|
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
|
-
|
|
50
|
+
// Monsters
|
|
51
|
+
import { getMonster, getMonstersByCombatLevel, isMonsterHrid } from '@c3d.gg/mwi-types/monsters/utils'
|
|
193
52
|
|
|
194
|
-
|
|
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
|
-
|
|
57
|
+
## Utils Reference
|
|
215
58
|
|
|
216
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
103
|
+
| Function | Description |
|
|
104
|
+
|----------|-------------|
|
|
105
|
+
| `isSkillHrid(value)` | Type guard for SkillHrid |
|
|
371
106
|
|
|
372
|
-
|
|
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
|
-
|
|
109
|
+
### Type Guards
|
|
400
110
|
|
|
401
111
|
```typescript
|
|
402
|
-
import {
|
|
403
|
-
|
|
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
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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
|
-
###
|
|
454
|
-
|
|
455
|
-
The package provides multiple entry points for better tree-shaking:
|
|
125
|
+
### Recipe Tree
|
|
456
126
|
|
|
457
127
|
```typescript
|
|
458
|
-
|
|
459
|
-
import {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
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
|
-
###
|
|
136
|
+
### Item Lookup
|
|
472
137
|
|
|
473
138
|
```typescript
|
|
474
|
-
import {
|
|
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
|
-
|
|
477
|
-
const
|
|
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
|
|
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
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
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
|
-
|
|
163
|
+
## Main Entry Point
|
|
515
164
|
|
|
516
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
171
|
+
## Auto-Generated
|
|
553
172
|
|
|
554
|
-
|
|
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
|
|
559
|
-
|
|
560
|
-
## Changelog
|
|
561
|
-
|
|
562
|
-
See [CHANGELOG.md](./CHANGELOG.md) for version history and breaking changes.
|
|
177
|
+
MIT
|