aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorana <ana@ana.st>2021-08-08 18:27:01 +0200
committerana <ana@ana.st>2021-08-08 18:27:01 +0200
commit0ec30df7de63281d6e9e6465309994df555cff85 (patch)
tree8c776148639a7f6ea05b9d8a1eb564475fdec213
parented69ab277b651afe318ede1dfbbb7757f5cd0331 (diff)
downloadeureka-marks-0ec30df7de63281d6e9e6465309994df555cff85.tar.gz
feat: load from all bestiaries
-rw-r--r--src/App.svelte22
-rw-r--r--src/bestiary.js8
2 files changed, 21 insertions, 9 deletions
diff --git a/src/App.svelte b/src/App.svelte
index 7402b73..0e50479 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -123,7 +123,7 @@
<h5>matches</h5>
<ul>
- {#each upMatches as m (m.name)}
+ {#each upMatches as m (m.name + m.level)}
<li>
<em>(Lv{m.level})</em> <strong>{m.name}</strong>
({#if m.mutating}mutates{/if}{#if m.augmenting}augments{/if} in {formatWeathers(
@@ -135,14 +135,14 @@
<h5>regular enemies</h5>
<ul>
- {#each normalMatches as m (m.name)}
+ {#each normalMatches as m (m.name + m.level)}
<li><em>(Lv{m.level})</em> <strong>{m.name}</strong></li>
{/each}
</ul>
<h5>special enemies that do not mutate/augment right now</h5>
<ul>
- {#each otherMatches as m (m.name)}
+ {#each otherMatches as m (m.name + m.level)}
<li>
<em>(Lv{m.level})</em> <strong>{m.name}</strong>
({#if m.mutating}mutates{/if}{#if m.augmenting}augments{/if}
@@ -155,12 +155,20 @@
<div class="pure-menu">
<ul class="pure-menu-list">
<li class="pure-menu-item">
- Anemos: {anemosForecast[0].weatherName}
+ {#if $level < 20}<strong>Anemos</strong>{:else}Anemos{/if}: {anemosForecast[0]
+ .weatherName}
</li>
- <li class="pure-menu-item">Pagos: {pagosForecast[0].weatherName}</li>
- <li class="pure-menu-item">Pyros: {pyrosForecast[0].weatherName}</li>
<li class="pure-menu-item">
- Hydatos: {hydatosForecast[0].weatherName}
+ {#if $level >= 20 && $level < 35}<strong>Pagos</strong
+ >{:else}Pagos{/if}: {pagosForecast[0].weatherName}
+ </li>
+ <li class="pure-menu-item">
+ {#if $level >= 35 && $level < 50}<strong>Pyros</strong
+ >{:else}Pyros{/if}: {pyrosForecast[0].weatherName}
+ </li>
+ <li class="pure-menu-item">
+ {#if $level >= 50}<strong>Hydatos</strong>{:else}Hydatos{/if}: {hydatosForecast[0]
+ .weatherName}
</li>
</ul>
</div>
diff --git a/src/bestiary.js b/src/bestiary.js
index 4a061be..12b35b7 100644
--- a/src/bestiary.js
+++ b/src/bestiary.js
@@ -1,12 +1,16 @@
import pagosB from "./pagos.bestiary.json";
+import anemosB from "./anemos.bestiary.json";
+import pyrosB from "./pyros.bestiary.json";
+import hydatosB from "./hydatos.bestiary.json";
import day from "dayjs";
import isBetween from "dayjs/plugin/isBetween";
day.extend(isBetween);
export function getMatches(forecast, level) {
+ const amalgam = hydatosB.concat(pyrosB.concat(pagosB.concat(anemosB)));
let res = [];
- pagosB.forEach((b) => {
- if (b.level >= level && b.level - 2 < level) {
+ amalgam.forEach((b) => {
+ if (b.level >= level && b.level - 2 <= level) {
res.push({
name: b.name,
level: b.level,