From 0c0c76e66dd49a2e74ec613a72d14574e6bd8b9b Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Wed, 14 Sep 2022 09:13:24 +0200 Subject: [PATCH 01/47] feat: add trophyFish --- src/constants/misc.js | 95 +++++++++++++++++++++++++++++++++++++++++++ src/lib.js | 28 +++++++++++++ 2 files changed, 123 insertions(+) diff --git a/src/constants/misc.js b/src/constants/misc.js index 22844d8267..3e4fcb61ba 100644 --- a/src/constants/misc.js +++ b/src/constants/misc.js @@ -1,3 +1,5 @@ +import { SYMBOLS } from "../../common/constants.js"; + // prevent specific players from appearing in leaderboards export const BLOCKED_PLAYERS = [ "20934ef9488c465180a78f861586b4cf", // Minikloon (Admin) @@ -390,3 +392,96 @@ export const ESSENCE = { export const STAT_MAPPINGS = { walk_speed: "speed", }; + +export const TROPHY_FISH = { + BLOBFISH: { + name: "Blobfish", + head: "https://sky.shiiyu.moe/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", + description: "Caught everywhere.", + }, + FLYFISH: { + name: "Flyfish", + head: "https://sky.shiiyu.moe/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", + description: "Caught from 8 blocks or higher above lava in the Blazing Volcano.", + }, + GOLDEN_FISH: { + name: "Golden Fish", + head: "https://sky.shiiyu.moe/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + description: "Has a chance to spawn after 15 minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + }, + GUSHER: { + name: "Gusher", + head: "https://sky.shiiyu.moe/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", + description: "Caught within 7-16 minutes after a Blazing Volcano eruption.", + }, + KARATE_FISH: { + name: "Karate Fish", + head: "https://sky.shiiyu.moe/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", + description: "Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", + }, + LAVA_HORSE: { + name: "Lava Horse", + head: "https://sky.shiiyu.moe/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", + description: "Caught everywhere.", + }, + MANA_RAY: { + name: "Mana Ray", + head: "https://sky.shiiyu.moe/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", + description: `Caught when you have at least 1,200 ${SYMBOLS.intelligence} Mana.`, + }, + MOLDFIN: { + name: "Moldfin", + head: "https://sky.shiiyu.moe/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", + description: "Caught in the Mystic Marsh.", + }, + OBFUSCATED_FISH_1: { + name: "Obfuscated 1", + head: "https://sky.shiiyu.moe/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", + description: "Caught with Corrupted Bait.", + }, + OBFUSCATED_FISH_2: { + name: "Obfuscated 2", + head: "https://sky.shiiyu.moe/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "Caught whilst using Obfuscated 1 as bait.", + }, + OBFUSCATED_FISH_3: { + name: "Obfuscated 3", + head: "https://sky.shiiyu.moe/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", + description: "Caught with Obfuscated 2 as bait.", + }, + SKELETON_FISH: { + name: "Skeleton Fish", + head: "https://sky.shiiyu.moe/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", + description: "Caught in the Burning Desert.", + }, + SLUGFISH: { + name: "Slugfish", + head: "https://sky.shiiyu.moe/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", + description: "Caught when the bobber has been active for at least 30 seconds.", + }, + SOUL_FISH: { + name: "Soul Fish", + head: "https://sky.shiiyu.moe/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", + description: "Caught in the Stronghold.", + }, + STEAMING_HOT_FLOUNDER: { + name: "Steaming-Hot Flounder", + head: "https://sky.shiiyu.moe/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", + description: "Caught when the bobber is within 2 blocks of a Geyser in the Blazing Volcano.", + }, + SULPHUR_SKITTER: { + name: "Sulphur Skitter", + head: "https://sky.shiiyu.moe/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "Caught when standing within 8 blocks of a Sulphur Ore.", + }, + VANILLE: { + name: "Vanille", + head: "https://sky.shiiyu.moe/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", + description: "Caught when using a Starter Lava Rod with no Enchantments.", + }, + VOLCANIC_STONEFISH: { + name: "Volcanic Stonefish", + head: "https://sky.shiiyu.moe/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", + description: "Caught in the Blazing Volcano.", + } +} diff --git a/src/lib.js b/src/lib.js index 50dacca95f..100d92fdee 100644 --- a/src/lib.js +++ b/src/lib.js @@ -1992,6 +1992,10 @@ export async function getStats( output.mining = mining; + // TROPHY FISH + + output.trophyFish = getTrophyFish(userProfile) + // MISC const misc = {}; @@ -2695,6 +2699,30 @@ export async function getCollections(uuid, profile, cacheOnly = false) { return output; } +export function getTrophyFish(userProfile) { + const trophyFish = { + total_caught: 0, + rewards: [], + fish: [], + }; + trophyFish.rewards = userProfile.trophy_fish.rewards; + trophyFish.total_caught = userProfile.trophy_fish.total_caught; + Object.keys(userProfile.trophy_fish).forEach((key) => { + const type = key.toUpperCase().replaceAll('_BRONZE', '').replaceAll('_SILVER', '').replaceAll('_GOLD', '').replaceAll('_DIAMOND', ''); + if (key == "rewards" || key == "total_caught") return; + + trophyFish.fish[key.toUpperCase()] = { + id: key.toUpperCase(), + name: constants.TROPHY_FISH[type].name, + amount: userProfile.trophy_fish[key], + head: constants.TROPHY_FISH[type].head, + description: constants.TROPHY_FISH[type].description, + } + }); + + return trophyFish +} + export function getDungeons(userProfile, hypixelProfile) { const output = {}; From 0664f4a18338a0436a5b9173c7e8724cb09e4f8a Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Wed, 14 Sep 2022 09:19:25 +0200 Subject: [PATCH 02/47] style: `npm run prettier:fix` --- src/constants/misc.js | 48 ++++++++++++++++++++++--------------------- src/lib.js | 13 ++++++++---- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/constants/misc.js b/src/constants/misc.js index 3e4fcb61ba..45f39fbf53 100644 --- a/src/constants/misc.js +++ b/src/constants/misc.js @@ -396,92 +396,94 @@ export const STAT_MAPPINGS = { export const TROPHY_FISH = { BLOBFISH: { name: "Blobfish", - head: "https://sky.shiiyu.moe/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", + head: "/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", description: "Caught everywhere.", }, FLYFISH: { name: "Flyfish", - head: "https://sky.shiiyu.moe/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", + head: "/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", description: "Caught from 8 blocks or higher above lava in the Blazing Volcano.", }, GOLDEN_FISH: { name: "Golden Fish", - head: "https://sky.shiiyu.moe/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", - description: "Has a chance to spawn after 15 minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + head: "/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + description: + "Has a chance to spawn after 15 minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", }, GUSHER: { name: "Gusher", - head: "https://sky.shiiyu.moe/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", + head: "/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", description: "Caught within 7-16 minutes after a Blazing Volcano eruption.", }, KARATE_FISH: { name: "Karate Fish", - head: "https://sky.shiiyu.moe/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", - description: "Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", + head: "/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", + description: + "Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", }, LAVA_HORSE: { name: "Lava Horse", - head: "https://sky.shiiyu.moe/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", + head: "/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", description: "Caught everywhere.", }, MANA_RAY: { name: "Mana Ray", - head: "https://sky.shiiyu.moe/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", + head: "/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", description: `Caught when you have at least 1,200 ${SYMBOLS.intelligence} Mana.`, }, MOLDFIN: { name: "Moldfin", - head: "https://sky.shiiyu.moe/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", + head: "/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", description: "Caught in the Mystic Marsh.", }, OBFUSCATED_FISH_1: { name: "Obfuscated 1", - head: "https://sky.shiiyu.moe/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", + head: "/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", description: "Caught with Corrupted Bait.", }, OBFUSCATED_FISH_2: { name: "Obfuscated 2", - head: "https://sky.shiiyu.moe/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", description: "Caught whilst using Obfuscated 1 as bait.", }, OBFUSCATED_FISH_3: { name: "Obfuscated 3", - head: "https://sky.shiiyu.moe/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", + head: "/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", description: "Caught with Obfuscated 2 as bait.", }, SKELETON_FISH: { name: "Skeleton Fish", - head: "https://sky.shiiyu.moe/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", + head: "/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", description: "Caught in the Burning Desert.", }, SLUGFISH: { name: "Slugfish", - head: "https://sky.shiiyu.moe/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", + head: "/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", description: "Caught when the bobber has been active for at least 30 seconds.", }, SOUL_FISH: { name: "Soul Fish", - head: "https://sky.shiiyu.moe/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", + head: "/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", description: "Caught in the Stronghold.", }, STEAMING_HOT_FLOUNDER: { name: "Steaming-Hot Flounder", - head: "https://sky.shiiyu.moe/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", + head: "/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", description: "Caught when the bobber is within 2 blocks of a Geyser in the Blazing Volcano.", }, SULPHUR_SKITTER: { name: "Sulphur Skitter", - head: "https://sky.shiiyu.moe/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", description: "Caught when standing within 8 blocks of a Sulphur Ore.", }, VANILLE: { name: "Vanille", - head: "https://sky.shiiyu.moe/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", + head: "/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", description: "Caught when using a Starter Lava Rod with no Enchantments.", }, VOLCANIC_STONEFISH: { name: "Volcanic Stonefish", - head: "https://sky.shiiyu.moe/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", - description: "Caught in the Blazing Volcano.", - } -} + head: "/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", + description: "Caught in the Blazing Volcano.", + }, +}; diff --git a/src/lib.js b/src/lib.js index 100d92fdee..114782c1d5 100644 --- a/src/lib.js +++ b/src/lib.js @@ -1994,7 +1994,7 @@ export async function getStats( // TROPHY FISH - output.trophyFish = getTrophyFish(userProfile) + output.trophyFish = getTrophyFish(userProfile); // MISC @@ -2708,7 +2708,12 @@ export function getTrophyFish(userProfile) { trophyFish.rewards = userProfile.trophy_fish.rewards; trophyFish.total_caught = userProfile.trophy_fish.total_caught; Object.keys(userProfile.trophy_fish).forEach((key) => { - const type = key.toUpperCase().replaceAll('_BRONZE', '').replaceAll('_SILVER', '').replaceAll('_GOLD', '').replaceAll('_DIAMOND', ''); + const type = key + .toUpperCase() + .replaceAll("_BRONZE", "") + .replaceAll("_SILVER", "") + .replaceAll("_GOLD", "") + .replaceAll("_DIAMOND", ""); if (key == "rewards" || key == "total_caught") return; trophyFish.fish[key.toUpperCase()] = { @@ -2717,10 +2722,10 @@ export function getTrophyFish(userProfile) { amount: userProfile.trophy_fish[key], head: constants.TROPHY_FISH[type].head, description: constants.TROPHY_FISH[type].description, - } + }; }); - return trophyFish + return trophyFish; } export function getDungeons(userProfile, hypixelProfile) { From 2ad4179bc1861ab2ec7d21a557ca4c82e1e63605 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sun, 9 Oct 2022 20:44:33 +0200 Subject: [PATCH 03/47] merge with dev --- src/constants.js | 1 + src/constants/bestiary.js | 597 ++++++++++++ src/constants/hotm.js | 4 + src/lib.js | 255 ++--- views/stats.ejs | 1913 ++++++++++++++++++++----------------- 5 files changed, 1801 insertions(+), 969 deletions(-) create mode 100644 src/constants/bestiary.js diff --git a/src/constants.js b/src/constants.js index 0d6e58d3aa..33f20d9dcf 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,6 +1,7 @@ export * from "../common/constants.js"; export * from "./constants/armor.js"; +export * from "./constants/bestiary.js"; export * from "./constants/collections.js"; export * from "./constants/dungeons.js"; export * from "./constants/forge.js"; diff --git a/src/constants/bestiary.js b/src/constants/bestiary.js new file mode 100644 index 0000000000..f1f3135816 --- /dev/null +++ b/src/constants/bestiary.js @@ -0,0 +1,597 @@ +export const BESTIARY = { + private: { + max: 5, + mobs: [ + { + id: "kills_family_zombie", + name: "Zombie", + skyblockId: "ZOMBIE_SKULL", + itemId: 397, + damage: 2, + maxTier: 5, + }, + { + id: "kills_family_skeleton", + name: "Skeleton", + skyblockId: "SKELETON_SKULL", + itemId: 397, + damage: 0, + maxTier: 5, + }, + { + id: "kills_family_spider", + name: "Spider", + head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + maxTier: 5, + }, + { + id: "kills_family_cave_spider", + name: "Cave Spider", + head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + maxTier: 5, + }, + { + id: "kills_family_enderman_private", + name: "Enderman", + head: "96c0b36d53fff69a49c7d6f3932f2b0fe948e032226d5e8045ec58408a36e951", + maxTier: 5, + }, + { + id: "kills_family_slime", + name: "Slime", + head: "895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c", + maxTier: 5, + }, + { + id: "kills_family_witch", + name: "Witch", + head: "fce6604157fc4ab5591e4bcf507a749918ee9c41e357d47376e0ee7342074c90", + maxTier: 5, + }, + ], + }, + hub: { + max: 1000, + mobs: [ + { + id: "kills_family_zombie_villager", + name: "Zombie Villager", + head: "e5e08a8776c1764c3fe6a6ddd412dfcb87f41331dad479ac96c21df4bf3ac89c", + }, + { + id: "kills_family_unburried_zombie", + name: "Crypt Ghoul", + skyblockId: "GOLD_SWORD", + itemId: 283, + damage: 0, + }, + { + id: "kills_family_ruin_wolf", + name: "Wolf", + head: "69d1d3113ec43ac2961dd59f28175fb4718873c6c448dfca8722317d67", + }, + { + id: "kills_family_old_wolf", + name: "Old Wolf", + head: "d359537c15534f61c1cd886bc118774ed22280e7cdab6613870160aad4ca39", + }, + ], + }, + spiders: { + max: 1000, + mobs: [ + { + id: "kills_family_dasher_spider", + name: "Dasher Spider", + head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + }, + { + id: "kills_family_spider_jockey", + name: "Spider Jockey", + head: "70939373cafe4b1f5397aafd09f3bb1663e7b629a41a75fbdc1860b6bf8b475f", + }, + { + id: "kills_family_weaver_spider", + name: "Weaver Spider", + head: "921438f646dc04515967e8195ccc3d31e23b02f9aa0ac914edc2822f98394b86", + }, + { + id: "kills_family_voracious_spider", + name: "Voracious Spider", + head: "8300986ed0a04ea79904f6ae53f49ed3a0ff5b1df62bba622ecbd3777f156df8", + }, + { + id: "kills_family_splitter_spider", + name: "Splitter Spider", + head: "2acf69fc7af5497a1741891d1e5bf32b96ae0d6c0bbd3c14758ea44a03c57283", + }, + { + id: "kills_family_brood_mother_spider", + boss: true, + name: "Brood Mother", + head: "cf0622b3998d42b34d5bc760bb2c83fdbc6e68fab05b7ea17b35097ed81190d6", + }, + { + id: "kills_family_respawning_skeleton", + name: "Gravel Skeleton", + skyblockId: "SKELETON_SKULL", + itemId: 397, + damage: 0, + }, + { + id: "kills_family_random_slime", + name: "Rain Slime", + head: "895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c", + }, + { + id: "kills_family_arachne_keeper", + name: "Arachne's Keeper", + head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + }, + { + id: "kills_family_arachne_brood", + name: "Arachne's Brood", + head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + }, + { + boss: true, + id: "kills_family_arachne", + name: "Arachne", + head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + }, + ], + }, + fortress: { + max: 1000, + mobs: [ + { + id: "kills_family_ashfang", + boss: true, + name: "Ashfang", + head: "3d2a5b4b109bd788edba0171d0aab8a55305ac2f56184df70a319cd488a36c3e", + }, + { + id: "kills_family_barbarian_duke_x", + boss: true, + name: "Barbarian Duke X", + head: "fee9fc7c181e2f630f6b1af85d4951359cafcfa82ff5ea3bc283e0e6088c6e54", + }, + { + id: "kills_family_bladesoul", + boss: true, + name: "Bladesoul", + head: "7f5f3384384d7f03bf97a73099b0bafb72c538fc0415ac8613b664f87579a379", + }, + { + id: "kills_family_blaze", + name: "Blaze", + head: "b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0", + }, + { + id: "kills_family_flaming_spider", + name: "Flaming Spider", + head: "5a65ef23ea35047150d33880473a47fe635f0c0e3c823bd76dc849cb02441655", + }, + { + id: "kills_family_ghast", + name: "Ghast", + head: "de8a38e9afbd3da10d19b577c55c7bfd6b4f2e407e44d4017b23be9167abff02", + }, + { + id: "kills_family_mage_outlaw", + boss: true, + name: "Mage Outlaw", + head: "ebec99b3a050fd277528407676366e20b92006ad88d14727a4d99eb8cb273b62", + }, + { + id: "kills_family_magma_cube", + name: "Magma Cube", + head: "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", + }, + { + id: "kills_family_magma_cube_boss", + boss: true, + name: "Magma Cube Boss", + head: "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", + }, + { + id: "kills_family_matcho", + name: "Matcho", + head: "ef2daabb78a1f7aa12d145d88c0ca46b9e856f5534e9286e555faf0c291f4fd5", + }, + { + id: "kills_family_charging_mushroom_cow", + name: "Mushroom Bull", + head: "2b52841f2fd589e0bc84cbabf9e1c27cb70cac98f8d6b3dd065e55a4dcb70d77", + }, + { + id: "kills_family_pigman", + name: "Pigman", + head: "74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb", + }, + { + id: "kills_family_wither_skeleton", + name: "Wither Skeleton", + head: "7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8", + }, + { + id: "kills_family_wither_spectre", + name: "Wither Spectre", + head: "f6aa5acfd973f67ba8e249ae07a11ae7ca713c900d90d09ce0903c79ddd7dd9e", + }, + ], + }, + end: { + max: 1000, + mobs: [ + { + id: "kills_family_enderman", + name: "Enderman", + head: "96c0b36d53fff69a49c7d6f3932f2b0fe948e032226d5e8045ec58408a36e951", + }, + { + id: "kills_family_obsidian_wither", + name: "Obsidian Defender", + head: "7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8", + }, + { + id: "kills_family_watcher", + name: "Watcher", + head: "daa8fc8de6417b48d48c80b443cf5326e3d9da4dbe9b25fcd49549d96168fc0", + }, + { + id: "kills_family_zealot_enderman", + name: "Zealot", + skyblockId: "SUMMONING_EYE", + itemId: 130, + damage: 0, + }, + { + id: "kills_family_endermite", + name: "Endermite", + head: "5bc7b9d36fb92b6bf292be73d32c6c5b0ecc25b44323a541fae1f1e67e393a3e", + }, + { + id: "kills_family_dragon", + boss: true, + name: "Dragon", + skyblockId: "DRAGON_EGG", + itemId: 122, + damage: 0, + }, + { + id: "kills_family_corrupted_protector", + boss: true, + name: "Endstone Protector", + head: "22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", + }, + { + id: "kills_family_voidling_fanatic", + name: "Voidling Fanatic", + head: "e53b7bcd56f0b95f87dd79ed17636beb9d8346744014228ea2f6b110b148c1", + }, + { + id: "kills_family_voidling_extremist", + name: "Voidling Extremist", + head: "eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3", + }, + ], + }, + caverns: { + max: 1000, + mobs: [ + { + id: "kills_family_invisible_creeper", + name: "Sneaky Creeper", + skyblockId: "CREEPER_SKULL", + itemId: 397, + damage: 4, + }, + { + id: "kills_family_lapis_zombie", + name: "Lapis Zombie", + skyblockId: "ZOMBIE_SKULL", + itemId: 351, + damage: 4, + }, + { + id: "kills_family_redstone_pigman", + name: "Redstone Pigman", + skyblockId: "REDSTONE", + itemId: 331, + damage: 0, + }, + { + id: "kills_family_emerald_slime", + name: "Emerald Slime", + head: "5774e86aa4cff792395b77add57b00bb1a102f8f0f0980f4d55b3d7aff1e6da9", + }, + { + id: "kills_family_diamond_zombie", + name: "Miner Zombie", + head: "d28d9ff54188a1afee65b94f3bfcce321c643a34590c14b192b2e3ec2f525d3", + }, + { + id: "kills_family_diamond_skeleton", + name: "Miner Skeleton", + head: "836bbc4215cea1b6a484e893b116e73459ef36bffc622741e577e9493a41e6e", + }, + { + id: "kills_family_caverns_ghost", + name: "Ghost", + head: "981977918a1180e0dec879e6bcd1aa39494977bb913be2ab01aff1db1fa4", + }, + { + id: "kills_family_goblin", + name: "Goblin", + head: "b6b972e32d761b192626e5d6d01edc094940910103cea5e2e2d1f231adb755d5", + }, + { + id: "kills_family_treasure_hoarder", + name: "Treasure Hoarder", + head: "b2b12a814ced8af02cddf29a37e7f3011e430e8a18b38b706f27c6bd31650b65", + }, + { + id: "kills_family_ice_walker", + name: "Ice Walker", + skyblockId: "PACKED_ICE", + itemId: 174, + damage: 0, + }, + { + id: "kills_family_automaton", + name: "Automaton", + head: "22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", + }, + { + id: "kills_family_butterfly", + name: "Butterfly", + head: "9fd806defdfdf59b1f2609c8ee364666de66127a623415b5430c9358c601ef7c", + }, + { + id: "kills_family_team_treasurite", + name: "Grunt", + head: "ef5e03b8de119f8589a808224cbea737f5dcf24235799b7378ac5bf06abf6dd4", + }, + { + id: "kills_family_sludge", + name: "Sludge", + head: "895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c", + }, + { + id: "kills_family_thyst", + name: "Thyst", + head: "5bc7b9d36fb92b6bf292be73d32c6c5b0ecc25b44323a541fae1f1e67e393a3e", + }, + { + id: "kills_family_worms", + name: "Worm", + head: "df03ad96092f3f789902436709cdf69de6b727c121b3c2daef9ffa1ccaed186c", + }, + { + id: "kills_family_yog", + name: "Yog", + head: "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", + }, + ], + }, + park: { + max: 1000, + mobs: [ + { + id: "kills_family_pack_spirit", + name: "Pack Spirit", + head: "b7c8bef6beb77e29af8627ecdc38d86aa2fea7ccd163dc73c00f9f258f9a1457", + }, + { + id: "kills_family_howling_spirit", + name: "Howling Spirit", + head: "b7c8bef6beb77e29af8627ecdc38d86aa2fea7ccd163dc73c00f9f258f9a1457", + }, + { + id: "kills_family_soul_of_the_alpha", + name: "Soul of the Alpha", + head: "b7c8bef6beb77e29af8627ecdc38d86aa2fea7ccd163dc73c00f9f258f9a1457", + }, + ], + }, + spooky: { + max: 1000, + mobs: [ + { + id: "kills_family_trick_or_treater", + name: "Trick or Treater", + head: "d7cbe061b445b88cb2df59accc8d2c1c12118fe0b2127e6e75813550adac67cf", + }, + { + id: "kills_family_wither_gourd", + name: "Wither Gourd", + head: "68f2ffc6fb4e9959b9a7a317f51a6775a159ddc2241dbd6c774d3ac08b6", + }, + { + id: "kills_family_phantom_spirit", + name: "Phantom Spirit", + head: "653b2f7c5e177bd67cead30d0ee53425c7684c975c8c2a5273a09ca49a1f6cdd", + }, + { + id: "kills_family_scary_jerry", + name: "Scary Jerry", + head: "df202dc24d15f7ce36e02fb4b3e8153b146ab9c1724aaa5d484c741da0eeb6fd", + }, + { + id: "kills_family_wraith", + name: "Wraith", + head: "aeabc3075cf41f38e6df1236b95caafcba1bee22c49d804b9427488c2f6e0efc", + }, + { + id: "kills_family_batty_witch", + name: "Crazy Witch", + head: "fce6604157fc4ab5591e4bcf507a749918ee9c41e357d47376e0ee7342074c90", + }, + { + id: "kills_family_headless_horseman", + boss: true, + name: "Headless Horseman", + head: "4c6570f1242992f6eba23ee582598c39e3e745383273deef8b3977583fe3cf5", + }, + ], + }, + catacombs: { + max: 1000, + mobs: [ + { + id: "kills_family_lost_adventurer", + name: "Lost Adventurer", + head: "1e0329f42192ee7c1a0c704f82dbbbe7c00fbfa3f020c1067a208630b991b988", + }, + { + id: "kills_family_zombie_grunt", + name: "Zombie Grunt", + skyblockId: "ZOMBIE_SKULL", + itemId: 397, + damage: 2, + }, + { + id: "kills_family_zombie_soldier", + name: "Zombie Soldier", + skyblockId: "ZOMBIE_SKULL", + itemId: 397, + damage: 2, + }, + { + id: "kills_family_zombie_knight", + name: "Zombie Soldier", + head: "25d2f31ba162fe6272e831aed17f53213db6fa1c4cbe4fc827f3963cc98b9", + }, + { + id: "kills_family_skeleton_grunt", + name: "Skeleton Grunt", + head: "70471677b37ae842c2bd232e16eeb84d5a493231eecec072da38be3127dd5c8", + }, + { + id: "kills_family_skeleton_soldier", + name: "Skeleton Soldier", + head: "219688e0c2f05aeb979d6a1b8c911957b7d3657e14b57af93c5ef6f6a59569dd", + }, + { + id: "kills_family_skeleton_master", + name: "Skeleton Master", + head: "74e95e1b7dc82ba7845a68fc6a312f4cd90ee2f6cce26a68c88b04b1072d879", + }, + { + id: "kills_family_scared_skeleton", + name: "Scared Skeleton", + skyblockId: "SKELETON_SKULL", + itemId: 397, + damage: 0, + }, + { + id: "kills_family_diamond_guy", + name: "Angry Archeologist", + head: "c48c783458e4cf8518e8ab5863fbc4cb948f90568eeb9a60d16c4fde2b96c033", + }, + { + id: "kills_family_dungeon_respawning_skeleton", + name: "Undead Skeleton", + skyblockId: "SKELETON_SKULL", + itemId: 397, + damage: 0, + }, + { + id: "kills_family_skeletor", + name: "Skeletor", + head: "89d074ad9b9971879eb325bddff3675f7224856bd6d569fc8d483c133d73005d", + }, + { + id: "kills_family_sniper_skeleton", + name: "Sniper", + head: "b18c071f080dba50a62a6263ff724edc157ce4fb4883cceff2491d5bbde830c1", + }, + { + id: "kills_family_crypt_souleater", + name: "Crypt Souleater", + head: "66f349270a3b851896cdad842f5eec6e140bd9119b75c074955c3be7865e27c7", + }, + { + id: "kills_family_crypt_dreadlord", + name: "Crypt Dreadlord", + head: "66f349270a3b851896cdad842f5eec6e140bd9119b75c074955c3be7865e27c7", + }, + { + id: "kills_family_crypt_tank_zombie", + name: "Tank Zombie", + skyblockId: "ZOMBIE_SKULL", + itemId: 397, + damage: 2, + }, + { + id: "kills_family_super_tank_zombie", + name: "Super Tank Zombie", + skyblockId: "ZOMBIE_SKULL", + itemId: 397, + damage: 2, + }, + { + id: "kills_family_crypt_lurker", + name: "Crypt Lurker", + skyblockId: "ZOMBIE_SKULL", + itemId: 397, + damage: 2, + }, + { + id: "kills_family_cellar_spider", + name: "Cellar Spider", + head: "41645dfd77d09923107b3496e94eeb5c30329f97efc96ed76e226e98224", + }, + { + id: "kills_family_watcher_summon_undead", + name: "Undead", + head: "f4624a9a8c69ca204504abb043d47456cd9b09749a36357462303f276a229d4", + }, + { + id: "kills_family_lonely_spider", + name: "Lonely Spider", + head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + }, + { + id: "kills_family_shadow_assassin", + name: "Shadow Assassin", + head: "3399e00f404411e465d74388df132d51fe868ecf86f1c073faffa1d9172ec0f3", + }, + { + id: "kills_family_king_midas", + name: "King Midas", + head: "62bca085750043503f5df9f7def824a2e3acfc27842bcd09d2b6695881e832f5", + }, + { + id: "kills_family_super_archer", + name: "Super Archer", + head: "dcae6db0b59a64305076d966d8e7b9a97be46dae3a807714fa86d37848f6", + }, + { + id: "kills_family_crypt_witherskeleton", + name: "Withermancer", + head: "7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8", + }, + { + id: "kills_family_zombie_commander", + name: "Zombie Commander", + skyblockId: "ZOMBIE_SKULL", + itemId: 397, + damage: 2, + }, + ], + }, + }; + + export const BEASTIARY_KILLS = { + regular: [ + 10, 25, 100, 250, 500, 1000, 2500, 5000, 10000, 25000, 50000, 100000, 200000, 300000, 400000, 500000, 600000, + 700000, 800000, 900000, 1000000, 1100000, 1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1900000, + 2000000, 2100000, 2200000, 2300000, 2400000, 2500000, 2600000, 2700000, 2800000, 2900000, 3000000, + ], + boss: [ + 2, 5, 10, 20, 30, 40, 50, 75, 100, 150, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, + 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 3100, 3200, + ], + }; \ No newline at end of file diff --git a/src/constants/hotm.js b/src/constants/hotm.js index 67bceb0e52..087ebfaa81 100644 --- a/src/constants/hotm.js +++ b/src/constants/hotm.js @@ -72,6 +72,10 @@ const rewards = { 5: { token_of_the_mountain: 1, }, + 6: { + token_of_the_mountain: 1, + }, + 7: {}, }, rewards: { token_of_the_mountain: { diff --git a/src/lib.js b/src/lib.js index 114782c1d5..aaa42acc27 100644 --- a/src/lib.js +++ b/src/lib.js @@ -796,6 +796,10 @@ export const getItems = async ( // Process inventories returned by API const armor = "inv_armor" in profile ? await processItems(profile.inv_armor.data, customTextures, packs, options.cacheOnly) : []; + const equipment = + "equippment_contents" in profile + ? await processItems(profile.equippment_contents.data, customTextures, packs, options.cacheOnly) + : []; const inventory = "inv_contents" in profile ? await processItems(profile.inv_contents.data, customTextures, packs, options.cacheOnly) @@ -886,6 +890,7 @@ export const getItems = async ( let hotm = "mining_core" in profile ? await getHotmItems(profile, packs) : []; output.armor = armor.filter((x) => x.rarity); + output.equipment = equipment.filter((x) => x.rarity); output.wardrobe = wardrobe; output.wardrobe_inventory = wardrobe_inventory; output.inventory = inventory; @@ -899,6 +904,7 @@ export const getItems = async ( output.hotm = hotm; const allItems = armor.concat( + equipment, inventory, enderchest, accessory_bag, @@ -1114,7 +1120,7 @@ export const getItems = async ( } if (accessory.tag?.ExtraAttributes?.talisman_enrichment != undefined) { - accessory.enrichment = accessory.tag.ExtraAttributes.talisman_enrichment; + accessory.enrichment = accessory.tag.ExtraAttributes.talisman_enrichment.toLowerCase(); } } @@ -1270,6 +1276,13 @@ export const getItems = async ( output.armor_set_rarity = armorPiece.rarity; } + if (equipment.filter((x) => x.rarity).length === 1) { + const equipmentPiece = equipment.find((x) => x.rarity); + + output.equipment_set = equipmentPiece.display_name; + output.equipment_set_rarity = equipmentPiece.rarity; + } + // Full armor set (4 pieces) if (armor.filter((x) => x.rarity).length === 4) { let output_name; @@ -1333,6 +1346,31 @@ export const getItems = async ( output.armor_set_rarity = constants.RARITIES[Math.max(...armor.map((a) => helper.rarityNameToInt(a.rarity)))]; } + // Full equipment set (4 pieces) + for (const piece of equipment) { + if (piece.rarity == null) delete equipment[equipment.indexOf(piece)]; + } + + if (equipment.filter((x) => x.rarity).length === 4) { + // Getting equipment_name + equipment.forEach((equipmentPiece) => { + let name = equipmentPiece.display_name; + + // Removing skin and stars / Whitelisting a-z and 0-9 + name = name.replace(/[^A-Za-z0-9 -']/g, "").trim(); + + // Removing modifier + if (equipmentPiece.tag?.ExtraAttributes?.modifier != undefined) { + name = name.split(" ").slice(1).join(" "); + } + + equipmentPiece.equipment_name = name; + }); + + output.equipment_set_rarity = + constants.RARITIES[Math.max(...equipment.map((a) => helper.rarityNameToInt(a.rarity)))]; + } + console.debug(`${options.debugId}: getItems returned. (${Date.now() - timeStarted}ms)`); return output; }; @@ -1409,6 +1447,7 @@ async function getLevels(userProfile, hypixelProfile, levelCaps) { enchanting: hypixelProfile.achievements.skyblock_augmentation || 0, alchemy: hypixelProfile.achievements.skyblock_concoctor || 0, taming: hypixelProfile.achievements.skyblock_domesticator || 0, + carpentry: 0, }; output.levels = {}; @@ -1722,20 +1761,6 @@ export async function getStats( } } - for (const member of members) { - if (profile?.members?.[member.uuid]?.last_save == undefined) { - continue; - } - - const lastUpdated = profile.members[member.uuid].last_save; - - member.last_updated = { - unix: lastUpdated, - text: - Date.now() - lastUpdated < 7 * 60 * 1000 ? "currently online" : `last played ${moment(lastUpdated).fromNow()}`, - }; - } - if (profile.banking?.balance != undefined) { output.bank = profile.banking.balance; } @@ -1751,18 +1776,10 @@ export async function getStats( output.profiles = {}; for (const sbProfile of allProfiles.filter((a) => a.profile_id != profile.profile_id)) { - if (sbProfile?.members?.[profile.uuid]?.last_save == undefined) { - continue; - } - output.profiles[sbProfile.profile_id] = { profile_id: sbProfile.profile_id, cute_name: sbProfile.cute_name, game_mode: sbProfile.game_mode, - last_updated: { - unix: sbProfile.members[profile.uuid].last_save, - text: `last played ${moment(sbProfile.members[profile.uuid].last_save).fromNow()}`, - }, }; } @@ -1770,6 +1787,10 @@ export async function getStats( output.minions = getMinions(profile.members); output.minion_slots = getMinionSlots(output.minions); output.collections = await getCollections(profile.uuid, profile, options.cacheOnly); + output.bestiary = getBestiary(profile.uuid, profile); + output.trophyFish = getTrophyFish(userProfile); + console.log(output.trophyFish); + output.social = hypixelProfile.socials; output.dungeons = getDungeons(userProfile, hypixelProfile); @@ -1790,6 +1811,7 @@ export async function getStats( const farming = { talked: userProfile.jacob2?.talked || false, + pelts: userProfile.trapper_quest?.pelt_count || 0, }; if (farming.talked) { @@ -1992,10 +2014,6 @@ export async function getStats( output.mining = mining; - // TROPHY FISH - - output.trophyFish = getTrophyFish(userProfile); - // MISC const misc = {}; @@ -2190,12 +2208,8 @@ export async function getStats( output.auctions_bought = auctions_bought; output.auctions_sold = auctions_sold; - const lastUpdated = userProfile.last_save; const firstJoin = userProfile.first_join; - const diff = (+new Date() - lastUpdated) / 1000; - - let lastUpdatedText = moment(lastUpdated).fromNow(); const firstJoinText = moment(firstJoin).fromNow(); if ("current_area" in userProfile) { @@ -2206,17 +2220,6 @@ export async function getStats( output.current_area_updated = userProfile.current_area_updated; } - if (diff < 3) { - lastUpdatedText = `Right now`; - } else if (diff < 60) { - lastUpdatedText = `${Math.floor(diff)} seconds ago`; - } - - output.last_updated = { - unix: lastUpdated, - text: lastUpdatedText, - }; - output.first_join = { unix: firstJoin, text: firstJoinText, @@ -2728,6 +2731,65 @@ export function getTrophyFish(userProfile) { return trophyFish; } +export function getBestiary(uuid, profile) { + const output = {}; + + const userProfile = profile.members[uuid]; + + if (!("unlocked_coll_tiers" in userProfile) || !("collection" in userProfile)) { + return output; + } + + const result = { + level: 0, + categories: {}, + }; + + let totalCollection = 0; + const bestiaryFamilies = {}; + for (const [name, value] of Object.entries(userProfile.bestiary || {})) { + if (name.startsWith("kills_family_")) { + bestiaryFamilies[name] = value; + } + } + + for (const family of Object.keys(constants.BESTIARY)) { + result.categories[family] = {}; + for (const mob of constants.BESTIARY[family].mobs) { + const mobName = mob.id.substring(13); + + const boss = mob.boss == true ? "boss" : "regular"; + + let kills = bestiaryFamilies[mob.id] || 0; + let head = mob.head; + let itemId = mob.itemId; + let damage = mob.damage; + let name = mob.name; + let maxTier = mob.maxTier ?? 41; + let tier = + constants.BEASTIARY_KILLS[boss].filter((k) => k <= kills).length > maxTier + ? maxTier + : constants.BEASTIARY_KILLS[boss].filter((k) => k <= kills).length; + totalCollection += tier; + + result.categories[family][mobName] = { + head: head, + name: name, + itemId: itemId, + damage: damage, + tier: tier, + maxTier: maxTier, + kills: kills, + }; + } + } + result.tiersUnlocked = totalCollection; + result.level = totalCollection / 10; + result.bonus = result.level.toFixed(0) * 2; + + return result; +} + export function getDungeons(userProfile, hypixelProfile) { const output = {}; @@ -3285,11 +3347,11 @@ export async function getProfile( let lastCachedSave = 0; + const profileData = []; if (profileObject) { - const profileData = db - .collection("profileCache") - .find({ profile_id: { $in: Object.keys(profileObject.profiles) } }); - + for (const pId of Object.keys(profileObject.profiles)) { + profileData.push(await db.collection("profileCache").findOne({ profile_id: pId })); + } for await (const doc of profileData) { if (doc.members?.[paramPlayer] == undefined) { continue; @@ -3298,8 +3360,6 @@ export async function getProfile( Object.assign(doc, profileObject.profiles[doc.profile_id]); allSkyBlockProfiles.push(doc); - - lastCachedSave = Math.max(lastCachedSave, doc.members[paramPlayer].last_save || 0); } } else { profileObject = { last_update: 0 }; @@ -3307,17 +3367,18 @@ export async function getProfile( let response = null; + lastCachedSave = Math.max(profileObject.last_update, Date.now() || 0); + if ( !options.cacheOnly && ((Date.now() - lastCachedSave > 190 * 1000 && Date.now() - lastCachedSave < 300 * 1000) || Date.now() - profileObject.last_update >= 300 * 1000) ) { try { + profileObject.last_update = Date.now(); response = await retry( async () => { - return await hypixel.get("skyblock/profiles", { - params, - }); + return await hypixel.get("skyblock/profiles", { params }); }, { retries: 2 } ); @@ -3347,12 +3408,6 @@ export async function getProfile( } for (const profile of allSkyBlockProfiles) { - for (const member in profile.members) { - if (profile.members[member]?.last_save == undefined) { - delete profile.members[member]; - } - } - profile.uuid = paramPlayer; } @@ -3360,32 +3415,7 @@ export async function getProfile( if (paramProfile) { if (paramProfile.length == 32) { - const filteredProfiles = allSkyBlockProfiles.filter((a) => a.profile_id.toLowerCase() == paramProfile); - - if (filteredProfiles.length > 0) { - skyBlockProfiles = filteredProfiles; - } else { - const profileResponse = await retry(async () => { - const response = await hypixel.get( - "skyblock/profile", - { - params: { key: credentials.hypixel_api_key, profile: paramProfile }, - }, - { retries: 2 } - ); - - if (!response.data.success) { - throw new Error("api request failed"); - } - - return response.data.profile; - }); - - profileResponse.cute_name = "Deleted"; - profileResponse.uuid = paramPlayer; - - skyBlockProfiles.push(profileResponse); - } + skyBlockProfiles = allSkyBlockProfiles.filter((a) => a.profile_id.toLowerCase() == paramProfile); } else { skyBlockProfiles = allSkyBlockProfiles.filter((a) => a.cute_name.toLowerCase() == paramProfile); } @@ -3400,10 +3430,8 @@ export async function getProfile( for (const profile of skyBlockProfiles) { let memberCount = 0; - for (const member in profile.members) { - if (profile.members[member]?.last_save != undefined) { - memberCount++; - } + for (let i = 0; i < Object.keys(profile.members).length; i++) { + memberCount++; } if (memberCount == 0) { @@ -3421,7 +3449,6 @@ export async function getProfile( throw new Error("No data returned by Hypixel API, please try again!"); } - let highest = 0; let profile; const storeProfiles = {}; @@ -3452,14 +3479,12 @@ export async function getProfile( .catch(console.error); } - if ("last_save" in userProfile) { - storeProfiles[_profile.profile_id] = { - profile_id: _profile.profile_id, - cute_name: _profile.cute_name, - game_mode: _profile.game_mode, - last_save: userProfile.last_save, - }; - } + storeProfiles[_profile.profile_id] = { + profile_id: _profile.profile_id ?? null, + cute_name: _profile.cute_name ?? "Unknown", + game_mode: _profile.game_mode ?? "normal", + selected: _profile.selected ?? false, + }; } for (const _profile of profiles) { @@ -3467,11 +3492,12 @@ export async function getProfile( return; } - const userProfile = _profile.members[paramPlayer]; - - if (userProfile?.last_save > highest) { + if ( + _profile?.selected || + _profile.profile_id.toLowerCase() == paramProfile || + _profile.cute_name.toLowerCase() == paramProfile + ) { profile = _profile; - highest = userProfile.last_save; } } @@ -3485,9 +3511,7 @@ export async function getProfile( userProfile.current_area = profileObject.current_area; } - if (Date.now() - userProfile.last_save < 5 * 60 * 1000) { - userProfile.current_area_updated = true; - } + userProfile.current_area_updated = true; if (response && response.request.fromCache !== true) { const apisEnabled = @@ -3497,28 +3521,25 @@ export async function getProfile( const insertProfileStore = { last_update: new Date(), - last_save: Math.max(...allSkyBlockProfiles.map((a) => a.members?.[paramPlayer]?.last_save ?? 0)), apis: apisEnabled, profiles: storeProfiles, }; - if (options.updateArea && Date.now() - userProfile.last_save < 5 * 60 * 1000) { - try { - const statusResponse = await hypixel.get("status", { - params: { uuid: paramPlayer, key: credentials.hypixel_api_key }, - }); + try { + const statusResponse = await hypixel.get("status", { + params: { uuid: paramPlayer, key: credentials.hypixel_api_key }, + }); - const areaData = statusResponse.data.session; + const areaData = statusResponse.data.session; - if (areaData.online && areaData.gameType == "SKYBLOCK") { - const areaName = constants.AREA_NAMES[areaData.mode] || helper.titleCase(areaData.mode.replaceAll("_", " ")); + if (areaData.online && areaData.gameType == "SKYBLOCK") { + const areaName = constants.AREA_NAMES[areaData.mode] || helper.titleCase(areaData.mode.replaceAll("_", " ")); - userProfile.current_area = areaName; - insertProfileStore.current_area = areaName; - } - } catch (e) { - console.error(e); + userProfile.current_area = areaName; + insertProfileStore.current_area = areaName; } + } catch (e) { + console.error(e); } updateLeaderboardPositions(db, paramPlayer, allSkyBlockProfiles).catch(console.error); diff --git a/views/stats.ejs b/views/stats.ejs index 6045bcac23..1f27a7837f 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -33,6 +33,45 @@ const skillItems = { tank: 'icon-299_0', }; +const bestiary = { + private: { + head: "/head/c9c8881e42915a9d29bb61a16fb26d059913204d265df5b439b3d792acd56", + name: "Private Island", + }, + hub: { + head: "/head/d7cc6687423d0570d556ac53e0676cb563bbdd9717cd8269bdebed6f6d4e7bf8", + name: "Hub", + }, + spiders: { + head: "/head/c754318a3376f470e481dfcd6c83a59aa690ad4b4dd7577fdad1c2ef08d8aee6", + name: "Spider's Den", + }, + fortress: { + head: "/head/c3687e25c632bce8aa61e0d64c24e694c3eea629ea944f4cf30dcfb4fbce071", + name: "Crimson Isle", + }, + end: { + head: "/head/7840b87d52271d2a755dedc82877e0ed3df67dcc42ea479ec146176b02779a5", + name: "The End", + }, + caverns: { + head: "/head/569a1f114151b4521373f34bc14c2963a5011cdc25a6554c48c708cd96ebfc", + name: "Deep Caverns", + }, + park: { + head: "/head/a221f813dacee0fef8c59f76894dbb26415478d9ddfc44c2e708a6d3b7549b", + name: "The Park", + }, + spooky: { + head: "/head/8db711ff52eedda59c434bb03169763d7c40b5b89127778feacd63aa94dfc", + name: "Spooky Festival", + }, + catacombs: { + head: "/head/964e1c3e315c8d8fffc37985b6681c5bd16a6f97ffd07199e8a05efbef103793", + name: "Catacombs", + }, +} + const slayerInfo = { zombie: { boss: "Revenant Horror", @@ -193,7 +232,7 @@ function formatEnrichment(string) { } function enrichmentToStatName(enrichment) { - switch (enrichment.toLowerCase()) { + switch (enrichment) { case 'walk_speed': return 'speed' @@ -207,7 +246,7 @@ function enrichmentToStatName(enrichment) { return 'bonus_attack_speed' default: - return enrichment.toLowerCase() + return enrichment } } @@ -227,21 +266,21 @@ function getEnrichments(accessories) { }) %> - Enrichments: - <% +Enrichments: +<% for (const [enrichment, amount] of Object.entries(enrichmentCounts)) { const stat = enrichmentToStatName(enrichment) %> - "> - <%= amount %>× <%= formatEnrichment(enrichment.toLowerCase()) %> - - <% +"> + <%= amount %>× <%= formatEnrichment(enrichment) %> + +<% if (enrichment !== Object.keys(enrichmentCounts).pop()) { %> // <% } } %> - <% +<% } } @@ -274,19 +313,16 @@ function isEnchanted(item) { function itemIcon(item, classes) { %> -
style='background-image: url("<%= item.texture_path %>")' <% } %> - class=" +
style='background-image: url("<%= item.texture_path %>")' <% } %> class=" <%= classes.join(" ") %> item-icon <% if(isEnchanted(item)){ %>is-enchanted <% } %> <% if(item.texture_path){ %>custom-icon<% } %> <% if(item.Damage != 0){ %>icon-<%= item.id %>_0<% } %> icon-<%= item.id %>_<%= item.Damage %> - " - > -
- <% + "> +
+<% } function jerriefy(rank) { @@ -557,6 +593,7 @@ const metaDescription = getMetaDescription() %> + <%= calculated.display_name %><% if(calculated.display_emoji){ %> <%= calculated.display_emoji %><% } %> | SkyCrypt @@ -569,6 +606,7 @@ const metaDescription = getMetaDescription() <%- include('../includes/resources') %> + @@ -580,13 +618,15 @@ const metaDescription = getMetaDescription() <%- include('../includes/header') %>
-
+
+
+

@@ -598,38 +638,37 @@ const metaDescription = getMetaDescription()
<% if(extra.cacheOnly) { %> - + <% } %>
Stats for <%- jerriefy(calculated.rank_prefix) %> <%= calculated.display_name %> <% if(calculated.display_emoji_img){ %> - + <% }else if(calculated.display_emoji){ %> - <%- extra.twemoji.parse(calculated.display_emoji) %> + <%- extra.twemoji.parse(calculated.display_emoji) %> <% } %> @@ -637,32 +676,31 @@ const metaDescription = getMetaDescription() <%= calculated.profile.cute_name %> <% if (calculated.profile.game_mode == 'ironman') { %> - ironman + ironman <% } %> <% if (calculated.profile.game_mode == 'bingo') { %> - <%- extra.twemoji.parse("🎲") %> + <%- extra.twemoji.parse("🎲") %> <% } %> <% if (calculated.profile.game_mode == 'island') { %> - <%- extra.twemoji.parse("🌴") %> + <%- extra.twemoji.parse("🌴") %> <% } %> @@ -727,19 +765,17 @@ const metaDescription = getMetaDescription() <% if(calculated.current_area){ %>
<%= calculated.current_area_updated ? 'Current' : 'Last' %> Area: <%= calculated.current_area %>
<% } %> -
Last Updated: <%= calculated.last_updated.text %>
Joined: <%= calculated.first_join.text %>
Purse: <%= helper.formatNumber(calculated.purse, true) %> Coin<%= Math.floor(calculated.purse) == 1 ? '': 's' %>
<% if('bank' in calculated){ %> -
Bank Account: <%= helper.formatNumber(calculated.bank, true) %> Coin<%= Math.floor(calculated.bank) == 1 ? '': 's' %>
+
Bank Account: <%= helper.formatNumber(calculated.bank, true) %> Coin<%= Math.floor(calculated.bank) == 1 ? '': 's' %>
<% } %> <% if('levels' in calculated && 'runecrafting' in calculated.levels){ %> -
Average Skill Level: <%= calculated.average_level.toFixed(2) %>
<% } %> @@ -766,60 +802,58 @@ const metaDescription = getMetaDescription() }, ]; - for (weight of weightSystems) { - %> -
- - <%= weight.name %>: - <%= parseFloat(Math.round(weight.total)).toLocaleString() %> -
- <% - } - %> + if (calculated.weight) { + for (weight of weightSystems) { %> +
+ + <%= weight.name %>: + <%= parseFloat(Math.round(weight.total)).toLocaleString() %> +
+ <%}%> + <%}%>
<% if ('levels' in calculated) { %> -
- - - - - - - - - <% if ('runecrafting' in calculated.levels) { %> - - - - <% } else { %> -
Skills from achievements across profiles. Enable Skills API for more accurate data.
- <% } %> -
+
+ + + + + + + + + <% if ('runecrafting' in calculated.levels) { %> + + + + <% } else { %> +
Skills from achievements across profiles. Enable Skills API for more accurate data.
+ <% } %> +
<% } else { %> -
<%= calculated.display_name %> doesn't have skills access via API enabled. See here how to enable full API access.
+
<%= calculated.display_name %> doesn't have skills access via API enabled. See here how to enable full API access.
<% } %>
@@ -836,12 +870,13 @@ const metaDescription = getMetaDescription() Dungeons Slayer Minions + Bestiary <% if(Object.keys(calculated.collections).length > 0){ %>Collections<% } %> <% if(Object.keys(calculated.misc).length > 0){ %>Misc<% } %>
- <% + <% const notAvailable = []; if(items.no_inventory) @@ -853,119 +888,131 @@ const metaDescription = getMetaDescription() if(Object.keys(calculated.collections).length == 0) notAvailable.push('Collections'); %> - <% if (notAvailable.length > 0 || ['ironman', 'bingo', 'island'].includes(calculated.profile.game_mode)) { %> + <% if (notAvailable.length > 0 || ['ironman', 'bingo', 'island'].includes(calculated.profile.game_mode)) { %>
Notice
<% if(notAvailable.length > 0){ %> - <%= notAvailable.join(', ') %> not available for <%= calculated.display_name %> due to limited API access.
See here how to enable full API access. + <%= notAvailable.join(', ') %> not available for <%= calculated.display_name %> due to limited API access.
See here how to enable full API access. <% } %> <% if(calculated.profile.game_mode == 'ironman'){ %> - <% if(notAvailable.length > 0){ %>

<% } %> - This is an Ironman profile. The player cannot use the auction house, bazaar, trade, or pick up drops from other players. + <% if(notAvailable.length > 0){ %>

<% } %> + This is an Ironman profile. The player cannot use the auction house, bazaar, trade, or pick up drops from other players. <% } %> <% if(calculated.profile.game_mode == 'bingo'){ %> - <% if(notAvailable.length > 0){ %>

<% } %> - This is a Bingo profile. The player cannot spend gems, use the auction house, bazaar, trade, or pick up drops from other players. + <% if(notAvailable.length > 0){ %>

<% } %> + This is a Bingo profile. The player cannot spend gems, use the auction house, bazaar, trade, or pick up drops from other players. <% } %> <% if(calculated.profile.game_mode == 'island'){ %> - <% if(notAvailable.length > 0){ %>

<% } %> - This is a Stranded profile. The player cannot leave their skyblock island or trade with other players. + <% if(notAvailable.length > 0){ %>

<% } %> + This is a Stranded profile. The player cannot leave their skyblock island or trade with other players. <% } %>
- <% } %> + <% } %> -
- -

