diff --git a/components/public/material-poster.tsx b/components/public/material-poster.tsx index b5ff0b1..7d2d2a2 100644 --- a/components/public/material-poster.tsx +++ b/components/public/material-poster.tsx @@ -83,7 +83,9 @@ export function MaterialPoster({ bleeding?: Array<{ id: string; imageUrl: string | null; amount: number; blendMode: PosterBlendMode }>; }) { const dragStart = useRef<{ pointerId: number; x: number; y: number; offsetX: number; offsetY: number } | null>(null); - const stats = character.baseStats.slice(0, 4); + const stats = character.baseStats.slice(0, 5); + const statBoxCount = Math.max(4, stats.length); + const hasFiveStats = statBoxCount === 5; const materials = mergePosterMaterials( [...character.ascension, ...character.leveling].flatMap((group) => group.items), ); @@ -191,7 +193,7 @@ export function MaterialPoster({

BASE STATS

- {Array.from({ length: 4 }, (_, index) => { + {Array.from({ length: statBoxCount }, (_, index) => { const stat = stats[index]; const iconName = stat ? statIconName(stat.key) : null; return ( @@ -216,7 +218,7 @@ export function MaterialPoster({
-
+

MATERIALS

LV.90

diff --git a/lib/guides/image-export.test.tsx b/lib/guides/image-export.test.tsx index c94c430..2ece489 100644 --- a/lib/guides/image-export.test.tsx +++ b/lib/guides/image-export.test.tsx @@ -140,6 +140,29 @@ describe("material poster text", () => { expect(html).not.toContain("เลเวล 90"); }); + it("shows a fifth base stat in its own box", () => { + const html = renderToStaticMarkup( + , + ); + + expect(html).toContain("Energy Recharge%"); + expect(html).toContain("132%"); + expect(html).toContain("h-[7cqw]"); + expect(html).toContain("top-[57%]"); + }); + it("optimizes scale-aware character artwork and bleeding layers for export", () => { const characterArtUrl = "https://buzz-cdn.astrxl.dev/posters/raiden.png"; const html = renderToStaticMarkup(