fix storybook mock types
This commit is contained in:
parent
70df592890
commit
318db82ce7
4 changed files with 89 additions and 16 deletions
|
|
@ -8,9 +8,15 @@ export const mockCharacter: Character = {
|
||||||
name: { en: 'Narmaya', ja: 'ナルメア' },
|
name: { en: 'Narmaya', ja: 'ナルメア' },
|
||||||
element: 5, // Dark
|
element: 5, // Dark
|
||||||
rarity: 3, // SSR
|
rarity: 3, // SSR
|
||||||
|
maxLevel: 100,
|
||||||
special: false,
|
special: false,
|
||||||
|
recruits: null,
|
||||||
|
gender: 2, // Female
|
||||||
|
race: { race1: 1, race2: 0 }, // Human
|
||||||
uncap: { flb: true, ulb: true, transcendence: false },
|
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 = {
|
export const mockSpecialCharacter: Character = {
|
||||||
|
|
@ -19,9 +25,15 @@ export const mockSpecialCharacter: Character = {
|
||||||
name: { en: 'Cagliostro', ja: 'カリオストロ' },
|
name: { en: 'Cagliostro', ja: 'カリオストロ' },
|
||||||
element: 4, // Earth
|
element: 4, // Earth
|
||||||
rarity: 3, // SSR
|
rarity: 3, // SSR
|
||||||
|
maxLevel: 100,
|
||||||
special: true, // Limited
|
special: true, // Limited
|
||||||
|
recruits: null,
|
||||||
|
gender: 2, // Female (canonical)
|
||||||
|
race: { race1: 1, race2: 0 }, // Human
|
||||||
uncap: { flb: true, ulb: true, transcendence: false },
|
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 = {
|
export const mockGridCharacter: GridCharacter = {
|
||||||
|
|
@ -43,7 +55,7 @@ export const mockGridCharacterWithRing: GridCharacter = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Characters organized by element for element-specific stories */
|
/** Characters organized by element for element-specific stories */
|
||||||
export const mockCharactersByElement = {
|
export const mockCharactersByElement: Record<string, Character> = {
|
||||||
wind: { ...mockCharacter, id: 'char-wind', element: 1, name: { en: 'Tiamat', ja: 'ティアマト' } },
|
wind: { ...mockCharacter, id: 'char-wind', element: 1, name: { en: 'Tiamat', ja: 'ティアマト' } },
|
||||||
fire: { ...mockCharacter, id: 'char-fire', element: 2, name: { en: 'Colossus', ja: 'コロッサス' } },
|
fire: { ...mockCharacter, id: 'char-fire', element: 2, name: { en: 'Colossus', ja: 'コロッサス' } },
|
||||||
water: {
|
water: {
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,9 @@ export const mockJob: Job = {
|
||||||
id: 'job-1',
|
id: 'job-1',
|
||||||
granblueId: '180001',
|
granblueId: '180001',
|
||||||
name: { en: 'Lumberjack', ja: 'ランバージャック' },
|
name: { en: 'Lumberjack', ja: 'ランバージャック' },
|
||||||
proficiency: [3], // Axe
|
proficiency: [3, 0], // Axe
|
||||||
row: 5,
|
row: 5,
|
||||||
|
order: 1,
|
||||||
ultimateMastery: true
|
ultimateMastery: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -16,6 +17,7 @@ export const mockJobNoUM: Job = {
|
||||||
name: { en: 'Dark Fencer', ja: 'ダークフェンサー' },
|
name: { en: 'Dark Fencer', ja: 'ダークフェンサー' },
|
||||||
proficiency: [1, 2], // Sabre, Dagger
|
proficiency: [1, 2], // Sabre, Dagger
|
||||||
row: 3,
|
row: 3,
|
||||||
|
order: 1,
|
||||||
ultimateMastery: false
|
ultimateMastery: false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -25,11 +27,12 @@ export const mockJobMultiProf: Job = {
|
||||||
name: { en: 'Kengo', ja: 'ケンゴウ' },
|
name: { en: 'Kengo', ja: 'ケンゴウ' },
|
||||||
proficiency: [1, 2], // Sword, Katana
|
proficiency: [1, 2], // Sword, Katana
|
||||||
row: 5,
|
row: 5,
|
||||||
|
order: 1,
|
||||||
ultimateMastery: true
|
ultimateMastery: true
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Jobs organized by row/tier */
|
/** Jobs organized by row/tier */
|
||||||
export const mockJobsByRow = {
|
export const mockJobsByRow: Record<string, Job> = {
|
||||||
row1: { ...mockJob, id: 'job-row1', granblueId: '100001', row: 1, ultimateMastery: false },
|
row1: { ...mockJob, id: 'job-row1', granblueId: '100001', row: 1, ultimateMastery: false },
|
||||||
row2: { ...mockJob, id: 'job-row2', granblueId: '110001', row: 2, ultimateMastery: false },
|
row2: { ...mockJob, id: 'job-row2', granblueId: '110001', row: 2, ultimateMastery: false },
|
||||||
row3: { ...mockJob, id: 'job-row3', granblueId: '120001', row: 3, ultimateMastery: false },
|
row3: { ...mockJob, id: 'job-row3', granblueId: '120001', row: 3, ultimateMastery: false },
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,11 @@ export const mockSummon: Summon = {
|
||||||
name: { en: 'Bahamut', ja: 'バハムート' },
|
name: { en: 'Bahamut', ja: 'バハムート' },
|
||||||
element: 5, // Dark
|
element: 5, // Dark
|
||||||
rarity: 3, // SSR
|
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 = {
|
export const mockGridSummon: GridSummon = {
|
||||||
|
|
@ -42,7 +46,7 @@ export const mockFriendSummon: GridSummon = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Summons organized by element */
|
/** Summons organized by element */
|
||||||
export const mockSummonsByElement = {
|
export const mockSummonsByElement: Record<string, Summon> = {
|
||||||
wind: { ...mockSummon, id: 'summon-wind', element: 1, name: { en: 'Tiamat', ja: 'ティアマト' } },
|
wind: { ...mockSummon, id: 'summon-wind', element: 1, name: { en: 'Tiamat', ja: 'ティアマト' } },
|
||||||
fire: { ...mockSummon, id: 'summon-fire', element: 2, name: { en: 'Colossus', ja: 'コロッサス' } },
|
fire: { ...mockSummon, id: 'summon-fire', element: 2, name: { en: 'Colossus', ja: 'コロッサス' } },
|
||||||
water: { ...mockSummon, id: 'summon-water', element: 3, name: { en: 'Leviathan', ja: 'リヴァイアサン' } },
|
water: { ...mockSummon, id: 'summon-water', element: 3, name: { en: 'Leviathan', ja: 'リヴァイアサン' } },
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,40 @@
|
||||||
import type { Weapon } from '$lib/types/api/entities';
|
import type { Weapon } from '$lib/types/api/entities';
|
||||||
import type { GridWeapon } from '$lib/types/api/party';
|
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 */
|
/** Mock weapon data for Storybook stories */
|
||||||
export const mockWeapon: Weapon = {
|
export const mockWeapon: Weapon = {
|
||||||
id: 'weapon-1',
|
id: 'weapon-1',
|
||||||
|
|
@ -8,9 +42,16 @@ export const mockWeapon: Weapon = {
|
||||||
name: { en: 'Luminiera Sword Omega', ja: 'シュヴァリエソード・マグナ' },
|
name: { en: 'Luminiera Sword Omega', ja: 'シュヴァリエソード・マグナ' },
|
||||||
element: 6, // Light
|
element: 6, // Light
|
||||||
rarity: 3, // SSR
|
rarity: 3, // SSR
|
||||||
series: 1, // Omega
|
maxLevel: 200,
|
||||||
|
maxSkillLevel: 20,
|
||||||
|
maxAwakeningLevel: 9,
|
||||||
|
series: mockOmegaSeries,
|
||||||
proficiency: 1, // Sword
|
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 = {
|
export const mockOpusWeapon: Weapon = {
|
||||||
|
|
@ -19,9 +60,16 @@ export const mockOpusWeapon: Weapon = {
|
||||||
name: { en: 'Cosmic Sword', ja: 'コスミックソード' },
|
name: { en: 'Cosmic Sword', ja: 'コスミックソード' },
|
||||||
element: 6,
|
element: 6,
|
||||||
rarity: 3,
|
rarity: 3,
|
||||||
series: 2, // Opus
|
maxLevel: 250,
|
||||||
|
maxSkillLevel: 20,
|
||||||
|
maxAwakeningLevel: 9,
|
||||||
|
series: mockOpusSeries,
|
||||||
proficiency: 1,
|
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 = {
|
export const mockDraconicWeapon: Weapon = {
|
||||||
|
|
@ -30,9 +78,16 @@ export const mockDraconicWeapon: Weapon = {
|
||||||
name: { en: 'Draconic Harp', ja: 'ドラゴニックハープ' },
|
name: { en: 'Draconic Harp', ja: 'ドラゴニックハープ' },
|
||||||
element: 1, // Wind
|
element: 1, // Wind
|
||||||
rarity: 3,
|
rarity: 3,
|
||||||
series: 3, // Draconic
|
maxLevel: 200,
|
||||||
|
maxSkillLevel: 20,
|
||||||
|
maxAwakeningLevel: 9,
|
||||||
|
series: mockDraconicSeries,
|
||||||
proficiency: 4, // Harp
|
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 = {
|
export const mockGridWeapon: GridWeapon = {
|
||||||
|
|
@ -42,7 +97,6 @@ export const mockGridWeapon: GridWeapon = {
|
||||||
transcendenceStep: 0,
|
transcendenceStep: 0,
|
||||||
mainhand: false,
|
mainhand: false,
|
||||||
weapon: mockWeapon,
|
weapon: mockWeapon,
|
||||||
awakening: null,
|
|
||||||
weaponKeys: [],
|
weaponKeys: [],
|
||||||
ax: []
|
ax: []
|
||||||
};
|
};
|
||||||
|
|
@ -54,13 +108,13 @@ export const mockMainhandWeapon: GridWeapon = {
|
||||||
transcendenceStep: 5,
|
transcendenceStep: 5,
|
||||||
mainhand: true,
|
mainhand: true,
|
||||||
weapon: mockOpusWeapon,
|
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: [],
|
weaponKeys: [],
|
||||||
ax: []
|
ax: []
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Weapons organized by element */
|
/** Weapons organized by element */
|
||||||
export const mockWeaponsByElement = {
|
export const mockWeaponsByElement: Record<string, Weapon> = {
|
||||||
wind: { ...mockWeapon, id: 'weapon-wind', element: 1, name: { en: 'Tiamat Bolt', ja: 'ティアマトボルト' } },
|
wind: { ...mockWeapon, id: 'weapon-wind', element: 1, name: { en: 'Tiamat Bolt', ja: 'ティアマトボルト' } },
|
||||||
fire: {
|
fire: {
|
||||||
...mockWeapon,
|
...mockWeapon,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue