v3.0.0: fixed exploits where players could go past floor 20 with cleric
This commit is contained in:
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
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.effects.Speck;
|
||||
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.sprites.MobSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
@@ -58,6 +60,11 @@ public class Chasm implements Hero.Doom {
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
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(
|
||||
new WndOptions( new Image(Dungeon.level.tilesTex(), 176, 16, 16, 16),
|
||||
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.ChampionEnemy;
|
||||
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.mobs.DemonSpawner;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Ghoul;
|
||||
@@ -215,6 +216,11 @@ public class GameScene extends PixelScene {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Dungeon.depth > 20 && Dungeon.hero.heroClass == HeroClass.CLERIC){
|
||||
ShatteredPixelDungeon.switchNoFade(TitleScene.class);
|
||||
return;
|
||||
}
|
||||
|
||||
Dungeon.level.playLevelMusic();
|
||||
|
||||
SPDSettings.lastClass(Dungeon.hero.heroClass.ordinal());
|
||||
|
||||
Reference in New Issue
Block a user