Armor

-
- <% if(items.armor.length == 0){ %> +
+ +

Armor

+
+ <% if(items.armor.length == 0){ %>
<%= calculated.display_name %> doesn't have any armor equipped.
- <% }else{ %> + <% }else{ %> <% if(items.armor_set) { %> -

- Set: <%= items.armor_set %> -

+

+ Set: <%= items.armor_set %> +

<% } %>
<% for(const item of items.armor.slice().reverse()){ %> -
- <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
+
+ <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
+ <% } %> + <% itemIcon(item, ['piece-icon']); %> +
<% } %> +
-
- <% } %> - <% if(items.wardrobe.length > 0){ %> -

Wardrobe

-
- <% for(const set of items.wardrobe){ %> -
- <% for(const [index, item] of set.entries()) { %> - <% if (item) { %> -
- <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
- <% } else { %> -
-
-
- <% } %> + <% } %> +

Equipment

+ <% if(Object.keys(items.equipment).length == 0){ %> +
<%= calculated.display_name %> doesn't have any equipment equipped.
+ <% }else{ %> +
+ <% for(const item of items.equipment.slice().reverse()){ %> +
+ <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
<% } %> + <% itemIcon(item, ['piece-icon']); %>
+ <% } %> +
+
<% } %> - <% } %>
-
- <% if(!items.no_inventory){ %> + <% if(items.wardrobe.length > 0){ %> +

Wardrobe

+
+ <% for(const set of items.wardrobe){ %> +
+ <% for(const [index, item] of set.entries()) { %> + <% if (item) { %> +
+ <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
+ <% } %> + <% itemIcon(item, ['piece-icon']); %> +
+ <% } else { %> +
+
+
+ <% } %> + <% } %> +
+ <% } %> + <% } %> +
+ <% if(!items.no_inventory){ %>

Weapons

<% if (items.weapons.length == 0) { %> -
<%= calculated.display_name %> doesn't have any weapons.
+
<%= calculated.display_name %> doesn't have any weapons.
<% } else { %> - <% if (items.highest_rarity_sword) { %> -

- Active Weapon: - <%- helper.renderLore(items.highest_rarity_sword.tag.display.Name) %> -

- <% } else if (items.weapons.length > 0) { %> -

- Active Weapon: None -

- <% } %> -
- <% + <% if (items.highest_rarity_sword) { %> +

+ Active Weapon: + <%- helper.renderLore(items.highest_rarity_sword.tag.display.Name) %> +

+ <% } else if (items.weapons.length > 0) { %> +

+ Active Weapon: None +

+ <% } %> +
+ <% items.weapons.filter(a => !a.hidden).forEach(item => { %> -
- <% if (rarityOrder.indexOf(item.rarity) <= 4) { %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
- <% + "> + <% if (rarityOrder.indexOf(item.rarity) <= 4) { %> +
+ <% } %> + <% itemIcon(item, ['piece-icon']); %> +
+ <% }); %> -
+
<% } %>
@@ -974,26 +1021,26 @@ const metaDescription = getMetaDescription()

Accessories

<% if(items.no_inventory){ %> -
<%= calculated.display_name %> doesn't have inventory access via API enabled. See here how to enable full API access.
+
<%= calculated.display_name %> doesn't have inventory access via API enabled. See here how to enable full API access.
<% }else if(items.accessories.length == 0){ %> -
<%= calculated.display_name %> doesn't have any accessories.
+
<%= calculated.display_name %> doesn't have any accessories.
<% }else{ %> -

- <% +

+ <% const maxTalis = items.accessories.filter(a => a.isUnique).length >= constants.UNIQUE_ACCESSORIES_COUNT ? 'golden-text': '' const maxRecombTalis = items.accessories.filter(a => a.isUnique && a.extra?.recombobulated).length >= constants.UNIQUE_ACCESSORIES_COUNT ? 'golden-text': '' %> - Unique Accessories: - <%= items.accessories.filter(a => a.isUnique).length %> / <%= constants.UNIQUE_ACCESSORIES_COUNT %> -
- Completion: - <%= Math.round(items.accessories.filter(a => a.isUnique).length / constants.UNIQUE_ACCESSORIES_COUNT * 100) %> -
- Recombobulated: - <%= items.accessories.filter(a => a.isUnique && a.extra?.recombobulated).length %> / <%= constants.UNIQUE_ACCESSORIES_COUNT %> -
- <% + Unique Accessories: + <%= items.accessories.filter(a => a.isUnique).length %> / <%= constants.UNIQUE_ACCESSORIES_COUNT %> +
+ Completion: + <%= Math.round(items.accessories.filter(a => a.isUnique).length / constants.UNIQUE_ACCESSORIES_COUNT * 100) %> +
+ Recombobulated: + <%= items.accessories.filter(a => a.isUnique && a.extra?.recombobulated).length %> / <%= constants.UNIQUE_ACCESSORIES_COUNT %> +
+ <% const rarities = items.accessory_rarities; const player_magical_power = {} @@ -1005,7 +1052,7 @@ const metaDescription = getMetaDescription() const mp_hegemony = rarities.hegemony ? constants.MAGICAL_POWER[rarities.hegemony.rarity] : 0 const mp_total = Object.values(player_magical_power).reduce((a, b) => a + b) + mp_hegemony; %> - From your accessory bag

22 MP × <%= rarities.mythic %> Accs. = <%= player_magical_power.mythic.toLocaleString() %> MP
@@ -1022,68 +1069,66 @@ const metaDescription = getMetaDescription() <% } %> Total: <%= mp_total.toLocaleString() %> Magical Power "> - Magical Power: <%= mp_total.toLocaleString() %> -
-

- <% if(items.accessories.find(a => !a.isInactive) != undefined){ %> -
-

Active Accessories

- <% items.accessories.filter(a => !a.isInactive).forEach(item => { + Magical Power: <%= mp_total.toLocaleString() %> + +

+ <% if(items.accessories.find(a => !a.isInactive) != undefined){ %> +
+

Active Accessories

+ <% items.accessories.filter(a => !a.isInactive).forEach(item => { %> -
- <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
- <% }) %> -
-
<%- getEnrichments(items.accessories.filter(a => a.isUnique && !a.isInactive)) %>
-
-
-
- <% } %> - <% if(items.accessories.find(a => a.isUnique && a.isInactive) != undefined){ %> -
-

Inactive Accessories

- <% items.accessories.filter(a => a.isUnique && a.isInactive).forEach(item => { %> -
- <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
- <% }) %> -
- <% } %> - <% if(calculated.missingAccessories.missing.length > 0 || calculated.missingAccessories.upgrades.length > 0){ %> - <% if(items.accessories.length == 1){ %> -
+
+ <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
<% } %> - -
-
-

Missing Accessories

- <% for(const [index, accessory] of calculated.missingAccessories.missing.entries()){ %> -
-
-
- <% } %> -

Missing Accessory Upgrades

- <% for(const [index, accessory] of calculated.missingAccessories.upgrades.entries()){ %> -
-
-
- <% } %> -
+ <% itemIcon(item, ['piece-icon']); %> +
+ <% }) %> +
+
<%- getEnrichments(items.accessories.filter(a => a.isUnique && !a.isInactive)) %>
+
+
+
+ <% } %> + <% if(items.accessories.find(a => a.isUnique && a.isInactive) != undefined){ %> +
+

Inactive Accessories

+ <% items.accessories.filter(a => a.isUnique && a.isInactive).forEach(item => { %> +
+ <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
+ <% } %> + <% itemIcon(item, ['piece-icon']); %> +
+ <% }) %> +
+ <% } %> + <% if(calculated.missingAccessories.missing.length > 0 || calculated.missingAccessories.upgrades.length > 0){ %> + <% if(items.accessories.length == 1){ %> +
+ <% } %> + +
+
+

Missing Accessories

+ <% for(const [index, accessory] of calculated.missingAccessories.missing.entries()){ %> +
+
+
+ <% } %> +

Missing Accessory Upgrades

+ <% for(const [index, accessory] of calculated.missingAccessories.upgrades.entries()){ %> +
+
+
<% } %> +
+ <% } %> <% } %>
- <% } %> - <% if(calculated.pets.length > 0){ %> + <% } %> + <% if(calculated.pets.length > 0){ %>

Pets

@@ -1154,180 +1199,179 @@ const metaDescription = getMetaDescription() const otherPets = calculated.pets.filter(pet => !pet.active).slice(0, petsToShowLimit) %> <% if (activePet) { %> -

Active Pet

-
-
- <% if (rarityOrder.indexOf(activePet.rarity) <= 4) { %> -
- <% } %> -
-
-
-
<%= activePet.rarity %> <%- activePet.display_name %>
-
Level <%= activePet.level.level %>
-
+

Active Pet

+
+
+ <% if (rarityOrder.indexOf(activePet.rarity) <= 4) { %> +
+ <% } %> +
+
+
+
<%= activePet.rarity %> <%- activePet.display_name %>
+
Level <%= activePet.level.level %>
-
+
+
<% } %> <% if (otherPets) { %> -

<%= activePet ? 'Other Pets' : '' %>

-
- <% for(const [index, pet] of otherPets.entries()) { %> +

<%= activePet ? 'Other Pets' : '' %>

+
+ <% for(const [index, pet] of otherPets.entries()) { %> - <% if ( + <% if ( (activePet && index === petsToShow - 1) || (!activePet && index === petsToShow) ) { %> -
- -
- <% } %> +
+ +
+ <% } %> -
- <% if(rarityOrder.indexOf(pet.rarity) <= 4) { %> -
- <% } %> -
-
Lvl <%= pet.level.level %>
-
+
+ <% if(rarityOrder.indexOf(pet.rarity) <= 4) { %> +
<% } %> +
+
Lvl <%= pet.level.level %>
+ <% } %> +
<% } %> <% if(calculated.missingPets.length > 0) { %> - <% if(calculated.pets.length == 1) { %> -
- <% } %> - -
- <% for(const [index, pet] of calculated.missingPets.entries()) { %> -
-
-
- <% } %> + <% if(calculated.pets.length == 1) { %> +
+ <% } %> + +
+ <% for(const [index, pet] of calculated.missingPets.entries()) { %> +
+
+ <% } %> +
<% } %>
- <% } %> - <% if(!items.no_inventory){ %> + <% } %> + <% if(!items.no_inventory){ %>

Inventory

<% if(items.no_inventory){ %> -
<%= calculated.display_name %> doesn't have inventory access via API enabled. See here how to enable full API access.
+
<%= calculated.display_name %> doesn't have inventory access via API enabled. See here how to enable full API access.
<% }else{ %> -
-
-
-
- <% +
+
+
+
+ <% const inventoryIconUrl = `https://crafatar.com/renders/head/${extra.isFoolsDay ? 'bd482739767c45dca1f8c33c40530952' : calculated.uuid }?size=32&overlay` %> - - - <% if(items.storage.length > 0){ %> - - <% } %> + + + <% if(items.storage.length > 0){ %> + + <% } %> - <% if(items.enderchest.length > 0){ %> - - <% } %> + <% if(items.enderchest.length > 0){ %> + + <% } %> - <% if(items.personal_vault.length > 0){ %> - - <% } %> + <% if(items.personal_vault.length > 0){ %> + + <% } %> - <% if(items.accessory_bag.length > 0){ %> - - <% } %> + <% if(items.accessory_bag.length > 0){ %> + + <% } %> - <% if(items.potion_bag.length > 0){ %> - - <% } %> + <% if(items.potion_bag.length > 0){ %> + + <% } %> - <% if(items.fishing_bag.length > 0){ %> - - <% } %> + <% if(items.fishing_bag.length > 0){ %> + + <% } %> - <% if(items.quiver.length > 0){ %> - - <% } %> -
+ <% if(items.quiver.length > 0){ %> + + <% } %>
-
+ +
<% } %>
- <% } %> -
- -

Skills

-
+ <% } %> +
+ +

