feat: Implement deck builder magnified card view, land advice, basic land integration, and unlimited time for deck construction.
This commit is contained in:
@@ -190,7 +190,8 @@ export class DraftManager extends EventEmitter {
|
||||
}
|
||||
} else if (draft.status === 'deck_building') {
|
||||
// Check global deck building timer (e.g., 120 seconds)
|
||||
const DECK_BUILDING_Duration = 120000;
|
||||
// Disabling timeout as per request. Set to ~11.5 days.
|
||||
const DECK_BUILDING_Duration = 999999999;
|
||||
if (draft.startTime && (now > draft.startTime + DECK_BUILDING_Duration)) {
|
||||
draft.status = 'complete'; // Signal that time is up
|
||||
updates.push({ roomId, draft });
|
||||
|
||||
@@ -12,6 +12,9 @@ interface CardInstance {
|
||||
position: { x: number; y: number; z: number }; // For freeform placement
|
||||
counters: { type: string; count: number }[];
|
||||
ptModification: { power: number; toughness: number };
|
||||
typeLine?: string;
|
||||
oracleText?: string;
|
||||
manaCost?: string;
|
||||
}
|
||||
|
||||
interface PlayerState {
|
||||
|
||||
@@ -21,6 +21,7 @@ interface Room {
|
||||
hostId: string;
|
||||
players: Player[];
|
||||
packs: any[]; // Store generated packs (JSON)
|
||||
basicLands?: any[];
|
||||
status: 'waiting' | 'drafting' | 'deck_building' | 'playing' | 'finished';
|
||||
messages: ChatMessage[];
|
||||
maxPlayers: number;
|
||||
@@ -29,13 +30,14 @@ interface Room {
|
||||
export class RoomManager {
|
||||
private rooms: Map<string, Room> = new Map();
|
||||
|
||||
createRoom(hostId: string, hostName: string, packs: any[], socketId?: string): Room {
|
||||
createRoom(hostId: string, hostName: string, packs: any[], basicLands: any[] = [], socketId?: string): Room {
|
||||
const roomId = Math.random().toString(36).substring(2, 8).toUpperCase();
|
||||
const room: Room = {
|
||||
id: roomId,
|
||||
hostId,
|
||||
players: [{ id: hostId, name: hostName, isHost: true, role: 'player', ready: false, socketId, isOffline: false }],
|
||||
packs,
|
||||
basicLands,
|
||||
status: 'waiting',
|
||||
messages: [],
|
||||
maxPlayers: 8
|
||||
|
||||
Reference in New Issue
Block a user