From 3b6cc5ba65bba67791b78541c45425ad732ff7cb Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 15 Jan 2024 14:16:49 -0800 Subject: [PATCH] Add support for weapon transcendence (#402) --- components/HovercardHeader/index.tsx | 2 +- components/extra/ExtraWeaponsGrid/index.tsx | 3 + components/reps/GridRep/index.tsx | 7 +- components/reps/SummonRep/index.tsx | 10 +- components/summon/SummonHovercard/index.tsx | 2 +- components/summon/SummonUnit/index.tsx | 11 +- .../uncap/TranscendencePopover/index.tsx | 4 +- components/uncap/UncapIndicator/index.tsx | 54 ++++---- components/weapon/WeaponGrid/index.tsx | 130 +++++++++++++++++- components/weapon/WeaponUnit/index.tsx | 14 +- types/GridWeapon.d.ts | 1 + types/Summon.d.ts | 2 +- types/Weapon.d.ts | 1 + utils/api.tsx | 2 +- 14 files changed, 195 insertions(+), 48 deletions(-) diff --git a/components/HovercardHeader/index.tsx b/components/HovercardHeader/index.tsx index 03266ab1..7af01f09 100644 --- a/components/HovercardHeader/index.tsx +++ b/components/HovercardHeader/index.tsx @@ -77,7 +77,7 @@ const HovercardHeader = ({ gridObject, object, type, ...props }: Props) => { ) { suffix = '_02' } else if ( - gridSummon.object.uncap.xlb && + gridSummon.object.uncap.transcendence && gridSummon.transcendence_step > 0 ) { suffix = '_03' diff --git a/components/extra/ExtraWeaponsGrid/index.tsx b/components/extra/ExtraWeaponsGrid/index.tsx index 00874b65..00b3ffbf 100644 --- a/components/extra/ExtraWeaponsGrid/index.tsx +++ b/components/extra/ExtraWeaponsGrid/index.tsx @@ -17,6 +17,7 @@ interface Props { removeWeapon: (id: string) => void updateObject: (object: SearchableObject, position: number) => void updateUncap: (id: string, position: number, uncap: number) => void + updateTranscendence: (id: string, position: number, stage: number) => void } // Constants @@ -29,6 +30,7 @@ const ExtraWeaponsGrid = ({ removeWeapon, updateObject, updateUncap, + updateTranscendence, }: Props) => { return (