Retocando habitaciones
This commit is contained in:
@@ -506,28 +506,28 @@ void Game::setScoreBoardColor()
|
||||
const bool isBrightBlack = colorAreEqual(colorBorder, stringToColor(options->palette, "bright_black"));
|
||||
|
||||
// Si el color del borde es negro o negro brillante cambia el texto del marcador a blanco
|
||||
board.color = isBlack || isBrightBlack? stringToColor(options->palette, "white") : colorBorder;
|
||||
board.color = isBlack || isBrightBlack ? stringToColor(options->palette, "white") : colorBorder;
|
||||
}
|
||||
|
||||
// Comprueba si ha finalizado el juego
|
||||
bool Game::checkEndGame()
|
||||
{
|
||||
const bool a = room->getName() == "THE JAIL"; // Estar en la habitación que toca
|
||||
const bool b = board.items >= int(totalItems * 0.9f); // Con mas del 90% de los items recogidos
|
||||
const bool c = player->getRect().x <= 128; // Y en la ubicación que toca (En la puerta)
|
||||
const bool isOnTheRoom = room->getName() == "THE JAIL"; // Estar en la habitación que toca
|
||||
const bool haveTheItems = board.items >= int(totalItems * 0.9f); // Con mas del 90% de los items recogidos
|
||||
const bool isOnTheDoor = player->getRect().x <= 128; // Y en la ubicación que toca (En la puerta)
|
||||
|
||||
if (b)
|
||||
if (haveTheItems)
|
||||
{
|
||||
board.jailEnabled = true;
|
||||
}
|
||||
|
||||
if (a && b && c)
|
||||
if (isOnTheRoom && haveTheItems && isOnTheDoor)
|
||||
{
|
||||
section.name = SECTION_PROG_ENDING;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (options->cheat.jailEnabled && a && c)
|
||||
if (options->cheat.jailEnabled && isOnTheRoom && isOnTheDoor)
|
||||
{
|
||||
section.name = SECTION_PROG_ENDING;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user