Add boss battles, level caps, and badge tracking
Introduces full boss battle system: data models (BossBattle, BossPokemon, BossResult), API endpoints for CRUD and per-run defeat tracking, and frontend UI including a sticky level cap bar with badge display on the run page, interleaved boss battle cards in the encounter list, and an admin panel section for managing boss battles and their pokemon teams. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -119,3 +119,34 @@ export interface UpdateEvolutionInput {
|
||||
condition?: string | null
|
||||
region?: string | null
|
||||
}
|
||||
|
||||
// Boss battles admin
|
||||
export interface CreateBossBattleInput {
|
||||
name: string
|
||||
bossType: string
|
||||
badgeName?: string | null
|
||||
badgeImageUrl?: string | null
|
||||
levelCap: number
|
||||
order: number
|
||||
afterRouteId?: number | null
|
||||
location: string
|
||||
spriteUrl?: string | null
|
||||
}
|
||||
|
||||
export interface UpdateBossBattleInput {
|
||||
name?: string
|
||||
bossType?: string
|
||||
badgeName?: string | null
|
||||
badgeImageUrl?: string | null
|
||||
levelCap?: number
|
||||
order?: number
|
||||
afterRouteId?: number | null
|
||||
location?: string
|
||||
spriteUrl?: string | null
|
||||
}
|
||||
|
||||
export interface BossPokemonInput {
|
||||
pokemonId: number
|
||||
level: number
|
||||
order: number
|
||||
}
|
||||
|
||||
@@ -127,6 +127,47 @@ export interface UpdateEncounterInput {
|
||||
currentPokemonId?: number
|
||||
}
|
||||
|
||||
// Boss battles
|
||||
export type BossType = 'gym_leader' | 'elite_four' | 'champion' | 'rival' | 'evil_team' | 'other'
|
||||
|
||||
export interface BossPokemon {
|
||||
id: number
|
||||
pokemonId: number
|
||||
level: number
|
||||
order: number
|
||||
pokemon: Pokemon
|
||||
}
|
||||
|
||||
export interface BossBattle {
|
||||
id: number
|
||||
gameId: number
|
||||
name: string
|
||||
bossType: BossType
|
||||
badgeName: string | null
|
||||
badgeImageUrl: string | null
|
||||
levelCap: number
|
||||
order: number
|
||||
afterRouteId: number | null
|
||||
location: string
|
||||
spriteUrl: string | null
|
||||
pokemon: BossPokemon[]
|
||||
}
|
||||
|
||||
export interface BossResult {
|
||||
id: number
|
||||
runId: number
|
||||
bossBattleId: number
|
||||
result: 'won' | 'lost'
|
||||
attempts: number
|
||||
completedAt: string | null
|
||||
}
|
||||
|
||||
export interface CreateBossResultInput {
|
||||
bossBattleId: number
|
||||
result: 'won' | 'lost'
|
||||
attempts?: number
|
||||
}
|
||||
|
||||
// Re-export for convenience
|
||||
import type { NuzlockeRules } from './rules'
|
||||
export type { NuzlockeRules }
|
||||
|
||||
Reference in New Issue
Block a user