Archived
updated diary, fixed kicked off ghosts causing noise bug, who was voted for is announced by name rather than by number, when humans win it says who they voted for / who the OG was. Other small adjustements to vote announcements
This commit is contained in:
@@ -366,3 +366,6 @@ Habe Highscore und Players in Lobbies auf die einfachst mögliche Art mit Textfl
|
||||
|
||||
16.5.2022 - Jonas
|
||||
Have been working on implementing all sound effects over the last couple of days
|
||||
|
||||
17. & 18.5.2022 - Jonas
|
||||
Working on outreach stuff and presentation.
|
||||
@@ -10,3 +10,4 @@ Jonas
|
||||
Jonas
|
||||
Jonas
|
||||
Jonas, the French delegate
|
||||
Jonas
|
||||
|
||||
@@ -29,10 +29,10 @@ public class ClientGameInfoHandler {
|
||||
//just messages
|
||||
|
||||
public static final String youGotGhostyfied = "You are now a ghost!";
|
||||
public static final String youGotKickedOff = "Bye bye - you've been kicked off";
|
||||
public static final String humansVotedFor = "Humans voted for: ";
|
||||
public static final String isAHuman = " but they're a human!";
|
||||
public static final String gotKickedOff = " is a Ghost and got kicked off";
|
||||
public static final String youGotKickedOff = "Bye bye - you've been kicked off.";
|
||||
public static final String humansVotedFor = "Humans voted for ";
|
||||
public static final String isAHuman = ", but they're a human!";
|
||||
public static final String gotKickedOff = " is a Ghost and got kicked off.";
|
||||
public static final String gotGhostyfied = " is now also a ghost!";
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public class VoteHandler {
|
||||
ghostification. */
|
||||
int[] noiseAmount = new int[6];
|
||||
for (int i = 0; i < passengers.length; i++) {
|
||||
if (passengers[i].getIsGhost() && i != newGhostPosition) {
|
||||
if (passengers[i].getIsGhost() && !passengers[i].getKickedOff() && i != newGhostPosition) {
|
||||
NoiseHandler n = new NoiseHandler();
|
||||
noiseAmount = n.noiseNotifier(passengers[i], g, noiseAmount);
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public class VoteHandler {
|
||||
.getIsGhost()) { // if player with most votes is human, notify everyone about it
|
||||
for (Passenger passenger : passengers) {
|
||||
passenger.send(
|
||||
ClientGameInfoHandler.humansVotedFor + voteIndex + ClientGameInfoHandler.isAHuman, game);
|
||||
ClientGameInfoHandler.humansVotedFor + passengers[voteIndex].getName() + ClientGameInfoHandler.isAHuman, game);
|
||||
}
|
||||
|
||||
for (ClientHandler c: game.getLobby().getLobbyClients()) { //send human vote sound to clients
|
||||
@@ -184,6 +184,10 @@ public class VoteHandler {
|
||||
|
||||
if (passengers[voteIndex].getIsGhost()) { // if player is a ghost
|
||||
if (passengers[voteIndex].getIsOG()) { // if ghost is OG --> end game, humans win
|
||||
for (Passenger passenger : passengers) {
|
||||
passenger.send(
|
||||
ClientGameInfoHandler.humansVotedFor + passengers[voteIndex].getName() + ", the Original Ghost!", game);
|
||||
}
|
||||
System.out.println(ClientGameInfoHandler.gameOverHumansWin);
|
||||
return ClientGameInfoHandler.gameOverHumansWin;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user