diff --git a/src/components/game/tabs/SpireTab.tsx b/src/components/game/tabs/SpireTab.tsx index df936f1..6bc6642 100755 --- a/src/components/game/tabs/SpireTab.tsx +++ b/src/components/game/tabs/SpireTab.tsx @@ -8,7 +8,8 @@ import { ScrollArea } from '@/components/ui/scroll-area'; import { Separator } from '@/components/ui/separator'; import { TooltipProvider, Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; import { BookOpen, ChevronUp, ChevronDown, RotateCcw, X, Mountain, Skull, Zap, Wind, Shield } from 'lucide-react'; -import type { GameStore } from '@/lib/game/types'; +import type { ActivityLogEntry } from '@/lib/game/types'; +import type { GameStore } from '@/lib/game/store'; import { ELEMENTS, GUARDIANS, SPELLS_DEF, SKILLS_DEF, ROOM_TYPE_LABELS } from '@/lib/game/constants'; import { GOLEMS_DEF, getGolemDamage, getGolemAttackSpeed } from '@/lib/game/data/golems'; import { fmt, fmtDec, getFloorElement, canAffordSpellCost, getEnemyName } from '@/lib/game/store'; @@ -490,6 +491,61 @@ export function SpireTab({ store, simpleMode = false }: SpireTabProps) { )} + {/* Activity Log - Show in Spire Mode (simpleMode) */} + {simpleMode && ( + + + Activity Log + + + +
+ {(store.activityLog || []).slice(0, 50).map((entry: ActivityLogEntry, i) => { + // Style based on event type + const getEventStyle = (eventType: string) => { + switch (eventType) { + case 'enemy_defeated': + case 'floor_cleared': + return 'text-green-400'; + case 'damage_dealt': + return 'text-red-400'; + case 'dodge': + return 'text-yellow-400'; + case 'armor_proc': + return 'text-blue-400'; + case 'special_effect': + return 'text-purple-400'; + case 'floor_transition': + return 'text-cyan-400'; + case 'spell_cast': + return 'text-amber-400'; + case 'golem_attack': + return 'text-orange-400'; + case 'puzzle_solved': + return 'text-pink-400'; + default: + return 'text-gray-300'; + } + }; + + return ( +
+ {entry.message} +
+ ); + })} + {(store.activityLog || []).length === 0 && ( +
No activity yet...
+ )} +
+
+
+
+ )} + {/* Crafting Progress (if any) - Only show in normal mode */} {!simpleMode && (store.designProgress || store.preparationProgress || store.applicationProgress) && ( diff --git a/src/lib/game/store.ts b/src/lib/game/store.ts index 8e41826..a1ce171 100755 --- a/src/lib/game/store.ts +++ b/src/lib/game/store.ts @@ -2,7 +2,8 @@ import { create } from 'zustand'; import { persist } from 'zustand/middleware'; -import type { GameState, GameAction, StudyTarget, SpellCost, SkillUpgradeChoice, EquipmentSlot, EquipmentInstance, EnchantmentDesign, DesignEffect, AttunementState, FloorState, EnemyState, RoomType, EquipmentSpellState, ActivityLogEntry } from './types'; +import type { GameState, GameAction, StudyTarget, SpellCost, SkillUpgradeChoice, EquipmentInstance, EnchantmentDesign, DesignEffect, AttunementState, FloorState, EnemyState, RoomType, EquipmentSpellState, ActivityLogEntry } from './types'; +import type { EquipmentSlot } from './data/equipment'; import { ELEMENTS, GUARDIANS,