diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java index d8957f4fe..3e553e9e5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java @@ -112,13 +112,18 @@ public enum Document { ADVENTURERS_GUIDE.pages.put("Looting", false); ADVENTURERS_GUIDE.pages.put("Magic", false); + //sewers ALCHEMY_GUIDE.pages.put("Potions", false); ALCHEMY_GUIDE.pages.put("Stones", false); ALCHEMY_GUIDE.pages.put("Darts", false); + + //prison ALCHEMY_GUIDE.pages.put("Exotic_Potions", false); ALCHEMY_GUIDE.pages.put("Exotic_Scrolls", false); ALCHEMY_GUIDE.pages.put("Energy_Food", false); ALCHEMY_GUIDE.pages.put("Bombs", false); + + //caves ALCHEMY_GUIDE.pages.put("Catalysts", false); ALCHEMY_GUIDE.pages.put("Brews_Elixirs", false); ALCHEMY_GUIDE.pages.put("Spells", false); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/LaboratoryRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/LaboratoryRoom.java index 1d510d1a6..792122e6c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/LaboratoryRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/LaboratoryRoom.java @@ -84,17 +84,25 @@ public class LaboratoryRoom extends SpecialRoom { } } - //pages after 5 are always deeper than the sewers - if(!missingPages.isEmpty() && (missingPages.size() > 5 || Dungeon.depth > 5)){ - AlchemyPage p = new AlchemyPage(); - p.page(missingPages.get(0)); - int pos; - do { - pos = level.pointToCell(random()); - } while ( - level.map[pos] != Terrain.EMPTY_SP || - level.heaps.get( pos ) != null); - level.drop( p, pos ); + //3 pages in sewers, 7 in prison, 10 in caves+ + int chapterTarget = 4 - (int)Math.ceil(missingPages.size()/3.5f); + + if(!missingPages.isEmpty() && chapter >= chapterTarget){ + + //for each chapter ahead of the target chapter, drop 1 additional page + int pagesToDrop = Math.min(missingPages.size(), (chapter - chapterTarget) + 1); + + for (int i = 0; i < pagesToDrop; i++) { + AlchemyPage p = new AlchemyPage(); + p.page(missingPages.remove(0)); + int pos; + do { + pos = level.pointToCell(random()); + } while ( + level.map[pos] != Terrain.EMPTY_SP || + level.heaps.get(pos) != null); + level.drop(p, pos); + } } if (level instanceof RegularLevel && ((RegularLevel)level).hasPitRoom()){