v2.5.1: jumping toward a distant well not clears that landmark entry

This commit is contained in:
Evan Debenham
2024-09-15 11:40:15 -04:00
parent fc6964c15b
commit eab0cd3a3e
2 changed files with 12 additions and 4 deletions

View File

@@ -146,6 +146,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.MiningLevel;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.LevelTransition;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster;
@@ -1638,6 +1639,12 @@ public class Hero extends Char {
}
if (found) break;
}
//Clear blobs that only exist for landmarks.
// Might want to make this a properly if it's used more
if (found && b instanceof WeakFloorRoom.WellID){
b.fullyClear();
}
}
}
}

View File

@@ -31,9 +31,9 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfFeatherFall;
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
@@ -106,9 +106,10 @@ public class Chasm implements Hero.Doom {
if (Dungeon.hero.isAlive()) {
Dungeon.hero.interrupt();
InterlevelScene.mode = InterlevelScene.Mode.FALL;
if (Dungeon.level instanceof RegularLevel) {
Room room = ((RegularLevel)Dungeon.level).room( pos );
InterlevelScene.fallIntoPit = room != null && room instanceof WeakFloorRoom;
if (Dungeon.level instanceof RegularLevel &&
((RegularLevel)Dungeon.level).room( pos ) instanceof WeakFloorRoom){
InterlevelScene.fallIntoPit = true;
Notes.remove(Notes.Landmark.DISTANT_WELL);
} else {
InterlevelScene.fallIntoPit = false;
}