v0.7.2: rebalanced gain rate for alchemy pages

This commit is contained in:
Evan Debenham 2019-01-25 18:21:49 -05:00
parent e73dffc615
commit c0e1856bb4
2 changed files with 24 additions and 11 deletions

View File

@ -112,13 +112,18 @@ public enum Document {
ADVENTURERS_GUIDE.pages.put("Looting", false); ADVENTURERS_GUIDE.pages.put("Looting", false);
ADVENTURERS_GUIDE.pages.put("Magic", false); ADVENTURERS_GUIDE.pages.put("Magic", false);
//sewers
ALCHEMY_GUIDE.pages.put("Potions", false); ALCHEMY_GUIDE.pages.put("Potions", false);
ALCHEMY_GUIDE.pages.put("Stones", false); ALCHEMY_GUIDE.pages.put("Stones", false);
ALCHEMY_GUIDE.pages.put("Darts", false); ALCHEMY_GUIDE.pages.put("Darts", false);
//prison
ALCHEMY_GUIDE.pages.put("Exotic_Potions", false); ALCHEMY_GUIDE.pages.put("Exotic_Potions", false);
ALCHEMY_GUIDE.pages.put("Exotic_Scrolls", false); ALCHEMY_GUIDE.pages.put("Exotic_Scrolls", false);
ALCHEMY_GUIDE.pages.put("Energy_Food", false); ALCHEMY_GUIDE.pages.put("Energy_Food", false);
ALCHEMY_GUIDE.pages.put("Bombs", false); ALCHEMY_GUIDE.pages.put("Bombs", false);
//caves
ALCHEMY_GUIDE.pages.put("Catalysts", false); ALCHEMY_GUIDE.pages.put("Catalysts", false);
ALCHEMY_GUIDE.pages.put("Brews_Elixirs", false); ALCHEMY_GUIDE.pages.put("Brews_Elixirs", false);
ALCHEMY_GUIDE.pages.put("Spells", false); ALCHEMY_GUIDE.pages.put("Spells", false);

View File

@ -84,17 +84,25 @@ public class LaboratoryRoom extends SpecialRoom {
} }
} }
//pages after 5 are always deeper than the sewers //3 pages in sewers, 7 in prison, 10 in caves+
if(!missingPages.isEmpty() && (missingPages.size() > 5 || Dungeon.depth > 5)){ int chapterTarget = 4 - (int)Math.ceil(missingPages.size()/3.5f);
AlchemyPage p = new AlchemyPage();
p.page(missingPages.get(0)); if(!missingPages.isEmpty() && chapter >= chapterTarget){
int pos;
do { //for each chapter ahead of the target chapter, drop 1 additional page
pos = level.pointToCell(random()); int pagesToDrop = Math.min(missingPages.size(), (chapter - chapterTarget) + 1);
} while (
level.map[pos] != Terrain.EMPTY_SP || for (int i = 0; i < pagesToDrop; i++) {
level.heaps.get( pos ) != null); AlchemyPage p = new AlchemyPage();
level.drop( p, pos ); 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()){ if (level instanceof RegularLevel && ((RegularLevel)level).hasPitRoom()){