v3.0.0: fixed exploits where players could go past floor 20 with cleric

This commit is contained in:
Evan Debenham
2024-12-04 13:54:00 -05:00
parent 555b39147f
commit 26c5a4d12a
2 changed files with 13 additions and 0 deletions
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfFeatherFall; import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfFeatherFall;
@@ -41,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
@@ -58,6 +60,11 @@ public class Chasm implements Hero.Doom {
Game.runOnRenderThread(new Callback() { Game.runOnRenderThread(new Callback() {
@Override @Override
public void call() { public void call() {
if (Dungeon.depth >= 20 && Dungeon.hero.heroClass == HeroClass.CLERIC){
GameScene.show(new WndMessage("Thanks for playing the Alpha!\n\nRuns with the Cleric cap out at floor 20 for the moment, but you'll be able to finish your run closer to the beta releases."));
return;
}
GameScene.show( GameScene.show(
new WndOptions( new Image(Dungeon.level.tilesTex(), 176, 16, 16, 16), new WndOptions( new Image(Dungeon.level.tilesTex(), 176, 16, 16, 16),
Messages.get(Chasm.class, "chasm"), Messages.get(Chasm.class, "chasm"),
@@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Ghoul; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Ghoul;
@@ -215,6 +216,11 @@ public class GameScene extends PixelScene {
return; return;
} }
if (Dungeon.depth > 20 && Dungeon.hero.heroClass == HeroClass.CLERIC){
ShatteredPixelDungeon.switchNoFade(TitleScene.class);
return;
}
Dungeon.level.playLevelMusic(); Dungeon.level.playLevelMusic();
SPDSettings.lastClass(Dungeon.hero.heroClass.ordinal()); SPDSettings.lastClass(Dungeon.hero.heroClass.ordinal());