From 8145b127ba4929504e73c65a6c1ea603074b1474 Mon Sep 17 00:00:00 2001 From: Virizion <9b717b9d4e5f09e89fa3@gmail.com> Date: Tue, 17 Nov 2015 20:04:23 -0500 Subject: [PATCH] Changed the score algorithm so if all players have the same score, nobody is eliminated. --- .../arcade/game/games/speedbuilder/SpeedBuilder.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilder/SpeedBuilder.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilder/SpeedBuilder.java index 2275f1ce8..4f75d5fa3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilder/SpeedBuilder.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/speedbuilder/SpeedBuilder.java @@ -259,6 +259,7 @@ public class SpeedBuilder extends SoloGame { Player lowestPlayer = null; int lowestScore = -1; + boolean allEqual = !_buildRecreations.isEmpty(); for (RecreationData recreation : _buildRecreations.values()) { @@ -268,9 +269,14 @@ public class SpeedBuilder extends SoloGame lowestPlayer = recreation.Player; lowestScore = score; } + + if (score != lowestScore) + { + allEqual = false; + } } - if (lowestPlayer != null) + if (lowestPlayer != null && !allEqual) { Manager.addSpectator(lowestPlayer, true); GetTeamList().get(0).SetPlayerState(lowestPlayer, PlayerState.OUT); @@ -282,6 +288,10 @@ public class SpeedBuilder extends SoloGame EndCheck(); } + + if (allEqual) + Announce(F.main("Build", "Everyone completed the build so nobody was eliminated!")); + _reviewState++; }