Add Aniimo elemental matchup calculator
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 18m14s
Validate and deploy Sokko G / deploy (push) Successful in 10s

This commit is contained in:
Shinuwa 2026-10-31 09:43:04 +01:00
parent 72b3b15c7e
commit 243465720f
15 changed files with 518 additions and 10 deletions

View file

@ -143,10 +143,11 @@ export async function loadAniimoData(signal) {
fetch("/data/aniimo/aniimos.json", { signal }),
fetch("/data/aniimo/i18n/fr.json", { signal }),
fetch("/data/aniimo/i18n/en.json", { signal }),
fetch("/data/aniimo/lists/index.json", { signal })
fetch("/data/aniimo/lists/index.json", { signal }),
fetch("/data/aniimo/elements.json", { signal })
]);
if (responses.some((response) => !response.ok)) throw new Error("Les données Aniimo sont indisponibles.");
const [aniimos, translations, englishTranslations, listIndex] = await Promise.all(responses.map((response) => response.json()));
const [aniimos, translations, englishTranslations, listIndex, elementChart] = await Promise.all(responses.map((response) => response.json()));
const lists = await loadGameLists("aniimo", listIndex, signal);
return { loaded: true, loading: false, error: "", translations, englishTranslations, lists, ...prepareAniimoData(aniimos, translations, englishTranslations) };
return { loaded: true, loading: false, error: "", translations, englishTranslations, lists, elementChart, ...prepareAniimoData(aniimos, translations, englishTranslations) };
}