v0.6.1: reduced the spawn rate of guidebook pages on very early floors
This commit is contained in:
committed by
Evan Debenham
parent
a41309ed66
commit
591b1b570e
+3
-2
@@ -369,9 +369,10 @@ public abstract class RegularLevel extends Level {
|
|||||||
missingPages.remove(Document.GUIDE_INTRO_PAGE);
|
missingPages.remove(Document.GUIDE_INTRO_PAGE);
|
||||||
missingPages.remove(Document.GUIDE_SEARCH_PAGE);
|
missingPages.remove(Document.GUIDE_SEARCH_PAGE);
|
||||||
|
|
||||||
|
int foundPages = allPages.size() - (missingPages.size() + 2);
|
||||||
|
|
||||||
//chance to find a page scales with pages missing and depth
|
//chance to find a page scales with pages missing and depth
|
||||||
if (missingPages.size() > 0 &&
|
if (missingPages.size() > 0 && Random.Float() < (Dungeon.depth/(float)(foundPages + 1))){
|
||||||
Random.Int(allPages.size()-2) < missingPages.size() + Dungeon.depth/2){
|
|
||||||
GuidePage p = new GuidePage();
|
GuidePage p = new GuidePage();
|
||||||
p.page(missingPages.get(0));
|
p.page(missingPages.get(0));
|
||||||
int cell = randomDropCell();
|
int cell = randomDropCell();
|
||||||
|
|||||||
Reference in New Issue
Block a user