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("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);

View File

@ -84,10 +84,17 @@ public class LaboratoryRoom extends SpecialRoom {
}
}
//pages after 5 are always deeper than the sewers
if(!missingPages.isEmpty() && (missingPages.size() > 5 || Dungeon.depth > 5)){
//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.get(0));
p.page(missingPages.remove(0));
int pos;
do {
pos = level.pointToCell(random());
@ -96,6 +103,7 @@ public class LaboratoryRoom extends SpecialRoom {
level.heaps.get(pos) != null);
level.drop(p, pos);
}
}
if (level instanceof RegularLevel && ((RegularLevel)level).hasPitRoom()){
entrance.set( Door.Type.REGULAR );