From 50bde6f8d2491a31437630120ed5c04303b0978a Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Sat, 20 Jan 2024 20:53:16 +0100 Subject: [PATCH] fix: clean code & fix bestiary --- src/constants/bestiary.js | 893 ++++++++++++++---------------- src/stats/bestiary.js | 47 +- views/sections/stats/bestiary.ejs | 96 ++-- 3 files changed, 472 insertions(+), 564 deletions(-) diff --git a/src/constants/bestiary.js b/src/constants/bestiary.js index 0508d4e798..5c7aaf2a9f 100644 --- a/src/constants/bestiary.js +++ b/src/constants/bestiary.js @@ -272,7 +272,7 @@ export const BESTIARY = { bracket: 5, }, { - name: "Brood Mother", + name: "Broodmother", cap: 400, texture: "/head/cf0622b3998d42b34d5bc760bb2c83fdbc6e68fab05b7ea17b35097ed81190d6", mobs: ["brood_mother_spider_12"], @@ -311,7 +311,7 @@ export const BESTIARY = { "splitter_spider_silverfish_50", "jockey_shot_silverfish_42", ], - bracket: 1, + bracket: 2, }, { name: "Spider Jockey", @@ -401,7 +401,7 @@ export const BESTIARY = { { name: "Obsidian Defender", cap: 10000, - texture: "/head/bce155224ea4bc49a8e9190737cb0417d8a7c38a037d8d0382dde4829c103590", + texture: "/item/OBSIDIAN", mobs: ["obsidian_wither_55"], bracket: 5, }, @@ -541,12 +541,12 @@ export const BESTIARY = { name: "Pigman", cap: 10000, texture: "/head/74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb", - mobs: ["kada_knight_90", "magma_cube_rider_90", "pigman_12"], + mobs: ["pigman_12"], bracket: 3, }, { name: "Wither Skeleton", - cap: 10000, + cap: 3000, texture: "/head/7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8", mobs: ["wither_skeleton_70"], bracket: 4, @@ -784,7 +784,7 @@ export const BESTIARY = { bracket: 3, }, { - name: "Bal", + name: "§öBal", cap: 250, texture: "/head/a1c97a06efde04d00287bf20416404ab2103e10f08623087e1b0c1264a1c0f0c", mobs: ["bal_boss_100"], @@ -831,53 +831,39 @@ export const BESTIARY = { texture: "/item/PUMPKIN", mobs: [ { - name: "Crazy Witch", - cap: 750, - texture: "/head/fce6604157fc4ab5591e4bcf507a749918ee9c41e357d47376e0ee7342074c90", - mobs: ["batty_witch_60"], - bracket: 2, - }, - { - name: "Headless Horseman", - cap: 500, - texture: "/head/4c6570f1242992f6eba23ee582598c39e3e745383273deef8b3977583fe3cf5", - mobs: ["horseman_horse_100"], + name: "Grim Reaper", + cap: 100, + texture: "/head/68a6194a5b217b9f5a3dfecce5f3efe6967405039b82fa0c4e8959175f32e75a", + mobs: ["grim_reaper_190"], bracket: 7, }, { - name: "Phantom Spirit", - cap: 750, - texture: "/head/653b2f7c5e177bd67cead30d0ee53425c7684c975c8c2a5273a09ca49a1f6cdd", - mobs: ["phantom_spirit_35"], - bracket: 2, - }, - { - name: "Scary Jerry", - cap: 750, - texture: "/head/df202dc24d15f7ce36e02fb4b3e8153b146ab9c1724aaa5d484c741da0eeb6fd", - mobs: ["scary_jerry_30"], - bracket: 2, + name: "Nightmare", + cap: 1000, + texture: "/head/578211e1b4d99d1c7bfda4838e48fc884c3eae376f58d932bc2f78b0a919f8e7", + mobs: ["nightmare_24"], + bracket: 4, }, { - name: "Trick or Treater", - cap: 750, - texture: "/head/d7cbe061b445b88cb2df59accc8d2c1c12118fe0b2127e6e75813550adac67cf", - mobs: ["trick_or_treater_30"], - bracket: 2, + name: "Phantom Fisher", + cap: 250, + texture: "/head/6c9bc01f299f98d565a27ba10a1293915ae8beeefb8a67845e2331dbe6fd6fd6", + mobs: ["phantom_fisherman_160"], + bracket: 6, }, { - name: "Wither Gourd", - cap: 750, - texture: "/head/68f2ffc6fb4e9959b9a7a317f51a6775a159ddc2241dbd6c774d3ac08b6", - mobs: ["wither_gourd_40"], - bracket: 2, + name: "Scarecrow", + cap: 4000, + texture: "/item/PUMPKIN", + mobs: ["scarecrow_9"], + bracket: 3, }, { - name: "Wraith", - cap: 750, - texture: "/head/aeabc3075cf41f38e6df1236b95caafcba1bee22c49d804b9427488c2f6e0efc", - mobs: ["wraith_50"], - bracket: 2, + name: "Werewolf", + cap: 1000, + texture: "/head/ce4606c6d973a999aec1687c7e075f7d37db8185e88b844507f16b3e2b3eb690", + mobs: ["werewolf_50"], + bracket: 4, }, ], }, @@ -933,13 +919,6 @@ export const BESTIARY = { name: "Jerry", texture: "/head/45f729736996a38e186fe9fe7f5a04b387ed03f3871ecc82fa78d8a2bdd31109", mobs: [ - { - name: "Green Jerry", - cap: 75, - texture: "/head/822d8e751c8f2fd4c8942c44bdb2f5ca4d8ae8e575ed3eb34c18a86e93b", - mobs: ["mayor_jerry_green_1"], - bracket: 4, - }, { name: "Blue Jerry", cap: 30, @@ -947,13 +926,6 @@ export const BESTIARY = { mobs: ["mayor_jerry_blue_2"], bracket: 5, }, - { - name: "Purple Jerry", - cap: 25, - texture: "/head/822d8e751c8f2fd4c8942c44bdb2f5ca4d8ae8e575ed3eb34c18a86e93b", - mobs: ["mayor_jerry_purple_3"], - bracket: 6, - }, { name: "Golden Jerry", cap: 20, @@ -961,6 +933,20 @@ export const BESTIARY = { mobs: ["mayor_jerry_golden_5"], bracket: 7, }, + { + name: "Green Jerry", + cap: 75, + texture: "/head/822d8e751c8f2fd4c8942c44bdb2f5ca4d8ae8e575ed3eb34c18a86e93b", + mobs: ["mayor_jerry_green_1"], + bracket: 4, + }, + { + name: "Purple Jerry", + cap: 25, + texture: "/head/822d8e751c8f2fd4c8942c44bdb2f5ca4d8ae8e575ed3eb34c18a86e93b", + mobs: ["mayor_jerry_purple_3"], + bracket: 6, + }, ], }, kuudra: { @@ -1109,372 +1095,329 @@ export const BESTIARY = { ], }, fishing: { - fishing: { - name: "Fishing", - texture: "/head/d88ba8bb50b79e441e47b7e452764d5fff6693779d2dadd9f7f52f98d7ea0", - mobs: [ - { - name: "Agarimoo", - cap: 4000, - texture: "/head/3d597f77cde32c9ac9b06f82fcf7c9cb500facc14bff166222b24be39962f0ef", - mobs: ["agarimoo_35"], - bracket: 3, - }, - { - name: "Carrot King", - cap: 400, - texture: "/head/1f59851de93f4c6547f809ca3aed189e94bbf4f888f1f75208e94c3733852a1", - mobs: ["carrot_king_25"], - bracket: 5, - }, - { - name: "Catfish", - cap: 1000, - texture: "/head/e18f77331b2cab64e2b430fa8e4273e4db7f78fcdfa4b1a9a418af47375056eb", - mobs: ["catfish_23"], - bracket: 4, - }, - { - name: "Deep Sea Protector", - cap: 1000, - texture: "/head/22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", - mobs: ["deep_sea_protector_60"], - bracket: 4, - }, - { - name: "Guardian Defender", - cap: 1000, - texture: "/head/221025434045bda7025b3e514b316a4b770c6faa4ba9adb4be3809526db77f9d", - mobs: ["guardian_defender_45"], - bracket: 4, - }, - { - name: "Night Squid", - cap: 1000, - texture: "/head/d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8", - mobs: ["night_squid_6"], - bracket: 4, - }, - { - name: "Oasis Rabbit", - cap: 300, - texture: "/head/1f59851de93f4c6547f809ca3aed189e94bbf4f888f1f75208e94c3733852a1", - mobs: ["oasis_rabbit_10"], - bracket: 3, - }, - { - name: "Oasis Sheep", - cap: 300, - texture: "/head/292df216ecd27624ac771bacfbfe006e1ed84a79e9270be0f88e9c8791d1ece4", - mobs: ["oasis_sheep_10"], - bracket: 3, - }, - { - name: "Poisoned Water Worm", - cap: 1000, - texture: "/head/5a1a0831aa03afb4212adcbb24e5dfaa7f476a1173fce259ef75a85855", - mobs: ["poisoned_water_worm_25"], - bracket: 4, - }, - { - name: "Rider of the Deep", - cap: 4000, - texture: "/head/cfb7dbbe002f69463768113c1e925848197f59b62694ce105792dd5a52dc17a1", - mobs: ["zombie_deep_20", "chicken_deep_20"], - bracket: 3, - }, - { - name: "Sea Archer", - cap: 4000, - texture: "/head/88eb68a4d38e9f446b8e99275f160302f366ef10216abf948487e582512bd0f3", - mobs: ["sea_archer_15"], - bracket: 3, - }, - { - name: "Sea Guardian", - cap: 4000, - texture: "/head/221025434045bda7025b3e514b316a4b770c6faa4ba9adb4be3809526db77f9d", - mobs: ["sea_guardian_10"], - bracket: 3, - }, - { - name: "Sea Leech", - cap: 1000, - texture: "/head/da91dab8391af5fda54acd2c0b18fbd819b865e1a8f1d623813fa761e924540", - mobs: ["sea_leech_30"], - bracket: 4, - }, - { - name: "Sea Walker", - cap: 4000, - texture: "/head/d88ba8bb50b79e441e47b7e452764d5fff6693779d2dadd9f7f52f98d7ea0", - mobs: ["sea_walker_4"], - bracket: 3, - }, - { - name: "Sea Witch", - cap: 4000, - texture: "/head/fce6604157fc4ab5591e4bcf507a749918ee9c41e357d47376e0ee7342074c90", - mobs: ["sea_witch_15"], - bracket: 3, - }, - { - name: "Squid", - cap: 10000, - texture: "/head/d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8", - mobs: ["pond_squid_1"], - bracket: 2, - }, - { - name: "The Sea Emperor", - cap: 100, - texture: "/head/044b653bbb727b5c865a8efc75092afe939e2c3e68613db9abae4f1b64f99f8", - mobs: ["skeleton_emperor_150", "guardian_emperor_150"], - bracket: 7, - }, - { - name: "Water Hydra", - cap: 400, - texture: "/head/21ffbda92442873d54051e4e17ea47278cb3b747d798070ba83bc4a9de58dd", - mobs: ["water_hydra_100"], - bracket: 5, - }, - { - name: "Water Worm", - cap: 1000, - texture: "/head/da91dab8391af5fda54acd2c0b18fbd819b865e1a8f1d623813fa761e924540", - mobs: ["water_worm_20"], - bracket: 4, - }, - { - name: "Abyssal Miner", - cap: 250, - texture: "/head/58be05cfae2c6a7d47da2ce88b3e00c72a145cc3218f041b3dd5bd5fa5ca827", - mobs: ["zombie_miner_150"], - bracket: 6, - }, - ], - }, - lava: { - name: "Lava Fishing", - texture: "/head/1642a06cd75ef307c1913ba7a224fb2082d8a2c5254fd1bf006125a087a9a868", - mobs: [ - { - name: "Fire Eel", - cap: 1000, - texture: "/head/c63704a7fc7d437f7b923e23e9a08ae3bbe28937df4dafa9e3e8725b2ce4afa5", - mobs: ["fire_eel_240"], - bracket: 4, - }, - { - name: "Flaming Worm", - cap: 4000, - texture: "/head/da91dab8391af5fda54acd2c0b18fbd819b865e1a8f1d623813fa761e924540", - mobs: ["flaming_worm_50"], - bracket: 3, - }, - { - name: "Lava Blaze", - cap: 1000, - texture: "/head/b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0", - mobs: ["lava_blaze_100"], - bracket: 4, - }, - { - name: "Lava Flame", - cap: 1000, - texture: "/head/b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0", - mobs: ["lava_flame_230"], - bracket: 4, - }, - { - name: "Lava Leech", - cap: 4000, - texture: "/head/5a1a0831aa03afb4212adcbb24e5dfaa7f476a1173fce259ef75a85855", - mobs: ["lava_leech_220"], - bracket: 3, - }, - { - name: "Lava Pigman", - cap: 1000, - texture: "/head/74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb", - mobs: ["lava_pigman_100"], - bracket: 4, - }, - { - name: "Lord Jawbus", - cap: 250, - texture: "/head/22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", - mobs: ["lord_jawbus_600"], - bracket: 6, - }, - { - name: "Magma Slug", - cap: 10000, - texture: "/head/38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", - mobs: ["magma_slug_200"], - bracket: 2, - }, - { - name: "Moogma", - cap: 4000, - texture: "/head/2b52841f2fd589e0bc84cbabf9e1c27cb70cac98f8d6b3dd065e55a4dcb70d77", - mobs: ["moogma_210"], - bracket: 3, - }, - { - name: "Plhlegblast", - cap: 7, - texture: "/head/d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8", - mobs: ["pond_squid_300"], - bracket: 7, - }, - { - name: "Pyroclastic Worm", - cap: 4000, - texture: "/head/38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", - mobs: ["pyroclastic_worm_240"], - bracket: 3, - }, - { - name: "Taurus", - cap: 1000, - texture: "/head/1642a06cd75ef307c1913ba7a224fb2082d8a2c5254fd1bf006125a087a9a868", - mobs: ["pig_rider_250"], - bracket: 4, - }, - { - name: "Thunder", - cap: 400, - texture: "/head/e92089618435a0ef63e95ee95a92b83073f8c33fa77dc5365199bad33b6256", - mobs: ["thunder_400"], - bracket: 5, - }, - ], - }, - spooky_festival: { - name: "Spooky Festival Fishing", - texture: "/item/PUMPKIN", - mobs: [ - { - name: "Grim Reaper", - cap: 100, - texture: "/head/68a6194a5b217b9f5a3dfecce5f3efe6967405039b82fa0c4e8959175f32e75a", - mobs: ["grim_reaper_190"], - bracket: 7, - }, - { - name: "Nightmare", - cap: 1000, - texture: "/head/578211e1b4d99d1c7bfda4838e48fc884c3eae376f58d932bc2f78b0a919f8e7", - mobs: ["nightmare_24"], - bracket: 4, - }, - { - name: "Phantom Fisher", - cap: 250, - texture: "/head/6c9bc01f299f98d565a27ba10a1293915ae8beeefb8a67845e2331dbe6fd6fd6", - mobs: ["phantom_fisherman_160"], - bracket: 6, - }, - { - name: "Scarecrow", - cap: 4000, - texture: "/item/PUMPKIN", - mobs: ["scarecrow_9"], - bracket: 3, - }, - { - name: "Werewolf", - cap: 1000, - texture: "/head/ce4606c6d973a999aec1687c7e075f7d37db8185e88b844507f16b3e2b3eb690", - mobs: ["werewolf_50"], - bracket: 4, - }, - ], - }, - fishing_festival: { - name: "Fishing Festival", - texture: "/head/ea575977e6bd0c7add94e2d8fdcc2af77e36c44d6b4c67788862a94000be6399", - mobs: [ - { - name: "Blue Shark", - cap: 1000, - texture: "/head/381e1d06e5f0654a682a3264905b5dc4b8e7b613ab6697ac45f2e0da3bc9b4fd", - mobs: ["blue_shark_20"], - bracket: 4, - }, - { - name: "Great White Shark", - cap: 400, - texture: "/head/de2e5865429dd2520bbc703e4a9f2f1abd5e1cc5d31b8a9acbf74b7a97c937aa", - mobs: ["great_white_shark_180"], - bracket: 5, - }, - { - name: "Nurse Shark", - cap: 4000, - texture: "/head/2067ccefba5d811f47e3e18438556b704393aafcafccedd5d0981999286f598a", - mobs: ["nurse_shark_6"], - bracket: 3, - }, - { - name: "Tiger Shark", - cap: 1000, - texture: "/head/ea575977e6bd0c7add94e2d8fdcc2af77e36c44d6b4c67788862a94000be6399", - mobs: ["tiger_shark_50"], - bracket: 4, - }, - ], - }, - winter: { - name: "Winter Fishing", - texture: "/head/4dd2d3c6d01c276226c7b0d377122e1a647b2ffb5b9b54fa98eac37bb1d09d3a", - mobs: [ - { - name: "Frosty", - cap: 4000, - texture: "/item/PUMPKIN", - mobs: ["frosty_the_snowman_13"], - bracket: 3, - }, - { - name: "Frozen Steve", - cap: 4000, - texture: "/head/54690f5aa6d0e800f9b8d1890fc158b921819a81dfd7342a2170e7efc46b9ed7", - mobs: ["frozen_steve_7"], - bracket: 3, - }, - { - name: "Grinch", - cap: 250, - texture: "/head/2508e4a2f88502c019652b2437b76c82fedff9091389d88118ecc673f628b547", - mobs: ["grinch_21"], - bracket: 6, - }, - { - name: "Nutcracker", - cap: 400, - texture: "/head/c2407e66c81b1443c2e7dfc4d6583eb19c622fa22f34fbf99fe6c45f76a", - mobs: ["nutcracker_50"], - bracket: 5, - }, - { - name: "Reindrake", - cap: 100, - texture: "/item/DRAGON_EGG", - mobs: ["reindrake_100"], - bracket: 7, - }, - { - name: "Yeti", - cap: 250, - texture: "/head/4dd2d3c6d01c276226c7b0d377122e1a647b2ffb5b9b54fa98eac37bb1d09d3a", - mobs: ["yeti_175"], - bracket: 6, - }, - ], - }, + name: "Fishing", + texture: "/head/d88ba8bb50b79e441e47b7e452764d5fff6693779d2dadd9f7f52f98d7ea0", + mobs: [ + { + name: "Agarimoo", + cap: 4000, + texture: "/head/3d597f77cde32c9ac9b06f82fcf7c9cb500facc14bff166222b24be39962f0ef", + mobs: ["agarimoo_35"], + bracket: 3, + }, + { + name: "Carrot King", + cap: 400, + texture: "/head/1f59851de93f4c6547f809ca3aed189e94bbf4f888f1f75208e94c3733852a1", + mobs: ["carrot_king_25"], + bracket: 5, + }, + { + name: "Catfish", + cap: 1000, + texture: "/head/e18f77331b2cab64e2b430fa8e4273e4db7f78fcdfa4b1a9a418af47375056eb", + mobs: ["catfish_23"], + bracket: 4, + }, + { + name: "Deep Sea Protector", + cap: 1000, + texture: "/head/22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", + mobs: ["deep_sea_protector_60"], + bracket: 4, + }, + { + name: "Guardian Defender", + cap: 1000, + texture: "/head/221025434045bda7025b3e514b316a4b770c6faa4ba9adb4be3809526db77f9d", + mobs: ["guardian_defender_45"], + bracket: 4, + }, + { + name: "Night Squid", + cap: 1000, + texture: "/head/d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8", + mobs: ["night_squid_6"], + bracket: 4, + }, + { + name: "Oasis Rabbit", + cap: 300, + texture: "/head/1f59851de93f4c6547f809ca3aed189e94bbf4f888f1f75208e94c3733852a1", + mobs: ["oasis_rabbit_10"], + bracket: 3, + }, + { + name: "Oasis Sheep", + cap: 300, + texture: "/head/292df216ecd27624ac771bacfbfe006e1ed84a79e9270be0f88e9c8791d1ece4", + mobs: ["oasis_sheep_10"], + bracket: 3, + }, + { + name: "Poisoned Water Worm", + cap: 1000, + texture: "/head/5a1a0831aa03afb4212adcbb24e5dfaa7f476a1173fce259ef75a85855", + mobs: ["poisoned_water_worm_25"], + bracket: 4, + }, + { + name: "Rider of the Deep", + cap: 4000, + texture: "/head/cfb7dbbe002f69463768113c1e925848197f59b62694ce105792dd5a52dc17a1", + mobs: ["zombie_deep_20", "chicken_deep_20"], + bracket: 3, + }, + { + name: "Sea Archer", + cap: 4000, + texture: "/head/88eb68a4d38e9f446b8e99275f160302f366ef10216abf948487e582512bd0f3", + mobs: ["sea_archer_15"], + bracket: 3, + }, + { + name: "Sea Guardian", + cap: 4000, + texture: "/head/221025434045bda7025b3e514b316a4b770c6faa4ba9adb4be3809526db77f9d", + mobs: ["sea_guardian_10"], + bracket: 3, + }, + { + name: "Sea Leech", + cap: 1000, + texture: "/head/da91dab8391af5fda54acd2c0b18fbd819b865e1a8f1d623813fa761e924540", + mobs: ["sea_leech_30"], + bracket: 4, + }, + { + name: "Sea Walker", + cap: 4000, + texture: "/head/d88ba8bb50b79e441e47b7e452764d5fff6693779d2dadd9f7f52f98d7ea0", + mobs: ["sea_walker_4"], + bracket: 3, + }, + { + name: "Sea Witch", + cap: 4000, + texture: "/head/fce6604157fc4ab5591e4bcf507a749918ee9c41e357d47376e0ee7342074c90", + mobs: ["sea_witch_15"], + bracket: 3, + }, + { + name: "Squid", + cap: 10000, + texture: "/head/d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8", + mobs: ["pond_squid_1"], + bracket: 2, + }, + { + name: "The Sea Emperor", + cap: 100, + texture: "/head/044b653bbb727b5c865a8efc75092afe939e2c3e68613db9abae4f1b64f99f8", + mobs: ["skeleton_emperor_150", "guardian_emperor_150"], + bracket: 7, + }, + { + name: "Water Hydra", + cap: 400, + texture: "/head/21ffbda92442873d54051e4e17ea47278cb3b747d798070ba83bc4a9de58dd", + mobs: ["water_hydra_100"], + bracket: 5, + }, + { + name: "Water Worm", + cap: 1000, + texture: "/head/da91dab8391af5fda54acd2c0b18fbd819b865e1a8f1d623813fa761e924540", + mobs: ["water_worm_20"], + bracket: 4, + }, + { + name: "Abyssal Miner", + cap: 250, + texture: "/head/58be05cfae2c6a7d47da2ce88b3e00c72a145cc3218f041b3dd5bd5fa5ca827", + mobs: ["zombie_miner_150"], + bracket: 6, + }, + ], + }, + lava: { + name: "Lava", + texture: "/head/1642a06cd75ef307c1913ba7a224fb2082d8a2c5254fd1bf006125a087a9a868", + mobs: [ + { + name: "Fire Eel", + cap: 1000, + texture: "/head/c63704a7fc7d437f7b923e23e9a08ae3bbe28937df4dafa9e3e8725b2ce4afa5", + mobs: ["fire_eel_240"], + bracket: 4, + }, + { + name: "Flaming Worm", + cap: 4000, + texture: "/head/da91dab8391af5fda54acd2c0b18fbd819b865e1a8f1d623813fa761e924540", + mobs: ["flaming_worm_50"], + bracket: 3, + }, + { + name: "Lava Blaze", + cap: 1000, + texture: "/head/b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0", + mobs: ["lava_blaze_100"], + bracket: 4, + }, + { + name: "Lava Flame", + cap: 1000, + texture: "/head/b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0", + mobs: ["lava_flame_230"], + bracket: 4, + }, + { + name: "Lava Leech", + cap: 4000, + texture: "/head/5a1a0831aa03afb4212adcbb24e5dfaa7f476a1173fce259ef75a85855", + mobs: ["lava_leech_220"], + bracket: 3, + }, + { + name: "Lava Pigman", + cap: 1000, + texture: "/head/74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb", + mobs: ["lava_pigman_100"], + bracket: 4, + }, + { + name: "Lord Jawbus", + cap: 250, + texture: "/head/22bcaceeb4162f400d44743315932ac820d3119ac8986a0161a726161ccc93fc", + mobs: ["lord_jawbus_600"], + bracket: 6, + }, + { + name: "Magma Slug", + cap: 10000, + texture: "/head/38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", + mobs: ["magma_slug_200"], + bracket: 2, + }, + { + name: "Moogma", + cap: 4000, + texture: "/head/2b52841f2fd589e0bc84cbabf9e1c27cb70cac98f8d6b3dd065e55a4dcb70d77", + mobs: ["moogma_210"], + bracket: 3, + }, + { + name: "Plhlegblast", + cap: 7, + texture: "/head/d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8", + mobs: ["pond_squid_300"], + bracket: 7, + }, + { + name: "Pyroclastic Worm", + cap: 4000, + texture: "/head/38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429", + mobs: ["pyroclastic_worm_240"], + bracket: 3, + }, + { + name: "Taurus", + cap: 1000, + texture: "/head/1642a06cd75ef307c1913ba7a224fb2082d8a2c5254fd1bf006125a087a9a868", + mobs: ["pig_rider_250"], + bracket: 4, + }, + { + name: "Thunder", + cap: 400, + texture: "/head/e92089618435a0ef63e95ee95a92b83073f8c33fa77dc5365199bad33b6256", + mobs: ["thunder_400"], + bracket: 5, + }, + ], + }, + fishing_festival: { + name: "Fishing Festival", + texture: "/head/ea575977e6bd0c7add94e2d8fdcc2af77e36c44d6b4c67788862a94000be6399", + mobs: [ + { + name: "Blue Shark", + cap: 1000, + texture: "/head/381e1d06e5f0654a682a3264905b5dc4b8e7b613ab6697ac45f2e0da3bc9b4fd", + mobs: ["blue_shark_20"], + bracket: 4, + }, + { + name: "Great White Shark", + cap: 400, + texture: "/head/de2e5865429dd2520bbc703e4a9f2f1abd5e1cc5d31b8a9acbf74b7a97c937aa", + mobs: ["great_white_shark_180"], + bracket: 5, + }, + { + name: "Nurse Shark", + cap: 4000, + texture: "/head/2067ccefba5d811f47e3e18438556b704393aafcafccedd5d0981999286f598a", + mobs: ["nurse_shark_6"], + bracket: 3, + }, + { + name: "Tiger Shark", + cap: 1000, + texture: "/head/ea575977e6bd0c7add94e2d8fdcc2af77e36c44d6b4c67788862a94000be6399", + mobs: ["tiger_shark_50"], + bracket: 4, + }, + ], + }, + winter: { + name: "Winter", + texture: "/head/4dd2d3c6d01c276226c7b0d377122e1a647b2ffb5b9b54fa98eac37bb1d09d3a", + mobs: [ + { + name: "Frosty", + cap: 4000, + texture: "/item/PUMPKIN", + mobs: ["frosty_the_snowman_13"], + bracket: 3, + }, + { + name: "Frozen Steve", + cap: 4000, + texture: "/head/54690f5aa6d0e800f9b8d1890fc158b921819a81dfd7342a2170e7efc46b9ed7", + mobs: ["frozen_steve_7"], + bracket: 3, + }, + { + name: "Grinch", + cap: 250, + texture: "/head/2508e4a2f88502c019652b2437b76c82fedff9091389d88118ecc673f628b547", + mobs: ["grinch_21"], + bracket: 6, + }, + { + name: "Nutcracker", + cap: 400, + texture: "/head/c2407e66c81b1443c2e7dfc4d6583eb19c622fa22f34fbf99fe6c45f76a", + mobs: ["nutcracker_50"], + bracket: 5, + }, + { + name: "Reindrake", + cap: 100, + texture: "/item/DRAGON_EGG", + mobs: ["reindrake_100"], + bracket: 7, + }, + { + name: "Yeti", + cap: 250, + texture: "/head/4dd2d3c6d01c276226c7b0d377122e1a647b2ffb5b9b54fa98eac37bb1d09d3a", + mobs: ["yeti_175"], + bracket: 6, + }, + ], }, catacombs: { name: "Catacombs", @@ -1508,30 +1451,6 @@ export const BESTIARY = { ], bracket: 7, }, - { - name: "Lonely Spider", - texture: "/head/cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", - cap: 25000, - mobs: [ - "lonely_spider_35", - "lonely_spider_55", - "lonely_spider_65", - "lonely_spider_75", - "lonely_spider_85", - "lonely_spider_95", - "lonely_spider_105", - "lonely_spider_115", - "master_lonely_spider_35", - "master_lonely_spider_55", - "master_lonely_spider_65", - "master_lonely_spider_75", - "master_lonely_spider_85", - "master_lonely_spider_95", - "master_lonely_spider_105", - "master_lonely_spider_115", - ], - bracket: 4, - }, { name: "Bat", cap: 1000, @@ -1563,6 +1482,30 @@ export const BESTIARY = { ], bracket: 4, }, + { + name: "Lonely Spider", + cap: 25000, + texture: "/head/cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1", + mobs: [ + "lonely_spider_35", + "lonely_spider_55", + "lonely_spider_65", + "lonely_spider_75", + "lonely_spider_85", + "lonely_spider_95", + "lonely_spider_105", + "lonely_spider_115", + "master_lonely_spider_35", + "master_lonely_spider_55", + "master_lonely_spider_65", + "master_lonely_spider_75", + "master_lonely_spider_85", + "master_lonely_spider_95", + "master_lonely_spider_105", + "master_lonely_spider_115", + ], + bracket: 4, + }, { name: "Crypt Dreadlord", cap: 25000, @@ -1637,7 +1580,7 @@ export const BESTIARY = { }, { name: "Fels", - cap: 25000, + cap: 10000, texture: "/head/bc6a4072c72e27b03234d650b0e52815d84657536daa23d1140b4c7b7f8d1dde", mobs: [ "tentaclees_90", @@ -1986,22 +1929,6 @@ export const BESTIARY = { ], bracket: 3, }, - { - name: "Withermancer", - texture: "/head/f5ec964645a8efac76be2f160d7c9956362f32b6517390c59c3085034f050cff", - cap: 25000, - mobs: [ - "crypt_witherskeleton_90", - "crypt_witherskeleton_100", - "crypt_witherskeleton_110", - "crypt_witherskeleton_120", - "master_crypt_witherskeleton_90", - "master_crypt_witherskeleton_100", - "master_crypt_witherskeleton_110", - "master_crypt_witherskeleton_120", - ], - bracket: 4, - }, { name: "Terracotta", cap: 40000, @@ -2079,6 +2006,22 @@ export const BESTIARY = { mobs: ["wither_miner_100", "master_wither_miner_100"], bracket: 4, }, + { + name: "Withermancer", + cap: 25000, + texture: "/head/f5ec964645a8efac76be2f160d7c9956362f32b6517390c59c3085034f050cff", + mobs: [ + "crypt_witherskeleton_90", + "crypt_witherskeleton_100", + "crypt_witherskeleton_110", + "crypt_witherskeleton_120", + "master_crypt_witherskeleton_90", + "master_crypt_witherskeleton_100", + "master_crypt_witherskeleton_110", + "master_crypt_witherskeleton_120", + ], + bracket: 4, + }, { name: "Zombie Commander", cap: 3000, @@ -2158,71 +2101,71 @@ export const BESTIARY = { mobs: [ { name: "Beetle", - texture: "/head/35590d5326a65d55b2bc60c5cd194c13d6125658d3d4c60ece1d9becfacea93c", cap: 250, + texture: "/head/35590d5326a65d55b2bc60c5cd194c13d6125658d3d4c60ece1d9becfacea93c", mobs: ["pest_beetle_1"], bracket: 6, }, { name: "Cricket", - texture: "/head/7b50d6e6bf907fa4e3c44f465cd2c4f79124b5703a2df22fac6376b1b91703cf", cap: 250, + texture: "/head/7b50d6e6bf907fa4e3c44f465cd2c4f79124b5703a2df22fac6376b1b91703cf", mobs: ["pest_cricket_1"], bracket: 6, }, { name: "Earthworm", - texture: "/head/6403ba4027a333d8d2fd32ab59d1cfdbaa7d908d80d2381db2a69cbe65450ad8", cap: 250, + texture: "/head/6403ba4027a333d8d2fd32ab59d1cfdbaa7d908d80d2381db2a69cbe65450ad8", mobs: ["pest_worm_1"], bracket: 6, }, { name: "Fly", - texture: "/head/9d90e777826a52461368e26d1b2e19bfa1ba582d602483e545f4124d0f731842", cap: 250, + texture: "/head/9d90e777826a52461368e26d1b2e19bfa1ba582d602483e545f4124d0f731842", mobs: ["pest_fly_1"], bracket: 6, }, { name: "Locust", - texture: "/head/4b24a482a32db1ea78fb98060b0c2fa4a373cbd18a68edddeb7419455a59cda9", cap: 250, + texture: "/head/4b24a482a32db1ea78fb98060b0c2fa4a373cbd18a68edddeb7419455a59cda9", mobs: ["pest_locust_1"], bracket: 6, }, { name: "Mite", - texture: "/head/be6baf6431a9daa2ca604d5a3c26e9a761d5952f0817174a4fe0b764616e21ff", cap: 250, + texture: "/head/be6baf6431a9daa2ca604d5a3c26e9a761d5952f0817174a4fe0b764616e21ff", mobs: ["pest_mite_1"], bracket: 6, }, { name: "Mosquito", - texture: "/head/52a9fe05bc663efcd12e56a3ccc5ec035bf577b78708548b6f4ffcf1d30eccfe", cap: 250, + texture: "/head/52a9fe05bc663efcd12e56a3ccc5ec035bf577b78708548b6f4ffcf1d30eccfe", mobs: ["pest_mosquito_1"], bracket: 6, }, { name: "Moth", - texture: "/head/65485c4b34e5b5470be94de100e61f7816f81bc5a11dfdf0eccf890172da5d0a", cap: 250, + texture: "/head/65485c4b34e5b5470be94de100e61f7816f81bc5a11dfdf0eccf890172da5d0a", mobs: ["pest_moth_1"], bracket: 6, }, { name: "Rat", - texture: "/head/a8abb471db0ab78703011979dc8b40798a941f3a4dec3ec61cbeec2af8cffe8", cap: 250, + texture: "/head/a8abb471db0ab78703011979dc8b40798a941f3a4dec3ec61cbeec2af8cffe8", mobs: ["pest_rat_1"], bracket: 6, }, { name: "Slug", - texture: "/head/7a79d0fd677b54530961117ef84adc206e2cc5045c1344d61d776bf8ac2fe1ba", cap: 250, + texture: "/head/7a79d0fd677b54530961117ef84adc206e2cc5045c1344d61d776bf8ac2fe1ba", mobs: ["pest_slug_1"], bracket: 6, }, diff --git a/src/stats/bestiary.js b/src/stats/bestiary.js index 1932e5762d..b90bff0092 100644 --- a/src/stats/bestiary.js +++ b/src/stats/bestiary.js @@ -33,44 +33,31 @@ export function getBestiary(userProfile) { } const output = {}; - let tiersUnlocked = 0, - totalTiers = 0; for (const [category, data] of Object.entries(constants.BESTIARY)) { - const { name, texture, mobs } = data; output[category] = { - name, - texture, + name: data.name, + texture: data.texture, + mobs: formatBestiaryMobs(userProfile, data.mobs), }; - if (category === "fishing") { - for (const [key, value] of Object.entries(data)) { - output[category][key] = { - name: value.name, - texture: value.texture, - }; - - output[category][key].mobs = formatBestiaryMobs(userProfile, value.mobs); + output[category].mobsUnlocked = output[category].mobs.length; + output[category].mobsMaxed = output[category].mobs.filter((mob) => mob.tier === mob.maxTier).length; + } - tiersUnlocked += output[category][key].mobs.reduce((acc, cur) => acc + cur.tier, 0); - totalTiers += output[category][key].mobs.reduce((acc, cur) => acc + cur.maxTier, 0); - output[category][key].mobsUnlocked = output[category][key].mobs.length; - output[category][key].mobsMaxed = output[category][key].mobs.filter((mob) => mob.tier === mob.maxTier).length; - } - } else { - output[category].mobs = formatBestiaryMobs(userProfile, mobs); - output[category].mobsUnlocked = output[category].mobs.length; - output[category].mobsMaxed = output[category].mobs.filter((mob) => mob.tier === mob.maxTier).length; + const mobs = Object.values(output).flatMap((category) => Object.values(category.mobs)); - tiersUnlocked += output[category].mobs.reduce((acc, cur) => acc + cur.tier, 0); - totalTiers += output[category].mobs.reduce((acc, cur) => acc + cur.maxTier, 0); - } - } + const maxMilestone = mobs.map((mob) => mob.maxTier).reduce((acc, cur) => acc + cur, 0); + const milestone = mobs.map((mob) => mob.tier).reduce((acc, cur) => acc + cur, 0); + const familiesMaxed = mobs.filter((mob) => mob.tier === mob.maxTier).length; + const familiesUnlocked = mobs.filter((mob) => mob.kills > 0).length; + const totalFamilies = mobs.length; return { categories: output, - tiersUnlocked, - totalTiers, - milestone: tiersUnlocked / 10, - maxMilestone: totalTiers / 10, + milestone, + maxMilestone, + familiesUnlocked, + totalFamilies, + familiesMaxed, }; } diff --git a/views/sections/stats/bestiary.ejs b/views/sections/stats/bestiary.ejs index e6e98120b1..512ce2e481 100644 --- a/views/sections/stats/bestiary.ejs +++ b/views/sections/stats/bestiary.ejs @@ -3,71 +3,49 @@

Bestiary

- <% max = calculated.bestiary.tiersUnlocked === calculated.bestiary.totalTiers ? 'golden-text' : ''; %> - Tiers Unlocked: <%= calculated.bestiary.tiersUnlocked.toLocaleString() %> / <%= calculated.bestiary.totalTiers.toLocaleString() %>
- Milestone: <%= calculated.bestiary.milestone %> / <%= calculated.bestiary.maxMilestone %> + <% max = calculated.bestiary.milestone === calculated.bestiary.maxMilestone ? 'golden-text' : ''; %> + Bestiary Level: + <%= calculated.bestiary.milestone / 10 %> / <%= calculated.bestiary.maxMilestone / 10 %> +
+ + <% max = calculated.bestiary.familiesUnlocked === calculated.bestiary.totalFamilies ? 'golden-text' : ''; %> + Families Unlocked: + <%= calculated.bestiary.familiesUnlocked %> / <%= calculated.bestiary.totalFamilies %> +
+ + <% max = calculated.bestiary.familiesMaxed === calculated.bestiary.totalFamilies ? 'golden-text' : ''; %> + Families Completed: + <%= calculated.bestiary.familiesMaxed %> / <%= calculated.bestiary.totalFamilies %> +

<% for (const [category, data] of Object.entries(calculated.bestiary.categories)) { %> - <% if (category === "fishing") { %> - <% for (const [key, value] of Object.entries(calculated.bestiary.categories[category])) { %> - <% if (["name", "texture"].includes(key)) continue; %> -
-
- <%= value.name %> - <% if (value.mobsUnlocked === value.mobsMaxed) { %> - max! - <% } else {%> - (<%= value.mobsMaxed %> / <%= value.mobsUnlocked %> max) - <% } %> -
- -
- <% for (const family of value.mobs) { %> - <% const amountsTooltip = family.kills >= family.nextTierKills ? `Progress: max!
` : `Progress to Tier ${family.tier + 1}: ${family.kills.toLocaleString()} / ${family.nextTierKills.toLocaleString()}

Overall Progress: ${family.kills.toLocaleString()} / ${family.maxKills.toLocaleString()}
`; %> -
-
-
-
- -
- <% max = family.tier >= family.maxTier ? 'max-stat' : ''; %> -
<%= family.name %> <%= family.tier %>
-
Kills: <%= family.kills.toLocaleString() %>
-
-
- <% } %> -
+
+
+ <%= data.name %> + <% if (data.mobsUnlocked === data.mobsMaxed ) { %> + max! + <% } else {%> + (<%= data.mobsMaxed %> / <%= data.mobsUnlocked %> max) <% } %> +
- <% } else { %> -
-
- <%= data.name %> - <% if (data.mobsUnlocked === data.mobsMaxed ) { %> - max! - <% } else {%> - (<%= data.mobsMaxed %> / <%= data.mobsUnlocked %> max) - <% } %> -
- -
- <% for (const family of data.mobs) { %> - <% const amountsTooltip = family.kills >= family.nextTierKills ? `Progress: max!
` : `Progress to Tier ${family.tier + 1}: ${family.kills.toLocaleString()} / ${family.nextTierKills.toLocaleString()}

Overall Progress: ${family.kills.toLocaleString()} / ${family.maxKills.toLocaleString()}
`; %> -
-
-
-
- -
- <% max = family.tier >= family.maxTier ? 'max-stat' : ''; %> -
<%= family.name %> <%= family.tier %>
-
Kills: <%= family.kills.toLocaleString() %>
-
+
+ <% for (const family of data.mobs) { %> + <% const amountsTooltip = family.kills >= family.nextTierKills ? `Progress: max!
` : `Progress to Tier ${family.tier + 1}: ${family.kills.toLocaleString()} / ${family.nextTierKills.toLocaleString()}

Overall Progress: ${family.kills.toLocaleString()} / ${family.maxKills.toLocaleString()}
`; %> +
+
+
+
+ +
+ <% max = family.tier >= family.maxTier ? 'max-stat' : ''; %> +
<%= family.name %> <%= family.tier %>
+
Kills: <%= family.kills.toLocaleString() %>
- <% } %> -
- <% } %> +
+ <% } %> +
<% } %>