From ab54dc70efccdab86d3f46524b19eb8959188798 Mon Sep 17 00:00:00 2001 From: unexpextxd <26cgould2@gmail.com> Date: Fri, 25 Aug 2023 12:49:27 -0400 Subject: [PATCH] Item data changes, starting to modify ProfileMember to supportThe Rift. Upgrade Undici. --- package.json | 4 +- src/responses/resources/skyblock/items.ts | 291 +++++++++++++++------- src/responses/skyblock/_profile_member.ts | 20 +- yarn.lock | 8 +- 4 files changed, 224 insertions(+), 99 deletions(-) diff --git a/package.json b/package.json index fd64103..3e03379 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ ], "dependencies": { "typescript": "^4.6.3", - "undici": "^5.19.1" + "undici": "^5.23.0" }, "devDependencies": { "dotenv": "^16.0.0" } -} \ No newline at end of file +} diff --git a/src/responses/resources/skyblock/items.ts b/src/responses/resources/skyblock/items.ts index da2f920..5af3a16 100644 --- a/src/responses/resources/skyblock/items.ts +++ b/src/responses/resources/skyblock/items.ts @@ -1,5 +1,190 @@ import { SkyBlockSlayerBosses } from '../../skyblock/_profile_member' +interface MainItemStats { + DAMAGE?: number + damage?: number + + STRENGTH?: number + strength?: number + + DEFENSE?: number + defense?: number + + HEALTH?: number + health?: number + + MINING_FORTUNE?: number + mining_fortune?: number + + WALK_SPEED?: number + walk_speed?: number + + MAGIC_FIND?: number + magic_find?: number + + INTELLIGENCE?: number + intelligence?: number + + WEAPON_ABILITY_DAMAGE?: number + weapon_ability_damage?: number + + CRITICAL_DAMAGE?: number + critical_damage?: number + + CRITICAL_CHANCE?: number + critical_chance?: number + + SEA_CREATURE_CHANCE?: number + sea_creature_chance?: number + + FEROCITY?: number + ferocity?: number + + BREAKING_POWER?: number + breaking_power?: number + + MINING_SPEED?: number + mining_speed?: number + + PET_LUCK?: number + pet_luck?: number + + ABILITY_DAMAGE_PERCENT?: number + ability_damage_percent?: number + + TRUE_DEFENSE?: number + true_defense?: number + + ATTACK_SPEED?: number + attack_speed?: number + + FARMING_FORTUNE?: number + farming_fortune?: number + + MENDING?: number + mending?: number + + VITALITY?: number + vitality?: number + + FISHING_SPEED?: number + fishing_speed?: number + + HEALTH_REGENERATION?: number + health_regeneration?: number + + FISHING_WISDOM?: number + fishing_wisdom?: number + + COMBAT_WISDOM?: number + combat_wisdom?: number + + FORAGING_WISDOM?: number + foraging_wisdom?: number + + FARMING_WISDOM?: number + farming_wisdom?: number + + MANA_REGEN?: number + mana_regen?: number +} + +interface RiftItemStats { + RIFT_DAMAGE?: number + rift_damage?: number + + RIFT_STRENGTH?: number + rift_strength?: number + + RIFT_DEFENCE?: number + rift_defense?: number + + RIFT_HEALTH?: number + rift_health?: number + + RIFT_MINING_FORTUNE?: number + rift_mining_fortune?: number + + RIFT_WALK_SPEED?: number + rift_walk_speed?: number + + RIFT_MAGIC_FIND?: number + rift_magic_find?: number + + RIFT_INTELLIGENCE?: number + rift_intelligence?: number + + RIFT_WEAPON_ABILITY_DAMAGE?: number + rift_weapon_ability_damage?: number + + RIFT_CRITICAL_DAMAGE?: number + rift_critical_damage?: number + + RIFT_CRITICAL_CHANCE?: number + rift_critical_chance?: number + + RIFT_SEA_CREATURE_CHANCE?: number + rift_sea_creature_chance?: number + + RIFT_FEROCITY?: number + rift_ferocity?: number + + RIFT_BREAKING_POWER?: number + rift_breaking_power?: number + + RIFT_MINGING_SPEED?: number + rift_mining_speed?: number + + RIFT_PET_LUCK?: number + rift_pet_luck?: number + + RIFT_ABILITY_DAMAGE_PERCENT?: number + rift_ability_damage_percent?: number + + RIFT_TRUE_DEFENSE?: number + rift_true_defense?: number + + RIFT_ATTACK_SPEED?: number + rift_attack_speed?: number + + RIFT_TIME?: number + rift_time?: number + // Hypixel spelling error + rift_Time?: number + + RIFT_FARMING_FORTUNE?: number + rift_farming_fortune?: number + + RIFT_MENDING?: number + rift_mending?: number + + RIFT_VITALITY?: number + rift_vitality?: number + + RIFT_FISHING_SPEED?: number + rift_fishing_speed?: number + + RIFT_HEALTH_REGENERATION?: number + rift_health_regeneration?: number + + RIFT_FISHING_WISDOM?: number + rift_fishing_wisdom?: number + + RIFT_COMBAT_WISDOM?: number + rift_combat_wisdom?: number + + RIFT_FORAGING_WISDOM?: number + rift_foraging_wisdom?: number + + RIFT_FARMING_WISDOM?: number + rift_farming_wisdom?: number + + RIFT_MANA_REGEN?: number + rift_mana_regen?: number +} + +type ItemStats = MainItemStats & RiftItemStats + type EssenceType = | 'DIAMOND' | 'WITHER' @@ -45,6 +230,11 @@ export interface SkyBlockItemsResponse { lastUpdated: number items: ({ material: string + /** Base64 encoded skin data. */ + skin?: string + /** Format: "R,G,B" */ + color?: string + lose_motes_value_on_transfer?: boolean /** A record of enchantment ids like `counter_strike` to their default level. */ enchantments?: Record durability?: number @@ -89,59 +279,8 @@ export interface SkyBlockItemsResponse { * Make sure to normalize the case for these, since older items have * them uppercase and newer items have them lowercase. */ - stats?: { - DAMAGE?: number - damage?: number - STRENGTH?: number - strength?: number - DEFENSE?: number - defense?: number - HEALTH?: number - health?: number - MINING_FORTUNE?: number - mining_fortune?: number - WALK_SPEED?: number - walk_speed?: number - MAGIC_FIND?: number - magic_find?: number - INTELLIGENCE?: number - intelligence?: number - WEAPON_ABILITY_DAMAGE?: number - weapon_ability_damage?: number - CRITICAL_DAMAGE?: number - critical_damage?: number - CRITICAL_CHANCE?: number - critical_chance?: number - SEA_CREATURE_CHANCE?: number - sea_creature_chance?: number - FEROCITY?: number - ferocity?: number - BREAKING_POWER?: number - breaking_power?: number - MINING_SPEED?: number - mining_speed?: number - PET_LUCK?: number - pet_luck?: number - ABILITY_DAMAGE_PERCENT?: number - ability_damage_percent?: number - TRUE_DEFENSE?: number - true_defense?: number - ATTACK_SPEED?: number - attack_speed?: number - RIFT_DAMAGE?: number - RIFT_INTELLIGENCE?: number - RIFT_TIME?: number - FARMING_FORTUNE?: number - farming_fortune?: number - mending?: number - vitality?: number - fishing_speed?: number - health_regeneration?: number - fishing_wisdom?: number - combat_wisdom?: number - foraging_wisdom?: number - farming_wisdom?: number - } + stats?: ItemStats + origin?: string ability_damage_scaling?: number /** * The number of coins that the player gets from selling the item to @@ -153,45 +292,8 @@ export interface SkyBlockItemsResponse { /** * The item that this item will give you if you right click it. Seems to be currently only used for eccentric paintings. */ - item_specific?: - | { - bundled_item_id: 'ECCENTRIC_PAINTING' - /** The number of the `bundled_item_id`s that right clicking will give you */ - bundled_amount: number - } - | { - mana_refund: number - } - | { - rift_time: number - intelligence: number - } - | { - tiers: Record< - number, - { - stats: Partial> - } - > - } - | { - portal: { - holo_name: string - description_name?: string - destination_mode: string - location_tag?: string - schematic_file: string - offset?: string - skill_requirement: { - skill: 'MINING' | 'COMBAT' | 'FORAGING' | 'FARMING' - level: number - } - } - } - | { - speed_on_farming_island: number - extra_pelts: number - } + item_specific?: Record // Too complicated to keep track of every single item that requires 'item_specific' stats. + /** * If present, this item can be converted into a dungeon item by * using essence. @@ -318,6 +420,11 @@ export interface SkyBlockItemsResponse { type: 'GARDEN_LEVEL' level: number } + | { + type: 'PROFILE_AGE' + minimum_age_unit: string + minimum_age: number + } )[] dungeon_item?: boolean /** diff --git a/src/responses/skyblock/_profile_member.ts b/src/responses/skyblock/_profile_member.ts index 837a8b3..cd90f6a 100644 --- a/src/responses/skyblock/_profile_member.ts +++ b/src/responses/skyblock/_profile_member.ts @@ -115,7 +115,7 @@ export interface SkyBlockPotionEffect { } export type SkyBlockDungeonClasses = 'healer' | 'mage' | 'berserk' | 'archer' | 'tank' -export type SkyBlockSlayerBosses = 'wolf' | 'zombie' | 'spider' | 'enderman' | 'blaze' +export type SkyBlockSlayerBosses = 'wolf' | 'zombie' | 'spider' | 'enderman' | 'blaze' | 'vampire' export interface ExperimentationGame { /** The timestamp of the start of the last attempt. */ @@ -409,6 +409,21 @@ export interface SkyBlockProfileMember { } first_join?: number first_join_hub?: number + rift: { + wither_cage: Record + black_lagoon: Record + dead_cats: Record + wizard_tower: Record + west_village: { + crazy_kloon: { + selected_colors: Record + } + mirrorverse: Record + kat_house: Record + } + enigma: Record + wyld_woods: Record + } /** * A record of the stat id to a number for each stat that the user has. For * example, { deaths_void: 500 } would mean that the user died to the void @@ -517,6 +532,9 @@ export interface SkyBlockProfileMember { unlocked_journals?: string[] journal_entries?: SkyBlockJournalEntries } + deletion_notice?: { + timestamp: number + } /** * This lists the dungeon people who the player has talked to * in the format _first_talk diff --git a/yarn.lock b/yarn.lock index dbd4cce..395a829 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,9 +24,9 @@ typescript@^4.6.3: resolved "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz" integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== -undici@^5.19.1: - version "5.19.1" - resolved "https://registry.npmjs.org/undici/-/undici-5.19.1.tgz" - integrity sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A== +undici@^5.23.0: + version "5.23.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.23.0.tgz#e7bdb0ed42cebe7b7aca87ced53e6eaafb8f8ca0" + integrity sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg== dependencies: busboy "^1.6.0"