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:
parent
a841a80d8a
commit
0c9dfd13c8
@ -366,3 +366,6 @@ Habe Highscore und Players in Lobbies auf die einfachst mögliche Art mit Textfl
|
|||||||
|
|
||||||
16.5.2022 - Jonas
|
16.5.2022 - Jonas
|
||||||
Have been working on implementing all sound effects over the last couple of days
|
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
|
Jonas
|
||||||
Jonas, the French delegate
|
Jonas, the French delegate
|
||||||
|
Jonas
|
||||||
|
|||||||
@ -29,10 +29,10 @@ public class ClientGameInfoHandler {
|
|||||||
//just messages
|
//just messages
|
||||||
|
|
||||||
public static final String youGotGhostyfied = "You are now a ghost!";
|
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 youGotKickedOff = "Bye bye - you've been kicked off.";
|
||||||
public static final String humansVotedFor = "Humans voted for: ";
|
public static final String humansVotedFor = "Humans voted for ";
|
||||||
public static final String isAHuman = " but they're a human!";
|
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 gotKickedOff = " is a Ghost and got kicked off.";
|
||||||
public static final String gotGhostyfied = " is now also a ghost!";
|
public static final String gotGhostyfied = " is now also a ghost!";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ public class VoteHandler {
|
|||||||
ghostification. */
|
ghostification. */
|
||||||
int[] noiseAmount = new int[6];
|
int[] noiseAmount = new int[6];
|
||||||
for (int i = 0; i < passengers.length; i++) {
|
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();
|
NoiseHandler n = new NoiseHandler();
|
||||||
noiseAmount = n.noiseNotifier(passengers[i], g, noiseAmount);
|
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
|
.getIsGhost()) { // if player with most votes is human, notify everyone about it
|
||||||
for (Passenger passenger : passengers) {
|
for (Passenger passenger : passengers) {
|
||||||
passenger.send(
|
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
|
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].getIsGhost()) { // if player is a ghost
|
||||||
if (passengers[voteIndex].getIsOG()) { // if ghost is OG --> end game, humans win
|
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);
|
System.out.println(ClientGameInfoHandler.gameOverHumansWin);
|
||||||
return ClientGameInfoHandler.gameOverHumansWin;
|
return ClientGameInfoHandler.gameOverHumansWin;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user