algospaced-dsa / algospaced-ui /src /data /storeCatalog.ts
iamfebin's picture
feat: player economy, item catalog, vault inventory, and companion gifting
aa1fcca
Raw History Blame Contribute Delete
6.37 kB
import type { StoreItem } from '../types/storeTypes';
/**
* Authoritative 12-item catalog for AlgoSpaced OS ("Merchant's Emporium").
* Partitioned evenly into 3 categories: Study Consumables, Desktop Cosmetics, and Companion Gifts.
*/
export const STORE_CATALOG: StoreItem[] = [
// 1. Study Consumables
{
id: 'consumable_streak_freeze',
name: 'Elixir of Frozen Time',
category: 'consumable',
price: 150,
lore: 'A crystalline phial filled with the enchanted sands of Chronos, arresting the relentless march of time when darkness falls.',
icon: 'ShieldAlert',
effect_type: 'streak_freeze',
effect_payload: { freeze_charges: 1 }
},
{
id: 'consumable_hint_scroll',
name: "Archivist's Hint Scroll",
category: 'consumable',
price: 75,
lore: 'An illuminated vellum scroll penned by royal archivists, unravelling algorithmic intuition and pattern landmarks.',
icon: 'Scroll',
effect_type: 'hint_scroll',
effect_payload: { hint_tokens: 1 }
},
{
id: 'consumable_focus_draught',
name: 'Potion of Keen Insight',
category: 'consumable',
price: 100,
lore: 'A sparkling azure potion that heightens mental acuity and doubles gold earned on your next 3 completed review cards.',
icon: 'Sparkles',
effect_type: 'focus_boost',
effect_payload: { multiplier: 2, reviews_remaining: 3 }
},
{
id: 'consumable_campfire_stew',
name: "Hearty Wayfarer's Stew",
category: 'consumable',
price: 50,
lore: 'A steaming bowl of herbal root stew prepared over the campfire coals, dispelling mental fatigue and restoring composure.',
icon: 'Flame',
effect_type: 'focus_boost',
effect_payload: { fatigue_reset: true }
},
// 2. Desktop Cosmetics
{
id: 'cosmetic_crt_scanlines',
name: 'Arcade CRT Phosphor Shader',
category: 'cosmetic',
price: 200,
lore: 'A retro cathode-ray raster filter with nostalgic scanlines, curved CRT edge vignette, and vintage phosphor bloom.',
icon: 'Tv',
effect_type: 'crt_theme',
effect_payload: { overlay_class: 'crt-scanlines-active' }
},
{
id: 'cosmetic_theme_amber',
name: 'Amber Campfire Theme',
category: 'cosmetic',
price: 250,
lore: 'A cozy UI palette featuring warm ember golds, toasted parchment backgrounds, and rustic brass window borders.',
icon: 'Flame',
effect_type: 'palette_theme',
effect_payload: { theme_id: 'amber' }
},
{
id: 'cosmetic_theme_cyber',
name: 'Synthwave Spire Theme',
category: 'cosmetic',
price: 300,
lore: 'Electric neon magenta and cyan hues inspired by the luminous power conduits pulsing beneath the ancient tower.',
icon: 'Cpu',
effect_type: 'palette_theme',
effect_payload: { theme_id: 'cyber' }
},
{
id: 'cosmetic_wallpaper_sanctuary',
name: 'Sanctuary of the Elixir',
category: 'cosmetic',
price: 350,
lore: 'A high-resolution landscape of the distant Ancient Tower glowing beneath the celestial northern aurora.',
icon: 'Image',
effect_type: 'wallpaper',
effect_payload: { wallpaper_url: '/wallpapers/sanctuary_spire.webp' }
},
// 3. Companion Gifts
{
id: 'gift_starflower_tea',
name: 'Soothing Starflower Tea',
category: 'companion_gift',
price: 80,
lore: 'Delicate white alpine blossoms harvested from mountain ridges, brewed into a soothing remedy that cools high fevers.',
icon: 'Flower2',
effect_type: 'aurelia_gift',
effect_payload: { bond_points: 15, emotion: 'smiling_warmly' }
},
{
id: 'gift_silk_shawl',
name: 'Embroidered Silver Shawl',
category: 'companion_gift',
price: 150,
lore: 'A lightweight yet luxuriously warm shawl woven from palace silk and lined with silver thread to fend off freezing winds.',
icon: 'Shirt',
effect_type: 'aurelia_gift',
effect_payload: { bond_points: 30, emotion: 'smiling_warmly' }
},
{
id: 'gift_music_box',
name: 'Celestial Music Box',
category: 'companion_gift',
price: 300,
lore: 'A miniature brass music box that softly plays the lullaby of her childhood palace gardens.',
icon: 'Music',
effect_type: 'aurelia_gift',
effect_payload: { bond_points: 60, emotion: 'excited_expression' }
},
{
id: 'gift_elixir_pendant',
name: 'Glimmer of the Sanctuary',
category: 'companion_gift',
price: 500,
lore: 'A carved crystalline teardrop imbued with starlight that brings radiant hope for her cure.',
icon: 'Gem',
effect_type: 'aurelia_gift',
effect_payload: { bond_points: 100, emotion: 'excited_expression' }
}
];
export const STORE_CATALOG_MAP: Record<string, StoreItem> = STORE_CATALOG.reduce<Record<string, StoreItem>>(
(acc, item) => {
acc[item.id] = item;
return acc;
},
{}
);
// Catalog aliases matching backend routers/store.py
const STORE_ALIASES: Record<string, string> = {
streak_freeze: 'consumable_streak_freeze',
hint_scroll: 'consumable_hint_scroll',
focus_potion: 'consumable_focus_draught',
focus_draught: 'consumable_focus_draught',
coffee_brew: 'consumable_campfire_stew',
campfire_stew: 'consumable_campfire_stew',
crt_amber_phosphor: 'cosmetic_crt_scanlines',
crt_scanlines: 'cosmetic_crt_scanlines',
theme_amber: 'cosmetic_theme_amber',
theme_cyber: 'cosmetic_theme_cyber',
theme_fantasy_dungeon: 'cosmetic_theme_cyber',
wallpaper_royal_library: 'cosmetic_wallpaper_sanctuary',
wallpaper_celestial_citadel: 'cosmetic_wallpaper_sanctuary',
wallpaper_sanctuary: 'cosmetic_wallpaper_sanctuary',
gift_royal_tea: 'gift_starflower_tea',
starflower_tea: 'gift_starflower_tea',
gift_quill: 'gift_silk_shawl',
silk_shawl: 'gift_silk_shawl',
music_box: 'gift_music_box',
gift_celestial_globe: 'gift_elixir_pendant',
elixir_pendant: 'gift_elixir_pendant'
};
for (const [aliasKey, targetId] of Object.entries(STORE_ALIASES)) {
if (STORE_CATALOG_MAP[targetId] && !STORE_CATALOG_MAP[aliasKey]) {
STORE_CATALOG_MAP[aliasKey] = STORE_CATALOG_MAP[targetId];
}
}
export function getStoreItem(id: string): StoreItem | undefined {
return STORE_CATALOG_MAP[id];
}
export function filterCatalogByCategory(category: string): StoreItem[] {
if (!category || category === 'all') {
return STORE_CATALOG;
}
return STORE_CATALOG.filter(item => item.category === category);
}