Skills

+
-
-
-
- mining -
+
+
+
+
+
+ mining +
- <% const mining = calculated.mining; %> + <% const mining = calculated.mining; %> - <% if(items.mining_tools.length > 0){ %> + <% if(items.mining_tools.length > 0){ %>

Mining Tools

<% if(items.highest_rarity_mining_tool){ %> -

- Active Tool: - <%- helper.renderLore(items.highest_rarity_mining_tool.tag.display.Name) %> -

+

+ Active Tool: + <%- helper.renderLore(items.highest_rarity_mining_tool.tag.display.Name) %> +

<% }else{ %> -

- Active Tool: None -

+

+ Active Tool: None +

<% } %>
<% items.mining_tools.filter(a => !a.hidden).forEach(item => { %> -
- <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
+
+ <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
+ <% } %> + <% itemIcon(item, ['piece-icon']); %> +
<% }); %>
- <% } %> + <% } %> - <% if (!mining.core) { %> + <% if (!mining.core) { %>

<%= calculated.display_name %> hasn't visited Dwarven Mines or Crystal Hollows yet.

- <% } else { %> + <% } else { %>

Dwarven Mines & Crystal Hollows

@@ -1407,6 +1451,7 @@ const metaDescription = getMetaDescription() <%= mining.core.tier.level %>
+ <% mining.core.tokens.spent > mining.core.tokens.total ? mining.core.tokens.total = mining.core.tokens.spent : null %> <% max = mining.core.tokens.spent === mining.core.tokens.total ? 'golden-text' : '' %> Token of the Mountain: <%= mining.core.tokens.spent %>/<%= mining.core.tokens.total %> @@ -1437,47 +1482,52 @@ const metaDescription = getMetaDescription()

- <% } %> + <% } %> -

Forge

- <% +

Forge

