Files
Dimension-47/server/src/modules/battle/dto/create-battle-map.dto.ts
Alexander Zielonka d6f2b62bd7
All checks were successful
Deploy Dimension47 / deploy (push) Successful in 35s
feat: Add battle screen with real-time sync (Phase 1 MVP)
- Add battle module with sessions, maps, tokens, and combatants
- Implement WebSocket gateway for real-time battle updates
- Add map upload with configurable grid system
- Create battle canvas with token rendering and drag support
- Support PC tokens from characters and NPC tokens from templates
- Add initiative tracking and round management
- GM-only controls for token manipulation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:04:16 +01:00

31 lines
762 B
TypeScript

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsString, IsInt, Min, IsOptional } from 'class-validator';
export class CreateBattleMapDto {
@ApiProperty({ description: 'Map name' })
@IsString()
name: string;
@ApiPropertyOptional({ description: 'Grid columns', default: 20 })
@IsOptional()
@IsInt()
@Min(1)
gridSizeX?: number = 20;
@ApiPropertyOptional({ description: 'Grid rows', default: 20 })
@IsOptional()
@IsInt()
@Min(1)
gridSizeY?: number = 20;
@ApiPropertyOptional({ description: 'Grid X offset', default: 0 })
@IsOptional()
@IsInt()
gridOffsetX?: number = 0;
@ApiPropertyOptional({ description: 'Grid Y offset', default: 0 })
@IsOptional()
@IsInt()
gridOffsetY?: number = 0;
}