From e73803e11ff19a88f6c9c5ea310df820c749e673 Mon Sep 17 00:00:00 2001 From: Sakura Knoll Date: Sun, 6 Mar 2022 20:33:03 +0900 Subject: [PATCH] Add recommended equipments for battlesuits --- public/data/honkai3rd/battlesuits/ae.json | 9 ++ public/data/honkai3rd/battlesuits/aka.json | 9 ++ public/data/honkai3rd/battlesuits/bh.json | 9 ++ public/data/honkai3rd/battlesuits/bke.json | 9 ++ public/data/honkai3rd/battlesuits/da.json | 9 ++ public/data/honkai3rd/battlesuits/fr.json | 9 ++ public/data/honkai3rd/battlesuits/ft.json | 9 ++ public/data/honkai3rd/battlesuits/hb.json | 9 ++ public/data/honkai3rd/battlesuits/hfs.json | 9 ++ public/data/honkai3rd/battlesuits/hor.json | 9 ++ public/data/honkai3rd/battlesuits/hos.json | 9 ++ public/data/honkai3rd/battlesuits/hot.json | 9 ++ public/data/honkai3rd/battlesuits/hov.json | 9 ++ public/data/honkai3rd/battlesuits/io.json | 9 ++ public/data/honkai3rd/battlesuits/ma.json | 9 ++ public/data/honkai3rd/battlesuits/mpe.json | 9 ++ public/data/honkai3rd/battlesuits/nyx.json | 9 ++ .../honkai3rd/battlesuits/pardofelis.json | 9 ++ public/data/honkai3rd/battlesuits/pe.json | 9 ++ public/data/honkai3rd/battlesuits/pv.json | 9 ++ public/data/honkai3rd/battlesuits/sa.json | 9 ++ public/data/honkai3rd/battlesuits/sn.json | 9 ++ public/data/honkai3rd/battlesuits/sns.json | 9 ++ public/data/honkai3rd/battlesuits/spa.json | 9 ++ public/data/honkai3rd/battlesuits/sw.json | 9 ++ public/data/honkai3rd/battlesuits/tp.json | 9 ++ ...v5.5-22.03.14-skadi-focused-supply-b.json} | 0 public/locales/en-US/common.json | 5 +- public/locales/ko-KR/common.json | 5 +- src/lib/honkai3rd/battlesuits.ts | 9 ++ .../honkai3rd/battlesuits/[battlesuitId].tsx | 99 ++++++++++++++++++- 31 files changed, 347 insertions(+), 5 deletions(-) rename public/data/honkai3rd/versions/5.5/supply-events/{v5.5-22.03.14-skaldi-focused-supply-b.json => v5.5-22.03.14-skadi-focused-supply-b.json} (100%) diff --git a/public/data/honkai3rd/battlesuits/ae.json b/public/data/honkai3rd/battlesuits/ae.json index 6d60d9dd..5d64d599 100644 --- a/public/data/honkai3rd/battlesuits/ae.json +++ b/public/data/honkai3rd/battlesuits/ae.json @@ -5,6 +5,15 @@ "type": "psychic", "valkyrie": "fuhua", "features": ["fire-dmg", "time mastery", "gather", "ignite"], + "equipment": [ + { + "type": "recommended", + "weapon": "cosmic-duality", + "stigmataTop": "fu-hua-margrave-top", + "stigmataMid": "fu-hua-margrave-mid", + "stigmataBot": "fu-hua-margrave-bot" + } + ], "leader": { "core": { "name": "Hex of Exposure", diff --git a/public/data/honkai3rd/battlesuits/aka.json b/public/data/honkai3rd/battlesuits/aka.json index 283f2cc2..c69719c8 100644 --- a/public/data/honkai3rd/battlesuits/aka.json +++ b/public/data/honkai3rd/battlesuits/aka.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "rita", "features": ["ice-dmg", "burst", "freeze"], + "equipment": [ + { + "type": "recommended", + "weapon": "skadi-of-thrymheim", + "stigmataTop": "ana-schariac-top", + "stigmataMid": "ana-schariac-mid", + "stigmataBot": "ana-schariac-bot" + } + ], "leader": { "core": { "name": "Herald of Dawn", diff --git a/public/data/honkai3rd/battlesuits/bh.json b/public/data/honkai3rd/battlesuits/bh.json index 79ad1cfa..2c586da5 100644 --- a/public/data/honkai3rd/battlesuits/bh.json +++ b/public/data/honkai3rd/battlesuits/bh.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "asuka", "features": ["physical", "time mastery"], + "equipment": [ + { + "type": "recommended", + "weapon": "lance-of-longinus", + "stigmataTop": "columbus-top", + "stigmataMid": "columbus-mid", + "stigmataBot": "columbus-bot" + } + ], "leader": { "core": { "name": "Heart: Pure Again", diff --git a/public/data/honkai3rd/battlesuits/bke.json b/public/data/honkai3rd/battlesuits/bke.json index 0f6b5aff..1c2c006a 100644 --- a/public/data/honkai3rd/battlesuits/bke.json +++ b/public/data/honkai3rd/battlesuits/bke.json @@ -5,6 +5,15 @@ "type": "mecha", "valkyrie": "durandal", "features": ["physical", "burst", "time mastery", "heavy-atk"], + "equipment": [ + { + "type": "recommended", + "weapon": "abyss-flower-liminal-spiral", + "stigmataTop": "dante-top", + "stigmataMid": "dante-mid", + "stigmataBot": "dante-bot" + } + ], "leader": { "core": { "name": "Horns of Jericho", diff --git a/public/data/honkai3rd/battlesuits/da.json b/public/data/honkai3rd/battlesuits/da.json index 5bc73224..5cd5fa8d 100644 --- a/public/data/honkai3rd/battlesuits/da.json +++ b/public/data/honkai3rd/battlesuits/da.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "durandal", "features": ["fire-dmg", "time mastery", "gather", "ignite"], + "equipment": [ + { + "type": "recommended", + "weapon": "sagittarius-astra", + "stigmataTop": "shakespeare-adrift-top", + "stigmataMid": "shakespeare-adrift-mid", + "stigmataBot": "shakespeare-adrift-bot" + } + ], "leader": { "core": { "name": "Crux Galactica", diff --git a/public/data/honkai3rd/battlesuits/fr.json b/public/data/honkai3rd/battlesuits/fr.json index 447c14ab..3c878337 100644 --- a/public/data/honkai3rd/battlesuits/fr.json +++ b/public/data/honkai3rd/battlesuits/fr.json @@ -5,6 +5,15 @@ "type": "quantum", "valkyrie": "rita", "features": ["lightning-dmg", "time mastery", "gather", "paralyze"], + "equipment": [ + { + "type": "recommended", + "weapon": "iris-of-helheim", + "stigmataTop": "irene-adler-top", + "stigmataMid": "irene-adler-mid", + "stigmataBot": "irene-adler-bot" + } + ], "leader": { "core": { "name": "Tonight or Never", diff --git a/public/data/honkai3rd/battlesuits/ft.json b/public/data/honkai3rd/battlesuits/ft.json index 581abcce..df57f607 100644 --- a/public/data/honkai3rd/battlesuits/ft.json +++ b/public/data/honkai3rd/battlesuits/ft.json @@ -5,6 +5,15 @@ "type": "psychic", "valkyrie": "olenyevas", "features": ["physical", "gather", "time mastery"], + "equipment": [ + { + "type": "recommended", + "weapon": "sleeper-s-dream", + "stigmataTop": "dickens-top", + "stigmataMid": "dickens-mid", + "stigmataBot": "dickens-bot" + } + ], "leader": { "core": { "name": "SHOWTIME!", diff --git a/public/data/honkai3rd/battlesuits/hb.json b/public/data/honkai3rd/battlesuits/hb.json index f2242640..882998a9 100644 --- a/public/data/honkai3rd/battlesuits/hb.json +++ b/public/data/honkai3rd/battlesuits/hb.json @@ -5,6 +5,15 @@ "type": "psychic", "valkyrie": "bronya", "features": ["ice-dmg", "time mastery", "fast atk"], + "equipment": [ + { + "type": "recommended", + "weapon": "crusher-bunny-19c", + "stigmataTop": "turgenev-top", + "stigmataMid": "turgenev-mid", + "stigmataBot": "turgenev-bot" + } + ], "leader": { "core": { "name": "H-T-T-P-S", diff --git a/public/data/honkai3rd/battlesuits/hfs.json b/public/data/honkai3rd/battlesuits/hfs.json index 02b0ae08..c225ecd3 100644 --- a/public/data/honkai3rd/battlesuits/hfs.json +++ b/public/data/honkai3rd/battlesuits/hfs.json @@ -5,6 +5,15 @@ "type": "psychic", "valkyrie": "kiana", "features": ["fire-dmg", "heal", "time mastery", "gather", "aerial"], + "equipment": [ + { + "type": "recommended", + "weapon": "key-of-radiance", + "stigmataTop": "murata-himeko-top", + "stigmataMid": "murata-himeko-mid", + "stigmataBot": "murata-himeko-bot" + } + ], "leader": { "core": { "name": "Nameless Knight-Errant's Path", diff --git a/public/data/honkai3rd/battlesuits/hor.json b/public/data/honkai3rd/battlesuits/hor.json index d85c2cc6..5f94b02c 100644 --- a/public/data/honkai3rd/battlesuits/hor.json +++ b/public/data/honkai3rd/battlesuits/hor.json @@ -5,6 +5,15 @@ "type": "mecha", "valkyrie": "bronya", "features": ["ice-dmg", "burst", "time mastery", "freeze"], + "equipment": [ + { + "type": "recommended", + "weapon": "domain-of-revelation", + "stigmataTop": "welt-yang-top", + "stigmataMid": "welt-yang-mid", + "stigmataBot": "welt-yang-bot" + } + ], "leader": { "core": { "name": "Source Protocol", diff --git a/public/data/honkai3rd/battlesuits/hos.json b/public/data/honkai3rd/battlesuits/hos.json index 920f3d31..cb493f0b 100644 --- a/public/data/honkai3rd/battlesuits/hos.json +++ b/public/data/honkai3rd/battlesuits/hos.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "fuhua", "features": ["physical", "impair", "burst", "time mastery", "gather"], + "equipment": [ + { + "type": "recommended", + "weapon": "domain-of-sentience", + "stigmataTop": "shattered-swords-top", + "stigmataMid": "shattered-swords-mid", + "stigmataBot": "shattered-swords-bot" + } + ], "leader": { "core": { "name": "Alliteration is an Agony", diff --git a/public/data/honkai3rd/battlesuits/hot.json b/public/data/honkai3rd/battlesuits/hot.json index 95377249..6e1bb8f9 100644 --- a/public/data/honkai3rd/battlesuits/hot.json +++ b/public/data/honkai3rd/battlesuits/hot.json @@ -11,6 +11,15 @@ "fast atk", "paralyze" ], + "equipment": [ + { + "type": "recommended", + "weapon": "domain-of-sanction", + "stigmataTop": "benares-awakening-top", + "stigmataMid": "benares-awakening-mid", + "stigmataBot": "benares-awakening-bot" + } + ], "leader": { "core": { "name": "Yaoyorozu", diff --git a/public/data/honkai3rd/battlesuits/hov.json b/public/data/honkai3rd/battlesuits/hov.json index 2638e075..60cb2831 100644 --- a/public/data/honkai3rd/battlesuits/hov.json +++ b/public/data/honkai3rd/battlesuits/hov.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "kiana", "features": ["physical", "time mastery", "fast atk", "aerial"], + "equipment": [ + { + "type": "recommended", + "weapon": "domain-of-the-void", + "stigmataTop": "sirin-ascendant-top", + "stigmataMid": "sirin-ascendant-mid", + "stigmataBot": "sirin-ascendant-bot" + } + ], "leader": { "core": { "name": "Void Throne", diff --git a/public/data/honkai3rd/battlesuits/io.json b/public/data/honkai3rd/battlesuits/io.json index 08fa8e7c..cbe45784 100644 --- a/public/data/honkai3rd/battlesuits/io.json +++ b/public/data/honkai3rd/battlesuits/io.json @@ -5,6 +5,15 @@ "type": "mecha", "valkyrie": "mobius", "features": ["lightning-dmg", "time mastery", "aerial"], + "equipment": [ + { + "type": "recommended", + "weapon": "basilisk-s-image-deathshroud", + "stigmataTop": "linnaeus-top", + "stigmataMid": "linnaeus-mid", + "stigmataBot": "linnaeus-bot" + } + ], "leader": { "core": { "name": "Infinite Fate", diff --git a/public/data/honkai3rd/battlesuits/ma.json b/public/data/honkai3rd/battlesuits/ma.json index fc093f23..7fa87690 100644 --- a/public/data/honkai3rd/battlesuits/ma.json +++ b/public/data/honkai3rd/battlesuits/ma.json @@ -5,6 +5,15 @@ "type": "imaginary", "valkyrie": "raven", "features": ["fire-dmg", "time mastery"], + "equipment": [ + { + "type": "recommended", + "weapon": "obscuring-wing", + "stigmataTop": "aslaug-top", + "stigmataMid": "aslaug-mid", + "stigmataBot": "aslaug-bot" + } + ], "leader": { "core": { "name": "Midnight Gathering", diff --git a/public/data/honkai3rd/battlesuits/mpe.json b/public/data/honkai3rd/battlesuits/mpe.json index 625c743e..9b0bdadf 100644 --- a/public/data/honkai3rd/battlesuits/mpe.json +++ b/public/data/honkai3rd/battlesuits/mpe.json @@ -2,6 +2,15 @@ "id": "mpe", "version": "5.1", "name": "Miss Pink Elf♪", + "equipment": [ + { + "type": "recommended", + "weapon": "whisper-of-the-past-sonnet", + "stigmataTop": "elysia-top", + "stigmataMid": "elysia-mid", + "stigmataBot": "elysia-bot" + } + ], "type": "psychic", "valkyrie": "elysia", "features": ["physical", "time mastery", "fast atk", "aerial"], diff --git a/public/data/honkai3rd/battlesuits/nyx.json b/public/data/honkai3rd/battlesuits/nyx.json index f8e52111..3c9ca45f 100644 --- a/public/data/honkai3rd/battlesuits/nyx.json +++ b/public/data/honkai3rd/battlesuits/nyx.json @@ -5,6 +5,15 @@ "type": "quantum", "valkyrie": "seele", "features": ["ice-dmg", "burst", "time mastery", "freeze"], + "equipment": [ + { + "type": "recommended", + "weapon": "sanguine-gaze-union", + "stigmataTop": "verne-top", + "stigmataMid": "verne-mid", + "stigmataBot": "verne-bot" + } + ], "leader": { "core": { "name": "A Torn Heart", diff --git a/public/data/honkai3rd/battlesuits/pardofelis.json b/public/data/honkai3rd/battlesuits/pardofelis.json index 34db91a0..efe88958 100644 --- a/public/data/honkai3rd/battlesuits/pardofelis.json +++ b/public/data/honkai3rd/battlesuits/pardofelis.json @@ -5,6 +5,15 @@ "type": "imaginary", "valkyrie": "pardofelis", "features": ["ice-dmg", "freeze", "time mastery"], + "equipment": [ + { + "type": "recommended", + "weapon": "dream-of-the-past-eyes-of-the-night", + "stigmataTop": "bastet-top", + "stigmataMid": "bastet-mid", + "stigmataBot": "bastet-bot" + } + ], "leader": { "core": { "name": "Life, an empty dream", diff --git a/public/data/honkai3rd/battlesuits/pe.json b/public/data/honkai3rd/battlesuits/pe.json index 2388c91c..677b77b3 100644 --- a/public/data/honkai3rd/battlesuits/pe.json +++ b/public/data/honkai3rd/battlesuits/pe.json @@ -5,6 +5,15 @@ "type": "imaginary", "valkyrie": "durandal", "features": ["physical", "time mastery"], + "equipment": [ + { + "type": "recommended", + "weapon": "midnight-ataegina", + "stigmataTop": "bianka-theatre-top", + "stigmataMid": "bianka-theatre-mid", + "stigmataBot": "bianka-theatre-bot" + } + ], "leader": { "core": { "name": "Stellar Crusader", diff --git a/public/data/honkai3rd/battlesuits/pv.json b/public/data/honkai3rd/battlesuits/pv.json index 2021c9c5..3b9b8fd2 100644 --- a/public/data/honkai3rd/battlesuits/pv.json +++ b/public/data/honkai3rd/battlesuits/pv.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "fischl", "features": ["lightning-dmg", "time mastery", "fast atk", "aerial"], + "equipment": [ + { + "type": "recommended", + "weapon": "mitternachts-waltz", + "stigmataTop": "wang-zhenyi-top", + "stigmataMid": "wang-zhenyi-mid", + "stigmataBot": "wang-zhenyi-bot" + } + ], "leader": { "core": { "name": "Evernight Suite", diff --git a/public/data/honkai3rd/battlesuits/sa.json b/public/data/honkai3rd/battlesuits/sa.json index 547f2ef4..35421f8f 100644 --- a/public/data/honkai3rd/battlesuits/sa.json +++ b/public/data/honkai3rd/battlesuits/sa.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "theresa", "features": ["physical", "heal", "time mastery", "stun", "gather"], + "equipment": [ + { + "type": "recommended", + "weapon": "zither-s-lament", + "stigmataTop": "shuijing-top", + "stigmataMid": "shuijing-mid", + "stigmataBot": "shuijing-bot" + } + ], "leader": { "core": { "name": "Nine Palaces", diff --git a/public/data/honkai3rd/battlesuits/sn.json b/public/data/honkai3rd/battlesuits/sn.json index 7d147488..b3c2a9b2 100644 --- a/public/data/honkai3rd/battlesuits/sn.json +++ b/public/data/honkai3rd/battlesuits/sn.json @@ -5,6 +5,15 @@ "type": "quantum", "valkyrie": "seele", "features": ["physical", "time mastery", "heavy-atk"], + "equipment": [ + { + "type": "recommended", + "weapon": "path-to-acheron-kindred", + "stigmataTop": "allan-poe-top", + "stigmataMid": "allan-poe-mid", + "stigmataBot": "allan-poe-bot" + } + ], "leader": { "core": { "name": "Cursed Blessing", diff --git a/public/data/honkai3rd/battlesuits/sns.json b/public/data/honkai3rd/battlesuits/sns.json index 708d5e40..00e8a645 100644 --- a/public/data/honkai3rd/battlesuits/sns.json +++ b/public/data/honkai3rd/battlesuits/sns.json @@ -5,6 +5,15 @@ "type": "mecha", "valkyrie": "carole", "features": ["physical", "time mastery", "stun", "gather", "aerial"], + "equipment": [ + { + "type": "recommended", + "weapon": "miracle-kissy-pillow", + "stigmataTop": "paganini-top", + "stigmataMid": "paganini-mid", + "stigmataBot": "paganini-bot" + } + ], "leader": { "core": { "name": "Star of Hope", diff --git a/public/data/honkai3rd/battlesuits/spa.json b/public/data/honkai3rd/battlesuits/spa.json index c8b7ddc0..6df2468b 100644 --- a/public/data/honkai3rd/battlesuits/spa.json +++ b/public/data/honkai3rd/battlesuits/spa.json @@ -5,6 +5,15 @@ "type": "mecha", "valkyrie": "rita", "features": ["fire-dmg", "ignite", "time mastery", "gather"], + "equipment": [ + { + "type": "recommended", + "weapon": "astral-divide-pisces", + "stigmataTop": "ragna-top", + "stigmataMid": "ragna-mid", + "stigmataBot": "ragna-bot" + } + ], "leader": { "core": { "name": "Thuban: Circumpolar Star", diff --git a/public/data/honkai3rd/battlesuits/sw.json b/public/data/honkai3rd/battlesuits/sw.json index be364ca0..f51e9f20 100644 --- a/public/data/honkai3rd/battlesuits/sw.json +++ b/public/data/honkai3rd/battlesuits/sw.json @@ -5,6 +5,15 @@ "type": "biologic", "valkyrie": "bronya", "features": ["ice-dmg", "fast atk", "time mastery", "gather", "aerial"], + "equipment": [ + { + "type": "recommended", + "weapon": "falcon-flare-final", + "stigmataTop": "bronya-n-ex-top", + "stigmataMid": "bronya-n-ex-mid", + "stigmataBot": "bronya-n-ex-bot" + } + ], "leader": { "core": { "name": "Hyper Proxy", diff --git a/public/data/honkai3rd/battlesuits/tp.json b/public/data/honkai3rd/battlesuits/tp.json index 61a13f91..c4aa282b 100644 --- a/public/data/honkai3rd/battlesuits/tp.json +++ b/public/data/honkai3rd/battlesuits/tp.json @@ -5,6 +5,15 @@ "type": "mecha", "valkyrie": "theresa", "features": ["physical", "bleed", "fast atk", "time mastery"], + "equipment": [ + { + "type": "recommended", + "weapon": "hekate-s-sombre", + "stigmataTop": "kafka-top", + "stigmataMid": "kafka-mid", + "stigmataBot": "kafka-bot" + } + ], "leader": { "core": { "name": "Execution Time", diff --git a/public/data/honkai3rd/versions/5.5/supply-events/v5.5-22.03.14-skaldi-focused-supply-b.json b/public/data/honkai3rd/versions/5.5/supply-events/v5.5-22.03.14-skadi-focused-supply-b.json similarity index 100% rename from public/data/honkai3rd/versions/5.5/supply-events/v5.5-22.03.14-skaldi-focused-supply-b.json rename to public/data/honkai3rd/versions/5.5/supply-events/v5.5-22.03.14-skadi-focused-supply-b.json diff --git a/public/locales/en-US/common.json b/public/locales/en-US/common.json index add6ac15..d4b1ebcb 100644 --- a/public/locales/en-US/common.json +++ b/public/locales/en-US/common.json @@ -40,7 +40,10 @@ "special-attack": "Special Attack", "ultimate": "Ultimate", "basic-attack": "Basic Attack", - "sp-skill": "SP Skill" + "sp-skill": "SP Skill", + "equipmentTypes": { + "recommended": "Recommended" + } }, "stigmata-list": { "description": "Stigmata list of Honkai 3rd", diff --git a/public/locales/ko-KR/common.json b/public/locales/ko-KR/common.json index 10c9bb3b..85ee7384 100644 --- a/public/locales/ko-KR/common.json +++ b/public/locales/ko-KR/common.json @@ -35,7 +35,10 @@ "special-attack": "특수 공격", "ultimate": "필살기", "basic-attack": "기본 공격", - "sp-skill": "SP 스킬" + "sp-skill": "SP 스킬", + "equipmentTypes": { + "recommended": "추천 장비" + } }, "stigmata-list": { "description": "붕괴 3rd 성흔 목록", diff --git a/src/lib/honkai3rd/battlesuits.ts b/src/lib/honkai3rd/battlesuits.ts index ac6df26f..0c804902 100644 --- a/src/lib/honkai3rd/battlesuits.ts +++ b/src/lib/honkai3rd/battlesuits.ts @@ -11,6 +11,14 @@ export interface BattlesuitSkillGroup { subskills: BattlesuitSkill[] } +export interface BattlesuitEquipment { + type: string + weapon: string + stigmataTop: string + stigmataMid: string + stigmataBot: string +} + export interface BattlesuitData { id: string version?: string @@ -19,6 +27,7 @@ export interface BattlesuitData { type: string valkyrie: string features: string[] + equipment?: BattlesuitEquipment[] leader: BattlesuitSkillGroup special: BattlesuitSkillGroup evasion: BattlesuitSkillGroup diff --git a/src/pages/honkai3rd/battlesuits/[battlesuitId].tsx b/src/pages/honkai3rd/battlesuits/[battlesuitId].tsx index ddaf45d0..c2372874 100644 --- a/src/pages/honkai3rd/battlesuits/[battlesuitId].tsx +++ b/src/pages/honkai3rd/battlesuits/[battlesuitId].tsx @@ -35,12 +35,27 @@ import Head from '../../../components/atoms/Head' import { capitalize } from '../../../lib/string' import { assetsBucketBaseUrl } from '../../../lib/consts' import Honkai3rdLayout from '../../../components/layouts/Honkai3rdLayout' +import { WeaponData } from '../../../lib/honkai3rd/weapons' +import { getWeaponById } from '../../../server/data/honkai3rd/weapons' +import { StigmataData } from '../../../lib/honkai3rd/stigmata' +import WeaponCard from '../../../components/molecules/WeaponCard' +import StigmataCard from '../../../components/molecules/StigmataCard' +import { getStigmataById } from '../../../server/data/honkai3rd/stigmata' + +type WeaponObjectMap = { [key: string]: WeaponData } +type StigmataObjectMap = { [key: string]: StigmataData } interface BattlesuitShowPageProps { battlesuit: BattlesuitData + weaponMap: WeaponObjectMap + stigmataMap: StigmataObjectMap } -const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => { +const BattlesuitShowPage = ({ + battlesuit, + weaponMap, + stigmataMap, +}: BattlesuitShowPageProps) => { const { t } = useTranslation() const { locale } = useRouter() @@ -170,6 +185,44 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => { + {battlesuit.equipment != null && ( + + {battlesuit.equipment.map((equipmentItem) => { + return ( + + + {t(`battlesuit-show.equipmentTypes.${equipmentItem.type}`)} + + + + + + + + + ) + })} + + )} + ( + (acc, equipmentItem) => { + acc.weaponIds.push(equipmentItem.weapon) + acc.stigmataIds.push( + equipmentItem.stigmataTop, + equipmentItem.stigmataMid, + equipmentItem.stigmataBot + ) + return acc + }, + { weaponIds: [], stigmataIds: [] } + ) + const weaponMap = weaponIds.reduce<{ [key: string]: WeaponData }>( + (map, id) => { + const weapon = getWeaponById(id) + if (weapon != null) { + map[id] = weapon + } + return map + }, + {} + ) + const stigmataMap = stigmataIds.reduce<{ [key: string]: StigmataData }>( + (map, id) => { + const stigmata = getStigmataById(id) + if (stigmata != null) { + map[id] = stigmata + } + return map + }, + {} + ) return { - props: { battlesuit, ...(await getI18NProps(locale)) }, + props: { + battlesuit, + weaponMap, + stigmataMap, + ...(await getI18NProps(locale)), + }, } }