void Room::muddaUseLenseOnDegrimer() { assert(_roomIndex >= 0 && _roomIndex <= 5); const TextRef text[] = { TX_MUD0N011, // All of these audio files are identical, but there's one for each room. TX_MUD1N013, TX_MUD2N010, TX_MUD3N016, TX_MUD4N009, TX_MUD5N009, }; giveItem(OBJECT_IALIENDV); loseItem(OBJECT_IDEGRIME); loseItem(OBJECT_ILENSES); _awayMission->mudd.missionScore++; showText(text[_roomIndex]); }
void playGame(unsigned int boardSize, struct Player players[], unsigned int playerCount){ do{ int total = 0; int i, j, k, r = 1; for (i = 0; i < playerCount; i++){ displayBoard(boardSize, players, playerCount); printf("\n%s 's (%c) Turn ", players[i].playerName, players[i].id); total = playerRoll(); players[i].playerPosition += total; if (players[i].playerPosition >= (4 * boardSize - 4)){ players[i].playerPosition = players[i].playerPosition - (4 * boardSize - 4); } stealPrize(players, i, playerCount); if (players[i].playerPosition == 0){ //Analizing Prizes for (j = 0; j < 10; j++) { if (players[i].playerPrizes[j]>10 && players[i].playerPrizes[j]<200){ players[i].playerScore += players[i].playerPrizes[j]; } } if (players[i].playerScore>TOTAL_AMOUNT){ printf("___\n"); printf(" \\_______\n"); printf(" \\++++++|\n"); printf(" \\=====|\n"); printf(" 0--- 0\n"); printf("%s (%c) checked out for $%d\n", players[i].playerName, players[i].id, players[i].playerScore); return 0; } else{ printf("___\n"); printf(" \\_______\n"); printf(" \\++++++|\n"); printf(" \\=====|\n"); printf(" 0--- 0\n"); printf("%s (%c) checked out for $%d\n", players[i].playerName, players[i].id, players[i].playerScore); continue; } } else if (players[i].playerPosition % 3 == 0 && players[i].playerPosition % 5 == 0 && players[i].playerPosition % 7 == 0){ players[i].count = i; winGrandPrize(players); players[i].count = -1; } else if (players[i].playerPosition % 3 == 0 && players[i].playerPosition % 5 == 0){ players[i].count = i; loseItem(players); players[i].count = -1; } else if (players[i].playerPosition % 3 == 0){ players[i].count = i; winPrize(players); players[i].count = -1; } else if (players[i].playerPosition % 5 == 0){ players[i].count = i; loseItem(players); players[i].count = -1; } else if (players[i].playerPosition % 7 == 0){ players[i].count = i; winGrandPrize(players); players[i].count = -1; } else{ printf("You do nothing.\n"); } } } while (true); }