diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/VaultRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/VaultRoom.java index 8b2f2186e..1e7ba207e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/VaultRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/VaultRoom.java @@ -33,6 +33,9 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; +import java.util.ArrayList; +import java.util.Arrays; + public class VaultRoom extends SpecialRoom { public void paint( Level level ) { @@ -45,6 +48,8 @@ public class VaultRoom extends SpecialRoom { int cy = (top + bottom) / 2; int c = cx + cy * level.width(); + Random.shuffle(prizeClasses); + switch (Random.Int( 3 )) { case 0: @@ -73,11 +78,12 @@ public class VaultRoom extends SpecialRoom { level.addItemToSpawn( new IronKey( Dungeon.depth ) ); } - private static Item prize( Level level ) { - return Generator.random( Random.oneOf( - Generator.Category.WAND, - Generator.Category.RING, - Generator.Category.ARTIFACT - ) ); + private Item prize( Level level ) { + return Generator.random( prizeClasses.remove(0) ); } + + private ArrayList prizeClasses = new ArrayList<>( + Arrays.asList(Generator.Category.WAND, + Generator.Category.RING, + Generator.Category.ARTIFACT)); }