v1.2.2: prevented multiple potion generating special rooms on one floor
This commit is contained in:
@@ -99,6 +99,11 @@ public abstract class SpecialRoom extends Room {
|
||||
PitRoom.class, CrystalVaultRoom.class, CrystalChoiceRoom.class, CrystalPathRoom.class
|
||||
) );
|
||||
|
||||
//only one special that generates a potion per floor
|
||||
private static final ArrayList<Class<? extends SpecialRoom>> POTION_SPAWN_ROOMS = new ArrayList<>( Arrays.asList(
|
||||
PoolRoom.class, SentryRoom.class, StorageRoom.class, ToxicGasRoom.class, MagicalFireRoom.class, TrapsRoom.class
|
||||
) );
|
||||
|
||||
public static ArrayList<Class<? extends Room>> runSpecials = new ArrayList<>();
|
||||
public static ArrayList<Class<? extends Room>> floorSpecials = new ArrayList<>();
|
||||
|
||||
@@ -140,6 +145,9 @@ public abstract class SpecialRoom extends Room {
|
||||
if (CRYSTAL_KEY_SPECIALS.contains(type)){
|
||||
floorSpecials.removeAll(CRYSTAL_KEY_SPECIALS);
|
||||
}
|
||||
if (POTION_SPAWN_ROOMS.contains(type)){
|
||||
floorSpecials.removeAll(POTION_SPAWN_ROOMS);
|
||||
}
|
||||
if (runSpecials.remove( type )) {
|
||||
runSpecials.add( type );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user