From 318db82ce7b5369c03b79e8a54a27677d3b36130 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 13 Dec 2025 21:24:39 -0800 Subject: [PATCH] fix storybook mock types --- src/stories/mocks/characters.ts | 18 +++++++-- src/stories/mocks/jobs.ts | 7 +++- src/stories/mocks/summons.ts | 8 +++- src/stories/mocks/weapons.ts | 72 ++++++++++++++++++++++++++++----- 4 files changed, 89 insertions(+), 16 deletions(-) diff --git a/src/stories/mocks/characters.ts b/src/stories/mocks/characters.ts index 604710a6..87504913 100644 --- a/src/stories/mocks/characters.ts +++ b/src/stories/mocks/characters.ts @@ -8,9 +8,15 @@ export const mockCharacter: Character = { name: { en: 'Narmaya', ja: 'ナルメア' }, element: 5, // Dark rarity: 3, // SSR + maxLevel: 100, special: false, + recruits: null, + gender: 2, // Female + race: { race1: 1, race2: 0 }, // Human uncap: { flb: true, ulb: true, transcendence: false }, - proficiency: [1, 2] // Sabre, Dagger + proficiency: [1, 2], // Sabre, Dagger + hp: { minHp: 200, maxHp: 1200, maxHpFlb: 1500 }, + atk: { minAtk: 6000, maxAtk: 8500, maxAtkFlb: 10000 } }; export const mockSpecialCharacter: Character = { @@ -19,9 +25,15 @@ export const mockSpecialCharacter: Character = { name: { en: 'Cagliostro', ja: 'カリオストロ' }, element: 4, // Earth rarity: 3, // SSR + maxLevel: 100, special: true, // Limited + recruits: null, + gender: 2, // Female (canonical) + race: { race1: 1, race2: 0 }, // Human uncap: { flb: true, ulb: true, transcendence: false }, - proficiency: [6] // Staff + proficiency: [6, 0], // Staff + hp: { minHp: 180, maxHp: 1100, maxHpFlb: 1400 }, + atk: { minAtk: 5500, maxAtk: 8000, maxAtkFlb: 9500 } }; export const mockGridCharacter: GridCharacter = { @@ -43,7 +55,7 @@ export const mockGridCharacterWithRing: GridCharacter = { }; /** Characters organized by element for element-specific stories */ -export const mockCharactersByElement = { +export const mockCharactersByElement: Record = { wind: { ...mockCharacter, id: 'char-wind', element: 1, name: { en: 'Tiamat', ja: 'ティアマト' } }, fire: { ...mockCharacter, id: 'char-fire', element: 2, name: { en: 'Colossus', ja: 'コロッサス' } }, water: { diff --git a/src/stories/mocks/jobs.ts b/src/stories/mocks/jobs.ts index e115770d..f8d6bb55 100644 --- a/src/stories/mocks/jobs.ts +++ b/src/stories/mocks/jobs.ts @@ -5,8 +5,9 @@ export const mockJob: Job = { id: 'job-1', granblueId: '180001', name: { en: 'Lumberjack', ja: 'ランバージャック' }, - proficiency: [3], // Axe + proficiency: [3, 0], // Axe row: 5, + order: 1, ultimateMastery: true }; @@ -16,6 +17,7 @@ export const mockJobNoUM: Job = { name: { en: 'Dark Fencer', ja: 'ダークフェンサー' }, proficiency: [1, 2], // Sabre, Dagger row: 3, + order: 1, ultimateMastery: false }; @@ -25,11 +27,12 @@ export const mockJobMultiProf: Job = { name: { en: 'Kengo', ja: 'ケンゴウ' }, proficiency: [1, 2], // Sword, Katana row: 5, + order: 1, ultimateMastery: true }; /** Jobs organized by row/tier */ -export const mockJobsByRow = { +export const mockJobsByRow: Record = { row1: { ...mockJob, id: 'job-row1', granblueId: '100001', row: 1, ultimateMastery: false }, row2: { ...mockJob, id: 'job-row2', granblueId: '110001', row: 2, ultimateMastery: false }, row3: { ...mockJob, id: 'job-row3', granblueId: '120001', row: 3, ultimateMastery: false }, diff --git a/src/stories/mocks/summons.ts b/src/stories/mocks/summons.ts index 235d5a12..7b3f0684 100644 --- a/src/stories/mocks/summons.ts +++ b/src/stories/mocks/summons.ts @@ -8,7 +8,11 @@ export const mockSummon: Summon = { name: { en: 'Bahamut', ja: 'バハムート' }, element: 5, // Dark rarity: 3, // SSR - uncap: { flb: true, ulb: true, transcendence: true } + maxLevel: 200, + subaura: true, + uncap: { flb: true, ulb: true, transcendence: true }, + hp: { minHp: 1000, maxHp: 2000, maxHpFlb: 2500, maxHpUlb: 3000 }, + atk: { minAtk: 3000, maxAtk: 4500, maxAtkFlb: 5500, maxAtkUlb: 6500 } }; export const mockGridSummon: GridSummon = { @@ -42,7 +46,7 @@ export const mockFriendSummon: GridSummon = { }; /** Summons organized by element */ -export const mockSummonsByElement = { +export const mockSummonsByElement: Record = { wind: { ...mockSummon, id: 'summon-wind', element: 1, name: { en: 'Tiamat', ja: 'ティアマト' } }, fire: { ...mockSummon, id: 'summon-fire', element: 2, name: { en: 'Colossus', ja: 'コロッサス' } }, water: { ...mockSummon, id: 'summon-water', element: 3, name: { en: 'Leviathan', ja: 'リヴァイアサン' } }, diff --git a/src/stories/mocks/weapons.ts b/src/stories/mocks/weapons.ts index 895b2163..0e34db62 100644 --- a/src/stories/mocks/weapons.ts +++ b/src/stories/mocks/weapons.ts @@ -1,6 +1,40 @@ import type { Weapon } from '$lib/types/api/entities'; import type { GridWeapon } from '$lib/types/api/party'; +/** Mock weapon series ref */ +const mockOmegaSeries = { + id: 'series-omega', + slug: 'omega', + name: { en: 'Omega', ja: 'マグナ' }, + hasWeaponKeys: false, + hasAwakening: true, + hasAxSkills: true, + extra: false, + elementChangeable: false +}; + +const mockOpusSeries = { + id: 'series-opus', + slug: 'opus', + name: { en: 'Opus', ja: 'オプス' }, + hasWeaponKeys: true, + hasAwakening: true, + hasAxSkills: false, + extra: false, + elementChangeable: false +}; + +const mockDraconicSeries = { + id: 'series-draconic', + slug: 'draconic', + name: { en: 'Draconic', ja: 'ドラゴニック' }, + hasWeaponKeys: true, + hasAwakening: false, + hasAxSkills: false, + extra: false, + elementChangeable: false +}; + /** Mock weapon data for Storybook stories */ export const mockWeapon: Weapon = { id: 'weapon-1', @@ -8,9 +42,16 @@ export const mockWeapon: Weapon = { name: { en: 'Luminiera Sword Omega', ja: 'シュヴァリエソード・マグナ' }, element: 6, // Light rarity: 3, // SSR - series: 1, // Omega + maxLevel: 200, + maxSkillLevel: 20, + maxAwakeningLevel: 9, + series: mockOmegaSeries, proficiency: 1, // Sword - uncap: { flb: true, ulb: true, transcendence: true } + ax: false, + axType: 0, + uncap: { flb: true, ulb: true, transcendence: true }, + hp: { minHp: 100, maxHp: 200, maxHpFlb: 250, maxHpUlb: 300 }, + atk: { minAtk: 2000, maxAtk: 3500, maxAtkFlb: 4000, maxAtkUlb: 4500 } }; export const mockOpusWeapon: Weapon = { @@ -19,9 +60,16 @@ export const mockOpusWeapon: Weapon = { name: { en: 'Cosmic Sword', ja: 'コスミックソード' }, element: 6, rarity: 3, - series: 2, // Opus + maxLevel: 250, + maxSkillLevel: 20, + maxAwakeningLevel: 9, + series: mockOpusSeries, proficiency: 1, - uncap: { flb: true, ulb: true, transcendence: true } + ax: false, + axType: 0, + uncap: { flb: true, ulb: true, transcendence: true }, + hp: { minHp: 200, maxHp: 400, maxHpFlb: 500, maxHpUlb: 600 }, + atk: { minAtk: 3000, maxAtk: 5000, maxAtkFlb: 6000, maxAtkUlb: 7000 } }; export const mockDraconicWeapon: Weapon = { @@ -30,9 +78,16 @@ export const mockDraconicWeapon: Weapon = { name: { en: 'Draconic Harp', ja: 'ドラゴニックハープ' }, element: 1, // Wind rarity: 3, - series: 3, // Draconic + maxLevel: 200, + maxSkillLevel: 20, + maxAwakeningLevel: 9, + series: mockDraconicSeries, proficiency: 4, // Harp - uncap: { flb: true, ulb: true, transcendence: false } + ax: false, + axType: 0, + uncap: { flb: true, ulb: true, transcendence: false }, + hp: { minHp: 150, maxHp: 300, maxHpFlb: 400, maxHpUlb: 500 }, + atk: { minAtk: 2500, maxAtk: 4000, maxAtkFlb: 5000, maxAtkUlb: 5500 } }; export const mockGridWeapon: GridWeapon = { @@ -42,7 +97,6 @@ export const mockGridWeapon: GridWeapon = { transcendenceStep: 0, mainhand: false, weapon: mockWeapon, - awakening: null, weaponKeys: [], ax: [] }; @@ -54,13 +108,13 @@ export const mockMainhandWeapon: GridWeapon = { transcendenceStep: 5, mainhand: true, weapon: mockOpusWeapon, - awakening: { id: 'awk-1', type: { slug: 'attack', name: { en: 'Attack', ja: '攻撃' } } }, + awakening: { type: { id: 'awk-1', slug: 'attack', name: { en: 'Attack', ja: '攻撃' } }, level: 9 }, weaponKeys: [], ax: [] }; /** Weapons organized by element */ -export const mockWeaponsByElement = { +export const mockWeaponsByElement: Record = { wind: { ...mockWeapon, id: 'weapon-wind', element: 1, name: { en: 'Tiamat Bolt', ja: 'ティアマトボルト' } }, fire: { ...mockWeapon,