v0.8.2a: fixed a crash bug introduced by guidebook changes
This commit is contained in:
parent
e51025de0c
commit
a78df087f6
|
@ -403,7 +403,7 @@ public abstract class RegularLevel extends Level {
|
||||||
missingPages.remove(Document.GUIDE_SEARCH_PAGE);
|
missingPages.remove(Document.GUIDE_SEARCH_PAGE);
|
||||||
|
|
||||||
//chance to find a page scales with pages missing and depth
|
//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){
|
if (Random.Float() < dropChance){
|
||||||
GuidePage p = new GuidePage();
|
GuidePage p = new GuidePage();
|
||||||
p.page(missingPages.get(0));
|
p.page(missingPages.get(0));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user