From a78df087f6556cf72d329256991e70a02979e379 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 13 Aug 2020 23:23:22 -0400 Subject: [PATCH] v0.8.2a: fixed a crash bug introduced by guidebook changes --- .../shatteredpixeldungeon/levels/RegularLevel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index 7e240a1a3..0b63d06be 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -403,7 +403,7 @@ public abstract class RegularLevel extends Level { missingPages.remove(Document.GUIDE_SEARCH_PAGE); //chance to find a page scales with pages missing and depth - float dropChance = (missingPages.size() + Dungeon.depth) / (float)(allPages.size() - 2); + float dropChance = (missingPages.size() + Dungeon.depth - 1) / (float)(allPages.size() - 2); if (Random.Float() < dropChance){ GuidePage p = new GuidePage(); p.page(missingPages.get(0));