Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from SkyzerDev/main
Browse files Browse the repository at this point in the history
Item data changes, starting to modify ProfileMember to support The  Rift.
  • Loading branch information
mat-1 authored Aug 26, 2023
2 parents 874a346 + ab54dc7 commit 568a2e6
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 99 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
],
"dependencies": {
"typescript": "^4.6.3",
"undici": "^5.19.1"
"undici": "^5.23.0"
},
"devDependencies": {
"dotenv": "^16.0.0"
}
}
}
291 changes: 199 additions & 92 deletions src/responses/resources/skyblock/items.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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<string, number>
durability?: number
Expand Down Expand Up @@ -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
Expand All @@ -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<Record<TieredStats, number>>
}
>
}
| {
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<string, any> // 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.
Expand Down Expand Up @@ -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
/**
Expand Down
20 changes: 19 additions & 1 deletion src/responses/skyblock/_profile_member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -409,6 +409,21 @@ export interface SkyBlockProfileMember {
}
first_join?: number
first_join_hub?: number
rift: {
wither_cage: Record<string, any>
black_lagoon: Record<string, any>
dead_cats: Record<string, any>
wizard_tower: Record<string, any>
west_village: {
crazy_kloon: {
selected_colors: Record<string, any>
}
mirrorverse: Record<string, any>
kat_house: Record<string, any>
}
enigma: Record<string, any>
wyld_woods: Record<string, any>
}
/**
* 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
Expand Down Expand Up @@ -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 <npcname>_first_talk
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 568a2e6

Please sign in to comment.