+ <% if (mining.forge?.processes?.length > 0) { mining.forge.processes.forEach(process => { %>

Slot <%= process.slot %>:

<% if (!process.id.startsWith("UNKNOWN-")) { %> - <%= process.name %> - <%= process.timeFinished < Date.now() ? "ended" : `ending ${process.timeFinishedText}`%> + <%= process.name %> - <%= process.timeFinished < Date.now() ? "ended" : `ending ${process.timeFinishedText}`%> <% } else { %> - Unknown item - + Unknown item + <% } %>
- <% + <% }); } else { %>

No items currently forging!

- <% } %> -
- - <% if(calculated.farming.talked){ %> -
-
-
- farming + <% } %>
- <% const farming = calculated.farming; + <% if(calculated.farming.talked){ %> +
+
+
+
+
+ farming +
+ + <% const farming = calculated.farming; if (farming.contests.attended_contests > 0) {%>

+ Pelts: <%= calculated.farming.pelts.toLocaleString() %>
Contests attended: <%= farming.contests.attended_contests.toLocaleString() %>
- <% max = farming.unique_golds == 10 ? 'golden-text' : '' %>Unique Golds: <%= farming.unique_golds.toLocaleString() %>
+ <% max = farming.unique_golds == 10 ? 'golden-text' : '' %>Unique Golds: <%= farming.unique_golds.toLocaleString() %>

<% for(let badge of badgeOrder){ %> - Current: <%= farming.current_badges[badge].toLocaleString() %> Badges
Total: <%= farming.total_badges[badge].toLocaleString() %> Badges '> @@ -1485,37 +1535,37 @@ const metaDescription = getMetaDescription() <%= farming.total_badges[badge].toLocaleString() %>
<% } %>

- <% }else{ %> + <% }else{ %>

<%= calculated.display_name %> hasn't attended any contests yet.

- <% } %> + <% } %> - <% if(items.farming_tools.length > 0){ %> + <% if(items.farming_tools.length > 0){ %>

Farming Tools

<% if(items.highest_rarity_farming_tool){ %> -

- Active Tool: - <%- helper.renderLore(items.highest_rarity_farming_tool.tag.display.Name) %> -

+

+ Active Tool: + <%- helper.renderLore(items.highest_rarity_farming_tool.tag.display.Name) %> +

<% }else{ %> -

- Active Tool: None -

+

+ Active Tool: None +

<% } %>
<% items.farming_tools.filter(a => !a.hidden).forEach(item => { %> -
- <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
+
+ <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
+ <% } %> + <% itemIcon(item, ['piece-icon']); %> +
<% }); %>
- <% } %> + <% } %> - <% if(Object.keys(calculated.farming.crops).length > 0){ %> + <% if(Object.keys(calculated.farming.crops).length > 0){ %>
<% @@ -1535,7 +1585,9 @@ const metaDescription = getMetaDescription() `; %>
-
+
+
+
<%= crop.name %>
@@ -1546,17 +1598,19 @@ const metaDescription = getMetaDescription()
<% } %>
+ <% } %> +
<% } %> -
- <% } %> -
-
-
- fishing -
+
+
+
+
+
+ fishing +
- <% + <% let totalSeaCreatureKills = 0; for(const creature of calculated.kills){ @@ -1566,23 +1620,23 @@ const metaDescription = getMetaDescription() } %> -

- Items fished: <%= calculated.fishing.total.toLocaleString() %>
- Treasures fished: <%= calculated.fishing.treasure.toLocaleString() %>
- Large treasures fished: <%= calculated.fishing.treasure_large.toLocaleString() %>
- Sea Creatures killed: <%= totalSeaCreatureKills.toLocaleString() %>
- <% +

+ Items fished: <%= calculated.fishing.total.toLocaleString() %>
+ Treasures fished: <%= calculated.fishing.treasure.toLocaleString() %>
+ Large treasures fished: <%= calculated.fishing.treasure_large.toLocaleString() %>
+ Sea Creatures killed: <%= totalSeaCreatureKills.toLocaleString() %>
+ <% if(calculated.fishing.shredder_fished > 0 && calculated.fishing.shredder_bait > 0){ %> - Fished with Shredder: <%= calculated.fishing.shredder_fished.toLocaleString() %>
Bait used with Shredder: <%= calculated.fishing.shredder_bait.toLocaleString() %>
'>Fished with Shredder: <%= calculated.fishing.shredder_fished.toLocaleString() %>
- <% } %> -

+ <% } %> +

- <% if(items.fishing_tools.length > 0){ %> + <% if(items.fishing_tools.length > 0){ %>

Fishing Rods

<% if(items.highest_rarity_fishing_tool){ %>

@@ -1598,27 +1652,23 @@ const metaDescription = getMetaDescription() <% items.fishing_tools.filter(a => !a.hidden).forEach(item => { %> -

- <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> -
- <% } %> - <% itemIcon(item, ['piece-icon']); %> -
+ "> + <% if(rarityOrder.indexOf(item.rarity) <= 4){ %> +
+ <% } %> + <% itemIcon(item, ['piece-icon']); %> +
<% }); %>
- <% } %> + <% } %> - <% if(totalSeaCreatureKills > 0){ %> + <% if(totalSeaCreatureKills > 0){ %>
<% for(const creatureId of seaCreatures) { @@ -1626,87 +1676,91 @@ const metaDescription = getMetaDescription() if(creature?.amount > 0 ) { %> -
-
<%= creature.entityName %>
-
-
<%= creature.amount.toLocaleString() %> Kill<%= creature.amount != 1 ? 's' : '' %>
-
- <% +
+
<%= creature.entityName %>
+
+
<%= creature.amount.toLocaleString() %> Kill<%= creature.amount != 1 ? 's' : '' %>
+
+ <% } } %>
- <% } %> -
- - <% if(calculated.enchanting.experimented){ %> -
-
-
- enchanting + <% } %>
- <% const enchanting = calculated.enchanting; %> - -
- <% for(let game in enchanting.experiments){ - const game_data = enchanting.experiments[game]; %> -
-
- <%= game_data.name %> + <% if(calculated.enchanting.experimented){ %> +
+
+
+
- -

- <% + enchanting +

+ + <% const enchanting = calculated.enchanting; %> + +
+ <% for(let game in enchanting.experiments){ + const game_data = enchanting.experiments[game]; %> +
+
+ <%= game_data.name %> +
+ +

+ <% const game_stats = helper.sortObject(game_data.stats); for(let stat in game_stats){ %> <%= helper.titleCase(stat.replace('_', ' ')) %>: <%= (stat == 'last_attempt' || stat == 'last_claimed') ? game_stats[stat].text : game_stats[stat] %>
- <% } %> -

- <% + <% } %> +

+ <% for(let tier in game_data.tiers) { const tier_data = game_data.tiers[tier]; %> -
-
-
-
-
<%= tier_data.name %>
-
- <% +
+
+
+
+
+
+
<%= tier_data.name %>
+
+ <% for(let info in tier_data) { if(info == 'name' || info == 'icon') continue; %> - <%= helper.titleCase(info.replace('_', ' ')) %>: <%= tier_data[info] %>
- <% } %> + <%= helper.titleCase(info.replace('_', ' ')) %>: <%= tier_data[info] %>
+ <% } %> +
-
- <% } %> - + <% } %> + +
+ <% } %>
- <% } %>
+ <% } %>
- <% } %>
-
-
- -

Dungeons

-
- <% if ( +
+ +

Dungeons

+
+ <% if ( Object.keys(calculated.dungeons).length === 0 || !calculated.dungeons.catacombs?.visited || Object.keys(calculated.dungeons.catacombs.floors).length === 0 ) { %> -

- <%= calculated.display_name %> hasn't entered any dungeon yet. -

- <% } else { %> +

+ <%= calculated.display_name %> hasn't entered any dungeon yet. +

+ <% } else { %> - <% if (calculated.dungeons.used_classes) { %> + <% if (calculated.dungeons.used_classes) { %>
@@ -1716,69 +1770,69 @@ const metaDescription = getMetaDescription()
- <% } %> + <% } %> -

- Selected Class: - <%= helper.titleCase(calculated.dungeons.selected_class) %> -
- <% max = calculated.dungeons.catacombs.bonuses.item_boost === 465 ? "golden-text" : "" %> - Dungeon Item Boost: - <%= calculated.dungeons.catacombs.bonuses.item_boost.toLocaleString() %> -
- <% max = calculated.dungeons.catacombs.highest_floor === "floor_7" ? "golden-text" : "" %> - Highest Floor Beaten (normal): - <%= helper.titleCase(calculated.dungeons.catacombs.highest_floor.replace("_", " ")) %> -
- <% if (calculated.dungeons.master_catacombs?.visited && Object.keys(calculated.dungeons.master_catacombs.floors).length > 0) { %> +

+ Selected Class: + <%= helper.titleCase(calculated.dungeons.selected_class) %> +
+ <% max = calculated.dungeons.catacombs.bonuses.item_boost === 465 ? "golden-text" : "" %> + Dungeon Item Boost: + <%= calculated.dungeons.catacombs.bonuses.item_boost.toLocaleString() %> +
+ <% max = calculated.dungeons.catacombs.highest_floor === "floor_7" ? "golden-text" : "" %> + Highest Floor Beaten (normal): + <%= helper.titleCase(calculated.dungeons.catacombs.highest_floor.replace("_", " ")) %> +
+ <% if (calculated.dungeons.master_catacombs?.visited && Object.keys(calculated.dungeons.master_catacombs.floors).length > 0) { %> <% max = calculated.dungeons.master_catacombs.highest_floor === "floor_7" ? "golden-text" : "" %> Highest Floor Beaten (master): <%= helper.titleCase(calculated.dungeons.master_catacombs.highest_floor.replace("_", " ")) %>
- <% } %> - <% max = calculated.dungeons.journals.maxed ? "golden-text" : "" %> - Journals Completed: - <%= calculated.dungeons.journals.journals_completed %> - (<%= calculated.dungeons.journals.pages_collected %>/<%= calculated.dungeons.journals.total_pages %>) -
- Secrets Found: - <%= calculated.dungeons.secrets_found.toLocaleString() %> -

- -

Catacombs

-
- <% for (let [id, floor] of Object.entries(calculated.dungeons.catacombs.floors)) { %> -
-
-
- <%= floor.name.replace("_", " ") %> -
- - -
- <% for (let [stat, value] of Object.entries(floor.stats)) { %> - <%= helper.capitalizeFirstLetter(stat.split("_").join(" ")) %>: - - <% if(stat.startsWith("fastest_time")) { %> - <%= moment.duration(value, "milliseconds").format("m:ss.SSS") %> - <% } else { %> - <%= helper.formatNumber(value) %> - <% } %> -
- <% } %> - <% if(floor.most_damage) { %> - Most Damage: - <%= helper.formatNumber(floor.most_damage.value) %> - (<%= helper.titleCase(floor.most_damage.class) %>) - <% } %> + <% } %> + <% max = calculated.dungeons.journals.maxed ? "golden-text" : "" %> + Journals Completed: + <%= calculated.dungeons.journals.journals_completed %> + (<%= calculated.dungeons.journals.pages_collected %>/<%= calculated.dungeons.journals.total_pages %>) +
+ Secrets Found: + <%= calculated.dungeons.secrets_found.toLocaleString() %> +

+ +

Catacombs

+
+ <% for (let [id, floor] of Object.entries(calculated.dungeons.catacombs.floors)) { %> +
+
+
+ <%= floor.name.replace("_", " ") %>
- <% if(floor.best_runs) { %> + + +
+ <% for (let [stat, value] of Object.entries(floor.stats)) { %> + <%= helper.capitalizeFirstLetter(stat.split("_").join(" ")) %>: + + <% if(stat.startsWith("fastest_time")) { %> + <%= moment.duration(value, "milliseconds").format("m:ss.SSS") %> + <% } else { %> + <%= helper.formatNumber(value) %> + <% } %> +
+ <% } %> + <% if(floor.most_damage) { %> + Most Damage: + <%= helper.formatNumber(floor.most_damage.value) %> + (<%= helper.titleCase(floor.most_damage.class) %>) + <% } %> +
+ <% if(floor.best_runs) { %>
Grade: <%= helper.calcDungeonGrade(floor.best_runs[floor.best_runs.length - 1]) %>
- <% for (let [stat, value] of Object.entries(floor.best_runs[floor.best_runs.length - 1])) { + <% for (let [stat, value] of Object.entries(floor.best_runs[floor.best_runs.length - 1])) { if(stat == "teammates") continue; %> <%= helper.capitalizeFirstLetter(stat.split("_").join(" ")) %>: ><%= @@ -1795,56 +1849,56 @@ const metaDescription = getMetaDescription() } })() %>
- <% } %> + <% } %>
- <% } %> -
+ <% } %> + +
+ <% } %>
- <% } %> -
- <% if (calculated.dungeons.master_catacombs?.visited) { %> + <% if (calculated.dungeons.master_catacombs?.visited) { %>

Master Catacombs

<% if (Object.keys(calculated.dungeons.master_catacombs.floors).length === 0) { %> -

<%= calculated.display_name %> hasn't completed any Master Catacombs floor yet.

+

<%= calculated.display_name %> hasn't completed any Master Catacombs floor yet.

<% } else { %> -
- <% for (let [id, floor] of Object.entries(calculated.dungeons.master_catacombs.floors)) { %> -
-
-
- <%= floor.name.replace("_", " ") %> -
- - -
+
+ <% for (let [id, floor] of Object.entries(calculated.dungeons.master_catacombs.floors)) { %> +
+
+
+ <%= floor.name.replace("_", " ") %> +
+ + +
<% for (let [stat, value] of Object.entries(floor.stats)) { %> - <%= helper.capitalizeFirstLetter(stat.split("_").join(" ")) %>: - + <%= helper.capitalizeFirstLetter(stat.split("_").join(" ")) %>: + <% if(stat.startsWith("fastest_time")) { %> - <%= moment.duration(value, "milliseconds").format("m:ss.SSS") %> + <%= moment.duration(value, "milliseconds").format("m:ss.SSS") %> <% } else { %> - <%= helper.formatNumber(value) %> + <%= helper.formatNumber(value) %> <% } %> -
+

<% } %> <% if(floor.most_damage) { %> - Most Damage: - <%= helper.formatNumber(floor.most_damage.value) %> - (<%= helper.titleCase(floor.most_damage.class) %>) + Most Damage: + <%= helper.formatNumber(floor.most_damage.value) %> + (<%= helper.titleCase(floor.most_damage.class) %>) <% } %> -
- <% if(floor.best_runs) { %> - -
- Grade: - <%= helper.calcDungeonGrade(floor.best_runs[floor.best_runs.length - 1]) %> -
- <% for (let [stat, value] of Object.entries(floor.best_runs[floor.best_runs.length - 1])) { +
+ <% if(floor.best_runs) { %> + +
+ Grade: + <%= helper.calcDungeonGrade(floor.best_runs[floor.best_runs.length - 1]) %> +
+ <% for (let [stat, value] of Object.entries(floor.best_runs[floor.best_runs.length - 1])) { if(stat == "teammates") continue; %> - <%= helper.capitalizeFirstLetter(stat.split("_").join(" ")) %>: - ><%= + <%= helper.capitalizeFirstLetter(stat.split("_").join(" ")) %>: + ><%= (() => { switch (stat) { case "timestamp": @@ -1858,17 +1912,17 @@ const metaDescription = getMetaDescription() } })() %>
- <% } %> -
<% } %> -
-
- <% } %> +
+ <% } %> +
+ <% } %> +
+ <% } %> <% } %> - <% } %> - <% if (calculated.dungeons.unlocked_collections) { %> + <% if (calculated.dungeons.unlocked_collections) { %>

Boss Collections

<% @@ -1888,28 +1942,30 @@ const metaDescription = getMetaDescription() claimedTooltip += `Unclaimed items: ${collection.unclaimed}`; } %> -
data-tippy-content="<%= claimedTooltip %>"<% } %>> -
-
-
<%= collection.name %> <% if (collection.tier > 0) { %><%= collection.tier %><% } %>
-
Bosses killed: <%= collection.killed.toLocaleString() %>
-
+
data-tippy-content="<%= claimedTooltip %>" <% } %>> +
+
+
+
+
<%= collection.name %> <% if (collection.tier > 0) { %><%= collection.tier %><% } %>
+
Bosses killed: <%= collection.killed.toLocaleString() %>
+
<% } %>
- <% } %> - <% } %> + <% } %> + <% } %> +
-
-
- -

Slayer

-
- <% if (calculated.slayer_coins_spent.total == 0 || calculated.slayer_coins_spent.total === undefined) { %> +
+ +

Slayer

+
+ <% if (calculated.slayer_coins_spent.total == 0 || calculated.slayer_coins_spent.total === undefined) { %>

<%= calculated.display_name %> hasn't played any Slayer yet.

- <% } else { %> + <% } else { %>

- Total Slayer XP: <%= calculated.slayer_xp.toLocaleString() %> + Total Slayer XP: <%= calculated.slayer_xp.toLocaleString() %>

- <% + <% let maxSlayerLevel = 0; for(const slayerName in calculated.slayers){ @@ -1966,12 +2022,18 @@ const metaDescription = getMetaDescription()
<% for(const [index, tier] of Object.keys(slayer.kills).entries()){ %> -
Tier <%= romanize(tier) %>
<%= slayer.kills[tier].toLocaleString() %>
+
+
Tier <%= romanize(tier) %>
+
<%= slayer.kills[tier].toLocaleString() %>
+
<% } %> -
Total
<%= totalKills.toLocaleString() %>
+
+
Total
+
<%= totalKills.toLocaleString() %>
+
<% if(slayer.level.unclaimed){ %> -
unclaimed slayer rewards!
+
unclaimed slayer rewards!
<% } %> <% max = slayer.level.currentLevel == slayer.level.maxLevel ? 'golden-text' : '' %><%= slayerName %> level <%= slayer.level.currentLevel %>
@@ -1981,24 +2043,32 @@ const metaDescription = getMetaDescription()
- <% } %> + <% } %>
<% if(maxSlayerLevel > 0){ %> -
+
<% } %> - <% } %> + <% } %> +
-
-
- -

Minions

-
- <% +
+ +

Minions

+
+ <% let uniqueMinions = 0; let maxedMinions = 0; let skippedMinions = 0; + let uniqueMinionsType = {}; + let minionsType = {}; for(const minion of calculated.minions){ + if (!uniqueMinionsType[minion.type]) uniqueMinionsType[minion.type] = 0 + if (!minionsType[minion.type]) minionsType[minion.type] = 0 + + minionsType[minion.type] += 1 + if (minion.tiers == minion.maxLevel) uniqueMinionsType[minion.type] += 1 + uniqueMinions += minion.levels.length; skippedMinions += minion.maxLevel - minion.levels.length; @@ -2006,63 +2076,129 @@ const metaDescription = getMetaDescription() maxedMinions++; } %> - -
-
Minions Sheet by TBlazeWarriorT
-
Check the next cheapest or fastest Minion upgrades and find out which Minions will earn you the most from Bazaar, for free.
-
-

- <% max = uniqueMinions == constants.MINIONS_MAX_UNIQUES ? 'golden-text' : '' %>Unique Minions: <%= uniqueMinions %> / <%= constants.MINIONS_MAX_UNIQUES %> (<%= Math.floor(uniqueMinions / constants.MINIONS_MAX_UNIQUES * 100) %>%)
- <% max = calculated.minion_slots.currentSlots == constants.MINIONS_MAX_SLOTS ? 'golden-text' : '' %>Minion Slots: <%= calculated.minion_slots.currentSlots %> (<%= calculated.minion_slots.toNextSlot %> to next slot)
- <% max = calculated.misc.profile_upgrades.minion_slots == 5 ? 'golden-text' : '' %>Bonus Minion Slots: <%= calculated.misc.profile_upgrades.minion_slots %> / <%= constants.PROFILE_UPGRADES['minion_slots'] %>
- <% max = maxedMinions == _.size(constants.MINIONS) ? 'golden-text' : '' %>Maxed Minions: <%= maxedMinions %> / <%= _.size(constants.MINIONS) %>
- <% if(skippedMinions > 0){ %> - Skipped Minion Tiers: <%= skippedMinions %>
- <% } %> -

- <% + +
+
Minions Sheet by TBlazeWarriorT
+
Check the next cheapest or fastest Minion upgrades and find out which Minions will earn you the most from Bazaar, for free.
+
+

+ <% max = uniqueMinions == constants.MINIONS_MAX_UNIQUES ? 'golden-text' : '' %>Unique Minions: <%= uniqueMinions %> / <%= constants.MINIONS_MAX_UNIQUES %> (<%= Math.floor(uniqueMinions / constants.MINIONS_MAX_UNIQUES * 100) %>%)
+ <% max = calculated.minion_slots.currentSlots == constants.MINIONS_MAX_SLOTS ? 'golden-text' : '' %>Minion Slots: <%= calculated.minion_slots.currentSlots %> (<%= calculated.minion_slots.toNextSlot %> to next slot)
+ <% max = calculated.misc.profile_upgrades.minion_slots == 5 ? 'golden-text' : '' %>Bonus Minion Slots: <%= calculated.misc.profile_upgrades.minion_slots %> / <%= constants.PROFILE_UPGRADES['minion_slots'] %>
+ <% max = maxedMinions == _.size(constants.MINIONS) ? 'golden-text' : '' %>Maxed Minions: <%= maxedMinions %> / <%= _.size(constants.MINIONS) %>
+ <% if(skippedMinions > 0){ %> + Skipped Minion Tiers: <%= skippedMinions %>
+ <% } %> +

+ <% for(const type of constants.MINION_TYPES){ - const minions = calculated.minions.filter(a => a.type == type && a.maxLevel > 0).sort((a, b) => b.maxLevel - a.maxLevel); - - const totalOfType = _.size(_.pickBy(constants.minions, a => a.type == type)); - const maxOfType = minions.filter(a => a.maxLevel == a.tiers).length; - - if(minions.length == 0) - continue; - + const minions = calculated.minions.filter(a => a.type == type) + if(minions.length == 0) continue; %>
-
+
+
+
<%= type %> - <% if(maxOfType >= totalOfType){ %> - max! + + <% if(uniqueMinionsType[type] >= minionsType[type]){ %> + max! <% }else{ %> - (<%= maxOfType %> / <%= totalOfType %> max) + (<%= uniqueMinionsType[type] %> / <%= minionsType[type] %> max) <% } %>
<% for(const minion of minions){ %> -

+ + <% + for(let i = 1; i <= minion.levels[minion.levels.length-1]; i++){ %> +
<%= romanize(i) %>
<% } %> " class="chip <%= minion.maxLevel == 0 ? 'no-minion' : '' %> <%= minion.maxLevel == minion.tiers ? 'max-stat' : '' %> <%= minion.maxLevel != minion.levels.length ? 'skipped-minion' : '' %> "> -
-
- <%= minion.name %> <%= minion.maxLevel %> -
+
+
+
+
+ <%= minion.name %> <%= minion.maxLevel %>
+
<% } %>
<% } %> +
-
- <% if(Object.keys(calculated.collections).length > 0){ %> + +
+ +

Bestiary

+
+ <% + let maxedBestiaryOnIsland = {}, bestariesOnIsland = {}, totalBestires = 0, totalMaxedBeasteries = 0, mBestiaryOnIsland = {}, maxLevel = 0; + for(const island of Object.keys(calculated.bestiary.categories)) { + for (const family of Object.keys(calculated.bestiary.categories[island])) { + maxLevel += 10; + if (!bestariesOnIsland[island]) bestariesOnIsland[island] = 0; + if (!maxedBestiaryOnIsland[island]) maxedBestiaryOnIsland[island] = 0; + if (!mBestiaryOnIsland[island]) mBestiaryOnIsland[island] = false; + totalBestires++; + bestariesOnIsland[island]++; + if (calculated.bestiary.categories[island][family].tier >= calculated.bestiary.categories[island][family].maxTier) { + totalMaxedBeasteries++; + maxedBestiaryOnIsland[island]++; + } + if (maxedBestiaryOnIsland[island] >= bestariesOnIsland[island]) { + mBestiaryOnIsland[island] = true; + } else { + mBestiaryOnIsland[island] = false; + } + } + } + %> + +

+ <% totalMaxedBeasteries >= totalBestires ? 'golden-text' : '' %>Maxed Beasteries: <%= totalMaxedBeasteries %> / <%= totalBestires%>
+ <% calculated.bestiary.level >= maxLevel ? 'golden-text' : '' %>Level: <%= calculated.bestiary.level.toLocaleString() %> / <%= maxLevel%> +

+ + <% for(const island of Object.keys(calculated.bestiary.categories)) { %> +
+
+ <%= bestiary[island].name %> + <% if (mBestiaryOnIsland[island]) {%> + max! + <%} else {%> + (<%= maxedBestiaryOnIsland[island] %> / <%= bestariesOnIsland[island] %> max) + <%}%> +
+ +
+ <% for (const family of Object.keys(calculated.bestiary.categories[island])) { %> +
+
+ <% if (calculated.bestiary.categories[island][family].head) { %> +
+ <% } else { %> +
+ <% } %> +
+
+
<%= calculated.bestiary.categories[island][family].name %> <%= calculated.bestiary.categories[island][family].tier %>
+
Kills: <%= calculated.bestiary.categories[island][family].kills.toLocaleString() %>
+
+
+ <% } %> +
+ <% } %> +
+
+ + <% if(Object.keys(calculated.collections).length > 0){ %>

Collections

@@ -2095,17 +2231,19 @@ const metaDescription = getMetaDescription() continue; %> -
-
- <%= type %> - <% if(maxOfType >= totalOfType){ %> - max! - <% }else{ %> - (<%= maxOfType %> / <%= totalOfType %> max) - <% } %> +
+
+
-
- <% + <%= type %> + <% if(maxOfType >= totalOfType){ %> + max! + <% }else{ %> + (<%= maxOfType %> / <%= totalOfType %> max) + <% } %> +
+
+ <% for(const collection of collections){ let amountsTooltip = ''; @@ -2119,26 +2257,27 @@ const metaDescription = getMetaDescription() amountsTooltip += `
Total: ${collection.totalAmount.toLocaleString()}`; %> -
-
- <% if ("texture" in collection) { %> -
- <% } else { %> -
- <% } %> -
-
-
<%= collection.name %> <%= collection.tier %>
-
Amount: <%= collection.amount.toLocaleString() %>
-
-
- <% } %> +
+
+ <% if ("texture" in collection) { %> +
+ <% } else { %> +
+ <% } %> +
+
+
<%= collection.name %> <%= collection.tier %>
+
Amount: <%= collection.amount.toLocaleString() %>
+
+ <% } %> +
<% } %>
- <% } %> - <% if(Object.keys(calculated.misc).length > 0){ %> + <% } %> + + <% if(Object.keys(calculated.misc).length > 0){ %>

Miscellaneous

@@ -2146,83 +2285,104 @@ const metaDescription = getMetaDescription()
-
+
Essence
<% for (const [key, value] of Object.entries(calculated.essence)) { %> -
-
-
-
<%= constants.ESSENCE[key].name %>
-
Amount: <%= value.toLocaleString() %>
-
+
+
+
+
+
+
<%= constants.ESSENCE[key].name %>
+
Amount: <%= value.toLocaleString() %>
+
<% } %>
- <% if(calculated.kills.length > 0 || calculated.deaths.length > 0){ + <% if(calculated.kills.length > 0 || calculated.deaths.length > 0){ let totalKills = calculated.kills.length; let totalDeaths = calculated.deaths.length; let rows = Math.min(Math.max(totalKills, totalDeaths), 10); %> -
kills
+
+
+
+
kills +

Total Kills: <%= calculated.kills.map(a => a.amount).reduce((a, b) => a + b, 0).toLocaleString() %>
- Total Deaths: <%= calculated.deaths.map(a => a.amount).reduce((a, b) => a + b, 0).toLocaleString() %>
+ Total Deaths: <%= calculated.deaths.map(a => a.amount).reduce((a, b) => a + b, 0).toLocaleString() %> +

-
-
-
Kills
-
- <% for(let i = 0; i < rows; i++){ +
+
+
Kills
+
+ <% for(let i = 0; i < rows; i++){ const kill = calculated.kills[i]; if(typeof calculated.kills[i] === 'undefined'){ %> -
- <% }else{ %> -
#<%= i + 1 %> 
<%= kill.entityName %>
<%= kill.amount.toLocaleString() %>
- <% } - } %> - <% if(calculated.kills.length > 10 || calculated.deaths.length > 10){ %> - - <% } %> +
+
+
+ <% }else{ %> +
+
#<%= i + 1 %> 
+
<%= kill.entityName %>
+
+
<%= kill.amount.toLocaleString() %>
+ <% } + } %> + <% if(calculated.kills.length > 10 || calculated.deaths.length > 10){ %> + + <% } %>
-
-
Deaths
-
- <% for(let i = 0; i < rows; i++){ +
+
+
Deaths
+
+ <% for(let i = 0; i < rows; i++){ const death = calculated.deaths[i]; if(typeof death === 'undefined'){ %> -
- <% }else{ %> -
#<%= i + 1 %> 
<%= death.entityName %>
<%= death.amount.toLocaleString() %>
- <% } - } %> - <% if(calculated.kills.length > 10 || calculated.deaths.length > 10){ %> - - <% } %> +
+
+
+ <% }else{ %> +
+
#<%= i + 1 %> 
+
<%= death.entityName %>
+
+
<%= death.amount.toLocaleString() %>
+ <% } + } %> + <% if(calculated.kills.length > 10 || calculated.deaths.length > 10){ %> + + <% } %>
-

+
<% } %> <% if('races' in calculated.misc){ %> -
races
+
+
+
+
races +
-
- <% +
+ <% const races = [ { id: "dungeon_hub_crystal_core", name: "Crystal Core", icon: '399_0' }, { id: "dungeon_hub_giant_mushroom", name: "Giant Mushroom", icon: '100_0' }, @@ -2236,16 +2396,16 @@ const metaDescription = getMetaDescription() if(times.length > 0){ %> -
-
<%= race.name %>
-
- <% +
+
<%= race.name %>
+
+ <% const races_no_return = times.filter(a => a.includes("no_return")); const races_with_return = times.filter(a => a.includes("with_return")); if(races_no_return.length > 0){ %> -
No Return:
- <% } +
No Return:
+ <% } for(const type of types){ const key = `${race.id}_${type}_no_return_best_time`; @@ -2260,20 +2420,20 @@ const metaDescription = getMetaDescription() if(duration < 1000) raceDuration = '0.' + raceDuration; %> -
-
- <%= helper.titleCase(type.split("_").join(" ")) %>: - <%= raceDuration %> -
-
- <%= helper.renderRaceTier(raceTier) %> -
-
- <% } +
+
+ <%= helper.titleCase(type.split("_").join(" ")) %>: + <%= raceDuration %> +
+
+ <%= helper.renderRaceTier(raceTier) %> +
+
+ <% } if(races_with_return.length > 0){ %> -
With Return:
- <% } +
With Return:
+ <% } for(const type of types){ const key = `${race.id}_${type}_with_return_best_time`; @@ -2288,26 +2448,26 @@ const metaDescription = getMetaDescription() if(duration < 1000) raceDuration = '0.' + raceDuration; %> -
-
- <%= helper.titleCase(type.split("_").join(" ")) %>: - <%= raceDuration %> -
-
- <%= helper.renderRaceTier(raceTier) %> -
-
- <% } %> +
+
+ <%= helper.titleCase(type.split("_").join(" ")) %>: + <%= raceDuration %> +
+
+ <%= helper.renderRaceTier(raceTier) %>
- <% + <% } %> +
+
+ <% } } %> -
-
Other Races
-
- <% for(const key in calculated.misc.races){ +
+
Other Races
+
+ <% for(const key in calculated.misc.races){ if(key.startsWith('dungeon_hub')) continue; @@ -2318,40 +2478,52 @@ const metaDescription = getMetaDescription() if(calculated.misc.races[key] < 1000) raceDuration = '0.' + raceDuration; %> -
-
- <%= raceName %>: - <%= raceDuration %> -
-
- <%= helper.renderRaceTier(raceTier) %> -
-
- <% } %> +
+
+ <%= raceName %>: + <%= raceDuration %> +
+
+ <%= helper.renderRaceTier(raceTier) %>
+
+ <% } %>
+
<% } %> <% if('gifts' in calculated.misc){ %> -
Gifts
-

- <% for(const key in calculated.misc.gifts){ %> - <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.gifts[key].toLocaleString() %>
- <% } %> -

+
+
+
+
Gifts +
+

+ <% for(const key in calculated.misc.gifts){ %> + <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.gifts[key].toLocaleString() %>
+ <% } %> +

<% } %> <% if('winter' in calculated.misc){ %> -
Season of jerry
-

- <% for(const key in calculated.misc.winter){ %> - <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.winter[key].toLocaleString() %>
- <% } %> -

+
+
+
+
Season of jerry +
+

+ <% for(const key in calculated.misc.winter){ %> + <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.winter[key].toLocaleString() %>
+ <% } %> +

<% } %> <% if('dragons' in calculated.misc){ %> -
Dragons
-

- <% for(const key in calculated.misc.dragons){ +

+
+
+
Dragons +
+

+ <% for(const key in calculated.misc.dragons){ let tooltip = ""; if(key == 'last_hits') @@ -2362,30 +2534,42 @@ const metaDescription = getMetaDescription() for(const death of calculated.deaths.filter(a => a.entityId.endsWith('_dragon'))) tooltip += `${ death.entityName }: ${ death.amount }
`; %> - ><%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.dragons[key].toLocaleString() %>
- <% } %> + ><%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.dragons[key].toLocaleString() %>
+ <% } %>

<% } %> <% if('protector' in calculated.misc){ %> -
Endstone protectors
-

- <% for(const key in calculated.misc.protector){ %> - <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.protector[key].toLocaleString() %>
- <% } %> +

+
+
+
Endstone protectors +
+

+ <% for(const key in calculated.misc.protector){ %> + <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.protector[key].toLocaleString() %>
+ <% } %>

<% } %> <% if('damage' in calculated.misc){ %> -
Damage
-

- <% for(const key in calculated.misc.damage){ %> - <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= Math.floor(calculated.misc.damage[key]).toLocaleString() %>
- <% } %> -

+
+
+
+
Damage +
+

+ <% for(const key in calculated.misc.damage){ %> + <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= Math.floor(calculated.misc.damage[key]).toLocaleString() %>
+ <% } %> +

<% } %> <% if('milestones' in calculated.misc){ %> -
Pet milestones
-

- <% for(const key in calculated.misc.milestones){ +

+
+
+
Pet milestones +
+

+ <% for(const key in calculated.misc.milestones){ let progress = { rarity: milestone_rarities[pet_milestones[key].length-1], maxed: true @@ -2409,15 +2593,19 @@ const metaDescription = getMetaDescription() else tooltip += `${ progress.percentage.toLocaleString() }`; %> - > - <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.milestones[key].toLocaleString() %>
- <% } %> -

+ > + <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.milestones[key].toLocaleString() %>
+ <% } %> +

<% } %> <% if('burrows' in calculated.misc){ %> -
Griffin burrows
-

- <% let burrow_naming = {"dug_next": "dug_arrows", "dug_combat": "dug_monsters"} +

+
+
+
Griffin burrows +
+

+ <% let burrow_naming = {"dug_next": "dug_arrows", "dug_combat": "dug_monsters"} for(const key in calculated.misc.burrows){ let name = burrow_naming[key] || key; let tooltip = ""; @@ -2426,71 +2614,91 @@ const metaDescription = getMetaDescription() if(rarity != "total" && rarity != "null") tooltip += `${ helper.capitalizeFirstLetter(rarity) }: ${ calculated.misc.burrows[key][rarity] }
`; %> - ><%= helper.capitalizeFirstLetter(name.split("_").join(" ")); %>: <%= calculated.misc.burrows[key].total.toLocaleString() %>
- <% } %> -

+ ><%= helper.capitalizeFirstLetter(name.split("_").join(" ")); %>: <%= calculated.misc.burrows[key].total.toLocaleString() %>
+ <% } %> +

<% } %> <% if('profile_upgrades' in calculated.misc){ %> -
Profile upgrades
-

- <% for(const upgrade in constants.PROFILE_UPGRADES){ %> - <% max = calculated.misc.profile_upgrades[upgrade] == constants.PROFILE_UPGRADES[upgrade] ? 'golden-text' : '' %><%= helper.capitalizeFirstLetter(upgrade.split("_").join(" ")); %>: <%= calculated.misc.profile_upgrades[upgrade] %> / <%= constants.PROFILE_UPGRADES[upgrade] %>
- <% } %> -

+
+
+
+
Profile upgrades +
+

+ <% for(const upgrade in constants.PROFILE_UPGRADES){ %> + <% max = calculated.misc.profile_upgrades[upgrade] == constants.PROFILE_UPGRADES[upgrade] ? 'golden-text' : '' %><%= helper.capitalizeFirstLetter(upgrade.split("_").join(" ")); %>: <%= calculated.misc.profile_upgrades[upgrade] %> / <%= constants.PROFILE_UPGRADES[upgrade] %>
+ <% } %> +

<% } %> <% if('auctions_sell' in calculated.misc){ %> -
Auctions sold
-

- <% for(const key in calculated.misc.auctions_sell){ +

+
+
+
Auctions sold +
+

+ <% for(const key in calculated.misc.auctions_sell){ let tooltip = ""; if(key == 'items_sold') for(const key of Object.keys(calculated.auctions_sold).sort((a, b) => rarityOrder.indexOf(a) - rarityOrder.indexOf(b))) tooltip += `${ helper.capitalizeFirstLetter(key) }: ${ calculated.auctions_sold[key] }
`; %> - ><%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.auctions_sell[key].toLocaleString() %>
- <% } %> -

+ ><%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.auctions_sell[key].toLocaleString() %>
+ <% } %> +

<% } %> <% if('auctions_buy' in calculated.misc){ %> -
Auctions bought
-

- <% for(const key in calculated.misc.auctions_buy){ +

+
+
+
Auctions bought +
+

+ <% for(const key in calculated.misc.auctions_buy){ let tooltip = ""; if(key == 'items_bought') for(const key of Object.keys(calculated.auctions_bought).sort((a, b) => rarityOrder.indexOf(a) - rarityOrder.indexOf(b))) tooltip += `${ helper.capitalizeFirstLetter(key) }: ${ calculated.auctions_bought[key] }
`; %> - ><%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.auctions_buy[key].toLocaleString() %>
- <% } %> -

+ ><%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: <%= calculated.misc.auctions_buy[key].toLocaleString() %>
+ <% } %> +

<% } %> <% if('claimed_items' in calculated.misc){ %> -
Claimed items
-

- <% for(const key in calculated.misc.claimed_items){ +

+
+
+
Claimed items +
+

+ <% for(const key in calculated.misc.claimed_items){ let timestamp = calculated.misc.claimed_items[key]; %> - <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: - <%= moment(timestamp).fromNow() %>
- <% } %> -

+ <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: + <%= moment(timestamp).fromNow() %>
+ <% } %> +

<% } %> <% if ('uncategorized' in calculated.misc && Object.keys(calculated.misc.uncategorized).length > 0) { %> -
Uncategorized
-

- <% for (const [key, value] of Object.entries(calculated.misc.uncategorized)) { %> - <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: - <%= value.formatted %>
- <% } %> -

+
+
+
+
Uncategorized +
+

+ <% for (const [key, value] of Object.entries(calculated.misc.uncategorized)) { %> + <%= helper.capitalizeFirstLetter(key.split("_").join(" ")); %>: + <%= value.formatted %>
+ <% } %> +

<% } %>
- <% } %> + <% } %>
<%- include('../includes/footer'); %> @@ -2505,4 +2713,5 @@ const metaDescription = getMetaDescription() const constants = JSON.parse(`<%- JSON.stringify(clientConstants).replaceAll('\\', '\\\\') %>`); - + + \ No newline at end of file From ca9d2a48ae69896fb6537081fa84e87770fbb484 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Wed, 12 Oct 2022 01:39:50 -0700 Subject: [PATCH 04/47] feat: add trophyFish --- src/lib.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/lib.js b/src/lib.js index b1f6080485..45eea33f2c 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2057,6 +2057,9 @@ export async function getStats( output.crimsonIsles = crimsonIsles; + // TROPHY FISH + output.trophyFish = getTrophyFish(userProfile); + // MISC const misc = {}; @@ -2804,6 +2807,35 @@ export function getBestiary(uuid, profile) { return result; } +export function getTrophyFish(userProfile) { + const trophyFish = { + total_caught: 0, + rewards: [], + fish: [], + }; + trophyFish.rewards = userProfile.trophy_fish.rewards; + trophyFish.total_caught = userProfile.trophy_fish.total_caught; + Object.keys(userProfile.trophy_fish).forEach((key) => { + const type = key + .toUpperCase() + .replaceAll("_BRONZE", "") + .replaceAll("_SILVER", "") + .replaceAll("_GOLD", "") + .replaceAll("_DIAMOND", ""); + if (key == "rewards" || key == "total_caught") return; + + trophyFish.fish[key.toUpperCase()] = { + id: key.toUpperCase(), + name: constants.TROPHY_FISH[type].name, + amount: userProfile.trophy_fish[key], + head: constants.TROPHY_FISH[type].head, + description: constants.TROPHY_FISH[type].description, + }; + }); + + return trophyFish; +} + export function getDungeons(userProfile, hypixelProfile) { const output = {}; From 18be0970e1fc5511ce4b55c8be69de7c130ac439 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Wed, 12 Oct 2022 01:40:01 -0700 Subject: [PATCH 05/47] feat: add trophyFish --- src/constants/misc.js | 97 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/src/constants/misc.js b/src/constants/misc.js index 3880791b56..36a5ebf055 100644 --- a/src/constants/misc.js +++ b/src/constants/misc.js @@ -1,3 +1,5 @@ +import { SYMBOLS } from "../../common/constants.js"; + // prevent specific players from appearing in leaderboards export const BLOCKED_PLAYERS = [ "20934ef9488c465180a78f861586b4cf", // Minikloon (Admin) @@ -454,3 +456,98 @@ export const DOJO = { damage: 0, }, }; + +export const TROPHY_FISH = { + BLOBFISH: { + name: "Blobfish", + head: "/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", + description: "Caught everywhere.", + }, + FLYFISH: { + name: "Flyfish", + head: "/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", + description: "Caught from 8 blocks or higher above lava in the Blazing Volcano.", + }, + GOLDEN_FISH: { + name: "Golden Fish", + head: "/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + description: + "Has a chance to spawn after 15 minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + }, + GUSHER: { + name: "Gusher", + head: "/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", + description: "Caught within 7-16 minutes after a Blazing Volcano eruption.", + }, + KARATE_FISH: { + name: "Karate Fish", + head: "/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", + description: + "Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", + }, + LAVA_HORSE: { + name: "Lava Horse", + head: "/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", + description: "Caught everywhere.", + }, + MANA_RAY: { + name: "Mana Ray", + head: "/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", + description: `Caught when you have at least 1,200 ${SYMBOLS.intelligence} Mana.`, + }, + MOLDFIN: { + name: "Moldfin", + head: "/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", + description: "Caught in the Mystic Marsh.", + }, + OBFUSCATED_FISH_1: { + name: "Obfuscated 1", + head: "/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", + description: "Caught with Corrupted Bait.", + }, + OBFUSCATED_FISH_2: { + name: "Obfuscated 2", + head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "Caught whilst using Obfuscated 1 as bait.", + }, + OBFUSCATED_FISH_3: { + name: "Obfuscated 3", + head: "/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", + description: "Caught with Obfuscated 2 as bait.", + }, + SKELETON_FISH: { + name: "Skeleton Fish", + head: "/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", + description: "Caught in the Burning Desert.", + }, + SLUGFISH: { + name: "Slugfish", + head: "/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", + description: "Caught when the bobber has been active for at least 30 seconds.", + }, + SOUL_FISH: { + name: "Soul Fish", + head: "/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", + description: "Caught in the Stronghold.", + }, + STEAMING_HOT_FLOUNDER: { + name: "Steaming-Hot Flounder", + head: "/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", + description: "Caught when the bobber is within 2 blocks of a Geyser in the Blazing Volcano.", + }, + SULPHUR_SKITTER: { + name: "Sulphur Skitter", + head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "Caught when standing within 8 blocks of a Sulphur Ore.", + }, + VANILLE: { + name: "Vanille", + head: "/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", + description: "Caught when using a Starter Lava Rod with no Enchantments.", + }, + VOLCANIC_STONEFISH: { + name: "Volcanic Stonefish", + head: "/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", + description: "Caught in the Blazing Volcano.", + }, +}; From acf9cdf5f3c47700faff641cc2f7f4fcb92fb04b Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Mon, 17 Oct 2022 20:44:42 +0200 Subject: [PATCH 06/47] fix conflicts --- src/constants/bestiary.js | 599 -------------------------------------- src/constants/misc.js | 3 - src/custom-resources.js | 4 +- src/lib.js | 43 +-- views/stats.ejs | 10 +- 5 files changed, 4 insertions(+), 655 deletions(-) diff --git a/src/constants/bestiary.js b/src/constants/bestiary.js index 279331e3d4..e392d4910c 100644 --- a/src/constants/bestiary.js +++ b/src/constants/bestiary.js @@ -1,602 +1,4 @@ export const BESTIARY = { -<<<<<<< HEAD - private: { - max: 5, - mobs: [ - { - id: "kills_family_zombie", - name: "Zombie", - skyblockId: "ZOMBIE_SKULL", - itemId: 397, - damage: 2, - maxTier: 5, - }, - { - id: "kills_family_skeleton", - name: "Skeleton", - skyblockId: "SKELETON_SKULL", - itemId: 397, - damage: 0, - maxTier: 5, - }, - { - id: "kills_family_spider", - name: "Spider", - head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - maxTier: 5, - }, - { - id: "kills_family_cave_spider", - name: "Cave Spider", - head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - maxTier: 5, - }, - { - id: "kills_family_enderman_private", - name: "Enderman", - head: "96c0b36d53fff69a49c7d6f3932f2b0fe948e032226d5e8045ec58408a36e951", - maxTier: 5, - }, - { - id: "kills_family_slime", - name: "Slime", - head: "895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c", - maxTier: 5, - }, - { - id: "kills_family_witch", - name: "Witch", - head: "fce6604157fc4ab5591e4bcf507a749918ee9c41e357d47376e0ee7342074c90", - maxTier: 5, - }, - ], - }, - hub: { - max: 1000, - mobs: [ - { - id: "kills_family_zombie_villager", - name: "Zombie Villager", - head: "e5e08a8776c1764c3fe6a6ddd412dfcb87f41331dad479ac96c21df4bf3ac89c", - }, - { - id: "kills_family_unburried_zombie", - name: "Crypt Ghoul", - skyblockId: "GOLD_SWORD", - itemId: 283, - damage: 0, - }, - { - id: "kills_family_ruin_wolf", - name: "Wolf", - head: "69d1d3113ec43ac2961dd59f28175fb4718873c6c448dfca8722317d67", - }, - { - id: "kills_family_old_wolf", - name: "Old Wolf", - head: "d359537c15534f61c1cd886bc118774ed22280e7cdab6613870160aad4ca39", - }, - ], - }, - spiders: { - max: 1000, - mobs: [ - { - id: "kills_family_dasher_spider", - name: "Dasher Spider", - head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - }, - { - id: "kills_family_spider_jockey", - name: "Spider Jockey", - head: "70939373cafe4b1f5397aafd09f3bb1663e7b629a41a75fbdc1860b6bf8b475f", - }, - { - id: "kills_family_weaver_spider", - name: "Weaver Spider", - head: "921438f646dc04515967e8195ccc3d31e23b02f9aa0ac914edc2822f98394b86", - }, - { - id: "kills_family_voracious_spider", - name: "Voracious Spider", - head: "8300986ed0a04ea79904f6ae53f49ed3a0ff5b1df62bba622ecbd3777f156df8", - }, - { - id: "kills_family_splitter_spider", - name: "Splitter Spider", - head: "2acf69fc7af5497a1741891d1e5bf32b96ae0d6c0bbd3c14758ea44a03c57283", - }, - { - id: "kills_family_brood_mother_spider", - boss: true, - name: "Brood Mother", - head: "cf0622b3998d42b34d5bc760bb2c83fdbc6e68fab05b7ea17b35097ed81190d6", - }, - { - id: "kills_family_respawning_skeleton", - name: "Gravel Skeleton", - skyblockId: "SKELETON_SKULL", - itemId: 397, - damage: 0, - }, - { - id: "kills_family_random_slime", - name: "Rain Slime", - head: "895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c", - }, - { - id: "kills_family_arachne_keeper", - name: "Arachne's Keeper", - head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - }, - { - id: "kills_family_arachne_brood", - name: "Arachne's Brood", - head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - }, - { - boss: true, - id: "kills_family_arachne", - name: "Arachne", - head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - }, - ], - }, - fortress: { - max: 1000, - mobs: [ - { - id: "kills_family_ashfang", - boss: true, - name: "Ashfang", - head: "3d2a5b4b109bd788edba0171d0aab8a55305ac2f56184df70a319cd488a36c3e", - }, - { - id: "kills_family_barbarian_duke_x", - boss: true, - name: "Barbarian Duke X", - head: "fee9fc7c181e2f630f6b1af85d4951359cafcfa82ff5ea3bc283e0e6088c6e54", - }, - { - id: "kills_family_bladesoul", - boss: true, - name: "Bladesoul", - head: "7f5f3384384d7f03bf97a73099b0bafb72c538fc0415ac8613b664f87579a379", - }, - { - id: "kills_family_blaze", - name: "Blaze", - head: "b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0", - }, - { - id: "kills_family_flaming_spider", - name: "Flaming Spider", - head: "5a65ef23ea35047150d33880473a47fe635f0c0e3c823bd76dc849cb02441655", - }, - { - id: "kills_family_ghast", - name: "Ghast", - head: "de8a38e9afbd3da10d19b577c55c7bfd6b4f2e407e44d4017b23be9167abff02", - }, - { - id: "kills_family_mage_outlaw", - boss: true, - name: "Mage Outlaw", - head: "ebec99b3a050fd277528407676366e20b92006ad88d14727a4d99eb8cb273b62", - }, - { - id: "kills_family_magma_cube", - name: "Magma Cube", - head: "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", - }, - { - id: "kills_family_magma_cube_boss", - boss: true, - name: "Magma Cube Boss", - head: "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", - }, - { - id: "kills_family_matcho", - name: "Matcho", - head: "ef2daabb78a1f7aa12d145d88c0ca46b9e856f5534e9286e555faf0c291f4fd5", - }, - { - id: "kills_family_charging_mushroom_cow", - name: "Mushroom Bull", - head: "2b52841f2fd589e0bc84cbabf9e1c27cb70cac98f8d6b3dd065e55a4dcb70d77", - }, - { - id: "kills_family_pigman", - name: "Pigman", - head: "74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb", - }, - { - id: "kills_family_wither_skeleton", - name: "Wither Skeleton", - head: "7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8", - }, - { - id: "kills_family_wither_spectre", - name: "Wither Spectre", - head: "f6aa5acfd973f67ba8e249ae07a11ae7ca713c900d90d09ce0903c79ddd7dd9e", - }, - ], - }, - end: { - max: 1000, - mobs: [ - { - id: "kills_family_enderman", - name: "Enderman", - head: "96c0b36d53fff69a49c7d6f3932f2b0fe948e032226d5e8045ec58408a36e951", - }, - { - id: "kills_family_obsidian_wither", - name: "Obsidian Defender", - head: "7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8", - }, - { - id: "kills_family_watcher", - name: "Watcher", - head: "daa8fc8de6417b48d48c80b443cf5326e3d9da4dbe9b25fcd49549d96168fc0", - }, - { - id: "kills_family_zealot_enderman", - name: "Zealot", - skyblockId: "SUMMONING_EYE", - itemId: 130, - damage: 0, - }, - { - id: "kills_family_endermite", - name: "Endermite", - head: "5bc7b9d36fb92b6bf292be73d32c6c5b0ecc25b44323a541fae1f1e67e393a3e", - }, - { - id: "kills_family_dragon", - boss: true, - name: "Dragon", - skyblockId: "DRAGON_EGG", - itemId: 122, - damage: 0, - }, - { - id: "kills_family_corrupted_protector", - boss: true, - name: "Endstone Protector", - head: "22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", - }, - { - id: "kills_family_voidling_fanatic", - name: "Voidling Fanatic", - head: "e53b7bcd56f0b95f87dd79ed17636beb9d8346744014228ea2f6b110b148c1", - }, - { - id: "kills_family_voidling_extremist", - name: "Voidling Extremist", - head: "eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3", - }, - ], - }, - caverns: { - max: 1000, - mobs: [ - { - id: "kills_family_invisible_creeper", - name: "Sneaky Creeper", - skyblockId: "CREEPER_SKULL", - itemId: 397, - damage: 4, - }, - { - id: "kills_family_lapis_zombie", - name: "Lapis Zombie", - skyblockId: "ZOMBIE_SKULL", - itemId: 351, - damage: 4, - }, - { - id: "kills_family_redstone_pigman", - name: "Redstone Pigman", - skyblockId: "REDSTONE", - itemId: 331, - damage: 0, - }, - { - id: "kills_family_emerald_slime", - name: "Emerald Slime", - head: "5774e86aa4cff792395b77add57b00bb1a102f8f0f0980f4d55b3d7aff1e6da9", - }, - { - id: "kills_family_diamond_zombie", - name: "Miner Zombie", - head: "d28d9ff54188a1afee65b94f3bfcce321c643a34590c14b192b2e3ec2f525d3", - }, - { - id: "kills_family_diamond_skeleton", - name: "Miner Skeleton", - head: "836bbc4215cea1b6a484e893b116e73459ef36bffc622741e577e9493a41e6e", - }, - { - id: "kills_family_caverns_ghost", - name: "Ghost", - head: "981977918a1180e0dec879e6bcd1aa39494977bb913be2ab01aff1db1fa4", - }, - { - id: "kills_family_goblin", - name: "Goblin", - head: "b6b972e32d761b192626e5d6d01edc094940910103cea5e2e2d1f231adb755d5", - }, - { - id: "kills_family_treasure_hoarder", - name: "Treasure Hoarder", - head: "b2b12a814ced8af02cddf29a37e7f3011e430e8a18b38b706f27c6bd31650b65", - }, - { - id: "kills_family_ice_walker", - name: "Ice Walker", - skyblockId: "PACKED_ICE", - itemId: 174, - damage: 0, - }, - { - id: "kills_family_automaton", - name: "Automaton", - head: "22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", - }, - { - id: "kills_family_butterfly", - name: "Butterfly", - head: "9fd806defdfdf59b1f2609c8ee364666de66127a623415b5430c9358c601ef7c", - }, - { - id: "kills_family_team_treasurite", - name: "Grunt", - head: "ef5e03b8de119f8589a808224cbea737f5dcf24235799b7378ac5bf06abf6dd4", - }, - { - id: "kills_family_sludge", - name: "Sludge", - head: "895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c", - }, - { - id: "kills_family_thyst", - name: "Thyst", - head: "5bc7b9d36fb92b6bf292be73d32c6c5b0ecc25b44323a541fae1f1e67e393a3e", - }, - { - id: "kills_family_worms", - name: "Worm", - head: "df03ad96092f3f789902436709cdf69de6b727c121b3c2daef9ffa1ccaed186c", - }, - { - id: "kills_family_yog", - name: "Yog", - head: "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", - }, - ], - }, - park: { - max: 1000, - mobs: [ - { - id: "kills_family_pack_spirit", - name: "Pack Spirit", - head: "b7c8bef6beb77e29af8627ecdc38d86aa2fea7ccd163dc73c00f9f258f9a1457", - }, - { - id: "kills_family_howling_spirit", - name: "Howling Spirit", - head: "b7c8bef6beb77e29af8627ecdc38d86aa2fea7ccd163dc73c00f9f258f9a1457", - }, - { - id: "kills_family_soul_of_the_alpha", - name: "Soul of the Alpha", - head: "b7c8bef6beb77e29af8627ecdc38d86aa2fea7ccd163dc73c00f9f258f9a1457", - }, - ], - }, - spooky: { - max: 1000, - mobs: [ - { - id: "kills_family_trick_or_treater", - name: "Trick or Treater", - head: "d7cbe061b445b88cb2df59accc8d2c1c12118fe0b2127e6e75813550adac67cf", - }, - { - id: "kills_family_wither_gourd", - name: "Wither Gourd", - head: "68f2ffc6fb4e9959b9a7a317f51a6775a159ddc2241dbd6c774d3ac08b6", - }, - { - id: "kills_family_phantom_spirit", - name: "Phantom Spirit", - head: "653b2f7c5e177bd67cead30d0ee53425c7684c975c8c2a5273a09ca49a1f6cdd", - }, - { - id: "kills_family_scary_jerry", - name: "Scary Jerry", - head: "df202dc24d15f7ce36e02fb4b3e8153b146ab9c1724aaa5d484c741da0eeb6fd", - }, - { - id: "kills_family_wraith", - name: "Wraith", - head: "aeabc3075cf41f38e6df1236b95caafcba1bee22c49d804b9427488c2f6e0efc", - }, - { - id: "kills_family_batty_witch", - name: "Crazy Witch", - head: "fce6604157fc4ab5591e4bcf507a749918ee9c41e357d47376e0ee7342074c90", - }, - { - id: "kills_family_headless_horseman", - boss: true, - name: "Headless Horseman", - head: "4c6570f1242992f6eba23ee582598c39e3e745383273deef8b3977583fe3cf5", - }, - ], - }, - catacombs: { - max: 1000, - mobs: [ - { - id: "kills_family_lost_adventurer", - name: "Lost Adventurer", - head: "1e0329f42192ee7c1a0c704f82dbbbe7c00fbfa3f020c1067a208630b991b988", - }, - { - id: "kills_family_zombie_grunt", - name: "Zombie Grunt", - skyblockId: "ZOMBIE_SKULL", - itemId: 397, - damage: 2, - }, - { - id: "kills_family_zombie_soldier", - name: "Zombie Soldier", - skyblockId: "ZOMBIE_SKULL", - itemId: 397, - damage: 2, - }, - { - id: "kills_family_zombie_knight", - name: "Zombie Soldier", - head: "25d2f31ba162fe6272e831aed17f53213db6fa1c4cbe4fc827f3963cc98b9", - }, - { - id: "kills_family_skeleton_grunt", - name: "Skeleton Grunt", - head: "70471677b37ae842c2bd232e16eeb84d5a493231eecec072da38be3127dd5c8", - }, - { - id: "kills_family_skeleton_soldier", - name: "Skeleton Soldier", - head: "219688e0c2f05aeb979d6a1b8c911957b7d3657e14b57af93c5ef6f6a59569dd", - }, - { - id: "kills_family_skeleton_master", - name: "Skeleton Master", - head: "74e95e1b7dc82ba7845a68fc6a312f4cd90ee2f6cce26a68c88b04b1072d879", - }, - { - id: "kills_family_scared_skeleton", - name: "Scared Skeleton", - skyblockId: "SKELETON_SKULL", - itemId: 397, - damage: 0, - }, - { - id: "kills_family_diamond_guy", - name: "Angry Archeologist", - head: "c48c783458e4cf8518e8ab5863fbc4cb948f90568eeb9a60d16c4fde2b96c033", - }, - { - id: "kills_family_dungeon_respawning_skeleton", - name: "Undead Skeleton", - skyblockId: "SKELETON_SKULL", - itemId: 397, - damage: 0, - }, - { - id: "kills_family_skeletor", - name: "Skeletor", - head: "89d074ad9b9971879eb325bddff3675f7224856bd6d569fc8d483c133d73005d", - }, - { - id: "kills_family_sniper_skeleton", - name: "Sniper", - head: "b18c071f080dba50a62a6263ff724edc157ce4fb4883cceff2491d5bbde830c1", - }, - { - id: "kills_family_crypt_souleater", - name: "Crypt Souleater", - head: "66f349270a3b851896cdad842f5eec6e140bd9119b75c074955c3be7865e27c7", - }, - { - id: "kills_family_crypt_dreadlord", - name: "Crypt Dreadlord", - head: "66f349270a3b851896cdad842f5eec6e140bd9119b75c074955c3be7865e27c7", - }, - { - id: "kills_family_crypt_tank_zombie", - name: "Tank Zombie", - skyblockId: "ZOMBIE_SKULL", - itemId: 397, - damage: 2, - }, - { - id: "kills_family_super_tank_zombie", - name: "Super Tank Zombie", - skyblockId: "ZOMBIE_SKULL", - itemId: 397, - damage: 2, - }, - { - id: "kills_family_crypt_lurker", - name: "Crypt Lurker", - skyblockId: "ZOMBIE_SKULL", - itemId: 397, - damage: 2, - }, - { - id: "kills_family_cellar_spider", - name: "Cellar Spider", - head: "41645dfd77d09923107b3496e94eeb5c30329f97efc96ed76e226e98224", - }, - { - id: "kills_family_watcher_summon_undead", - name: "Undead", - head: "f4624a9a8c69ca204504abb043d47456cd9b09749a36357462303f276a229d4", - }, - { - id: "kills_family_lonely_spider", - name: "Lonely Spider", - head: "cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - }, - { - id: "kills_family_shadow_assassin", - name: "Shadow Assassin", - head: "3399e00f404411e465d74388df132d51fe868ecf86f1c073faffa1d9172ec0f3", - }, - { - id: "kills_family_king_midas", - name: "King Midas", - head: "62bca085750043503f5df9f7def824a2e3acfc27842bcd09d2b6695881e832f5", - }, - { - id: "kills_family_super_archer", - name: "Super Archer", - head: "dcae6db0b59a64305076d966d8e7b9a97be46dae3a807714fa86d37848f6", - }, - { - id: "kills_family_crypt_witherskeleton", - name: "Withermancer", - head: "7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8", - }, - { - id: "kills_family_zombie_commander", - name: "Zombie Commander", - skyblockId: "ZOMBIE_SKULL", - itemId: 397, - damage: 2, - }, - ], - }, - }; - - export const BEASTIARY_KILLS = { - regular: [ - 10, 25, 100, 250, 500, 1000, 2500, 5000, 10000, 25000, 50000, 100000, 200000, 300000, 400000, 500000, 600000, - 700000, 800000, 900000, 1000000, 1100000, 1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1900000, - 2000000, 2100000, 2200000, 2300000, 2400000, 2500000, 2600000, 2700000, 2800000, 2900000, 3000000, - ], - boss: [ - 2, 5, 10, 20, 30, 40, 50, 75, 100, 150, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, - 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 3100, 3200, - ], - }; -======= private: { max: 5, mobs: [ @@ -1193,4 +595,3 @@ export const BEASTIARY_KILLS = { 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 3100, 3200, ], }; ->>>>>>> 18be0970e1fc5511ce4b55c8be69de7c130ac439 diff --git a/src/constants/misc.js b/src/constants/misc.js index 949c1a521a..36a5ebf055 100644 --- a/src/constants/misc.js +++ b/src/constants/misc.js @@ -393,8 +393,6 @@ export const STAT_MAPPINGS = { walk_speed: "speed", }; -<<<<<<< HEAD -======= export const KUUDRA_TIERS = { none: { name: "Basic", @@ -459,7 +457,6 @@ export const DOJO = { }, }; ->>>>>>> 18be0970e1fc5511ce4b55c8be69de7c130ac439 export const TROPHY_FISH = { BLOBFISH: { name: "Blobfish", diff --git a/src/custom-resources.js b/src/custom-resources.js index adc52c0343..affdcf9aaf 100644 --- a/src/custom-resources.js +++ b/src/custom-resources.js @@ -58,7 +58,7 @@ async function init() { console.log(`Custom Resources loading started on ${getClusterId(true)}.`); console.time(`custom_resources_${getClusterId()}`); - for (const packOrFile of await fs.readdir(RESOURCE_PACK_FOLDER, { withFileTypes: true })) { + /*for (const packOrFile of await fs.readdir(RESOURCE_PACK_FOLDER, { withFileTypes: true })) { if (!packOrFile.isDirectory()) { continue; } @@ -406,7 +406,7 @@ async function init() { pack.textures.push(texture); } - } + }*/ console.log(`Custom Resources loading done. (${getClusterId(true)})`); console.timeEnd(`custom_resources_${getClusterId()}`); diff --git a/src/lib.js b/src/lib.js index 7021466d88..ef4f804cfb 100644 --- a/src/lib.js +++ b/src/lib.js @@ -1799,12 +1799,10 @@ export async function getStats( output.minion_slots = getMinionSlots(output.minions); output.collections = await getCollections(profile.uuid, profile, options.cacheOnly); output.bestiary = getBestiary(profile.uuid, profile); -<<<<<<< HEAD + output.trophyFish = getTrophyFish(userProfile); console.log(output.trophyFish); -======= ->>>>>>> 18be0970e1fc5511ce4b55c8be69de7c130ac439 output.social = hypixelProfile.socials; output.dungeons = getDungeons(userProfile, hypixelProfile); @@ -2063,9 +2061,6 @@ export async function getStats( output.crimsonIsles = crimsonIsles; - // TROPHY FISH - output.trophyFish = getTrophyFish(userProfile); - // MISC const misc = {}; @@ -2754,7 +2749,6 @@ export async function getCollections(uuid, profile, cacheOnly = false) { return output; } -<<<<<<< HEAD export function getTrophyFish(userProfile) { const trophyFish = { total_caught: 0, @@ -2784,8 +2778,6 @@ export function getTrophyFish(userProfile) { return trophyFish; } -======= ->>>>>>> 18be0970e1fc5511ce4b55c8be69de7c130ac439 export function getBestiary(uuid, profile) { const output = {}; @@ -2844,39 +2836,6 @@ export function getBestiary(uuid, profile) { return result; } - -<<<<<<< HEAD -======= -export function getTrophyFish(userProfile) { - const trophyFish = { - total_caught: 0, - rewards: [], - fish: [], - }; - trophyFish.rewards = userProfile.trophy_fish.rewards; - trophyFish.total_caught = userProfile.trophy_fish.total_caught; - Object.keys(userProfile.trophy_fish).forEach((key) => { - const type = key - .toUpperCase() - .replaceAll("_BRONZE", "") - .replaceAll("_SILVER", "") - .replaceAll("_GOLD", "") - .replaceAll("_DIAMOND", ""); - if (key == "rewards" || key == "total_caught") return; - - trophyFish.fish[key.toUpperCase()] = { - id: key.toUpperCase(), - name: constants.TROPHY_FISH[type].name, - amount: userProfile.trophy_fish[key], - head: constants.TROPHY_FISH[type].head, - description: constants.TROPHY_FISH[type].description, - }; - }); - - return trophyFish; -} - ->>>>>>> 18be0970e1fc5511ce4b55c8be69de7c130ac439 export function getDungeons(userProfile, hypixelProfile) { const output = {}; diff --git a/views/stats.ejs b/views/stats.ejs index bf98fbb0ff..706ebafad0 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -2280,9 +2280,6 @@ const metaDescription = getMetaDescription() <% } %> -<<<<<<< HEAD - -======= <%if (Object.keys(calculated.crimsonIsles.kuudra_completed_tiers).length > 0 || Object.keys(calculated.crimsonIsles.dojo).length > 0) { %>
@@ -2345,7 +2342,6 @@ const metaDescription = getMetaDescription() <% } %>
<% } %> ->>>>>>> 18be0970e1fc5511ce4b55c8be69de7c130ac439 <% if(Object.keys(calculated.misc).length > 0){ %>
@@ -2783,8 +2779,4 @@ const metaDescription = getMetaDescription() -<<<<<<< HEAD - -======= - ->>>>>>> 18be0970e1fc5511ce4b55c8be69de7c130ac439 + \ No newline at end of file From 2b20ff5df881a36993523b56835edb7f0e846888 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Mon, 17 Oct 2022 20:46:17 +0200 Subject: [PATCH 07/47] fix: re-enable `custom-resources.js` --- src/custom-resources.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/custom-resources.js b/src/custom-resources.js index affdcf9aaf..adc52c0343 100644 --- a/src/custom-resources.js +++ b/src/custom-resources.js @@ -58,7 +58,7 @@ async function init() { console.log(`Custom Resources loading started on ${getClusterId(true)}.`); console.time(`custom_resources_${getClusterId()}`); - /*for (const packOrFile of await fs.readdir(RESOURCE_PACK_FOLDER, { withFileTypes: true })) { + for (const packOrFile of await fs.readdir(RESOURCE_PACK_FOLDER, { withFileTypes: true })) { if (!packOrFile.isDirectory()) { continue; } @@ -406,7 +406,7 @@ async function init() { pack.textures.push(texture); } - }*/ + } console.log(`Custom Resources loading done. (${getClusterId(true)})`); console.timeEnd(`custom_resources_${getClusterId()}`); From af84376b38cb2e655fca89ba26184b3b0581db88 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Tue, 18 Oct 2022 15:50:52 +0200 Subject: [PATCH 08/47] fix: trophyFish not visible in browser --- public/resources/ts/globals.d.ts | 12 ++++++++++++ src/lib.js | 13 +++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/public/resources/ts/globals.d.ts b/public/resources/ts/globals.d.ts index 56e682e852..60669b9d4f 100644 --- a/public/resources/ts/globals.d.ts +++ b/public/resources/ts/globals.d.ts @@ -569,6 +569,18 @@ declare const calculated: SkyCryptPlayer & { amount: number; }[]; reaper_peppers_eaten: number; + trophyFish: { + total_caught: number; + fish: { + [key: string]: { + id: string; + name: string; + amount: number; + head: string; + description: string; + }; + }; + }; }; interface SkyCryptRelativeTime { diff --git a/src/lib.js b/src/lib.js index ef4f804cfb..1a1de0142a 100644 --- a/src/lib.js +++ b/src/lib.js @@ -1800,8 +1800,7 @@ export async function getStats( output.collections = await getCollections(profile.uuid, profile, options.cacheOnly); output.bestiary = getBestiary(profile.uuid, profile); - output.trophyFish = getTrophyFish(userProfile); - console.log(output.trophyFish); + output.trophy_fish = getTrophyFish(userProfile); output.social = hypixelProfile.socials; @@ -2753,18 +2752,20 @@ export function getTrophyFish(userProfile) { const trophyFish = { total_caught: 0, rewards: [], - fish: [], + fish: {}, }; + trophyFish.rewards = userProfile.trophy_fish.rewards; trophyFish.total_caught = userProfile.trophy_fish.total_caught; - Object.keys(userProfile.trophy_fish).forEach((key) => { + + for (const key of Object.keys(userProfile.trophy_fish)) { + if (key == "rewards" || key == "total_caught") continue; const type = key .toUpperCase() .replaceAll("_BRONZE", "") .replaceAll("_SILVER", "") .replaceAll("_GOLD", "") .replaceAll("_DIAMOND", ""); - if (key == "rewards" || key == "total_caught") return; trophyFish.fish[key.toUpperCase()] = { id: key.toUpperCase(), @@ -2773,7 +2774,7 @@ export function getTrophyFish(userProfile) { head: constants.TROPHY_FISH[type].head, description: constants.TROPHY_FISH[type].description, }; - }); + } return trophyFish; } From 873811fa97ffdc54ba8a87701f0f0766fba97aba Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Wed, 19 Oct 2022 18:14:22 +0000 Subject: [PATCH 09/47] feat: condense trophy fishe into 1 object each --- src/lib.js | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/lib.js b/src/lib.js index 1a1de0142a..116243a369 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2760,20 +2760,26 @@ export function getTrophyFish(userProfile) { for (const key of Object.keys(userProfile.trophy_fish)) { if (key == "rewards" || key == "total_caught") continue; - const type = key - .toUpperCase() - .replaceAll("_BRONZE", "") - .replaceAll("_SILVER", "") - .replaceAll("_GOLD", "") - .replaceAll("_DIAMOND", ""); - - trophyFish.fish[key.toUpperCase()] = { - id: key.toUpperCase(), - name: constants.TROPHY_FISH[type].name, - amount: userProfile.trophy_fish[key], - head: constants.TROPHY_FISH[type].head, - description: constants.TROPHY_FISH[type].description, - }; + + const arr = key.split("_"); + const rarity = ["bronze", "silver", "gold", "diamond"].includes(arr[arr.length - 1]) ? arr[arr.length - 1] : false; + if (!rarity) { + trophyFish.fish[key] = { + id: key.toUpperCase(), + name: constants.TROPHY_FISH[key.toUpperCase()].name, + total: userProfile.trophy_fish[key], + amounts: { + bronze: 0, + silver: 0, + gold: 0, + diamond: 0, + }, + }; + } else { + arr.pop(); + const fish = arr.join("_"); + trophyFish.fish[fish].amounts[rarity] = userProfile.trophy_fish[key]; + } } return trophyFish; From 6ac6624f5fb589ba154e0d810fe02d84ca2cd25f Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Thu, 20 Oct 2022 15:57:08 +0000 Subject: [PATCH 10/47] feat: display trophy fish --- views/stats.ejs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/views/stats.ejs b/views/stats.ejs index 706ebafad0..bcd74c3261 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -1690,6 +1690,28 @@ const metaDescription = getMetaDescription() } %>
<% } %> + + <% if (calculated?.trophy_fish?.total_caught > 0) { %> + +
+ <% for (const fish of Object.values(calculated.trophy_fish.fish)) { %> +
+
+
+
+
+
<%= fish.name %>
+
+
Bronze: <%= fish.amounts.bronze.toLocaleString() %>
+
Silver: <%= fish.amounts.silver.toLocaleString() %>
+
Gold: <%= fish.amounts.gold.toLocaleString() %>
+
Diamond: <%= fish.amounts.diamond.toLocaleString() %>
+
+
+
+ <% } %> +
+ <% } %> <% if(calculated.enchanting.experimented){ %> From 35d1eb43597bbaa015d4245e57795b62d4b6c6e2 Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Thu, 20 Oct 2022 16:03:10 +0000 Subject: [PATCH 11/47] feat: display missing trophy fish --- src/lib.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/lib.js b/src/lib.js index 116243a369..ced5a74e90 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2755,6 +2755,21 @@ export function getTrophyFish(userProfile) { fish: {}, }; + for (const key of Object.keys(constants.TROPHY_FISH)) { + trophyFish.fish[key.toLowerCase()] = { + id: key, + name: constants.TROPHY_FISH[key].name, + total: 0, + amounts: { + bronze: 0, + silver: 0, + gold: 0, + diamond: 0, + }, + head: constants.TROPHY_FISH[key].head, + } + } + trophyFish.rewards = userProfile.trophy_fish.rewards; trophyFish.total_caught = userProfile.trophy_fish.total_caught; @@ -2764,17 +2779,7 @@ export function getTrophyFish(userProfile) { const arr = key.split("_"); const rarity = ["bronze", "silver", "gold", "diamond"].includes(arr[arr.length - 1]) ? arr[arr.length - 1] : false; if (!rarity) { - trophyFish.fish[key] = { - id: key.toUpperCase(), - name: constants.TROPHY_FISH[key.toUpperCase()].name, - total: userProfile.trophy_fish[key], - amounts: { - bronze: 0, - silver: 0, - gold: 0, - diamond: 0, - }, - }; + trophyFish.fish[key].total = userProfile.trophy_fish[key]; } else { arr.pop(); const fish = arr.join("_"); From 23d315dbb7ed1fa946296ddf0a7ed1a2e4abe5cb Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Thu, 20 Oct 2022 16:22:51 +0000 Subject: [PATCH 12/47] feat: grab head texture from constants directly --- common/constants.js | 1 + common/constants/trophy-fish.js | 96 +++++++++++++++++++++++++++++++++ src/constants/misc.js | 95 -------------------------------- src/lib.js | 21 ++++---- views/stats.ejs | 2 +- 5 files changed, 108 insertions(+), 107 deletions(-) create mode 100644 common/constants/trophy-fish.js diff --git a/common/constants.js b/common/constants.js index 8d7c199836..963207cbe8 100644 --- a/common/constants.js +++ b/common/constants.js @@ -4,3 +4,4 @@ export * from "./constants/items.js"; export * from "./constants/potions.js"; export * from "./constants/rewards.js"; export * from "./constants/stats.js"; +export * from "./constants/trophy-fish.js"; diff --git a/common/constants/trophy-fish.js b/common/constants/trophy-fish.js new file mode 100644 index 0000000000..068be4ad45 --- /dev/null +++ b/common/constants/trophy-fish.js @@ -0,0 +1,96 @@ +import { SYMBOLS } from "./stats.js"; + +export const TROPHY_FISH = { + BLOBFISH: { + name: "Blobfish", + head: "/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", + description: "Caught everywhere.", + }, + FLYFISH: { + name: "Flyfish", + head: "/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", + description: "Caught from 8 blocks or higher above lava in the Blazing Volcano.", + }, + GOLDEN_FISH: { + name: "Golden Fish", + head: "/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + description: + "Has a chance to spawn after 15 minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + }, + GUSHER: { + name: "Gusher", + head: "/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", + description: "Caught within 7-16 minutes after a Blazing Volcano eruption.", + }, + KARATE_FISH: { + name: "Karate Fish", + head: "/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", + description: + "Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", + }, + LAVA_HORSE: { + name: "Lava Horse", + head: "/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", + description: "Caught everywhere.", + }, + MANA_RAY: { + name: "Mana Ray", + head: "/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", + description: `Caught when you have at least 1,200 ${SYMBOLS.intelligence} Mana.`, + }, + MOLDFIN: { + name: "Moldfin", + head: "/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", + description: "Caught in the Mystic Marsh.", + }, + OBFUSCATED_FISH_1: { + name: "Obfuscated 1", + head: "/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", + description: "Caught with Corrupted Bait.", + }, + OBFUSCATED_FISH_2: { + name: "Obfuscated 2", + head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "Caught whilst using Obfuscated 1 as bait.", + }, + OBFUSCATED_FISH_3: { + name: "Obfuscated 3", + head: "/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", + description: "Caught with Obfuscated 2 as bait.", + }, + SKELETON_FISH: { + name: "Skeleton Fish", + head: "/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", + description: "Caught in the Burning Desert.", + }, + SLUGFISH: { + name: "Slugfish", + head: "/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", + description: "Caught when the bobber has been active for at least 30 seconds.", + }, + SOUL_FISH: { + name: "Soul Fish", + head: "/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", + description: "Caught in the Stronghold.", + }, + STEAMING_HOT_FLOUNDER: { + name: "Steaming-Hot Flounder", + head: "/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", + description: "Caught when the bobber is within 2 blocks of a Geyser in the Blazing Volcano.", + }, + SULPHUR_SKITTER: { + name: "Sulphur Skitter", + head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "Caught when standing within 8 blocks of a Sulphur Ore.", + }, + VANILLE: { + name: "Vanille", + head: "/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", + description: "Caught when using a Starter Lava Rod with no Enchantments.", + }, + VOLCANIC_STONEFISH: { + name: "Volcanic Stonefish", + head: "/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", + description: "Caught in the Blazing Volcano.", + }, +}; diff --git a/src/constants/misc.js b/src/constants/misc.js index 36a5ebf055..e75fd1dc4b 100644 --- a/src/constants/misc.js +++ b/src/constants/misc.js @@ -456,98 +456,3 @@ export const DOJO = { damage: 0, }, }; - -export const TROPHY_FISH = { - BLOBFISH: { - name: "Blobfish", - head: "/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", - description: "Caught everywhere.", - }, - FLYFISH: { - name: "Flyfish", - head: "/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", - description: "Caught from 8 blocks or higher above lava in the Blazing Volcano.", - }, - GOLDEN_FISH: { - name: "Golden Fish", - head: "/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", - description: - "Has a chance to spawn after 15 minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", - }, - GUSHER: { - name: "Gusher", - head: "/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", - description: "Caught within 7-16 minutes after a Blazing Volcano eruption.", - }, - KARATE_FISH: { - name: "Karate Fish", - head: "/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", - description: - "Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", - }, - LAVA_HORSE: { - name: "Lava Horse", - head: "/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", - description: "Caught everywhere.", - }, - MANA_RAY: { - name: "Mana Ray", - head: "/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", - description: `Caught when you have at least 1,200 ${SYMBOLS.intelligence} Mana.`, - }, - MOLDFIN: { - name: "Moldfin", - head: "/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", - description: "Caught in the Mystic Marsh.", - }, - OBFUSCATED_FISH_1: { - name: "Obfuscated 1", - head: "/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", - description: "Caught with Corrupted Bait.", - }, - OBFUSCATED_FISH_2: { - name: "Obfuscated 2", - head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", - description: "Caught whilst using Obfuscated 1 as bait.", - }, - OBFUSCATED_FISH_3: { - name: "Obfuscated 3", - head: "/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", - description: "Caught with Obfuscated 2 as bait.", - }, - SKELETON_FISH: { - name: "Skeleton Fish", - head: "/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", - description: "Caught in the Burning Desert.", - }, - SLUGFISH: { - name: "Slugfish", - head: "/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", - description: "Caught when the bobber has been active for at least 30 seconds.", - }, - SOUL_FISH: { - name: "Soul Fish", - head: "/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", - description: "Caught in the Stronghold.", - }, - STEAMING_HOT_FLOUNDER: { - name: "Steaming-Hot Flounder", - head: "/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", - description: "Caught when the bobber is within 2 blocks of a Geyser in the Blazing Volcano.", - }, - SULPHUR_SKITTER: { - name: "Sulphur Skitter", - head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", - description: "Caught when standing within 8 blocks of a Sulphur Ore.", - }, - VANILLE: { - name: "Vanille", - head: "/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", - description: "Caught when using a Starter Lava Rod with no Enchantments.", - }, - VOLCANIC_STONEFISH: { - name: "Volcanic Stonefish", - head: "/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", - description: "Caught in the Blazing Volcano.", - }, -}; diff --git a/src/lib.js b/src/lib.js index ced5a74e90..0b09c5c31f 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2757,17 +2757,16 @@ export function getTrophyFish(userProfile) { for (const key of Object.keys(constants.TROPHY_FISH)) { trophyFish.fish[key.toLowerCase()] = { - id: key, - name: constants.TROPHY_FISH[key].name, - total: 0, - amounts: { - bronze: 0, - silver: 0, - gold: 0, - diamond: 0, - }, - head: constants.TROPHY_FISH[key].head, - } + id: key, + name: constants.TROPHY_FISH[key].name, + total: 0, + amounts: { + bronze: 0, + silver: 0, + gold: 0, + diamond: 0, + }, + }; } trophyFish.rewards = userProfile.trophy_fish.rewards; diff --git a/views/stats.ejs b/views/stats.ejs index bcd74c3261..1b2ec2c5a3 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -1697,7 +1697,7 @@ const metaDescription = getMetaDescription() <% for (const fish of Object.values(calculated.trophy_fish.fish)) { %>
-
+
<%= fish.name %>
From a089d8132670ec08f71c115015305cd27e35be70 Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Thu, 20 Oct 2022 16:30:33 +0000 Subject: [PATCH 13/47] refactor: remove unused vairable --- src/constants/misc.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/constants/misc.js b/src/constants/misc.js index e75fd1dc4b..3880791b56 100644 --- a/src/constants/misc.js +++ b/src/constants/misc.js @@ -1,5 +1,3 @@ -import { SYMBOLS } from "../../common/constants.js"; - // prevent specific players from appearing in leaderboards export const BLOCKED_PLAYERS = [ "20934ef9488c465180a78f861586b4cf", // Minikloon (Admin) From 811128ac73ead1cac7e713fa1d084c9833b85919 Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Thu, 20 Oct 2022 16:48:35 +0000 Subject: [PATCH 14/47] feat: change display to stretch --- public/resources/scss/stats.scss | 4 ++++ views/stats.ejs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/resources/scss/stats.scss b/public/resources/scss/stats.scss index 8119f92213..12b18b57bb 100644 --- a/public/resources/scss/stats.scss +++ b/public/resources/scss/stats.scss @@ -1930,6 +1930,10 @@ inventory-view { line-height: 4px; } +.trophy-fish { + flex-grow: 1; +} + .category-header { text-transform: uppercase; font-weight: 600; diff --git a/views/stats.ejs b/views/stats.ejs index 1b2ec2c5a3..a9e636cb9b 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -1695,7 +1695,7 @@ const metaDescription = getMetaDescription()
<% for (const fish of Object.values(calculated.trophy_fish.fish)) { %> -
+
From e20e6ea46b942581abe968f4045e5cd8401e469f Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sat, 22 Oct 2022 17:18:31 +0200 Subject: [PATCH 15/47] refactor: Better display --- common/constants/trophy-fish.js | 146 ++++++++++++++--------- public/resources/scss/stats.scss | 4 - public/resources/ts/development-defer.ts | 5 +- public/resources/ts/globals.d.ts | 32 ++++- public/resources/ts/stats-defer.ts | 5 +- src/helper.js | 18 +++ src/lib.js | 55 +++++---- views/stats.ejs | 26 ++-- 8 files changed, 187 insertions(+), 104 deletions(-) diff --git a/common/constants/trophy-fish.js b/common/constants/trophy-fish.js index 068be4ad45..2494aef9fc 100644 --- a/common/constants/trophy-fish.js +++ b/common/constants/trophy-fish.js @@ -1,96 +1,132 @@ -import { SYMBOLS } from "./stats.js"; +import { STATS_DATA } from "../../common/constants/stats.js"; export const TROPHY_FISH = { BLOBFISH: { - name: "Blobfish", - head: "/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", - description: "Caught everywhere.", + display_name: "Blobfish", + texture_path: "/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", + description: "§7Caught everywhere.", + rarity: "common", + trophy_fish: true, }, FLYFISH: { - name: "Flyfish", - head: "/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", - description: "Caught from 8 blocks or higher above lava in the Blazing Volcano.", + display_name: "Flyfish", + texture_path: "/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", + description: "§7Caught from §a8 §7blocks or higher above lava in the Blazing Volcano.", + rarity: "uncommon", + trophy_fish: true, }, GOLDEN_FISH: { - name: "Golden Fish", - head: "/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + display_name: "Golden Fish", + texture_path: "/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", description: - "Has a chance to spawn after 15 minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + "§7Has a chance to spawn after §a15 §7minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + rarity: "legendary", + trophy_fish: true, }, GUSHER: { - name: "Gusher", - head: "/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", - description: "Caught within 7-16 minutes after a Blazing Volcano eruption.", + display_name: "Gusher", + texture_path: "/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", + description: "§7Caught within §a7-16 §7minutes after a Blazing Volcano eruption.", + rarity: "common", + trophy_fish: true, }, KARATE_FISH: { - name: "Karate Fish", - head: "/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", + display_name: "Karate Fish", + texture_path: "/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", description: - "Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", + "§7Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", + rarity: "epic", + trophy_fish: true, }, LAVA_HORSE: { - name: "Lava Horse", - head: "/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", - description: "Caught everywhere.", + display_name: "Lava Horse", + texture_path: "/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", + description: "§7Caught everywhere.", + rarity: "rare", + trophy_fish: true, }, MANA_RAY: { - name: "Mana Ray", - head: "/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", - description: `Caught when you have at least 1,200 ${SYMBOLS.intelligence} Mana.`, + display_name: "Mana Ray", + texture_path: "/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", + description: `§7Caught when you have at least §b1,200 ${STATS_DATA.intelligence.symbol} Mana§7.`, + rarity: "rare", + trophy_fish: true, }, MOLDFIN: { - name: "Moldfin", - head: "/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", - description: "Caught in the Mystic Marsh.", + display_name: "Moldfin", + texture_path: "/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", + description: "§7Caught in the Mystic Marsh.", + rarity: "epic", + trophy_fish: true, }, OBFUSCATED_FISH_1: { - name: "Obfuscated 1", - head: "/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", - description: "Caught with Corrupted Bait.", + display_name: "Obfuscated 1", + texture_path: "/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", + description: "§7Caught with Corrupted Bait.", + rarity: "common", + trophy_fish: true, }, OBFUSCATED_FISH_2: { - name: "Obfuscated 2", - head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", - description: "Caught whilst using Obfuscated 1 as bait.", + display_name: "Obfuscated 2", + texture_path: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "§7Caught whilst using Obfuscated 1 as bait.", + rarity: "uncommon", + trophy_fish: true, }, OBFUSCATED_FISH_3: { - name: "Obfuscated 3", - head: "/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", - description: "Caught with Obfuscated 2 as bait.", + display_name: "Obfuscated 3", + texture_path: "/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", + description: "§7Caught with Obfuscated 2 as bait.", + rarity: "rare", + trophy_fish: true, }, SKELETON_FISH: { - name: "Skeleton Fish", - head: "/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", - description: "Caught in the Burning Desert.", + display_name: "Skeleton Fish", + texture_path: "/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", + description: "§7Caught in the Burning Desert.", + rarity: "epic", + trophy_fish: true, }, SLUGFISH: { - name: "Slugfish", - head: "/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", - description: "Caught when the bobber has been active for at least 30 seconds.", + display_name: "Slugfish", + texture_path: "/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", + description: "§7Caught when the bobber has been active for at least §a30 §7seconds.", + rarity: "uncommon", + trophy_fish: true, }, SOUL_FISH: { - name: "Soul Fish", - head: "/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", - description: "Caught in the Stronghold.", + display_name: "Soul Fish", + texture_path: "/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", + description: "§7Caught in the Stronghold.", + rarity: "epic", + trophy_fish: true, }, STEAMING_HOT_FLOUNDER: { - name: "Steaming-Hot Flounder", - head: "/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", - description: "Caught when the bobber is within 2 blocks of a Geyser in the Blazing Volcano.", + display_name: "Steaming-Hot Flounder", + texture_path: "/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", + description: "§7Caught when the bobber is within §a2 §7blocks of a Geyser in the Blazing Volcano.", + rarity: "common", + trophy_fish: true, }, SULPHUR_SKITTER: { - name: "Sulphur Skitter", - head: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", - description: "Caught when standing within 8 blocks of a Sulphur Ore.", + display_name: "Sulphur Skitter", + texture_path: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "§7Caught when standing within §a8 §7blocks of a Sulphur Ore.", + rarity: "common", + trophy_fish: true, }, VANILLE: { - name: "Vanille", - head: "/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", - description: "Caught when using a Starter Lava Rod with no Enchantments.", + display_name: "Vanille", + texture_path: "/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", + description: "§7Caught when using a §aStarter Lava Rod §7with no Enchantments.", + rarity: "rare", + trophy_fish: true, }, VOLCANIC_STONEFISH: { - name: "Volcanic Stonefish", - head: "/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", - description: "Caught in the Blazing Volcano.", + display_name: "Volcanic Stonefish", + texture_path: "/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", + description: "§7Caught in the Blazing Volcano.", + rarity: "rare", + trophy_fish: true, }, }; diff --git a/public/resources/scss/stats.scss b/public/resources/scss/stats.scss index 12b18b57bb..8119f92213 100644 --- a/public/resources/scss/stats.scss +++ b/public/resources/scss/stats.scss @@ -1930,10 +1930,6 @@ inventory-view { line-height: 4px; } -.trophy-fish { - flex-grow: 1; -} - .category-header { text-transform: uppercase; font-weight: 600; diff --git a/public/resources/ts/development-defer.ts b/public/resources/ts/development-defer.ts index a41ef35884..413fc4c19e 100644 --- a/public/resources/ts/development-defer.ts +++ b/public/resources/ts/development-defer.ts @@ -22,7 +22,7 @@ document.addEventListener("click", (e) => { return; } - let item: DisplayItem | Item | Pet | undefined = undefined; + let item: DisplayItem | Item | Pet | TrophyFish | undefined = undefined; if (element.hasAttribute("data-item-id")) { const itemId = element.getAttribute("data-item-id") as string; @@ -34,6 +34,9 @@ document.addEventListener("click", (e) => { } else if (element.hasAttribute("data-missing-accessory-index")) { item = calculated.missingAccessories.missing[parseInt(element.getAttribute("data-missing-accessory-index") as string)]; + } else if (element.hasAttribute("data-trophy-fish-index")) { + item = + calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; } else if (element.hasAttribute("data-upgrade-accessory-index")) { item = calculated.missingAccessories.upgrades[parseInt(element.getAttribute("data-upgrade-accessory-index") as string)]; diff --git a/public/resources/ts/globals.d.ts b/public/resources/ts/globals.d.ts index 60669b9d4f..5ee8aa9f30 100644 --- a/public/resources/ts/globals.d.ts +++ b/public/resources/ts/globals.d.ts @@ -569,15 +569,23 @@ declare const calculated: SkyCryptPlayer & { amount: number; }[]; reaper_peppers_eaten: number; - trophyFish: { + trophy_fish: { total_caught: number; fish: { [key: string]: { + display_name: string; id: string; - name: string; + lore: string; + texture_path: string; + rarity: string; amount: number; - head: string; - description: string; + trophy_fish: boolean; + amounts: { + bronze: number; + silver: number; + gold: number; + diamond: number; + } }; }; }; @@ -704,3 +712,19 @@ interface StatBonusType { [key in StatName]?: number; }; } + +interface TrophyFish { + display_name: string; + id: string; + lore: string; + texture_path: string; + total?: number; + rarity: string; + trophy_fish: boolean; + amounts: { + bronze: number, + silver: number, + gold: number, + diamond: number, + }, +} \ No newline at end of file diff --git a/public/resources/ts/stats-defer.ts b/public/resources/ts/stats-defer.ts index 3bdec3138c..9bd330f58d 100644 --- a/public/resources/ts/stats-defer.ts +++ b/public/resources/ts/stats-defer.ts @@ -248,7 +248,7 @@ export function showBackpack(item: Backpack): void { } function fillLore(element: HTMLElement) { - let item: DisplayItem | Item | Pet | undefined = undefined; + let item: DisplayItem | Item | Pet | TrophyFish | undefined = undefined; if (element.hasAttribute("data-item-id")) { const itemId = element.getAttribute("data-item-id") as string; @@ -260,6 +260,9 @@ function fillLore(element: HTMLElement) { } else if (element.hasAttribute("data-missing-accessory-index")) { item = calculated.missingAccessories.missing[parseInt(element.getAttribute("data-missing-accessory-index") as string)]; + } else if (element.hasAttribute("data-trophy-fish-index")) { + item = + calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; } else if (element.hasAttribute("data-upgrade-accessory-index")) { item = calculated.missingAccessories.upgrades[parseInt(element.getAttribute("data-upgrade-accessory-index") as string)]; diff --git a/src/helper.js b/src/helper.js index 12e5cf38d3..bd533bbf1b 100644 --- a/src/helper.js +++ b/src/helper.js @@ -851,6 +851,24 @@ export function generateItem(data) { data.rarity = data.rarity.toLowerCase(); } + if (data.trophy_fish && !data.tag?.display?.Lore) { + data.tag ??= {}; + data.tag.display ??= {}; + data.tag.display.Lore = [ + data.description, + "", + "§7Bring this to the §fOdger §7at the", + "§7top of the Blazing Volcano", + "§7", + `§${RARITY_COLORS[data.rarity ?? "common"]} ${(data.rarity || "common").toUpperCase()} TROPHY FISH`, + ]; + + data.tag = data.tag ?? {}; + data.tag.display = data.tag.display ?? {}; + const rarityColor = data.rarity ? `§${RARITY_COLORS[data.rarity ?? "common"]}` : ""; + data.tag.display.Name = `${rarityColor}${data.display_name}`; + } + // Setting tag.display.Name using display_name if not specified if (data.display_name && !data.tag.display.Name) { data.tag = data.tag ?? {}; diff --git a/src/lib.js b/src/lib.js index 0b09c5c31f..b68b75d821 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2756,36 +2756,49 @@ export function getTrophyFish(userProfile) { }; for (const key of Object.keys(constants.TROPHY_FISH)) { - trophyFish.fish[key.toLowerCase()] = { + trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)] = { + display_name: helper.generateItem(constants.TROPHY_FISH[key]).tag.display.Name, id: key, - name: constants.TROPHY_FISH[key].name, - total: 0, + lore: helper.generateItem(constants.TROPHY_FISH[key]).tag.display.Lore, + texture_path: constants.TROPHY_FISH[key].texture_path, + total: userProfile.trophy_fish[key.toLowerCase()] || 0, + rarity: constants.TROPHY_FISH[key].rarity, + trophy_fish: true, amounts: { - bronze: 0, - silver: 0, - gold: 0, - diamond: 0, + bronze: userProfile.trophy_fish[`${key.toLowerCase()}_bronze`] || 0, + silver: userProfile.trophy_fish[`${key.toLowerCase()}_silver`] || 0, + gold: userProfile.trophy_fish[`${key.toLowerCase()}_gold `] || 0, + diamond: userProfile.trophy_fish[`${key.toLowerCase()}_diamond`] || 0, }, }; + if ( + !trophyFish.fish[Object.keys(trophyFish.fish).length - 1].lore[ + trophyFish.fish[Object.keys(trophyFish.fish).length - 1].lore.length - 1 + ].includes(`§7Diamond: §b`) + ) { + trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].lore.push( + "", + `§7Total: §f${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].total}`, + `§7Bronze: §c${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.bronze}`, + `§7Silver: §7${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.silver}`, + `§7Gold: §6${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.gold}`, + `§7Diamond: §b${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.diamond}` + ); + } + const formattedLore = []; + for (const line of trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].lore) { + formattedLore.push('' + helper.renderLore(line) + ""); + } + + trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].lore = formattedLore.join(""); + trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].display_name = helper + .renderLore(trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].display_name) + .replace(");'>", ""); } trophyFish.rewards = userProfile.trophy_fish.rewards; trophyFish.total_caught = userProfile.trophy_fish.total_caught; - for (const key of Object.keys(userProfile.trophy_fish)) { - if (key == "rewards" || key == "total_caught") continue; - - const arr = key.split("_"); - const rarity = ["bronze", "silver", "gold", "diamond"].includes(arr[arr.length - 1]) ? arr[arr.length - 1] : false; - if (!rarity) { - trophyFish.fish[key].total = userProfile.trophy_fish[key]; - } else { - arr.pop(); - const fish = arr.join("_"); - trophyFish.fish[fish].amounts[rarity] = userProfile.trophy_fish[key]; - } - } - return trophyFish; } diff --git a/views/stats.ejs b/views/stats.ejs index a9e636cb9b..7741f05a7c 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -1692,28 +1692,18 @@ const metaDescription = getMetaDescription() <% } %> <% if (calculated?.trophy_fish?.total_caught > 0) { %> - -
- <% for (const fish of Object.values(calculated.trophy_fish.fish)) { %> -
-
-
+ +
+ <% let i = 0; + for (const [key, data] of Object.entries(calculated.trophy_fish.fish)) { %> +
+
-
-
<%= fish.name %>
-
-
Bronze: <%= fish.amounts.bronze.toLocaleString() %>
-
Silver: <%= fish.amounts.silver.toLocaleString() %>
-
Gold: <%= fish.amounts.gold.toLocaleString() %>
-
Diamond: <%= fish.amounts.diamond.toLocaleString() %>
-
-
-
- <% } %> + <% i++; + } %>
<% } %>
- <% if(calculated.enchanting.experimented){ %>
From a37ab541d5fe64bd683d1d3b0707ce1ff0a44377 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sat, 22 Oct 2022 17:45:29 +0200 Subject: [PATCH 16/47] fix: TS errors --- public/resources/ts/development-defer.ts | 3 +-- public/resources/ts/globals.d.ts | 23 ++++++++++++----------- public/resources/ts/stats-defer.ts | 3 +-- src/lib.js | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/public/resources/ts/development-defer.ts b/public/resources/ts/development-defer.ts index 413fc4c19e..5945bbbeec 100644 --- a/public/resources/ts/development-defer.ts +++ b/public/resources/ts/development-defer.ts @@ -35,8 +35,7 @@ document.addEventListener("click", (e) => { item = calculated.missingAccessories.missing[parseInt(element.getAttribute("data-missing-accessory-index") as string)]; } else if (element.hasAttribute("data-trophy-fish-index")) { - item = - calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; + item = calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; } else if (element.hasAttribute("data-upgrade-accessory-index")) { item = calculated.missingAccessories.upgrades[parseInt(element.getAttribute("data-upgrade-accessory-index") as string)]; diff --git a/public/resources/ts/globals.d.ts b/public/resources/ts/globals.d.ts index 5ee8aa9f30..d4fe7e440a 100644 --- a/public/resources/ts/globals.d.ts +++ b/public/resources/ts/globals.d.ts @@ -574,7 +574,7 @@ declare const calculated: SkyCryptPlayer & { fish: { [key: string]: { display_name: string; - id: string; + type: string; lore: string; texture_path: string; rarity: string; @@ -585,7 +585,7 @@ declare const calculated: SkyCryptPlayer & { silver: number; gold: number; diamond: number; - } + }; }; }; }; @@ -713,18 +713,19 @@ interface StatBonusType { }; } -interface TrophyFish { +interface TrophyFish extends Item { display_name: string; - id: string; + type: string; lore: string; texture_path: string; - total?: number; rarity: string; + amount?: number; trophy_fish: boolean; amounts: { - bronze: number, - silver: number, - gold: number, - diamond: number, - }, -} \ No newline at end of file + bronze: number; + silver: number; + gold: number; + diamond: number; + }; +} + diff --git a/public/resources/ts/stats-defer.ts b/public/resources/ts/stats-defer.ts index 9bd330f58d..746a375b0e 100644 --- a/public/resources/ts/stats-defer.ts +++ b/public/resources/ts/stats-defer.ts @@ -261,8 +261,7 @@ function fillLore(element: HTMLElement) { item = calculated.missingAccessories.missing[parseInt(element.getAttribute("data-missing-accessory-index") as string)]; } else if (element.hasAttribute("data-trophy-fish-index")) { - item = - calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; + item = calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; } else if (element.hasAttribute("data-upgrade-accessory-index")) { item = calculated.missingAccessories.upgrades[parseInt(element.getAttribute("data-upgrade-accessory-index") as string)]; diff --git a/src/lib.js b/src/lib.js index b68b75d821..5f9854addb 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2758,7 +2758,7 @@ export function getTrophyFish(userProfile) { for (const key of Object.keys(constants.TROPHY_FISH)) { trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)] = { display_name: helper.generateItem(constants.TROPHY_FISH[key]).tag.display.Name, - id: key, + type: key, lore: helper.generateItem(constants.TROPHY_FISH[key]).tag.display.Lore, texture_path: constants.TROPHY_FISH[key].texture_path, total: userProfile.trophy_fish[key.toLowerCase()] || 0, From 9066851c36b09704f4dd0402314f7300caff3be9 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sat, 22 Oct 2022 18:01:29 +0200 Subject: [PATCH 17/47] `npm run prettier:fix` --- public/resources/ts/globals.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/public/resources/ts/globals.d.ts b/public/resources/ts/globals.d.ts index d4fe7e440a..46ed9bdd1c 100644 --- a/public/resources/ts/globals.d.ts +++ b/public/resources/ts/globals.d.ts @@ -728,4 +728,3 @@ interface TrophyFish extends Item { diamond: number; }; } - From f8e19eb6497505620a7731004409bbab193f22cc Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 26 Jan 2023 14:31:03 +0100 Subject: [PATCH 18/47] revert all previous committs --- common/constants.js | 3 +- common/constants/trophy-fish.js | 132 ----------------------- public/resources/ts/development-defer.ts | 4 +- public/resources/ts/globals.d.ts | 38 +------ src/helper.js | 18 ---- src/lib.js | 56 ---------- 6 files changed, 3 insertions(+), 248 deletions(-) delete mode 100644 common/constants/trophy-fish.js diff --git a/common/constants.js b/common/constants.js index 963207cbe8..5fe8bd9093 100644 --- a/common/constants.js +++ b/common/constants.js @@ -3,5 +3,4 @@ export * from "./constants/enchantments.js"; export * from "./constants/items.js"; export * from "./constants/potions.js"; export * from "./constants/rewards.js"; -export * from "./constants/stats.js"; -export * from "./constants/trophy-fish.js"; +export * from "./constants/stats.js"; \ No newline at end of file diff --git a/common/constants/trophy-fish.js b/common/constants/trophy-fish.js deleted file mode 100644 index 2494aef9fc..0000000000 --- a/common/constants/trophy-fish.js +++ /dev/null @@ -1,132 +0,0 @@ -import { STATS_DATA } from "../../common/constants/stats.js"; - -export const TROPHY_FISH = { - BLOBFISH: { - display_name: "Blobfish", - texture_path: "/head/3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", - description: "§7Caught everywhere.", - rarity: "common", - trophy_fish: true, - }, - FLYFISH: { - display_name: "Flyfish", - texture_path: "/head/5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", - description: "§7Caught from §a8 §7blocks or higher above lava in the Blazing Volcano.", - rarity: "uncommon", - trophy_fish: true, - }, - GOLDEN_FISH: { - display_name: "Golden Fish", - texture_path: "/head/fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", - description: - "§7Has a chance to spawn after §a15 §7minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The Golden Fish is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", - rarity: "legendary", - trophy_fish: true, - }, - GUSHER: { - display_name: "Gusher", - texture_path: "/head/afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", - description: "§7Caught within §a7-16 §7minutes after a Blazing Volcano eruption.", - rarity: "common", - trophy_fish: true, - }, - KARATE_FISH: { - display_name: "Karate Fish", - texture_path: "/head/901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", - description: - "§7Caught in the lava pools near the Dojo. Note - Half of the lava pools do not actually count as being in the Dojo area. If you stand in the same place as your bobber and do not see 'Dojo' in the sidebar, you cannot catch the Karate Fish there.", - rarity: "epic", - trophy_fish: true, - }, - LAVA_HORSE: { - display_name: "Lava Horse", - texture_path: "/head/1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", - description: "§7Caught everywhere.", - rarity: "rare", - trophy_fish: true, - }, - MANA_RAY: { - display_name: "Mana Ray", - texture_path: "/head/fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", - description: `§7Caught when you have at least §b1,200 ${STATS_DATA.intelligence.symbol} Mana§7.`, - rarity: "rare", - trophy_fish: true, - }, - MOLDFIN: { - display_name: "Moldfin", - texture_path: "/head/54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", - description: "§7Caught in the Mystic Marsh.", - rarity: "epic", - trophy_fish: true, - }, - OBFUSCATED_FISH_1: { - display_name: "Obfuscated 1", - texture_path: "/head/e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", - description: "§7Caught with Corrupted Bait.", - rarity: "common", - trophy_fish: true, - }, - OBFUSCATED_FISH_2: { - display_name: "Obfuscated 2", - texture_path: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", - description: "§7Caught whilst using Obfuscated 1 as bait.", - rarity: "uncommon", - trophy_fish: true, - }, - OBFUSCATED_FISH_3: { - display_name: "Obfuscated 3", - texture_path: "/head/df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", - description: "§7Caught with Obfuscated 2 as bait.", - rarity: "rare", - trophy_fish: true, - }, - SKELETON_FISH: { - display_name: "Skeleton Fish", - texture_path: "/head/923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", - description: "§7Caught in the Burning Desert.", - rarity: "epic", - trophy_fish: true, - }, - SLUGFISH: { - display_name: "Slugfish", - texture_path: "/head/d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", - description: "§7Caught when the bobber has been active for at least §a30 §7seconds.", - rarity: "uncommon", - trophy_fish: true, - }, - SOUL_FISH: { - display_name: "Soul Fish", - texture_path: "/head/7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", - description: "§7Caught in the Stronghold.", - rarity: "epic", - trophy_fish: true, - }, - STEAMING_HOT_FLOUNDER: { - display_name: "Steaming-Hot Flounder", - texture_path: "/head/8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", - description: "§7Caught when the bobber is within §a2 §7blocks of a Geyser in the Blazing Volcano.", - rarity: "common", - trophy_fish: true, - }, - SULPHUR_SKITTER: { - display_name: "Sulphur Skitter", - texture_path: "/head/4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", - description: "§7Caught when standing within §a8 §7blocks of a Sulphur Ore.", - rarity: "common", - trophy_fish: true, - }, - VANILLE: { - display_name: "Vanille", - texture_path: "/head/57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", - description: "§7Caught when using a §aStarter Lava Rod §7with no Enchantments.", - rarity: "rare", - trophy_fish: true, - }, - VOLCANIC_STONEFISH: { - display_name: "Volcanic Stonefish", - texture_path: "/head/38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", - description: "§7Caught in the Blazing Volcano.", - rarity: "rare", - trophy_fish: true, - }, -}; diff --git a/public/resources/ts/development-defer.ts b/public/resources/ts/development-defer.ts index 5945bbbeec..5f1990f49f 100644 --- a/public/resources/ts/development-defer.ts +++ b/public/resources/ts/development-defer.ts @@ -22,7 +22,7 @@ document.addEventListener("click", (e) => { return; } - let item: DisplayItem | Item | Pet | TrophyFish | undefined = undefined; + let item: DisplayItem | Item | Pet | indefined = undefined; if (element.hasAttribute("data-item-id")) { const itemId = element.getAttribute("data-item-id") as string; @@ -34,8 +34,6 @@ document.addEventListener("click", (e) => { } else if (element.hasAttribute("data-missing-accessory-index")) { item = calculated.missingAccessories.missing[parseInt(element.getAttribute("data-missing-accessory-index") as string)]; - } else if (element.hasAttribute("data-trophy-fish-index")) { - item = calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; } else if (element.hasAttribute("data-upgrade-accessory-index")) { item = calculated.missingAccessories.upgrades[parseInt(element.getAttribute("data-upgrade-accessory-index") as string)]; diff --git a/public/resources/ts/globals.d.ts b/public/resources/ts/globals.d.ts index 46ed9bdd1c..1b7866b9e5 100644 --- a/public/resources/ts/globals.d.ts +++ b/public/resources/ts/globals.d.ts @@ -569,26 +569,6 @@ declare const calculated: SkyCryptPlayer & { amount: number; }[]; reaper_peppers_eaten: number; - trophy_fish: { - total_caught: number; - fish: { - [key: string]: { - display_name: string; - type: string; - lore: string; - texture_path: string; - rarity: string; - amount: number; - trophy_fish: boolean; - amounts: { - bronze: number; - silver: number; - gold: number; - diamond: number; - }; - }; - }; - }; }; interface SkyCryptRelativeTime { @@ -711,20 +691,4 @@ interface StatBonusType { [key: string]: { [key in StatName]?: number; }; -} - -interface TrophyFish extends Item { - display_name: string; - type: string; - lore: string; - texture_path: string; - rarity: string; - amount?: number; - trophy_fish: boolean; - amounts: { - bronze: number; - silver: number; - gold: number; - diamond: number; - }; -} +} \ No newline at end of file diff --git a/src/helper.js b/src/helper.js index bd533bbf1b..12e5cf38d3 100644 --- a/src/helper.js +++ b/src/helper.js @@ -851,24 +851,6 @@ export function generateItem(data) { data.rarity = data.rarity.toLowerCase(); } - if (data.trophy_fish && !data.tag?.display?.Lore) { - data.tag ??= {}; - data.tag.display ??= {}; - data.tag.display.Lore = [ - data.description, - "", - "§7Bring this to the §fOdger §7at the", - "§7top of the Blazing Volcano", - "§7", - `§${RARITY_COLORS[data.rarity ?? "common"]} ${(data.rarity || "common").toUpperCase()} TROPHY FISH`, - ]; - - data.tag = data.tag ?? {}; - data.tag.display = data.tag.display ?? {}; - const rarityColor = data.rarity ? `§${RARITY_COLORS[data.rarity ?? "common"]}` : ""; - data.tag.display.Name = `${rarityColor}${data.display_name}`; - } - // Setting tag.display.Name using display_name if not specified if (data.display_name && !data.tag.display.Name) { data.tag = data.tag ?? {}; diff --git a/src/lib.js b/src/lib.js index 5f9854addb..8ed40228f4 100644 --- a/src/lib.js +++ b/src/lib.js @@ -1800,8 +1800,6 @@ export async function getStats( output.collections = await getCollections(profile.uuid, profile, options.cacheOnly); output.bestiary = getBestiary(profile.uuid, profile); - output.trophy_fish = getTrophyFish(userProfile); - output.social = hypixelProfile.socials; output.dungeons = getDungeons(userProfile, hypixelProfile); @@ -2748,60 +2746,6 @@ export async function getCollections(uuid, profile, cacheOnly = false) { return output; } -export function getTrophyFish(userProfile) { - const trophyFish = { - total_caught: 0, - rewards: [], - fish: {}, - }; - - for (const key of Object.keys(constants.TROPHY_FISH)) { - trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)] = { - display_name: helper.generateItem(constants.TROPHY_FISH[key]).tag.display.Name, - type: key, - lore: helper.generateItem(constants.TROPHY_FISH[key]).tag.display.Lore, - texture_path: constants.TROPHY_FISH[key].texture_path, - total: userProfile.trophy_fish[key.toLowerCase()] || 0, - rarity: constants.TROPHY_FISH[key].rarity, - trophy_fish: true, - amounts: { - bronze: userProfile.trophy_fish[`${key.toLowerCase()}_bronze`] || 0, - silver: userProfile.trophy_fish[`${key.toLowerCase()}_silver`] || 0, - gold: userProfile.trophy_fish[`${key.toLowerCase()}_gold `] || 0, - diamond: userProfile.trophy_fish[`${key.toLowerCase()}_diamond`] || 0, - }, - }; - if ( - !trophyFish.fish[Object.keys(trophyFish.fish).length - 1].lore[ - trophyFish.fish[Object.keys(trophyFish.fish).length - 1].lore.length - 1 - ].includes(`§7Diamond: §b`) - ) { - trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].lore.push( - "", - `§7Total: §f${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].total}`, - `§7Bronze: §c${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.bronze}`, - `§7Silver: §7${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.silver}`, - `§7Gold: §6${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.gold}`, - `§7Diamond: §b${trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].amounts.diamond}` - ); - } - const formattedLore = []; - for (const line of trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].lore) { - formattedLore.push('' + helper.renderLore(line) + ""); - } - - trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].lore = formattedLore.join(""); - trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].display_name = helper - .renderLore(trophyFish.fish[Object.keys(constants.TROPHY_FISH).indexOf(key)].display_name) - .replace(");'>", ""); - } - - trophyFish.rewards = userProfile.trophy_fish.rewards; - trophyFish.total_caught = userProfile.trophy_fish.total_caught; - - return trophyFish; -} - export function getBestiary(uuid, profile) { const output = {}; From b4a1c74cec717931d2be7c65965fcde0ad1f96d5 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 26 Jan 2023 14:33:13 +0100 Subject: [PATCH 19/47] revert --- common/constants.js | 2 +- public/resources/ts/development-defer.ts | 2 +- public/resources/ts/globals.d.ts | 2 +- public/resources/ts/stats-defer.ts | 4 +--- views/stats.ejs | 13 ------------- 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/common/constants.js b/common/constants.js index 5fe8bd9093..8d7c199836 100644 --- a/common/constants.js +++ b/common/constants.js @@ -3,4 +3,4 @@ export * from "./constants/enchantments.js"; export * from "./constants/items.js"; export * from "./constants/potions.js"; export * from "./constants/rewards.js"; -export * from "./constants/stats.js"; \ No newline at end of file +export * from "./constants/stats.js"; diff --git a/public/resources/ts/development-defer.ts b/public/resources/ts/development-defer.ts index 5f1990f49f..a41ef35884 100644 --- a/public/resources/ts/development-defer.ts +++ b/public/resources/ts/development-defer.ts @@ -22,7 +22,7 @@ document.addEventListener("click", (e) => { return; } - let item: DisplayItem | Item | Pet | indefined = undefined; + let item: DisplayItem | Item | Pet | undefined = undefined; if (element.hasAttribute("data-item-id")) { const itemId = element.getAttribute("data-item-id") as string; diff --git a/public/resources/ts/globals.d.ts b/public/resources/ts/globals.d.ts index 1b7866b9e5..56e682e852 100644 --- a/public/resources/ts/globals.d.ts +++ b/public/resources/ts/globals.d.ts @@ -691,4 +691,4 @@ interface StatBonusType { [key: string]: { [key in StatName]?: number; }; -} \ No newline at end of file +} diff --git a/public/resources/ts/stats-defer.ts b/public/resources/ts/stats-defer.ts index 746a375b0e..3bdec3138c 100644 --- a/public/resources/ts/stats-defer.ts +++ b/public/resources/ts/stats-defer.ts @@ -248,7 +248,7 @@ export function showBackpack(item: Backpack): void { } function fillLore(element: HTMLElement) { - let item: DisplayItem | Item | Pet | TrophyFish | undefined = undefined; + let item: DisplayItem | Item | Pet | undefined = undefined; if (element.hasAttribute("data-item-id")) { const itemId = element.getAttribute("data-item-id") as string; @@ -260,8 +260,6 @@ function fillLore(element: HTMLElement) { } else if (element.hasAttribute("data-missing-accessory-index")) { item = calculated.missingAccessories.missing[parseInt(element.getAttribute("data-missing-accessory-index") as string)]; - } else if (element.hasAttribute("data-trophy-fish-index")) { - item = calculated.trophy_fish.fish[parseInt(element.getAttribute("data-trophy-fish-index") as string)]; } else if (element.hasAttribute("data-upgrade-accessory-index")) { item = calculated.missingAccessories.upgrades[parseInt(element.getAttribute("data-upgrade-accessory-index") as string)]; diff --git a/views/stats.ejs b/views/stats.ejs index 7741f05a7c..f337251bec 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -1690,19 +1690,6 @@ const metaDescription = getMetaDescription() } %>
<% } %> - - <% if (calculated?.trophy_fish?.total_caught > 0) { %> - -
- <% let i = 0; - for (const [key, data] of Object.entries(calculated.trophy_fish.fish)) { %> -
-
-
- <% i++; - } %> -
- <% } %>
<% if(calculated.enchanting.experimented){ %>
From d691b5c21810d16c6810d5508ed1e98f9c31fa30 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 26 Jan 2023 14:43:52 +0100 Subject: [PATCH 20/47] feat: add trophyFish --- public/resources/scss/stats.scss | 50 ++++++++++++ src/constants.js | 1 + src/constants/trophy-fish.js | 133 +++++++++++++++++++++++++++++++ src/lib.js | 60 ++++++++++++++ views/stats.ejs | 45 +++++++++++ 5 files changed, 289 insertions(+) create mode 100644 src/constants/trophy-fish.js diff --git a/public/resources/scss/stats.scss b/public/resources/scss/stats.scss index 8119f92213..2981d0ea5e 100644 --- a/public/resources/scss/stats.scss +++ b/public/resources/scss/stats.scss @@ -2036,6 +2036,56 @@ inventory-view { font-size: 14px; } +.trophy-fish-data { + font-size: 16px; + font-weight: 450; + + .trophy-fish-info { + .trophy-fish-name { + color: white; + } + + .trophy-fish-amount { + color: rgba(var(--text-rgb), 0.7); + font-weight: 500; + margin-left: 4px; + } + } + + .trophy-fish-count { + display: grid; + grid-template-columns: repeat(2, auto 1fr); + gap: 0px 4px; + + text-align: left; + align-items: center; + } + + .count-format { + height: 12px; + width: 12px; + border-radius: 50%; + } + + .bronze-count { + background-color: #a85c03; + } + + .gold-count { + background-color: #feb801; + } + + .silver-count { + background-color: #b4b4b5; + margin-left: 10px; + } + + .diamond-count { + background-color: #68ecff; + margin-left: 10px; + } +} + .narrow-info-header { position: absolute; top: 0; diff --git a/src/constants.js b/src/constants.js index 33f20d9dcf..bde41edffa 100644 --- a/src/constants.js +++ b/src/constants.js @@ -18,4 +18,5 @@ export * from "./constants/random-emoji.js"; export * from "./constants/skills.js"; export * from "./constants/skins-animations.js"; export * from "./constants/tags.js"; +export * from "./constants/trophy-fish.js"; export * from "./constants/accessories.js"; diff --git a/src/constants/trophy-fish.js b/src/constants/trophy-fish.js new file mode 100644 index 0000000000..f1d7e632f7 --- /dev/null +++ b/src/constants/trophy-fish.js @@ -0,0 +1,133 @@ +import { STATS_DATA } from "../../common/constants/stats.js"; + +export const TROPHY_FISH = { + BLOBFISH: { + display_name: "Blobfish", + texture: "3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", + description: "§7Caught everywhere.", + rarity: "common", + }, + FLYFISH: { + display_name: "Flyfish", + texture: "5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", + description: "§7Caught from §a8 §7blocks or higher above lava in the §cBlazing Volcano§7.", + rarity: "uncommon", + }, + GOLDEN_FISH: { + display_name: "Golden Fish", + texture: "fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + description: + "§7Has a chance to spawn after §a15 §7minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The §6Golden Fish §7is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + rarity: "legendary", + }, + GUSHER: { + display_name: "Gusher", + texture: "afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", + description: "§7Caught within §a7-16 §7minutes after a §cBlazing Volcano §7eruption.", + rarity: "common", + }, + KARATE_FISH: { + display_name: "Karate Fish", + texture: "901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", + description: + "§7Caught in the lava pools near the §eDojo§7. Note - Half of the lava pools do not actually count as being in the §eDojo §7area. If you stand in the same place as your bobber and do not see '§eDojo§7' in the sidebar, you cannot catch the §5Karate Fish §7there.", + rarity: "epic", + }, + LAVA_HORSE: { + display_name: "Lavahorse", + texture: "1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", + description: "§7Caught everywhere.", + rarity: "rare", + }, + MANA_RAY: { + display_name: "Mana Ray", + texture: "fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", + description: `§7Caught when you have at least §b1,200 ${STATS_DATA.intelligence.symbol} Intelligence§7.`, + rarity: "rare", + }, + MOLDFIN: { + display_name: "Moldfin", + texture: "54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", + description: "§7Caught in the §5Mystic Marsh§7.", + rarity: "epic", + }, + OBFUSCATED_FISH_1: { + display_name: "Obfuscated 1", + texture: "e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", + description: "§7Caught with §fCorrupted Bait§7.", + rarity: "common", + }, + OBFUSCATED_FISH_2: { + display_name: "Obfuscated 2", + texture: "8321e19aa4b3163c8990b066b1cd0895c3c97a799057327507db0ffc80d90575", + description: "§7Caught whilst using Obfuscated 1 as bait.", + rarity: "uncommon", + }, + OBFUSCATED_FISH_3: { + display_name: "Obfuscated 3", + texture: "df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", + description: "§7Caught with §9Obfuscated 2 §7as bait.", + rarity: "rare", + }, + SKELETON_FISH: { + display_name: "Skeleton Fish", + texture: "923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", + description: "§7Caught in the §cBurning Desert§7.", + rarity: "epic", + }, + SLUGFISH: { + display_name: "Slugfish", + texture: "d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", + description: "§7Caught when the bobber has been active for at least §a30 §7seconds.", + rarity: "uncommon", + }, + SOUL_FISH: { + display_name: "Soul Fish", + texture: "7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", + description: "§7Caught in the §2Stronghold§7.", + rarity: "epic", + }, + STEAMING_HOT_FLOUNDER: { + display_name: "Steaming-Hot Flounder", + texture: "8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", + description: "§7Caught when the bobber is within §a2 §7blocks of a Geyser in the §cBlazing Volcano§7.", + rarity: "common", + }, + SULPHUR_SKITTER: { + display_name: "Sulphur Skitter", + texture: "4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + description: "§7Caught when standing within §a8 §7blocks of a Sulphur Ore.", + rarity: "common", + }, + VANILLE: { + display_name: "Vanille", + texture: "57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", + description: "§7Caught when using a §aStarter Lava Rod §7with no Enchantments.", + rarity: "rare", + }, + VOLCANIC_STONEFISH: { + display_name: "Volcanic Stonefish", + texture: "38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", + description: "§7Caught in the §cBlazing Volcano§7.", + rarity: "rare", + }, +}; + +export const TROPHY_FISH_STAGES = { + 1: { + formatted: `Bronze Hunter`, + type: "bronze", + }, + 2: { + formatted: `Silver Hunter`, + type: "silver", + }, + 3: { + formatted: `Gold Hunter`, + type: "gold", + }, + 4: { + formatted: `Diamond Hunter`, + type: "diamond", + }, +}; diff --git a/src/lib.js b/src/lib.js index 8ed40228f4..bdb90f9af6 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2058,6 +2058,8 @@ export async function getStats( output.crimsonIsles = crimsonIsles; + output.trophy_fish = getTrophyFish(userProfile); + // MISC const misc = {}; @@ -2746,6 +2748,64 @@ export async function getCollections(uuid, profile, cacheOnly = false) { return output; } +export function getTrophyFish(userProfile) { + const output = { + total_caught: 0, + stage: { + name: null, + progress: null, + }, + fish: [], + }; + + for (const key of Object.keys(constants.TROPHY_FISH)) { + const id = key.toLowerCase(); + + output.fish.push({ + id: key, + name: constants.TROPHY_FISH[key].display_name, + texture: constants.TROPHY_FISH[key].texture, + description: constants.TROPHY_FISH[key].description, + caught: { + total: userProfile.trophy_fish[id] || 0, + bronze: userProfile.trophy_fish[`${id}_bronze`] || 0, + silver: userProfile.trophy_fish[`${id}_silver`] || 0, + gold: userProfile.trophy_fish[`${id}_gold`] || 0, + diamond: userProfile.trophy_fish[`${id}_diamond`] || 0, + }, + }); + } + + output.total_caught = userProfile.trophy_fish?.total_caught || 0; + + const { type: stageType, formatted: stageFormatted } = + constants.TROPHY_FISH_STAGES[userProfile.trophy_fish.rewards.length] || {}; + const { type: stageProgressType } = constants.TROPHY_FISH_STAGES[userProfile.trophy_fish.rewards.length + 1] || { + type: stageType, + }; + + const stageProgress = + stageType === "diamond" + ? null + : stageType + ? `${ + Object.keys(userProfile.trophy_fish).filter( + (a) => a.endsWith(stageProgressType) && userProfile.trophy_fish[a] > 0 + ).length + } / ${Object.keys(constants.TROPHY_FISH).length}` + : null; + + output.stage = { + name: stageFormatted || "None", + type: stageType, + progress: stageProgress, + }; + + console.log(output); + + return output; +} + export function getBestiary(uuid, profile) { const output = {}; diff --git a/views/stats.ejs b/views/stats.ejs index f337251bec..ef1de53880 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -1690,6 +1690,51 @@ const metaDescription = getMetaDescription() } %>
<% } %> + +
+

+ Total Caught: + <%= calculated.trophy_fish.total_caught.toLocaleString() %> +
+ <% max = calculated.trophy_fish.stage.type === "diamond" ? 'golden-text' : '' %> + Current Stage: + <%= calculated.trophy_fish.stage.name %> + <% if (calculated.trophy_fish.stage.progress !== null) { %> + (<%= calculated.trophy_fish.stage.progress %>) + <% } %> +
+

+ + +
+ +
+ <% for (const fish of calculated.trophy_fish.fish) { %> +
+
+
+
+ +
+
+
+ <%= fish.name %> + x<%= fish.caught.total.toLocaleString() %> +
+ +
+
<%= fish.caught.bronze.toLocaleString() %> +
<%= fish.caught.silver.toLocaleString() %> +
<%= fish.caught.gold.toLocaleString() %> +
<%= fish.caught.diamond.toLocaleString() %> +
+
+
+
+ <% } %> +
+
+
<% if(calculated.enchanting.experimented){ %>
From 37a51b1f276a3b57a1668cc4faa563f601795d9f Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 26 Jan 2023 14:45:19 +0100 Subject: [PATCH 21/47] style: `npm run prettier:fix` --- src/lib.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib.js b/src/lib.js index bdb90f9af6..41f7ba9bb2 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2801,8 +2801,6 @@ export function getTrophyFish(userProfile) { progress: stageProgress, }; - console.log(output); - return output; } From 7a898ed6bc6beb2e90017dc9345f5476a40c0f25 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 26 Jan 2023 16:16:56 +0100 Subject: [PATCH 22/47] feat: add corresponding color to higher catch type --- src/constants/trophy-fish.js | 152 ++++++++++++++++++++++++++--------- src/lib.js | 20 +++-- 2 files changed, 126 insertions(+), 46 deletions(-) diff --git a/src/constants/trophy-fish.js b/src/constants/trophy-fish.js index f1d7e632f7..fde469d246 100644 --- a/src/constants/trophy-fish.js +++ b/src/constants/trophy-fish.js @@ -3,113 +3,185 @@ import { STATS_DATA } from "../../common/constants/stats.js"; export const TROPHY_FISH = { BLOBFISH: { display_name: "Blobfish", - texture: "3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", description: "§7Caught everywhere.", - rarity: "common", + textures: { + bronze: "3e77a61f2a25f19bb047be985b965f069d857502881bea3f9682d00bfd5cc3e7", + silver: "40e6628e5c358e080d3180c7424b70371e67e5724020b68a64d60ab41fe70bae", + gold: "2e93d72c19e7b917f233dc291b749391f2d870ef30cafc5f17281023ae17c2b9", + diamond: "d9339dfceaa5d99a5571ec4743b004d827b229eaf00eb703ced03a86029f3ad", + }, }, FLYFISH: { display_name: "Flyfish", - texture: "5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", description: "§7Caught from §a8 §7blocks or higher above lava in the §cBlazing Volcano§7.", - rarity: "uncommon", - }, - GOLDEN_FISH: { - display_name: "Golden Fish", - texture: "fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + textures: { + bronze: "5140c42fc3a1ba2fe77c45b975fa87e8f54a1b1833bc76e6339b4c262304011d", + diamond: "1516c233797626ce5e0132166062ae1cb435c561c00a6fa11b37e2295f8c7c5b", + gold: "6051fc3ea4b8459df839e67c157e9d1a753be0603cbf18d3c1352ebf61b58581", + silver: "adc59df19336fa7a84e4637519d7f843c38e7673ffcc3f39edeed950e28d8b57", + }, + }, + goldEN_FISH: { + display_name: "golden Fish", description: - "§7Has a chance to spawn after §a15 §7minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The §6Golden Fish §7is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", - rarity: "legendary", + "§7Has a chance to spawn after §a15 §7minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The §6golden Fish §7is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + textures: { + bronze: "fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", + diamond: "f46cb8cbb60cda60092b3051648dd2db7eec49ae87f3f524c6182797b4109a12", + gold: "38175538210af6a4d1a443e08ee321abad837c6c927c7803ab361d29e3f8e509", + silver: "98ac13a462e9e9ffc3569c6beb44e4b28be5a15e7628c8957c5cddfaff26c285", + }, }, GUSHER: { display_name: "Gusher", - texture: "afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", description: "§7Caught within §a7-16 §7minutes after a §cBlazing Volcano §7eruption.", - rarity: "common", + textures: { + bronze: "afb8c51bfcd996840010bcce2a3575ae26352e00446d3ec313fcbf1f88108512", + diamond: "577322d86e61df34b2dcbb3fa7f4d03d0e3be56bddac6bdf2e7de61e21f718eb", + gold: "d550a51e76f32aaa556b98d817db6ae71aadb2af7d76c34b903dad5ee2f90439", + silver: "e5c2828e950c1fd7f73a6b7879d8b562ecff894b6cb22afb9c2660627b3b8dfe", + }, }, KARATE_FISH: { display_name: "Karate Fish", - texture: "901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", description: "§7Caught in the lava pools near the §eDojo§7. Note - Half of the lava pools do not actually count as being in the §eDojo §7area. If you stand in the same place as your bobber and do not see '§eDojo§7' in the sidebar, you cannot catch the §5Karate Fish §7there.", - rarity: "epic", + textures: { + bronze: "901ef47164aba899674cac1e04dda29895ba670807a162e888681c6428e42a83", + diamond: "fa57e62e393f80cd4bb23109c7c869b1f66621ceccae4b7601afb3269120294d", + gold: "ac28a1f0f3908274e5860e1ac1b122b7323327aeb376e8378a036c9fa8bf35c5", + silver: "e56227d0e98b7541b2922e9cd9113155d13028978d4c3f68775199ea27299fd4", + }, }, LAVA_HORSE: { display_name: "Lavahorse", - texture: "1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", description: "§7Caught everywhere.", - rarity: "rare", + textures: { + bronze: "1176ea86635c4e849469ed694b3c0c3f7ec7677ed0682bee5ef6d59ea669677f", + diamond: "67e685788792dc90e7d19c2932f3dc1dbe396e6cac068260997ea0b64ffd2bf8", + gold: "a4d8850536ca5d3b735691be439c7f8619ebc14ad0aef78055fd86a37dd2adf1", + silver: "124ab405566c448c7484132f99a7bb79bdf547ae50713c0dd866a2375156b2c7", + }, }, MANA_RAY: { display_name: "Mana Ray", - texture: "fdb2cad06f475b036ad71d61469b8e670e189204350adab6079dc85e1f7d58f2", description: `§7Caught when you have at least §b1,200 ${STATS_DATA.intelligence.symbol} Intelligence§7.`, - rarity: "rare", + textures: { + bronze: "ff357b0f4e13cc2013bf4a02a3d3351ab0d7856e73f9f0cf8b6f13e78d95b215", + diamond: "6d6dacd67f0562980e597a8ba508b3e321002f4d358c85dd9a4a39bacaea63f8", + gold: "c515e96329992b2969c427a17ae68173ad0f8b86f9e3a0e3f9460385581edfe3", + silver: "dfd706157c2a3e2c8c3674cbc37f7a1206b87b7a6453d11e7408492c01c35634", + }, }, MOLDFIN: { display_name: "Moldfin", - texture: "54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", description: "§7Caught in the §5Mystic Marsh§7.", - rarity: "epic", + textures: { + bronze: "54f33dc405ba447b35926b48d90600302aeebb140ad330d885886cb1029a8af", + diamond: "9c99ddc1d711f482305d8f1ffcadd4b444fad1b0b07c5be2b73b1f08ee6cbe5e", + gold: "5113e386937a8ed25fe40fdbe6b88712ae73411f6a0ae927420ffcb9d778226b", + silver: "6a52dd3040aca257bf361c15cc4a0114f850b2a91867ee49d26cebca5203aab4", + }, }, OBFUSCATED_FISH_1: { display_name: "Obfuscated 1", - texture: "e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", description: "§7Caught with §fCorrupted Bait§7.", - rarity: "common", + textures: { + bronze: "e1f4d91e1bf8d3c4258fe0f28ec2fa40670e25ba06ac4b5cb1abf52a83731a9c", + diamond: "caa0b4b4f443257e83176df4ffd550de7ee89867e506b9c1ca53f33611327929", + gold: "8a2a44913ee1d5babc172f374351ea7ad1516ca256d16a4ef72d8a092b519cd1", + silver: "479b52391ff0cd3c83db1c1c218a02ab13a2c6a4aaa1cf126c7912bd377e8fbf", + }, }, OBFUSCATED_FISH_2: { display_name: "Obfuscated 2", - texture: "8321e19aa4b3163c8990b066b1cd0895c3c97a799057327507db0ffc80d90575", description: "§7Caught whilst using Obfuscated 1 as bait.", - rarity: "uncommon", + textures: { + bronze: "8321e19aa4b3163c8990b066b1cd0895c3c97a799057327507db0ffc80d90575", + gold: "4631953a0351988029b90e838181e4e563d782e470ea33b8c612756f730625c2", + silver: "cb12de47e0b48ab8f7d8f500fdc5d7869b7f2192f823620088582a56afcf68fb", + diamond: "cdca1057973e87f875722d7cf5c7b3de2aa4831ced2aa4259c0e4bec7b499245", + }, }, OBFUSCATED_FISH_3: { display_name: "Obfuscated 3", - texture: "df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", description: "§7Caught with §9Obfuscated 2 §7as bait.", - rarity: "rare", + textures: { + bronze: "df478663687d16f79b9c32546a7c3ec2736e87ce69779991e52deaf622abd8c2", + silver: "3c800c71b925587213382eeaaa426ed63112503e278ff9f5b3d39dbdb95d31d0", + gold: "97f71c13302401772e611a2a508f23df54b778be725ce231662f3fc810d258a1", + diamond: "665a04023ce40813abee55061fe802d2f8195fcdee3570388bba072073ecef3a", + }, }, SKELETON_FISH: { display_name: "Skeleton Fish", - texture: "923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", description: "§7Caught in the §cBurning Desert§7.", - rarity: "epic", + textures: { + bronze: "923e0a25048b60a2cc092f72943159ec170063bb235aa79690ef34ab181d691", + diamond: "ed01389874c7be1165d5df633daf27d936bfaf553143cfcbaa50c93c4746f9f3", + gold: "639dd2fe302e2ac4d9e8d31876489258b04e58a8e8754714669145a89a82d2e0", + silver: "a39846ad1c8fd3420febff458401bacd91d1f4fd444940f7f7cb9e2a490ca4dd", + }, }, SLUGFISH: { display_name: "Slugfish", - texture: "d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", description: "§7Caught when the bobber has been active for at least §a30 §7seconds.", - rarity: "uncommon", + textures: { + bronze: "c1de9e49ecc8d6209c783bfd1684a89e624a4e483a86023c6df57f77d5b75890", + diamond: "a5d717aa5c9063181283811d265bfd0ffdc7eda09a0984cee59578b4a5efd4a1", + gold: "289d72f3750a5cd244cbf09af9478453b6575df591d720b6ec23d84a165c65f2", + silver: "d82efd885e6e2a964efb857de724b2ef043f1dcbbe618f10ec3742c6f2cecab", + }, }, SOUL_FISH: { display_name: "Soul Fish", - texture: "7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", description: "§7Caught in the §2Stronghold§7.", - rarity: "epic", + textures: { + bronze: "7fe554d346c20c161aa85cfdc1b89779c9f64e726a5bb28ace8078e6594052d7", + diamond: "b63912df6540359774fb5cb4546a2eea1736f3fc7cf2848421697c1be8a5361", + gold: "3c9548a25e68332e6dde60816d811242fa40da58a5e24a5233e0079d9c57f779", + silver: "d086c5700ec707d703cfb45ab8afee5269a59eedda516a2c68f3e2aef7fa6a94", + }, }, STEAMING_HOT_FLOUNDER: { display_name: "Steaming-Hot Flounder", - texture: "8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", description: "§7Caught when the bobber is within §a2 §7blocks of a Geyser in the §cBlazing Volcano§7.", - rarity: "common", + textures: { + bronze: "8b88f88f3053c434660eeb4c7b2344bc21ab52596cea5a66d0f9db8c0e050209", + diamond: "c6602a15cf491f76584179221ed1da25fe6918f9100b864b39ea6493734809d1", + gold: "305cb6623837195113c04409658f9e8872a05e2321b79dfd1ce48eda6f749b90", + silver: "6887f3db9e1f28f08fed4fdc8be40dbeef7a04f026d5e30041ecd49a78558efb", + }, }, SULPHUR_SKITTER: { display_name: "Sulphur Skitter", - texture: "4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", description: "§7Caught when standing within §a8 §7blocks of a Sulphur Ore.", - rarity: "common", + textures: { + bronze: "4fbf7111609f2ec23d9b3f285e1755b62193bd7c3d770576e2b18c48afeb0e29", + diamond: "4c6eac56808a85b59d48aff59a262922a57cfa766f6c56f69c7d91fea230fa", + gold: "a79c52c2bb808d2e46e8e4e4db506f9406e9dfa20aee419ad90eacfb0216c169", + silver: "ba6e3560712f7213a428518deb66c0638269d17e90d8f31d4ade2a0acb91fd80", + }, }, VANILLE: { display_name: "Vanille", - texture: "57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", description: "§7Caught when using a §aStarter Lava Rod §7with no Enchantments.", - rarity: "rare", + textures: { + bronze: "57120222cce38d53ba69fc6540e97bff9abdbe22ba6068d4ee9af52ecc56842f", + diamond: "bd6519e85f7fd69cb2d7bbd8d77018d907cab7b9ec1309eb933de78df00b63c1", + gold: "7684b553c9b045a429a775881130c5e6daa547d314f1f0255135f5bd46870e85", + silver: "7313271354dc2e5b1a720c6668f03ca7106ee439f874907f2a54083f0cb57721", + }, }, VOLCANIC_STONEFISH: { display_name: "Volcanic Stonefish", - texture: "38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", description: "§7Caught in the §cBlazing Volcano§7.", - rarity: "rare", + textures: { + bronze: "38f89cbaa61ecc99a8321d53f070cef8414efc3eac47bf6fe143056fed9ee8", + diamond: "48bec97138419aff0af6fb445cd5f8d68e30698facf46ae956cbda2331fb2284", + gold: "491156fede270a2fe49acf80d5956a0a9f312e37a0be669c3da54732a4c169c2", + silver: "f868b5727d27ace0beca1ca19c783b5375a88ce3d3956a0c589b4ba167e6c18f", + }, }, }; diff --git a/src/lib.js b/src/lib.js index f97ff319e0..462b8f34a4 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2861,18 +2861,26 @@ export function getTrophyFish(userProfile) { for (const key of Object.keys(constants.TROPHY_FISH)) { const id = key.toLowerCase(); + const caught = userProfile.trophy_fish[id] || 0; + const caughtBronze = userProfile.trophy_fish[`${id}_bronze`] || 0; + const caughtSilver = userProfile.trophy_fish[`${id}_silver`] || 0; + const caughtGold = userProfile.trophy_fish[`${id}_gold`] || 0; + const caughtDiamond = userProfile.trophy_fish[`${id}_diamond`] || 0; + const highestType = + caughtDiamond > 0 ? "diamond" : caughtGold > 0 ? "gold" : caughtSilver > 0 ? "silver" : "bronze"; output.fish.push({ id: key, name: constants.TROPHY_FISH[key].display_name, - texture: constants.TROPHY_FISH[key].texture, + texture: constants.TROPHY_FISH[key].textures[highestType], description: constants.TROPHY_FISH[key].description, caught: { - total: userProfile.trophy_fish[id] || 0, - bronze: userProfile.trophy_fish[`${id}_bronze`] || 0, - silver: userProfile.trophy_fish[`${id}_silver`] || 0, - gold: userProfile.trophy_fish[`${id}_gold`] || 0, - diamond: userProfile.trophy_fish[`${id}_diamond`] || 0, + total: caught, + bronze: caughtBronze, + silver: caughtSilver, + gold: caughtGold, + diamond: caughtDiamond, + highestType: highestType, }, }); } From e7cf272bbf4b60786b004ae35779f86a69c211a6 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sun, 29 Jan 2023 13:30:07 +0100 Subject: [PATCH 23/47] fix: error & typo --- src/constants/trophy-fish.js | 6 +++--- src/lib.js | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/constants/trophy-fish.js b/src/constants/trophy-fish.js index fde469d246..c9e2d13770 100644 --- a/src/constants/trophy-fish.js +++ b/src/constants/trophy-fish.js @@ -21,10 +21,10 @@ export const TROPHY_FISH = { silver: "adc59df19336fa7a84e4637519d7f843c38e7673ffcc3f39edeed950e28d8b57", }, }, - goldEN_FISH: { - display_name: "golden Fish", + GOLDEN_FISH: { + display_name: "Golden Fish", description: - "§7Has a chance to spawn after §a15 §7minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The §6golden Fish §7is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", + "§7Has a chance to spawn after §a15 §7minutes of fishing, increasing linearly until reaching 100% at 20 minutes. The §6Golden Fish §7is rolled when your fishing hook is thrown out, regardless of if you catch a fish or not. You are not required to Trophy Fish to catch this one.", textures: { bronze: "fcfa31d81eae819936834e6664430daf8affbff30b48a1daa7ca1b4c20e3fe7d", diamond: "f46cb8cbb60cda60092b3051648dd2db7eec49ae87f3f524c6182797b4109a12", diff --git a/src/lib.js b/src/lib.js index 462b8f34a4..9575309132 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2861,11 +2861,12 @@ export function getTrophyFish(userProfile) { for (const key of Object.keys(constants.TROPHY_FISH)) { const id = key.toLowerCase(); - const caught = userProfile.trophy_fish[id] || 0; - const caughtBronze = userProfile.trophy_fish[`${id}_bronze`] || 0; - const caughtSilver = userProfile.trophy_fish[`${id}_silver`] || 0; - const caughtGold = userProfile.trophy_fish[`${id}_gold`] || 0; - const caughtDiamond = userProfile.trophy_fish[`${id}_diamond`] || 0; + const caught = (userProfile.trophy_fish && userProfile.trophy_fish[id]) || 0; + const caughtBronze = (userProfile.trophy_fish && userProfile.trophy_fish[`${id}_bronze`]) || 0; + const caughtSilver = (userProfile.trophy_fish && userProfile.trophy_fish[`${id}_silver`]) || 0; + const caughtGold = (userProfile.trophy_fish && userProfile.trophy_fish[`${id}_gold`]) || 0; + const caughtDiamond = (userProfile.trophy_fish && userProfile.trophy_fish[`${id}_diamond`]) || 0; + const highestType = caughtDiamond > 0 ? "diamond" : caughtGold > 0 ? "gold" : caughtSilver > 0 ? "silver" : "bronze"; @@ -2888,8 +2889,8 @@ export function getTrophyFish(userProfile) { output.total_caught = userProfile.trophy_fish?.total_caught || 0; const { type: stageType, formatted: stageFormatted } = - constants.TROPHY_FISH_STAGES[userProfile.trophy_fish.rewards.length] || {}; - const { type: stageProgressType } = constants.TROPHY_FISH_STAGES[userProfile.trophy_fish.rewards.length + 1] || { + constants.TROPHY_FISH_STAGES[(userProfile.trophy_fish?.rewards || []).length] || {}; + const { type: stageProgressType } = constants.TROPHY_FISH_STAGES[(userProfile.trophy_fish?.rewards || []).length + 1] || { type: stageType, }; @@ -2904,7 +2905,7 @@ export function getTrophyFish(userProfile) { } / ${Object.keys(constants.TROPHY_FISH).length}` : null; - output.stage = { + output.stage = { name: stageFormatted || "None", type: stageType, progress: stageProgress, From 0f91863bc76413fdb545538fac72c727e0f579b7 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sun, 29 Jan 2023 13:31:35 +0100 Subject: [PATCH 24/47] style: `npm run prettier:fix` --- src/lib.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.js b/src/lib.js index 9575309132..189ce7fdf7 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2890,7 +2890,9 @@ export function getTrophyFish(userProfile) { const { type: stageType, formatted: stageFormatted } = constants.TROPHY_FISH_STAGES[(userProfile.trophy_fish?.rewards || []).length] || {}; - const { type: stageProgressType } = constants.TROPHY_FISH_STAGES[(userProfile.trophy_fish?.rewards || []).length + 1] || { + const { type: stageProgressType } = constants.TROPHY_FISH_STAGES[ + (userProfile.trophy_fish?.rewards || []).length + 1 + ] || { type: stageType, }; @@ -2905,7 +2907,7 @@ export function getTrophyFish(userProfile) { } / ${Object.keys(constants.TROPHY_FISH).length}` : null; - output.stage = { + output.stage = { name: stageFormatted || "None", type: stageType, progress: stageProgress, From 07ac5206957bdd1404647b4782e603e3bc21cb64 Mon Sep 17 00:00:00 2001 From: MartinNemi03 Date: Sun, 29 Jan 2023 21:16:47 +0100 Subject: [PATCH 25/47] feat: fancy close icon instead of 0 and other hilarious jokes you can tell about my commit to this PR --- public/resources/scss/stats.scss | 18 ++++++++++----- views/stats.ejs | 38 +++++++++++++++++++++----------- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/public/resources/scss/stats.scss b/public/resources/scss/stats.scss index e2797084c8..b2cd84da45 100644 --- a/public/resources/scss/stats.scss +++ b/public/resources/scss/stats.scss @@ -1984,7 +1984,8 @@ inventory-view { .collections, .minions, .stat-farming-crops, -.sea-creatures { +.sea-creatures, +.trophy-fish { display: flex; flex-wrap: wrap; gap: 8px; @@ -2046,14 +2047,11 @@ inventory-view { font-weight: 450; .trophy-fish-info { - .trophy-fish-name { - color: white; - } + margin-bottom: 2px; .trophy-fish-amount { color: rgba(var(--text-rgb), 0.7); font-weight: 500; - margin-left: 4px; } } @@ -2061,11 +2059,21 @@ inventory-view { display: grid; grid-template-columns: repeat(2, auto 1fr); gap: 0px 4px; + height: 44px; text-align: left; align-items: center; } + .count-value { + height: 22px; + + svg { + width: 20px; + height: 22px; + } + } + .count-format { height: 12px; width: 12px; diff --git a/views/stats.ejs b/views/stats.ejs index b8d535578f..92be43af0c 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -12,6 +12,7 @@ const rarityOrder = ["very_special", "special", "supreme", "divine", "mythic", "legendary", "epic", "rare", "uncommon", "common"]; const slayerOrder = ["zombie", "spider", "wolf", "enderman", "blaze"]; const badgeOrder = ["gold", "silver", "bronze"]; +const trophyFishOrder = ["bronze", "silver", "gold", "diamond"] const skillItems = { alchemy: "icon-379_0", @@ -1768,8 +1769,8 @@ const metaDescription = getMetaDescription() } %>
<% } %> - -
+ +

Total Caught: <%= calculated.trophy_fish.total_caught.toLocaleString() %> @@ -1778,7 +1779,7 @@ const metaDescription = getMetaDescription() Current Stage: <%= calculated.trophy_fish.stage.name %> <% if (calculated.trophy_fish.stage.progress !== null) { %> - (<%= calculated.trophy_fish.stage.progress %>) + (<%= calculated.trophy_fish.stage.progress %>) <% } %>

@@ -1786,7 +1787,7 @@ const metaDescription = getMetaDescription()
-
+
<% for (const fish of calculated.trophy_fish.fish) { %>
@@ -1801,10 +1802,21 @@ const metaDescription = getMetaDescription()
-
<%= fish.caught.bronze.toLocaleString() %> -
<%= fish.caught.silver.toLocaleString() %> -
<%= fish.caught.gold.toLocaleString() %> -
<%= fish.caught.diamond.toLocaleString() %> + <% for (const fishTier of trophyFishOrder) { + let count = fish.caught[fishTier] ?? 0; %> +
+ <% if (count > 0) { %> + + <%= fish.caught[fishTier].toLocaleString() %> + + <% } else { %> + + + + + + <% } %> + <% } %>
@@ -2836,7 +2848,7 @@ const metaDescription = getMetaDescription()

<% } %> - <% if('effects' in calculated.misc){ + <% if('effects' in calculated.misc){ if (Object.keys(calculated.misc.effects).some((key) => Object.keys(calculated.misc.effects[key]).length > 0)) { %>
@@ -2844,7 +2856,7 @@ const metaDescription = getMetaDescription()
Potions
- <% + <% let effects_tooltips = []; for (const key of Object.keys(calculated.misc.effects).sort()) { effects_tooltips[key] ??= []; @@ -2852,7 +2864,7 @@ const metaDescription = getMetaDescription() if (key === "active") { if (potion?.effect === undefined || potion?.level === null) continue; effects_tooltips[key].push(`${constants.POTION_EFFECTS[potion.effect]?.[potion.level].name.replace('Potion', '') || potion.effect.split('_').map((effect) => helper.capitalizeFirstLetter(effect.toLowerCase())).join(' ')}
`) - + } else { potion = potion?.effect || potion @@ -2865,7 +2877,7 @@ const metaDescription = getMetaDescription() > Active Potion Effects: <%= calculated.misc.effects.active.length %>
- + > Paused Potion Effects: <%= calculated.misc.effects.paused.length %>
@@ -2974,4 +2986,4 @@ const metaDescription = getMetaDescription() - \ No newline at end of file + From 2c0bb06111da402497312d45298c817fa0e23b7e Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Thu, 9 Feb 2023 17:47:33 +0000 Subject: [PATCH 26/47] feat: make trophy fish names bold --- views/stats.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/stats.ejs b/views/stats.ejs index 92be43af0c..b916d3dbe3 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -1797,7 +1797,7 @@ const metaDescription = getMetaDescription()
- <%= fish.name %> + <%= fish.name %> x<%= fish.caught.total.toLocaleString() %>
From a0bb76e4c80544f619d5678385ae06e0f4b8b67a Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Thu, 9 Feb 2023 18:06:58 +0000 Subject: [PATCH 27/47] feat: scroll trophy fish on mobile displays --- public/resources/scss/stats.scss | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/resources/scss/stats.scss b/public/resources/scss/stats.scss index b2cd84da45..87a625e4d0 100644 --- a/public/resources/scss/stats.scss +++ b/public/resources/scss/stats.scss @@ -1990,7 +1990,8 @@ inventory-view { flex-wrap: wrap; gap: 8px; - &.sea-creatures { + &.sea-creatures, + &.trophy-fish { gap: 15px; } } @@ -2415,7 +2416,8 @@ inventory-view { .collections, .minions, .stat-farming-crops, - .sea-creatures { + .sea-creatures, + .trophy-fish { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(-1 * var(--padding)); @@ -2425,7 +2427,8 @@ inventory-view { contain-intrinsic-size: 200px 64px; } - &.sea-creatures { + &.sea-creatures, + &.trophy-fish { @supports (contain-intrinsic-size: 140px 230px) { contain-intrinsic-size: 140px 230px; } From 66ab661f4da3544e076539b94ecb174e09781a84 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Mon, 12 Jun 2023 16:08:44 +0200 Subject: [PATCH 28/47] fix: `hypixelItem` being null --- src/lib.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.js b/src/lib.js index 9b9b3a0b9b..de30c99ed2 100644 --- a/src/lib.js +++ b/src/lib.js @@ -353,6 +353,9 @@ async function processItems(base64, source, customTextures = false, packs, cache for (const key in item.tag.ExtraAttributes) { if (key.startsWith("personal_compact_") || key.startsWith("personal_deletor_")) { const hypixelItem = await db.collection("items").findOne({ id: item.tag.ExtraAttributes[key] }); + if (hypixelItem === null) { + continue; + } const itemData = { Count: 1, From f8e3adf838d5dcd1b2077ef51c274b658ca90db1 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Mon, 12 Jun 2023 18:47:58 +0200 Subject: [PATCH 29/47] refactor: use "???" pet texture as fallback --- src/lib.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib.js b/src/lib.js index de30c99ed2..85a30d83aa 100644 --- a/src/lib.js +++ b/src/lib.js @@ -353,22 +353,19 @@ async function processItems(base64, source, customTextures = false, packs, cache for (const key in item.tag.ExtraAttributes) { if (key.startsWith("personal_compact_") || key.startsWith("personal_deletor_")) { const hypixelItem = await db.collection("items").findOne({ id: item.tag.ExtraAttributes[key] }); - if (hypixelItem === null) { - continue; - } const itemData = { Count: 1, Damage: hypixelItem?.damage ?? 3, id: hypixelItem?.item_id ?? 397, itemIndex: item.containsItems.length, - glowing: hypixelItem.glowing, - display_name: hypixelItem.name, - rarity: hypixelItem.tier, + glowing: hypixelItem?.glowing ?? false, + display_name: hypixelItem?.name ?? _.startCase(item.tag.ExtraAttributes[key].replace(/_/g, " ")), + rarity: hypixelItem?.tier ?? "common", categories: [], }; - if (hypixelItem.texture !== undefined) { + if (hypixelItem?.texture !== undefined) { itemData.texture_path = `/head/${hypixelItem.texture}`; } @@ -379,6 +376,10 @@ async function processItems(base64, source, customTextures = false, packs, cache itemData.texture_path = `/leather/${type}/${color}`; } + if (hypixelItem === null) { + itemData.texture_path = "/head/bc8ea1f51f253ff5142ca11ae45193a4ad8c3ab5e9c6eec8ba7a4fcb7bac40" + } + item.containsItems.push(itemData); } } From 9fbaf469dd5883c5e9cf6bd0c972b195ddda8d69 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Mon, 12 Jun 2023 18:49:57 +0200 Subject: [PATCH 30/47] style: `npm run prettier:fix` --- src/lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.js b/src/lib.js index 85a30d83aa..26b0fac235 100644 --- a/src/lib.js +++ b/src/lib.js @@ -377,7 +377,7 @@ async function processItems(base64, source, customTextures = false, packs, cache } if (hypixelItem === null) { - itemData.texture_path = "/head/bc8ea1f51f253ff5142ca11ae45193a4ad8c3ab5e9c6eec8ba7a4fcb7bac40" + itemData.texture_path = "/head/bc8ea1f51f253ff5142ca11ae45193a4ad8c3ab5e9c6eec8ba7a4fcb7bac40"; } item.containsItems.push(itemData); From 1b80e69bdba16e17ccc014977b82131500915e33 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Mon, 19 Jun 2023 19:02:57 +0200 Subject: [PATCH 31/47] feat: add new pet skins released in June --- src/constants/skins-animations.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/constants/skins-animations.js b/src/constants/skins-animations.js index 02e075567b..d251726886 100644 --- a/src/constants/skins-animations.js +++ b/src/constants/skins-animations.js @@ -853,6 +853,20 @@ const SKINS = [ source: "firesale", release: new Date("2023-04-21 18:00:00 GMT+1").getTime(), }, + { + id: "PET_SKIN_WHALE_COSMIC", + name: "Cosmic", + texture: "/head/1a68f59a187f5b7183df2ea708a6e4704845afd433272cd32cbed52286db1fd3", + source: "firesale", + release: new Date("2023-06-02 18:00:00 GMT+1").getTime(), + }, + { + id: "PET_SKIN_MONKEY_LEMUR", + name: "Lemur", + texture: "/head/b6f45eb8a8bef3f8ee406ac0923d8626c5e5b7ff511cfbd417c994b68941f104", + source: "firesale", + release: new Date("2023-06-19 18:00:00 GMT+1").getTime(), + }, ]; /* From 0e72cfea629b7feda9262bf3c92cfed23c11d405 Mon Sep 17 00:00:00 2001 From: Zickles <76439587+Zickles@users.noreply.github.com> Date: Wed, 21 Jun 2023 18:51:40 -0400 Subject: [PATCH 32/47] add new zombie pet lore changes --- common/constants/stats.js | 9 +++++++++ src/constants/pet-stats.js | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common/constants/stats.js b/common/constants/stats.js index edfc1c56c0..8baba09174 100644 --- a/common/constants/stats.js +++ b/common/constants/stats.js @@ -237,6 +237,15 @@ export const STATS_DATA = { suffix: "", color: "3", }, + undead: { + name: "Undead", + nameLore: "Undead", + nameShort: "Undead", + nameTiny: "U", + symbol: "༕", + suffix: "", + color: "2" + } }; const symbols = { diff --git a/src/constants/pet-stats.js b/src/constants/pet-stats.js index 2da9ae6fb2..f1146fb742 100644 --- a/src/constants/pet-stats.js +++ b/src/constants/pet-stats.js @@ -2136,10 +2136,10 @@ class Zombie extends Pet { } get third() { - const mult = getValue(this.rarity, { legendary: 0.25 }); + const mult = getValue(this.rarity, { legendary: 0.2 }); return { name: "§6Living Dead", - desc: [`§7Increases the defense of all undead armor sets by §a${round(this.level * mult, 1)}%§7.`], + desc: [`§7Increases all stats on§7§2undead ${SYMBOLS.undead} §7armor by §a${round(this.level * mult, 1)}%§7.`], }; } } From d4163081544067247f4b4063493069266adeaa2a Mon Sep 17 00:00:00 2001 From: Zickles <76439587+Zickles@users.noreply.github.com> Date: Wed, 21 Jun 2023 18:54:08 -0400 Subject: [PATCH 33/47] fix spacing --- src/constants/pet-stats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/pet-stats.js b/src/constants/pet-stats.js index f1146fb742..f94b40254c 100644 --- a/src/constants/pet-stats.js +++ b/src/constants/pet-stats.js @@ -2139,7 +2139,7 @@ class Zombie extends Pet { const mult = getValue(this.rarity, { legendary: 0.2 }); return { name: "§6Living Dead", - desc: [`§7Increases all stats on§7§2undead ${SYMBOLS.undead} §7armor by §a${round(this.level * mult, 1)}%§7.`], + desc: [`§7Increases all stats on §7§2undead ${SYMBOLS.undead} §7armor by §a${round(this.level * mult, 1)}%§7.`], }; } } From 198ff32992e36da74a15e36375438da039864499 Mon Sep 17 00:00:00 2001 From: Zickles <76439587+Zickles@users.noreply.github.com> Date: Thu, 22 Jun 2023 08:35:31 -0400 Subject: [PATCH 34/47] npm run prettier:fix --- common/constants/stats.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/constants/stats.js b/common/constants/stats.js index 8baba09174..438ab0f78b 100644 --- a/common/constants/stats.js +++ b/common/constants/stats.js @@ -244,8 +244,8 @@ export const STATS_DATA = { nameTiny: "U", symbol: "༕", suffix: "", - color: "2" - } + color: "2", + }, }; const symbols = { From 688549856b0f36cfb8ba7373e0184864d6d1c066 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 22 Jun 2023 15:27:18 +0200 Subject: [PATCH 35/47] feat: rift pet changes --- common/constants/stats.js | 18 ++++++ src/constants/pet-stats.js | 123 +++++++++++++++++++++++++++++++++---- src/constants/pets.js | 34 +++++++++- src/lib.js | 24 +++++--- 4 files changed, 178 insertions(+), 21 deletions(-) diff --git a/common/constants/stats.js b/common/constants/stats.js index edfc1c56c0..383b0a65ec 100644 --- a/common/constants/stats.js +++ b/common/constants/stats.js @@ -237,6 +237,24 @@ export const STATS_DATA = { suffix: "", color: "3", }, + mana_regen: { + name: "Mana Regen", + nameLore: "Mana Regen", + nameShort: "Mana Regen", + nameTiny: "MPR", + symbol: "🗲", + suffix: "", + color: "b", + }, + rift_time: { + name: "Rift Time", + nameLore: "Rift Time", + nameShort: "Rift Time", + nameTiny: "RT", + symbol: "ф", + suffix: "", + color: "a", + }, }; const symbols = { diff --git a/src/constants/pet-stats.js b/src/constants/pet-stats.js index 2da9ae6fb2..387dad2c16 100644 --- a/src/constants/pet-stats.js +++ b/src/constants/pet-stats.js @@ -9,11 +9,11 @@ const LEGENDARY = RARITIES.indexOf("legendary"); const MYTHIC = RARITIES.indexOf("mythic"); function formatStat(stat) { - const statFloored = Math.floor(stat); - if (statFloored > 0) { - return `§a+${statFloored}`; + const formattedStat = stat.toFixed(2).replace(/\.?0+$/, ''); + if (stat > 0) { + return `§a+${formattedStat}`; } else { - return `§a${statFloored}`; + return `§a${formattedStat}`; } } @@ -119,6 +119,12 @@ class Pet { case "fishing_speed": list.push(`§7Fishing Speed: ${formatStat(newStats[stat])}`); break; + case "rift_time": + list.push(`§7Rift Time: §a${formatStat(newStats[stat])}s`); + break; + case "mana_regen": + list.push(`§7Mana Regen: §a${formatStat(newStats[stat])}%`); + break; default: list.push(`§cUNKNOWN: ${stat}`); break; @@ -1008,9 +1014,9 @@ class GoldenDragon extends Pet { if (this.level >= 100) { const goldCollectionDigits = this.profile?.collections?.GOLD_INGOT?.totalAmount.toString().length ?? 0; - stats.strength = round(25 + Math.max(0, this.level - 100) * 0.25, 0) + 10 * goldCollectionDigits; - stats.bonus_attack_speed = round(25 + Math.max(0, this.level - 100) * 0.25, 0); - stats.magic_find = round(5 + Math.max(0, (this.level - 100) / 10) * 0.5, 0) + 2 * goldCollectionDigits; + stats.strength = Math.floor(25 + Math.max(0, this.level - 100) * 0.25) + 10 * goldCollectionDigits; + stats.bonus_attack_speed = Math.floor(25 + Math.max(0, this.level - 100) * 0.25); + stats.magic_find = Math.floor(5 + Math.max(0, (this.level - 100) / 10) * 0.5) + 2 * goldCollectionDigits; } return stats; } @@ -1315,11 +1321,14 @@ class Guardian extends Pet { if (this.rarity >= LEGENDARY) { list.push(this.third); } + if (this.rarity >= MYTHIC) { + list.push(this.fourth); + } return list; } get first() { - const mult = getValue(this.rarity, { common: 0.02, uncommon: 0.06, rare: 0.1, epic: 0.15, legendary: 0.2 }); + const mult = getValue(this.rarity, { common: 0.02, uncommon: 0.06, rare: 0.1, epic: 0.15, legendary: 0.2, mythic: 1.2 }); return { name: "§6Lazerbeam", desc: [ @@ -1345,6 +1354,14 @@ class Guardian extends Pet { desc: [`§7Regenerate §b${round(this.level * mult, 1)}% §7extra mana, doubled when near or in water§7.`], }; } + + get fourth() { + const mult = getValue(this.rarity, { mythic: 0.07 }); + return { + name: "§6Lucky Seven", + desc: [`§7Gain §b +${round(this.level * mult, 1)}% §7chance to find §5ultra rare §7books in §dSuperpairs.`] + } + } } class Horse extends Pet { @@ -1796,6 +1813,9 @@ class Spider extends Pet { if (this.rarity >= LEGENDARY) { list.push(this.third); } + if (this.rarity >= MYTHIC) { + list.push(this.fourth); + } return list; } @@ -1825,6 +1845,13 @@ class Spider extends Pet { desc: [`§7Spider and tarantula minions work §a${round(this.level * mult, 1)}% §7faster while on your island.`], }; } + + get fourth() { + return { + name: "§6Web Battlefield", + desc: [`§7Killing mob grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`] + } + } } class Spirit extends Pet { @@ -1882,6 +1909,9 @@ class Tarantula extends Pet { if (this.rarity >= LEGENDARY) { list.push(this.third); } + if (this.rarity >= MYTHIC) { + list.push(this.fourth); + } return list; } @@ -1902,12 +1932,19 @@ class Tarantula extends Pet { } get third() { - const mult = getValue(this.rarity, { legendary: 0.5 }); + const mult = getValue(this.rarity, { legendary: 0.005 }); return { name: "§6Arachnid Slayer", - desc: [`§7Grants §a${round(this.level * mult, 1)}% §3${SYMBOLS.wisdom} Combat Wisdom §7against §aSpiders§7.`], + desc: [`§7Gain §b${round(1 + this.level * mult, 1)}x §7Combat XP against §aSpiders§7.`], }; } + + get fourth() { + return { + name: "§6Web Battlefield", + desc: [`§7Killing mob grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`] + } + } } class Tiger extends Pet { @@ -2295,6 +2332,46 @@ class Monkey extends Pet { } } +class Montezuma extends Pet { + get stats() { + const riftSouls = + "objectives" in (this.profile ?? {}) + ? Object.entries(this.profile.objectives).find( + ([key, value]) => key.startsWith("rift_") && key.endsWith("_soul") && value.status === "COMPLETE" + )?.length ?? 0 + : 0; + + return { + rift_time: riftSouls * 15, + mana_regen: riftSouls * 2, + }; + } + + get abilities() { + const list = [this.first]; + if (this.rarity >= RARE) { + list.push(this.second); + } + + return list; + } + + get first() { + return { + name: "§6Nine Lives", + desc: [`§7Gain §a+15${SYMBOLS.rift_time} Rift Time §7per Soul piece.`], + }; + } + + get second() { + return { + name: "§6Trickery", + desc: [`§7Gain §b+2 ${SYMBOLS.mana_regen} Mana Regen §7per soul piece found.`] + } + } + +} + class Ocelot extends Pet { get stats() { return { @@ -3174,7 +3251,7 @@ class Snail extends Pet { } get first() { - const mult = getValue(this.rarity, { common: 0.1, uncommon: 0.2, rare: 0.3 }); + const mult = getValue(this.rarity, { comMONTEZUMA: 0.1, uncommon: 0.2, rare: 0.3 }); return { name: "§6Red Sand Enjoyer", @@ -3334,6 +3411,28 @@ class Reindeer extends Pet { } } +class RiftFerret extends Pet { + get stats() { + return { + speed: 0.5 * this.level, + intelligence: -0.02 * this.level, + }; + } + + get abilities() { + const list = [this.first]; + + return list; + } + + get first() { + return { + name: "§6Orbs are Fun", + desc: [`§7Gain §a+10% §7experience from §bXP Orbs§7.`], + }; + } +} + class QuestionMark extends Pet { get stats() { return {}; @@ -3412,6 +3511,7 @@ export const PET_STATS = { MEGALODON: Megalodon, MITHRIL_GOLEM: MithrilGolem, MONKEY: Monkey, + MONTEZUMA: Montezuma, MOOSHROOM_COW: MooshroomCow, OCELOT: Ocelot, PARROT: Parrot, @@ -3421,6 +3521,7 @@ export const PET_STATS = { RABBIT: Rabbit, RAT: Rat, REINDEER: Reindeer, + RIFT_FERRET: RiftFerret, ROCK: Rock, SCATHA: Scatha, SHEEP: Sheep, diff --git a/src/constants/pets.js b/src/constants/pets.js index 4e8bfed84b..a1adb973a1 100644 --- a/src/constants/pets.js +++ b/src/constants/pets.js @@ -239,7 +239,7 @@ export const PET_DATA = { GUARDIAN: { head: "/head/221025434045bda7025b3e514b316a4b770c6faa4ba9adb4be3809526db77f9d", type: "enchanting", - maxTier: "legendary", + maxTier: "mythic", maxLevel: 100, emoji: "🐡", }, @@ -274,7 +274,7 @@ export const PET_DATA = { SPIDER: { head: "/head/cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", type: "combat", - maxTier: "legendary", + maxTier: "mythic", maxLevel: 100, emoji: "🕷️", }, @@ -367,7 +367,7 @@ export const PET_DATA = { TARANTULA: { head: "/head/8300986ed0a04ea79904f6ae53f49ed3a0ff5b1df62bba622ecbd3777f156df8", type: "combat", - maxTier: "legendary", + maxTier: "mythic", maxLevel: 100, emoji: "🕸️", }, @@ -535,6 +535,20 @@ export const PET_DATA = { maxLevel: 100, emoji: "🦌", }, + RIFT_FERRET: { + head: "/head/b6b11399448260185da1d17e54c984515faab6d8585f00972451ec2b43d46f94", + type: "combat", + maxTier: "epic", + maxLevel: 1, + emoji: "🦝", + }, + MONTEZUMA: { + head: "/head/df656c06e8a5cb4692564ee21748bddec9d785d1834284aaa1439601bba47d6b", + type: "combat", + maxTier: "epic", + maxLevel: 1, + emoji: "💀", + }, }; export const PET_VALUE = { @@ -863,4 +877,18 @@ export const PET_ITEMS = { description: `§7Grants §6+4 ${SYMBOLS.farming_fortune} Farming Fortune§7 for each Garden Level unlocked.`, // TODO: Add statsPerLevel once Garden data comes to the API }, + DEAD_CAT_FOOD: { + name: "Dead Cat Food", + tier: "RARE", + description: "§7Grants §a+30 ${SYMBOLS.rift_time} Rift Time §7and §b5 ${SYMBOLS.mana_regen} Mana Regen§7.", + stats: { + rift_time: 30, + mana_regen: 5, + }, + }, + FOUR_EYED_FISH: { + name: "Four-Eyed Fish", + tier: "EPIC", + description: `§7Gain §6+2,000 Coins §7when digging up any §eGriffin Burrow§7.\n§7Grants §b+10 ${SYMBOLS.magic_find} Magic Find §7and §a+55 ${SYMBOLS.defense} Defense§7.`, + }, }; diff --git a/src/lib.js b/src/lib.js index 9b9b3a0b9b..321b941bb5 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2488,6 +2488,8 @@ export async function getStats( output.reaper_peppers_eaten = userProfile.reaper_peppers_eaten ?? 0; + output.objectives = userProfile.objectives ?? 0; + if (!userProfile.pets) { userProfile.pets = []; } @@ -2541,7 +2543,7 @@ export async function getStats( return output; } -export async function getPets(profile, userProfile) { +export async function getPets(profile, calculated) { let output = []; if (!("pets" in profile)) { @@ -2549,7 +2551,7 @@ export async function getPets(profile, userProfile) { } // debug pets - // profile.pets = helper.generateDebugPets("BINGO"); + // profile.pets = helper.generateDebugPets("TARANTULA"); for (const pet of profile.pets) { if (!("tier" in pet)) { @@ -2639,9 +2641,8 @@ export async function getPets(profile, userProfile) { const rarity = constants.RARITIES.indexOf(pet.rarity); const searchName = pet.type in constants.PET_STATS ? pet.type : "???"; - const petInstance = new constants.PET_STATS[searchName](rarity, pet.level.level, pet.extra, userProfile); + const petInstance = new constants.PET_STATS[searchName](rarity, pet.level.level, pet.extra, calculated ?? profile); pet.stats = Object.assign({}, petInstance.stats); - petInstance.profile = null; pet.ref = petInstance; if (pet.heldItem) { @@ -2736,20 +2737,25 @@ export async function getPets(profile, userProfile) { const progress = Math.ceil(pet.level.progress * 20); const numerator = pet.level.xpCurrent.toLocaleString(); - const denominator = helper.formatNumber(pet.level.xpForNext, false, 10); + const denominator = helper.formatNumber(pet.level.xpForNext, false); lore.push(`§2${"-".repeat(progress)}§f${"-".repeat(20 - progress)} §e${numerator} §6/ §e${denominator}`); } else { lore.push("§bMAX LEVEL"); } + let progress = Math.floor((pet.exp / pet.level.xpMaxLevel) * 100); + if (isNaN(progress)) { + progress = 0; + } + lore.push( "", `§7Total XP: §e${helper.formatNumber(pet.exp, true, 1)} §6/ §e${helper.formatNumber( pet.level.xpMaxLevel, true, 1 - )} §6(${Math.floor((pet.exp / pet.level.xpMaxLevel) * 100)}%)` + )} §6(${progress.toLocaleString()}%)` ); if (petData.obtainsExp !== "feed") { @@ -2764,6 +2770,7 @@ export async function getPets(profile, userProfile) { pet.display_name = `${petName}${petSkin ? " ✦" : ""}`; pet.emoji = petData.emoji; + pet.ref.profile = null; output.push(pet); } @@ -2846,7 +2853,10 @@ async function getMissingPets(pets, gameMode, userProfile) { profile.pets.push(pets[0]); } - return getPets(profile, userProfile); + profile.objectives = userProfile.objectives; + profile.collections = userProfile.collections; + + return await getPets(profile); } function getPetScore(pets) { From 42d58fc1ffd53bf6ec099a30ef2a0611c8bf8934 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 22 Jun 2023 15:30:57 +0200 Subject: [PATCH 36/47] style: `npm run prettier:fix` --- src/constants/pet-stats.js | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/constants/pet-stats.js b/src/constants/pet-stats.js index 387dad2c16..5c61f5f0ef 100644 --- a/src/constants/pet-stats.js +++ b/src/constants/pet-stats.js @@ -9,7 +9,7 @@ const LEGENDARY = RARITIES.indexOf("legendary"); const MYTHIC = RARITIES.indexOf("mythic"); function formatStat(stat) { - const formattedStat = stat.toFixed(2).replace(/\.?0+$/, ''); + const formattedStat = stat.toFixed(2).replace(/\.?0+$/, ""); if (stat > 0) { return `§a+${formattedStat}`; } else { @@ -1328,7 +1328,14 @@ class Guardian extends Pet { } get first() { - const mult = getValue(this.rarity, { common: 0.02, uncommon: 0.06, rare: 0.1, epic: 0.15, legendary: 0.2, mythic: 1.2 }); + const mult = getValue(this.rarity, { + common: 0.02, + uncommon: 0.06, + rare: 0.1, + epic: 0.15, + legendary: 0.2, + mythic: 1.2, + }); return { name: "§6Lazerbeam", desc: [ @@ -1359,8 +1366,8 @@ class Guardian extends Pet { const mult = getValue(this.rarity, { mythic: 0.07 }); return { name: "§6Lucky Seven", - desc: [`§7Gain §b +${round(this.level * mult, 1)}% §7chance to find §5ultra rare §7books in §dSuperpairs.`] - } + desc: [`§7Gain §b +${round(this.level * mult, 1)}% §7chance to find §5ultra rare §7books in §dSuperpairs.`], + }; } } @@ -1849,8 +1856,10 @@ class Spider extends Pet { get fourth() { return { name: "§6Web Battlefield", - desc: [`§7Killing mob grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`] - } + desc: [ + `§7Killing mob grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`, + ], + }; } } @@ -1942,8 +1951,10 @@ class Tarantula extends Pet { get fourth() { return { name: "§6Web Battlefield", - desc: [`§7Killing mob grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`] - } + desc: [ + `§7Killing mob grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`, + ], + }; } } @@ -2366,10 +2377,9 @@ class Montezuma extends Pet { get second() { return { name: "§6Trickery", - desc: [`§7Gain §b+2 ${SYMBOLS.mana_regen} Mana Regen §7per soul piece found.`] - } + desc: [`§7Gain §b+2 ${SYMBOLS.mana_regen} Mana Regen §7per soul piece found.`], + }; } - } class Ocelot extends Pet { From fae2c90e0af1e7ee8d0332deef5529e6b0f881fc Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 22 Jun 2023 15:35:16 +0200 Subject: [PATCH 37/47] feat: add new Rift Enchantments --- common/constants/enchantments.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/constants/enchantments.js b/common/constants/enchantments.js index 6d20e30ef1..7cc3f7b02e 100644 --- a/common/constants/enchantments.js +++ b/common/constants/enchantments.js @@ -66,7 +66,9 @@ export const MAX_ENCHANTS = new Set([ "Prosecute VI", "Protection VII", "Punch II", + "Quantum V", "Rainbow I", + "Reflection V", "Rejuvenate V", "Replenish I", "Respiration III", @@ -89,6 +91,7 @@ export const MAX_ENCHANTS = new Set([ "Thunderbolt VI", "Thunderlord VII", "Titan Killer VII", + "Transylvanian V", "Triple-Strike V", "True Protection I", "Turbo-Cacti V", From c546b1c98c3d765a5f59cde66da76f9f7f955ddf Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 22 Jun 2023 15:36:49 +0200 Subject: [PATCH 38/47] feat: add Rift to `AREA_NAMES` --- src/constants/misc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/constants/misc.js b/src/constants/misc.js index 53599cb84b..a8ed41412c 100644 --- a/src/constants/misc.js +++ b/src/constants/misc.js @@ -163,6 +163,7 @@ export const AREA_NAMES = { winter: "Jerry's Workshop", instanced: "Kuudra's End", garden: "The Garden", + rift: "Rift", }; export const COLOR_NAMES = { From d52624a5b51a1e2859d567d18a35dcae76ae815b Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Thu, 22 Jun 2023 16:00:49 +0200 Subject: [PATCH 39/47] fix: div tag missing `<` --- views/stats.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/stats.ejs b/views/stats.ejs index 86f090c07f..b411ee1f76 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -2196,7 +2196,7 @@ const metaDescription = getMetaDescription()
<% if (slayer.level.unclaimed){ %> - div class="slayer-unclaimed">unclaimed slayer rewards!
+
unclaimed slayer rewards!
<% } %> <% max = slayer.level.currentLevel == slayer.level.maxLevel ? 'golden-text' : '' %> From ced79a06d91fe6cbacdbecc4dc382f629c832d35 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Fri, 23 Jun 2023 16:32:40 +0200 Subject: [PATCH 40/47] fix: slayer order --- views/stats.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/stats.ejs b/views/stats.ejs index 86f090c07f..3f3f824eb0 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -10,7 +10,7 @@ ..######...#######..##....##..######.....##....##.....##.##....##....##.....######. */ const rarityOrder = ["very_special", "special", "supreme", "divine", "mythic", "legendary", "epic", "rare", "uncommon", "common"]; -const slayerOrder = ["zombie", "spider", "wolf", "enderman", "blaze", "vampire"]; +const slayerOrder = ["zombie", "spider", "wolf", "enderman", "vampire", "blaze"]; const badgeOrder = ["gold", "silver", "bronze"]; const skillItems = { From e1677fc3935116eedf50cddd19ebe1e622be21ba Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Fri, 23 Jun 2023 16:52:09 +0200 Subject: [PATCH 41/47] fix: changes to pets --- src/constants/pets.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants/pets.js b/src/constants/pets.js index a1adb973a1..e85300ecce 100644 --- a/src/constants/pets.js +++ b/src/constants/pets.js @@ -538,15 +538,15 @@ export const PET_DATA = { RIFT_FERRET: { head: "/head/b6b11399448260185da1d17e54c984515faab6d8585f00972451ec2b43d46f94", type: "combat", - maxTier: "epic", - maxLevel: 1, + maxTier: "legendary", + maxLevel: 100, emoji: "🦝", }, MONTEZUMA: { head: "/head/df656c06e8a5cb4692564ee21748bddec9d785d1834284aaa1439601bba47d6b", type: "combat", maxTier: "epic", - maxLevel: 1, + maxLevel: 100, emoji: "💀", }, }; From d243722b4d379f719855b8d8acddcadc1b07647a Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Fri, 23 Jun 2023 17:01:19 +0200 Subject: [PATCH 42/47] refactor: ignore untransferable rift accessories --- src/constants/accessories.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/constants/accessories.js b/src/constants/accessories.js index 674afbe2ae..10b1fe752b 100644 --- a/src/constants/accessories.js +++ b/src/constants/accessories.js @@ -74,7 +74,6 @@ const accessoryUpgrades = [ ["KUUDRA_FOLLOWER_ARTIFACT", "KUUDRA_FOLLOWER_RELIC"], ["AGARIMOO_TALISMAN", "AGARIMOO_RING", "AGARIMOO_ARTIFACT"], ["BLOOD_DONOR_TALISMAN", "BLOOD_DONOR_RING", "BLOOD_DONOR_ARTIFACT"], - ["CRUX_TALISMAN_1", "CRUX_TALISMAN_2", "CRUX_TALISMAN_3", "CRUX_TALISMAN_4", "CRUX_TALISMAN_5", "CRUX_TALISMAN_6"], ["LUSH_TALISMAN", "LUSH_RING", "LUSH_ARTIFACT"], ]; @@ -96,6 +95,17 @@ const ignoredAccessories = [ "HOCUS_POCUS_CIPHER", "TINY_DANCER", "MINIATURIZED_TUBULATOR", + "PUNCHCARD_ARTIFACT", + "HARMONIOUS_SURGERY_TOOLKIT", + "CRUX_TALISMAN_1", + "CRUX_TALISMAN_2", + "CRUX_TALISMAN_3", + "CRUX_TALISMAN_4", + "CRUX_TALISMAN_5", + "CRUX_TALISMAN_6", + "WARDING_TRINKET", + "RING_OF_BROKEN_LOVE", + "GARLIC_FLAVORED_GUMMY_BEAR", ]; export const accessoryAliases = { From 38777457bd5d3e3f77ee7e497eb9e17105b5bab2 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Fri, 23 Jun 2023 19:50:30 +0200 Subject: [PATCH 43/47] fix: tier boosted unknown pets missing rarity --- src/lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.js b/src/lib.js index 868c9fe587..a3cad4debb 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2571,7 +2571,7 @@ export async function getPets(profile, calculated) { const petData = constants.PET_DATA[pet.type] ?? { head: "/head/bc8ea1f51f253ff5142ca11ae45193a4ad8c3ab5e9c6eec8ba7a4fcb7bac40", type: "???", - maxTier: "LEGENDARY", + maxTier: "legendary", maxLevel: 100, emoji: "❓", }; From 7f3f05cda1963da1f55b7bbd8f2a618bc55855fa Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Fri, 23 Jun 2023 19:50:55 +0200 Subject: [PATCH 44/47] build(deps): bump skyhelper-networth to 1.14.1 --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7039ccf6d6..b8b7dafe74 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "sharp": "^0.30.7", "sitemap": "^7.1.1", "skinview3d": "^2.2.1", - "skyhelper-networth": "^1.12.10", + "skyhelper-networth": "^1.14.1", "tippy.js": "^6.3.7", "twemoji": "^14.0.2", "upng-js": "^2.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a98ba6a873..e5eabcdd62 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -101,8 +101,8 @@ dependencies: specifier: ^2.2.1 version: 2.2.1 skyhelper-networth: - specifier: ^1.12.10 - version: 1.12.10 + specifier: ^1.14.1 + version: 1.14.1 tippy.js: specifier: ^6.3.7 version: 6.3.7 @@ -4138,8 +4138,8 @@ packages: three: 0.136.0 dev: false - /skyhelper-networth@1.12.10: - resolution: {integrity: sha512-QGPEGesL2G9uExSO26ww/WxXU31m1yBnhQOHw5OjNrXo5/JmpaelIh1BCyTaXklsornPdy2gFxpu/bWPPArdFg==} + /skyhelper-networth@1.14.1: + resolution: {integrity: sha512-UsRTBiR3Q7ZjeDaT4VlMYq1z27gb1I3SZ7qGowWGNK6TyoSFAIeEbB/JWmaLmfj8Az6gh4GRXS2aHP0JDoVxHg==} dependencies: axios: 0.27.2 prismarine-nbt: 2.2.1 From d29b6bb9594bb5706d8b11af624f46e908375f19 Mon Sep 17 00:00:00 2001 From: Zickles <76439587+Zickles@users.noreply.github.com> Date: Wed, 28 Jun 2023 08:06:20 -0400 Subject: [PATCH 45/47] fix maxLevel --- src/lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.js b/src/lib.js index 1d81b98319..88078a32e0 100644 --- a/src/lib.js +++ b/src/lib.js @@ -2210,7 +2210,7 @@ export async function getStats( output.skyblock_level = { xp: userProfile.leveling?.experience || 0, level: Math.floor(userProfile.leveling?.experience / 100 || 0), - maxLevel: 386, + maxLevel: 416, progress: (userProfile.leveling?.experience % 100) / 100 || 0, xpCurrent: userProfile.leveling?.experience % 100 || 0, xpForNext: 100, From d831eedbdedd607a1fd95a5fbc1f7014e8b9c013 Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Fri, 30 Jun 2023 15:48:56 -0700 Subject: [PATCH 46/47] fix: add missing bracket --- common/constants/stats.js | 1 + 1 file changed, 1 insertion(+) diff --git a/common/constants/stats.js b/common/constants/stats.js index d21115bbe1..1c94bd4eb0 100644 --- a/common/constants/stats.js +++ b/common/constants/stats.js @@ -254,6 +254,7 @@ export const STATS_DATA = { symbol: "ф", suffix: "", color: "a", + }, undead: { name: "Undead", nameLore: "Undead", From 7630e964cf3fc1e07258ed6c86b82a994afade6e Mon Sep 17 00:00:00 2001 From: metalcupcake5 Date: Fri, 30 Jun 2023 15:49:27 -0700 Subject: [PATCH 47/47] refactor: typo --- src/constants/pet-stats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/pet-stats.js b/src/constants/pet-stats.js index 1756c35670..7963cbed17 100644 --- a/src/constants/pet-stats.js +++ b/src/constants/pet-stats.js @@ -1857,7 +1857,7 @@ class Spider extends Pet { return { name: "§6Web Battlefield", desc: [ - `§7Killing mob grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`, + `§7Killing mobs grants §c+6 ${SYMBOLS.strength} Strength §7and §b+1 ${SYMBOLS.magic_find} Magic Find §7for §a40s §7to all players staying within §a20 §7blocks of where they died. §8Stacks up to 10 times.`, ], }; }