File size: 2,280 Bytes
c703ea3
a46ce65
b66ef35
 
 
5fe1a3d
b66ef35
d9c705e
b66ef35
 
 
 
 
c703ea3
b66ef35
 
a46ce65
c703ea3
b66ef35
c703ea3
b66ef35
 
 
 
5fe1a3d
 
b66ef35
 
 
 
 
 
c703ea3
b66ef35
 
 
 
 
 
 
 
 
 
 
 
 
 
5fe1a3d
b66ef35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7428b13
5435413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import type { PicletType } from '../types/picletTypes';

// Enums
export enum EncounterType {
  WILD_PICLET = 'wildPiclet',
  FIRST_PICLET = 'firstPiclet'
}


// PicletInstance - Individual monster instances owned by the player
export interface PicletInstance {
  id?: number;
  
  // Basic Info
  typeId: string;
  nickname?: string;
  primaryType: PicletType;
  tier: string; // 'low' | 'medium' | 'high' | 'legendary'
  
  // Roster Management
  isInRoster: boolean;
  rosterPosition?: number; // 0-5 when in roster
  
  // Metadata
  caught: boolean; // Whether this Piclet has been caught by the player
  caughtAt?: Date; // When this Piclet was caught (undefined if not caught)
  
  // Original generation data
  imageUrl: string;
  imageData?: string; // Base64 encoded image with transparency
  imageCaption: string;
  concept: string;
  description: string; // Generated monster description
  imagePrompt: string;
}

// Encounter - Game encounters
export interface Encounter {
  id?: number;
  
  // Type
  type: EncounterType;
  
  // Details
  title: string;
  description: string;
  picletTypeId?: string; // For wild piclet encounters
  picletInstanceId?: number; // For first piclet encounters - specific Piclet to catch
  enemyLevel?: number;
  
  // Timing
  createdAt: Date;
}

// GameState - Overall game progress
export interface GameState {
  id?: number;
  
  // Timing
  lastEncounterRefresh: Date;
  lastPlayed: Date;
  
  // Progress (0-1000)
  progressPoints: number;
  trainersDefeated: number;
  picletsCapured: number;
  battlesLost: number;
}


// Trainer Scanning Progress - Track automated trainer piclet generation
export interface TrainerScanProgress {
  id?: number;
  
  // Image Info
  imagePath: string; // e.g., "trainer_images/001_Willow_Snap/image_001.jpg"
  trainerName: string; // e.g., "001_Willow_Snap"
  imageIndex: number; // e.g., 1, 2, 3 for multiple images per trainer
  
  // Processing Status
  status: 'pending' | 'processing' | 'completed' | 'failed';
  
  // Results
  picletInstanceId?: number; // ID of generated piclet if successful
  errorMessage?: string; // Error details if failed
  
  // Timing
  startedAt?: Date;
  completedAt?: Date;
  
  // Remote URL for reference
  remoteUrl: string; // Full HuggingFace URL
}