diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java index fbcccad78..6f9fbb482 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java @@ -59,7 +59,7 @@ public class Snake extends Mob { @Override public String defenseVerb() { dodges++; - if (dodges >= 5 && !Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_1)){ + if (dodges >= 3 && !Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_1)){ GLog.w(Messages.get(this, "hint")); dodges = 0; } 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 28a5a9703..20452a91e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -398,14 +398,13 @@ public abstract class RegularLevel extends Level { } } - //these are dropped specially + //a total of 8 pages drop randomly, 2 pages are specially dropped missingPages.remove(Document.GUIDE_INTRO_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 - if (missingPages.size() > 0 && Random.Float() < (Dungeon.depth/(float)(foundPages + 1))){ + float dropChance = (missingPages.size() + Dungeon.depth) / (float)(allPages.size() - 2); + if (Random.Float() < dropChance){ GuidePage p = new GuidePage(); p.page(missingPages.get(0)); int cell = randomDropCell(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java index bde07d40f..634d5fc7c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java @@ -199,7 +199,7 @@ public class HeroSelectScene extends PixelScene { btnExit = new ExitButton(); btnExit.setPos( Camera.main.width - btnExit.width(), 0 ); - add( btnExit ); + if (!SPDSettings.intro()) add( btnExit ); PointerArea fadeResetter = new PointerArea(0, 0, Camera.main.width, Camera.main.height){ @Override @@ -272,7 +272,11 @@ public class HeroSelectScene extends PixelScene { @Override protected void onBackPressed() { - ShatteredPixelDungeon.switchScene( TitleScene.class ); + if (!SPDSettings.intro()){ + ShatteredPixelDungeon.switchScene(TitleScene.class); + } else { + super.onBackPressed(); + } } private class HeroBtn extends StyledButton { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index 3133fbc35..2713c93b2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -52,7 +52,7 @@ public class WelcomeScene extends PixelScene { final int previousVersion = SPDSettings.version(); - if (ShatteredPixelDungeon.versionCode == previousVersion) { + if (ShatteredPixelDungeon.versionCode == previousVersion && !SPDSettings.intro()) { ShatteredPixelDungeon.switchNoFade(TitleScene.class); return; } @@ -96,7 +96,7 @@ public class WelcomeScene extends PixelScene { @Override protected void onClick() { super.onClick(); - if (previousVersion == 0){ + if (previousVersion == 0 || SPDSettings.intro()){ SPDSettings.version(ShatteredPixelDungeon.versionCode); GamesInProgress.selectedClass = null; GamesInProgress.curSlot = 1; @@ -110,7 +110,7 @@ public class WelcomeScene extends PixelScene { float buttonY = Math.min(topRegion + (PixelScene.landscape() ? 60 : 120), h - 24); - if (previousVersion != 0){ + if (previousVersion != 0 && !SPDSettings.intro()){ StyledButton changes = new StyledButton(Chrome.Type.GREY_BUTTON_TR, Messages.get(TitleScene.class, "changes")){ @Override protected void onClick() { @@ -134,7 +134,7 @@ public class WelcomeScene extends PixelScene { RenderedTextBlock text = PixelScene.renderTextBlock(6); String message; - if (previousVersion == 0) { + if (previousVersion == 0 || SPDSettings.intro()) { message = Messages.get(this, "welcome_msg"); } else if (previousVersion <= ShatteredPixelDungeon.versionCode) { if (previousVersion < LATEST_UPDATE){