UNPKG

dungeon-sdk-drikkx

Version:

Shared types and entities for the Dungeon game

140 lines 3.47 kB
import { CharacterDatabase, CharacterInDungeon } from './character.types'; import { Item } from './item.types'; import { CombatTurn } from './combat.types'; export declare enum DungeonTheme { CAVE = "CAVE", FOREST = "FOREST", RUINS = "RUINS", CASTLE = "CASTLE" } export declare enum DungeonDifficulty { EASY = "EASY", MEDIUM = "MEDIUM", HARD = "HARD", ELITE = "ELITE" } export declare enum DungeonStatus { WAITING = "WAITING", IN_PROGRESS = "IN_PROGRESS", COMPLETED = "COMPLETED", FAILED = "FAILED" } export declare enum RoomType { COMBAT = "COMBAT", ELITE = "ELITE", BOSS = "BOSS" } export declare enum RoomStatus { PENDING = "PENDING", IN_PROGRESS = "IN_PROGRESS", COMPLETED = "COMPLETED" } export declare enum WaveStatus { PENDING = "PENDING", IN_PROGRESS = "IN_PROGRESS", COMPLETED = "COMPLETED" } export interface DungeonWaveDatabase { id: string; roomId: string; waveNumber: number; status: WaveStatus; enemies: CharacterDatabase[]; rewards: Item[]; startTime?: Date | null; endTime?: Date | null; completed: boolean; createdAt: Date; } export interface ExtendedDungeonWave { id: string; roomId: string; waveNumber: number; status: WaveStatus; rewards: Item[]; startTime?: Date | null; endTime?: Date | null; completed: boolean; createdAt: Date; enemies: CharacterInDungeon[]; } export interface DungeonRoomDatabase { id: string; dungeonId: string; type: RoomType; roomNumber: number; status: RoomStatus; completed: boolean; description: string; createdAt: Date; completedAt?: Date | null; waves: DungeonWaveDatabase[]; } export interface ExtendedDungeonRoom { id: string; dungeonId: string; type: RoomType; roomNumber: number; status: RoomStatus; completed: boolean; description: string; createdAt: Date; completedAt?: Date | null; waves: ExtendedDungeonWave[]; } export interface DungeonDatabase { id: string; theme: DungeonTheme; difficulty: DungeonDifficulty; status: DungeonStatus; currentRoom: number; currentWave: number; totalRooms: number; totalWaves: number; party: CharacterDatabase[]; combatHistory: CombatTurn[]; completed: boolean; createdAt: Date; startedAt: Date; completedAt?: Date | null; createdById: string; rooms: DungeonRoomDatabase[]; } export interface ExtendedDungeon { id: string; theme: DungeonTheme; difficulty: DungeonDifficulty; status: DungeonStatus; currentRoom: number; currentWave: number; totalRooms: number; totalWaves: number; party: CharacterInDungeon[]; combatHistory: CombatTurn[]; completed: boolean; createdAt: Date; startedAt: Date; completedAt?: Date | null; createdById: string; rooms: ExtendedDungeonRoom[]; } export interface DungeonDatabaseState { dungeon: DungeonDatabase; currentRoom: number; currentWave: number; activeEnemies: CharacterDatabase[]; waveNumber: number; combatLog: CombatResultDatabase[]; isComplete: boolean; } export interface CombatResultDatabase { success: boolean; action: string; source: CharacterDatabase; target: CharacterDatabase; damage: number; isCritical: boolean; effects: string[]; waveCompleted: boolean; } //# sourceMappingURL=dungeon.types.d.ts.map