v0.8.2a: tweaks to very earlygame UX:

- hero select no longer has a back button if a game hasn't been played
- snakes now give a hint when missed 3 times, down from 5.
- sped up guidebook page dropping speed
This commit is contained in:
Evan Debenham 2020-08-13 17:18:48 -04:00
parent 380faca85d
commit fc6a32058e
4 changed files with 14 additions and 11 deletions

View File

@ -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;
}

View File

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

View File

@ -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 {

View File

@ -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){