v0.6.0: special room fixes

This commit is contained in:
Evan Debenham 2017-05-08 13:10:41 -04:00
parent b72d160dc1
commit 2b03f58bc2
2 changed files with 5 additions and 4 deletions

View File

@ -54,7 +54,7 @@ public class MagicWellRoom extends SpecialRoom {
(Class<? extends WellWater>)Random.element( WATERS );
if (waterClass == WaterOfTransmutation.class) {
SpecialRoom.disableGaranteedWell();
SpecialRoom.disableGuaranteedWell();
}
WellWater water = (WellWater)level.blobs.get( waterClass );

View File

@ -67,7 +67,7 @@ public class SpecialRoom extends Room {
public static ArrayList<Class<? extends Room>> runSpecials = new ArrayList<>();
public static ArrayList<Class<? extends Room>> floorSpecials = new ArrayList<>();
private static int pitNeededDepth = Integer.MAX_VALUE;
private static int pitNeededDepth = -1;
private static int guaranteedWellDepth = Integer.MAX_VALUE;
public static void initForRun() {
@ -83,6 +83,7 @@ public class SpecialRoom extends Room {
runSpecials.remove( GardenRoom.class );
}
pitNeededDepth = -1;
guaranteedWellDepth = Random.IntRange( 6, 14 );
Random.shuffle(runSpecials);
}
@ -99,10 +100,10 @@ public class SpecialRoom extends Room {
}
public static void resetPitRoom(int depth){
if (pitNeededDepth == depth) pitNeededDepth = Integer.MAX_VALUE;
if (pitNeededDepth == depth) pitNeededDepth = -1;
}
public static void disableGaranteedWell(){
public static void disableGuaranteedWell(){
guaranteedWellDepth = Integer.MAX_VALUE;
}