diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java b/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java index 578819f..d21b308 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java @@ -114,7 +114,7 @@ public class HellsBells { private int getStart(int regionSize, int length) { double randomNumber = (random.nextDouble() - random.nextDouble()) / 2 + 0.5; - return (int) (randomNumber * (regionSize - length)); + return Math.max(Math.min((int) (randomNumber * (regionSize - length)), regionSize - length), 0); } private int getHeightStart() {