SteamWar/FightSystem
Archiviert
13
1

HellsBells #275

Manuell gemergt
Lixfel hat 19 Commits von Hells_bells nach master 2021-06-25 07:17:45 +02:00 zusammengeführt
Nur Änderungen aus Commit 7b0c106128 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -97,19 +97,22 @@ public class HellsBells {
public void startCountdown() { public void startCountdown() {
if (current != State.NONE) { if (current != State.NONE) {
long currentTime = System.currentTimeMillis(); long currentTime = System.currentTimeMillis();
if (current != State.LAST && currentTime >= stateStart + (current.switchAfter * 1000L)) {
if (current != State.PRE) {
if (current != State.LAST && current != State.PRE && currentTime >= stateStart + (current.switchAfter * 1000L)) {
Bukkit.broadcastMessage(FightSystem.PREFIX + "§aDie Bomben fallen nun schneller."); Bukkit.broadcastMessage(FightSystem.PREFIX + "§aDie Bomben fallen nun schneller.");
}
current = current.getNext(); current = current.getNext();
stateStart = currentTime; stateStart = currentTime;
} }
int timer = current.minTime + random.nextInt(current.maxTime - current.minTime); int timer = current.minTime + random.nextInt(current.maxTime - current.minTime);
if (current == State.PRE) { if (current == State.PRE) {
Bukkit.broadcastMessage(FightSystem.PREFIX + (startMessages.get(random.nextInt(startMessages.size())))); Bukkit.broadcastMessage(FightSystem.PREFIX + (startMessages.get(random.nextInt(startMessages.size()))));
current = current.getNext();
} }
currentCountdown = new HellsBellsCountdown(timer, SWSound.BLOCK_NOTE_BASS, true); currentCountdown = new HellsBellsCountdown(timer, SWSound.BLOCK_NOTE_BASS, true);
currentCountdown.enable(); currentCountdown.enable();
} }
@ -212,7 +215,7 @@ public class HellsBells {
private enum State { private enum State {
NONE(0, 0, -1), NONE(0, 0, -1),
PRE(60, 80, 50), PRE(60, 80, 0),
FIRST(40, 60, 5 * 60), FIRST(40, 60, 5 * 60),
SECOND(30, 40, 4 * 60), SECOND(30, 40, 4 * 60),
THIRD(20, 30, 3 * 60), THIRD(20, 30, 3 * 60),