From 6e651526489a874c262dbbc578011a84e3a2514a Mon Sep 17 00:00:00 2001 From: Resistencia Dev Date: Mon, 8 Dec 2025 22:39:05 +0100 Subject: [PATCH] feat: Fix victory screens background images - Changed GameBoard background to show mission_success.png for ALLIED_WIN and mission_fail.png for NAZIS_WIN - Hidden board area completely during victory phases - Removed redundant background image from VictoryScreen component - Fixed image extensions from .jpg to .png for victory backgrounds --- client/src/components/GameBoard.tsx | 312 ++++++++++++------------ client/src/components/VictoryScreen.tsx | 12 - 2 files changed, 158 insertions(+), 166 deletions(-) diff --git a/client/src/components/GameBoard.tsx b/client/src/components/GameBoard.tsx index 2304992..81acb99 100644 --- a/client/src/components/GameBoard.tsx +++ b/client/src/components/GameBoard.tsx @@ -291,113 +291,156 @@ export default function GameBoard({ gameState, currentPlayerId, actions }: GameB
- Game Background + Game Background
- {/* --- MAPA TÁCTICO (TABLERO) O CARTA DE MISIÓN --- */} -
- {showBoard ? ( - <> - {/* TABLERO CON TOKENS */} - Tactical Map + {/* --- MAPA TÁCTICO (TABLERO) O CARTA DE MISIÓN O ASSASSIN_PHASE --- */} + {/* No mostrar el tablero en fases de victoria */} + {gameState.phase !== GamePhase.ALLIED_WIN && gameState.phase !== GamePhase.NAZIS_WIN && ( +
+ {gameState.phase === GamePhase.ASSASSIN_PHASE ? ( + /* IMAGEN LASTSHOT PARA ASSASSIN_PHASE */ + <> + Last Shot + {/* Overlay oscuro para mejorar legibilidad */} +
- {/* TOKENS SOBRE EL MAPA */} - {missionCoords.map((coord, idx) => { - const result = gameState.questResults[idx]; - const isCurrent = gameState.currentRound === idx + 1; - - return ( -
- {/* Marcador de Ronda Actual */} - {isCurrent && ( - - Current Round - - )} - - {/* Resultado de Misión (Éxito/Fracaso) */} - {result === true && ( - -
- Success -
-
- )} - {result === false && ( - -
- Fail -
-
- )} -
- ); - })} - - {/* TRACK DE VOTOS FALLIDOS */} -
-
Votos Rechazados
-
- {[...Array(5)].map((_, i) => ( -
- ))} + {/* Título sobre la imagen */} +
+

+ ¡ÚLTIMA OPORTUNIDAD! +

+ {currentPlayer?.role === 'francotirador' ? ( +

+ Francotirador, elige a quién crees que es MARLENE +

+ ) : ( +

+ El Francotirador está decidiendo... +

+ )}
-
- - ) : ( - /* CARTA DE MISIÓN CON TÍTULO */ - <> - {`Mission - {/* Título y subtítulo sobre la carta */} -
-

- Misión {gameState.currentRound} -

-

- {missionNames[gameState.currentRound - 1]} -

-
- - )} -
+ + ) : showBoard ? ( + <> + {/* TABLERO CON TOKENS */} + Tactical Map + + {/* TOKENS SOBRE EL MAPA */} + {missionCoords.map((coord, idx) => { + const result = gameState.questResults[idx]; + const isCurrent = gameState.currentRound === idx + 1; + + return ( +
+ {/* Marcador de Ronda Actual */} + {isCurrent && ( + + Current Round + + )} + + {/* Resultado de Misión (Éxito/Fracaso) */} + {result === true && ( + +
+ Success +
+
+ )} + {result === false && ( + +
+ Fail +
+
+ )} +
+ ); + })} + + {/* TRACK DE VOTOS FALLIDOS */} +
+
Votos Rechazados
+
+ {[...Array(5)].map((_, i) => ( +
+ ))} +
+
+ + ) : ( + /* CARTA DE MISIÓN CON TÍTULO */ + <> + {`Mission + {/* Título y subtítulo sobre la carta */} +
+

+ Misión {gameState.currentRound} +

+

+ {missionNames[gameState.currentRound - 1]} +

+
+ + )} +
+ )} {/* --- ÁREA DE JUEGO (CARTAS Y ACCIONES) --- */}
@@ -677,68 +720,23 @@ export default function GameBoard({ gameState, currentPlayerId, actions }: GameB {/* FASE: ASESINO (FRANCOTIRADOR) */} {gameState.phase === GamePhase.ASSASSIN_PHASE && ( - {/* Imagen de fondo solo para el Francotirador */} {currentPlayer?.role === 'francotirador' && ( -
- Last Shot - {/* Overlay oscuro para mejorar legibilidad */} -
-
- )} - - {/* Fondo oscuro para los demás jugadores */} - {currentPlayer?.role !== 'francotirador' && ( -
- )} - - -

- ¡ÚLTIMA OPORTUNIDAD! -

- {currentPlayer?.role === 'francotirador' ? ( -

- Francotirador, elige a quién crees que es MARLENE -

- ) : ( -

- El Francotirador está decidiendo... -

- )} -
- - {currentPlayer?.role === 'francotirador' && ( - +
{gameState.players .filter(p => p.faction === Faction.ALIADOS) // Solo jugadores Aliados .map(player => ( actions.assassinKill(player.id)} - className="bg-black/60 hover:bg-red-600/70 border-4 border-white/30 hover:border-red-500 p-6 rounded-xl transition-all backdrop-blur-sm" - whileHover={{ scale: 1.1 }} + className="bg-black/60 hover:bg-red-600/70 border-2 border-white/30 hover:border-red-500 p-3 rounded-lg transition-all backdrop-blur-sm flex flex-col items-center gap-2" + whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} > -
+
{player.name}
-

{player.name}

+

{player.name}

))} - +
+ )} + + {currentPlayer?.role !== 'francotirador' && ( +
+ El Francotirador está decidiendo... +
)} )} diff --git a/client/src/components/VictoryScreen.tsx b/client/src/components/VictoryScreen.tsx index ed72d6f..f575ffc 100644 --- a/client/src/components/VictoryScreen.tsx +++ b/client/src/components/VictoryScreen.tsx @@ -36,18 +36,6 @@ export default function VictoryScreen({ gameState, isHost, onRestart, onFinalize initial={{ opacity: 0 }} animate={{ opacity: 1 }} > - {/* Imagen de fondo a pantalla completa */} -
- {isNazisWin - {/* Overlay oscuro para mejorar legibilidad */} -
-
{/* Título de victoria */}