From f659c097e3546807123f51a800749f224d47d06e Mon Sep 17 00:00:00 2001 From: DarthGigi <47110839+DarthGigi@users.noreply.github.com> Date: Thu, 21 Nov 2024 00:06:35 +0100 Subject: [PATCH] feat: add bestiary --- src/lib/layouts/stats/Main.svelte | 2 + src/lib/sections/stats/Bestiary.svelte | 69 ++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 src/lib/sections/stats/Bestiary.svelte diff --git a/src/lib/layouts/stats/Main.svelte b/src/lib/layouts/stats/Main.svelte index 8af020dd..9956d71e 100644 --- a/src/lib/layouts/stats/Main.svelte +++ b/src/lib/layouts/stats/Main.svelte @@ -5,6 +5,7 @@ import Stats from "$lib/layouts/stats/Stats.svelte"; import Accessories from "$lib/sections/stats/Accessories.svelte"; import Armor from "$lib/sections/stats/Armor.svelte"; + import Bestiary from "$lib/sections/stats/Bestiary.svelte"; import Dungeons from "$lib/sections/stats/Dungeons.svelte"; import Inventory from "$lib/sections/stats/Inventory.svelte"; import Minions from "$lib/sections/stats/Minions.svelte"; @@ -34,6 +35,7 @@ + diff --git a/src/lib/sections/stats/Bestiary.svelte b/src/lib/sections/stats/Bestiary.svelte new file mode 100644 index 00000000..1ceee66e --- /dev/null +++ b/src/lib/sections/stats/Bestiary.svelte @@ -0,0 +1,69 @@ + + + +
+ + + +
+ {#each Object.entries(bestiary.categories) as [_, data]} +
+

{data.name}

+ {#if data.mobsMaxed === data.mobs.length} + Max! + {:else} + ({data.mobsMaxed} / {data.mobs.length} max) + {/if} +
+ +
+ {#each data.mobs as mob} + {@const hasKilled = mob.kills} + {@const hasMaxed = mob.tier === mob.maxTier} + +
+
+ {mob.name} + {mob.tier} +
+ Kills: + {format(mob.kills)} +
+
+
+
+ {#if hasMaxed} + Progress: + max! + {:else} +
+
+ + Progress to Tier {mob.tier + 1}: + + {format(mob.kills)} / {format(mob.nextTierKills)} +
+
+ Overall progress: + {format(mob.kills)} / {format(mob.maxKills)} +
+
+ {/if} +
+
+ {/each} +
+ {/each} +