ZPM generating patched. If it won't work this time, imma look for the

razors in the drawer...
This commit is contained in:
ericnerdo 2016-05-15 22:59:06 +02:00
parent 49072956a7
commit 2f8c4b7168

View File

@ -228,7 +228,7 @@ public class Game {
}
while (!source.canHazZPM()) {
int j = 0;
int newSourceCounter = 0;
for (int i = 0; i < dungeon.getMapHeight(); i++) {
compare = source.getAdjacentTile(Direction.getRandom());
@ -236,12 +236,17 @@ public class Game {
source = compare;
}
while(j != 20) {
while(newSourceCounter != 20) {
compare = source.getAdjacentTile(Direction.getRandom());
if (compare != null)
if (!compare.hasZPM() && (compare.playerBaseOnTile == null))
if (compare != null) {
source = compare;
j++;
if (!compare.hasZPM() && (compare.playerBaseOnTile == null)) {
if (source.canHazZPM()) {
break;
}
}
}
newSourceCounter++;
}
}